mongo.py 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. import datetime, time
  2. from datetime import timedelta, date
  3. import pymongo
  4. def connect_to_mongodb():
  5. teleclient = pymongo.MongoClient('mongodb://127.0.0.1:27017/')
  6. # teleclient["admin"].authenticate("root", "xxxxx",mechanism='SCRAM-SHA-1')
  7. global bot, mydb, shang_text, caigou, heixiazi, shiyong, zlbbb, sdbbb, ywysf, dkzl, sdzz, designated, byzl, tjishuju, user_status, wzjdsj, zzclient, dj, cgtixian, Voting, lssj, web, miner, tjadd, supercomputing, buykuangji, buy_records, profit_records, jiangli, jlzhidu, daily_release, xsefhpz, yue_zlsshi, Rental
  8. mydb = teleclient['TRXNL3bot'] #数据库名
  9. bot = mydb['bot']
  10. heixiazi = mydb['heixiazi']
  11. shang_text = mydb['shang_text']
  12. Rental = mydb['Rental']
  13. caigou = mydb['caigou']
  14. shiyong = mydb['shiyong']
  15. zlbbb = mydb['zlbbb']
  16. sdbbb = mydb['sdbbb']
  17. ywysf = mydb['ywysf']
  18. dkzl = mydb['dkzl']
  19. sdzz = mydb['sdzz']
  20. byzl = mydb['byzl']
  21. tjishuju = mydb['tjishuju']
  22. designated = mydb['designated']
  23. user_status = mydb['user_status']
  24. wzjdsj = mydb['wzjdsj']
  25. cgtixian = mydb['cgtixian']
  26. zzclient = mydb['zzclient']
  27. Voting = mydb['Voting']
  28. lssj = mydb['lssj']
  29. miner = mydb['miner']
  30. tjadd = mydb['tjadd']
  31. buykuangji = mydb['buykuangji']
  32. supercomputing = mydb['supercomputing']
  33. buy_records = mydb['buy_records']
  34. profit_records = mydb['profit_records']
  35. jiangli = mydb['jiangli']
  36. jlzhidu = mydb['jlzhidu']
  37. daily_release = mydb['daily_release']
  38. xsefhpz = mydb['xsefhpz']
  39. yue_zlsshi = mydb['yue_zlsshi']
  40. mydb1 = teleclient['zhongzhuanzhan']
  41. dj = mydb1['dj']
  42. mydb2 = teleclient['wangzhan']
  43. web = mydb2['web']
  44. if shang_text.find_one({}) == None:
  45. shangtext('质押倍数', 2.6)
  46. shangtext('波场汇率', 16.63)
  47. shangtext('兑入差', 1)
  48. shangtext('兑出差', 1)
  49. shangtext('有U手续费', 1)
  50. shangtext('无U手续费', 2)
  51. shangtext('监控尾随按钮文本', '')
  52. shangtext('监控尾随按钮', b'\x80\x03]q\x00.')
  53. shangtext('能量单飞到网站', 0)
  54. shangtext('获利比例', 0)
  55. shangtext('预估能量', 1)
  56. shangtext('自动质押', 0)
  57. shangtext('钱包TRX余额大于多少质押', 4000)
  58. shangtext('预留TRX质押', 2000)
  59. chaosuanjiedian(1, 200, 30000, 0.05)
  60. chaosuanjiedian(2, 1000, 90000, 0.1)
  61. chaosuanjiedian(3, 5000, 300000, 0.2)
  62. chaosuanjiedian(4, 30000, 600000, 0.3)
  63. chaosuanjiedian(5, 60000, 1800000, 0.4)
  64. chaosuanjiedian(6, 100000, 5000000, 0.5)
  65. Energy_Miner('A型能量算力', 200, 300, 2, 1)
  66. Energy_Miner('B型能量算力', 1000, 1800, 12, 1.2)
  67. Energy_Miner('C型能量算力', 5000, 10000, 65, 1.3)
  68. Energy_Miner('D型能量算力', 30000, 70000, 450, 1.5)
  69. zduguize('上三代', 0.05, 0.05, 0.05)
  70. zduguize('上二代', 0.05, 0.05, 0.05)
  71. zduguize('上一代', 0.05, 0.05, 0.05)
  72. zduguize('下一代', 0.05, 0.05, 0.05)
  73. zduguize('下二代', 0.05, 0.05, 0.05)
  74. zduguize('下三代', 0.05, 0.05, 0.05)
  75. xixsefhpeiz('全球能量销售额', 0.01)
  76. xixsefhpeiz('全球能量算力', 0.05)
  77. Rental_duration(7, 0)
  78. Rental_duration(30, 0.05)
  79. Rental_duration(90, 0.1)
  80. Rental_duration(180, 0.15)
  81. Rental_duration(365, 0.2)
  82. def xixsefhpeiz(projectname, sl):
  83. xsefhpz.insert_one({
  84. 'projectname': projectname,
  85. 'sl': sl
  86. })
  87. def chaosuanjiedian(level, gerensuanli, tuanduisuanli, sl):
  88. supercomputing.insert_one({
  89. 'level': level,
  90. 'gerensuanli': gerensuanli,
  91. 'tuanduisuanli': tuanduisuanli,
  92. 'sl': sl
  93. })
  94. def tjadd_data(trc20, user_id, fullname, timer):
  95. tjadd.insert_one({
  96. 'trc20': trc20,
  97. 'user_id': user_id,
  98. 'fullname': fullname,
  99. 'timer': timer
  100. })
  101. def Rental_duration(days, sy):
  102. Rental.insert_one({
  103. 'days': days,
  104. 'sy': sy
  105. })
  106. def Energy_Miner(projectname, price, cz, sl, sy):
  107. miner.insert_one({
  108. 'projectname': projectname,
  109. 'price': price,
  110. 'cz': cz,
  111. 'sl': sl,
  112. 'sy': sy,
  113. })
  114. def Voting_data(TRX, piaoshu, jiangli,tranhash, timer):
  115. Voting.insert_one({
  116. 'TRX': TRX,
  117. 'piaoshu': piaoshu,
  118. 'jiangli': jiangli,
  119. 'tranhash': tranhash,
  120. 'timer': timer
  121. })
  122. def jydddatae(bianhao, user_id, money,weishu, timer):
  123. dj.insert_one({
  124. 'bianhao': bianhao,
  125. 'user_id': user_id,
  126. 'money': money,
  127. 'weishu': weishu,
  128. 'timer': timer
  129. })
  130. def user_status_time(chat_id):
  131. user_status.insert_one({
  132. 'chat_id': chat_id
  133. })
  134. def meitianshuju(timer, zong, shi, yu, shiyonglv, mtshifan):
  135. tjishuju.insert_one({
  136. 'timer': timer,
  137. 'zong': zong,
  138. 'shi': shi,
  139. 'yu': yu,
  140. 'shiyonglv': shiyonglv,
  141. 'mtshifan': mtshifan
  142. })
  143. def designdata(user_id, duitype, money, weisui, trc20, timer):
  144. designated.insert_one({
  145. 'user_id': user_id,
  146. 'duitype': duitype,
  147. 'money': money,
  148. 'weisui': weisui,
  149. 'trc20': trc20,
  150. 'timer': timer
  151. })
  152. def sdzzdata(user_id, firstname, titype, trc20, money, beizhu, timer):
  153. sdzz.insert_one({
  154. 'user_id': user_id,
  155. 'firstname': firstname,
  156. 'titype': titype,
  157. 'trc20': trc20,
  158. 'money': money,
  159. 'beizhu': beizhu,
  160. 'timer': timer
  161. })
  162. def sydata(tranhash):
  163. shiyong.insert_one({
  164. 'tranhash': tranhash
  165. })
  166. def zzdata(api, key):
  167. zzclient.insert_one({
  168. 'api': api,
  169. 'key': key
  170. })
  171. def kehuduanurl(api, key):
  172. kehuduan = mydb['kehuduan']
  173. kehuduan.insert_one({
  174. 'api': api,
  175. 'key': key,
  176. 'tcid': 0,
  177. })
  178. def blockdata(transaction_id,transferType, ownerAddress, toAddress, money, timestamp,rztext,cztext):
  179. qukuai = mydb['qukuai']
  180. qukuai.insert_one({
  181. 'transaction_id': transaction_id,
  182. 'transferType': transferType,
  183. 'ownerAddress': ownerAddress,
  184. 'toAddress': toAddress,
  185. 'pinjie': f'{ownerAddress},{toAddress}',
  186. 'money': money,
  187. 'timestamp': timestamp,
  188. 'rztext': rztext,
  189. 'cztext': cztext,
  190. 'TTYK': 0
  191. })
  192. def heixiazitrc20(trc20, trcstate, timer):
  193. heixiazi.insert_one({
  194. 'trc20': trc20,
  195. 'trcstate': trcstate,
  196. 'timer': timer
  197. })
  198. def zulinnengliangbaobiao(ywy_id,timestamp, tranhash, txid, user_id, owner, amount, money, today_money, shengmoney, resource,receiver, pencount, quantity, days, createtime, Expiration):
  199. zlbbb.insert_one({
  200. 'ywy_id': ywy_id,
  201. 'timestamp': timestamp,
  202. 'tranhash': tranhash,
  203. 'txid': txid,
  204. 'user_id': user_id,
  205. 'owner': owner,
  206. 'amount': amount,
  207. 'money': money,
  208. 'today_money': today_money,
  209. 'shengmoney': shengmoney,
  210. 'resource': resource,
  211. 'receiver': receiver,
  212. 'pencount': pencount,
  213. 'quantity': quantity,
  214. 'days': days,
  215. 'createtime': createtime,
  216. 'Expiration': Expiration,
  217. 'authxf': 0
  218. })
  219. def tixian_data(bianhao,money,leixing,huilv,timer):
  220. cgtixian.insert_one({
  221. 'bianhao': bianhao,
  222. 'money': money,
  223. 'leixing': leixing,
  224. 'huilv': huilv,
  225. 'timer': timer
  226. })
  227. def caigouda(bianhao,TRX,shuliang,timer):
  228. caigou.insert_one({
  229. 'bianhao': bianhao,
  230. 'TRX': TRX,
  231. 'shuliang': shuliang,
  232. 'timer': timer,
  233. 'state': 0,
  234. 'money': 0
  235. })
  236. def bots(token, port):
  237. bot.insert_one({
  238. 'token': token,
  239. 'port': port,
  240. 'state': 'auto'
  241. })
  242. def shangtext(projectname, text):
  243. shang_text.insert_one({
  244. 'projectname': projectname,
  245. 'text': text
  246. })
  247. def bdaddressdata(bot_id, user_id, today_money, creation_time):
  248. bdadd = mydb[f'bdadd{bot_id}']
  249. bdadd.insert_one({
  250. 'bot_id': bot_id,
  251. 'user_id': user_id,
  252. 'today_money': today_money,
  253. 'creation_time': creation_time
  254. })
  255. def yue_zlsshidata(bot_id, user_id, trc20, today_money, wusuijishu, shengmoney, zzmoney, timer):
  256. yue_zlsshi.insert_one({
  257. 'bot_id': bot_id,
  258. 'user_id': user_id,
  259. 'trc20': trc20,
  260. 'today_money': today_money,
  261. 'wusuijishu': wusuijishu,
  262. 'shengmoney': shengmoney,
  263. 'zzmoney': zzmoney,
  264. 'timer': timer
  265. })
  266. def pledge_library(bot_id, user_id, trc20, today_money, wusuijishu, shengmoney, zzmoney, timer):
  267. library = mydb[f'library{bot_id}']
  268. library.insert_one({
  269. 'bot_id': bot_id,
  270. 'user_id': user_id,
  271. 'trc20': trc20,
  272. 'today_money': today_money,
  273. 'wusuijishu': wusuijishu,
  274. 'shengmoney': shengmoney,
  275. 'zzmoney': zzmoney,
  276. 'timer': timer
  277. })
  278. def addressdata(bot_id, user_id, trc20, timer, change_timer):
  279. address = mydb[f'address{bot_id}']
  280. address.insert_one({
  281. 'user_id': [user_id],
  282. 'trc20': trc20,
  283. 'timer': timer,
  284. 'change_timer': change_timer,
  285. 'USDT': 0,
  286. 'TRX': 0,
  287. 'tjcs': 1,
  288. 'syn': False,
  289. 'del': False
  290. })
  291. def wallet_data(bot_id, projectname, trc20, sign, USDT, TRX, timer):
  292. wallet = mydb[f'wallet{bot_id}']
  293. wallet.insert_one({
  294. 'bot_id': bot_id,
  295. 'projectname': projectname,
  296. 'trc20': trc20,
  297. 'sign': sign,
  298. 'USDT': USDT,
  299. 'TRX': TRX,
  300. 'TRXstate': 0,
  301. 'USDTstate': 0,
  302. 'timer': timer
  303. })
  304. def beiyongzl(trc20, sign, USDT, TRX, timer):
  305. byzl.insert_one({
  306. 'trc20': trc20,
  307. 'sign': sign,
  308. 'USDT': USDT,
  309. 'TRX': TRX,
  310. 'TRXstate': 0,
  311. 'USDTstate': 0,
  312. 'timer': timer,
  313. 'zhiya': 0,
  314. 'shiyong': 0
  315. })
  316. def keybutton(bot_id, Row, first):
  317. key = mydb[f'key{bot_id}']
  318. key.insert_one({
  319. 'bot_id': bot_id,
  320. 'Row': Row,
  321. 'first': first,
  322. 'projectname': '点击修改内容',
  323. 'text': '',
  324. 'file_id': '',
  325. 'file_type': '',
  326. 'key_text': '',
  327. 'keyboard': b'\x80\x03]q\x00.',
  328. 'entities': b'\x80\x03]q\x00.'
  329. })
  330. def print_telegram(bot_id, transaction_id, trc20, cztext):
  331. print_tg = mydb[f'print_tg{bot_id}']
  332. print_tg.insert_one({
  333. 'bot_id': bot_id,
  334. 'transaction_id': transaction_id,
  335. 'trc20': trc20,
  336. 'text': cztext,
  337. })
  338. def ywysifa(ywy_id, projectname, text, file_id, key_text, keyboard, send_type):
  339. ywysf.insert_one({
  340. 'ywy_id': ywy_id,
  341. 'projectname': projectname,
  342. 'text': text,
  343. 'file_id': file_id,
  344. 'key_text': key_text,
  345. 'keyboard': keyboard,
  346. 'send_type': send_type,
  347. 'state': 1,
  348. 'entities': b'\x80\x03]q\x00.'
  349. })
  350. def sifatuwen(bot_id, projectname, text, file_id, key_text, keyboard, send_type):
  351. sftw = mydb[f'sfwt{bot_id}']
  352. sftw.insert_one({
  353. 'bot_id': bot_id,
  354. 'projectname': projectname,
  355. 'text': text,
  356. 'file_id': file_id,
  357. 'key_text': key_text,
  358. 'keyboard': keyboard,
  359. 'send_type': send_type,
  360. 'state': 1,
  361. 'entities': b'\x80\x03]q\x00.'
  362. })
  363. def shanduiywybaobiao(ywy_id, timestamp, txid, zztype, user_id, trc20, projectname, USDT, TRX, text, tranhash, timer):
  364. sdbbb.insert_one({
  365. 'ywy_id': ywy_id,
  366. 'timestamp': timestamp,
  367. 'txid': txid,
  368. 'zztype': zztype,
  369. 'user_id': user_id,
  370. 'trc20': trc20,
  371. 'projectname': projectname,
  372. 'USDT': USDT,
  373. 'TRX': TRX,
  374. 'text': text,
  375. 'tranhash': tranhash,
  376. 'timer': timer,
  377. 'zlstate': 0
  378. })
  379. def userlogdata(bot_id, order_id, timestamp, txid, zztype, user_id, trc20, projectname, USDT, TRX, text, tranhash, timer):
  380. user_log = mydb[f'user_log{bot_id}']
  381. user_log.insert({
  382. 'bot_id': bot_id,
  383. 'order_id': order_id,
  384. 'timestamp': timestamp,
  385. 'txid': txid,
  386. 'zztype': zztype,
  387. 'user_id': user_id,
  388. 'trc20': trc20,
  389. 'projectname': projectname,
  390. 'USDT': USDT,
  391. 'TRX': TRX,
  392. 'text': text,
  393. 'tranhash': tranhash,
  394. 'timer': timer,
  395. 'zlstate': 0
  396. })
  397. def user_data(bot_id, count_id, user_id, username, firstname, lastname, fullname, creation_time,
  398. last_contact_time,code):
  399. user = mydb[f'user{bot_id}']
  400. user.insert_one({
  401. 'count_id': count_id,
  402. 'user_id': user_id,
  403. 'username': username,
  404. 'firstname': firstname,
  405. 'lastname': lastname,
  406. 'fullname': fullname,
  407. 'state': '1',
  408. 'USDT': 0,
  409. 'TRX': 0,
  410. 'creation_time': creation_time,
  411. 'last_contact_time': last_contact_time,
  412. 'code': code,
  413. 'sign': 0,
  414. 'tycs': 0,
  415. 'tgtycs': 0,
  416. 'grade': 'ptuser',
  417. 'dengji': 'L0',
  418. 'dazhe': 1,
  419. 'gerensuanli': 0,
  420. 'tuanduisuanli': 0,
  421. 'lang': ''
  422. })
  423. def management(bot_id, user_id, trc20, today_money, wusuijishu, shengmoney, zzmoney, timer):
  424. order = mydb[f'order{bot_id}']
  425. order.insert_one({
  426. 'bot_id': bot_id,
  427. 'user_id': user_id,
  428. 'trc20': trc20,
  429. 'today_money': today_money,
  430. 'wusuijishu': wusuijishu,
  431. 'shengmoney': shengmoney,
  432. 'zzmoney': zzmoney,
  433. 'timer': timer
  434. })
  435. def pledge_data(projectname, bot_id, order_id, timestamp, tranhash, txid, user_id, owner, amount, money, today_money, shengmoney, resource,
  436. receiver, pencount, quantity, days, createtime, Expiration):
  437. pledge = mydb[f'pledge{bot_id}']
  438. pledge.insert_one({
  439. 'projectname': projectname,
  440. 'bot_id': bot_id,
  441. 'order_id': order_id,
  442. 'timestamp': timestamp,
  443. 'tranhash': tranhash,
  444. 'txid': txid,
  445. 'user_id': user_id,
  446. 'owner': owner,
  447. 'amount': amount,
  448. 'money': money,
  449. 'today_money': today_money,
  450. 'shengmoney': shengmoney,
  451. 'resource': resource,
  452. 'receiver': receiver,
  453. 'pencount': pencount,
  454. 'quantity': quantity,
  455. 'days': days,
  456. 'createtime': createtime,
  457. 'Expiration': Expiration,
  458. 'authxf': 0
  459. })
  460. def zqbdata(bot_id,projectname,transaction_id,transferType,ownerAddress,toAddress,money,timestamp):
  461. zqb = mydb[f'zqb{bot_id}']
  462. zqb.insert_one({
  463. 'bot_id': bot_id,
  464. 'projectname': projectname,
  465. 'transaction_id': transaction_id,
  466. 'transferType': transferType,
  467. 'ownerAddress': ownerAddress,
  468. 'toAddress': toAddress,
  469. 'money': money,
  470. 'timestamp': timestamp
  471. })
  472. def get_order(bot_id):
  473. return mydb[f'order{bot_id}']
  474. def get_zqb(bot_id):
  475. return mydb[f'zqb{bot_id}']
  476. def get_qukuai():
  477. return mydb['qukuai']
  478. def get_kehuduan():
  479. return mydb['kehuduan']
  480. def get_library(bot_id):
  481. return mydb[f'library{bot_id}']
  482. def get_pledge(bot_id):
  483. return mydb[f'pledge{bot_id}']
  484. def get_bdadd(bot_id):
  485. return mydb[f'bdadd{bot_id}']
  486. def get_user_log(bot_id):
  487. return mydb[f'user_log{bot_id}']
  488. def get_wallet(bot_id):
  489. return mydb[f'wallet{bot_id}']
  490. def get_sftw(bot_id):
  491. return mydb[f'sfwt{bot_id}']
  492. def get_print_tg(bot_id):
  493. return mydb[f'print_tg{bot_id}']
  494. def get_group(bot_id):
  495. return mydb[f'user{bot_id}']
  496. def get_address(bot_id):
  497. return mydb[f'address{bot_id}']
  498. def get_key(bot_id):
  499. return mydb[f'key{bot_id}']
  500. def get_tiyan(bot_id):
  501. return mydb[f'tylog{bot_id}']
  502. def tiyanlog(bot_id,bianhao, user_id, firstname,owner, receiver, amount, timer,Expiration, txid):
  503. tylog = mydb[f'tylog{bot_id}']
  504. tylog.insert_one({
  505. 'bot_id': bot_id,
  506. 'bianhao': bianhao,
  507. 'user_id': user_id,
  508. 'firstname': firstname,
  509. 'owner': owner,
  510. 'receiver': receiver,
  511. 'amount': amount,
  512. 'timer': timer,
  513. 'Expiration': Expiration,
  514. 'txid': txid,
  515. })
  516. def daikuanlog(bianhao, user_id, firstname,owner, receiver, timer,Expiration, txid):
  517. dkzl.insert_one({
  518. 'bianhao': bianhao,
  519. 'user_id': user_id,
  520. 'firstname': firstname,
  521. 'owner': owner,
  522. 'receiver': receiver,
  523. 'timer': timer,
  524. 'Expiration': Expiration,
  525. 'txid': txid,
  526. })
  527. def zduguize(projectname, energy_sales, Acceleration_bonus, Computational):
  528. jlzhidu.insert_one({
  529. 'projectname': projectname,
  530. 'energy_sales': energy_sales,
  531. 'Acceleration_bonus': Acceleration_bonus,
  532. 'Computational': Computational
  533. })
  534. # import string,random
  535. # def activation_code(id,length=10):
  536. # prefix = hex(int(id))[2:]+ 'L'
  537. # length = length - len(prefix)
  538. # chars=string.ascii_letters+string.digits
  539. # return prefix + ''.join([random.choice(chars) for i in range(length)])
  540. def zzhzcad(money):
  541. money = float(money) if str(money).count('.') > 0 else int(money)
  542. money = round(money, 6)
  543. return money
  544. if __name__ == '__main__':
  545. connect_to_mongodb()
  546. from decimal import Decimal
  547. Rental.delete_many({})
  548. # Rental_duration(7, 0)
  549. # Rental_duration(30, 0.05)
  550. # Rental_duration(90, 0.1)
  551. # Rental_duration(180, 0.15)
  552. # Rental_duration(365, 0.2)
  553. # get_group(5853415365).update_many({},{"$set":{"lang": 'zh'}})
  554. # for i in list(jiangli.find({})):
  555. # timer = i['timer']
  556. # dt = datetime.datetime.strptime(timer, "%Y-%m-%d %H:%M:%S")
  557. # # 加上24小时
  558. # dt_plus_24h = dt + timedelta(hours=24)
  559. # # 将结果转回时间字符串
  560. # new_time_str = dt_plus_24h.strftime("%Y-%m-%d %H:%M:%S")
  561. # ddid = i['_id']
  562. # jiangli.update_one({'_id': ddid},{"$set":{'midnight_tomorrow_str': new_time_str}})
  563. # uid = '5baaf819-870a-46da-a2c5-96406fed7d90'
  564. # xgdict = {str(5963475006): {"state": 1}}
  565. # jiangli.update_one({"mining_machine_id": uid}, {"$set": {f'{user_id}.state': 0}})
  566. # get_group(bot_id).update_many({},{"$set":{'dengji': 'L0'}})
  567. # supercomputing.drop({})
  568. # chaosuanjiedian(1, 200, 30000, 0.05)
  569. # chaosuanjiedian(2, 1000, 90000, 0.1)
  570. # chaosuanjiedian(3, 5000, 300000, 0.2)
  571. # chaosuanjiedian(4, 30000, 600000, 0.3)
  572. # chaosuanjiedian(5, 60000, 1800000, 0.4)
  573. # chaosuanjiedian(6, 100000, 5000000, 0.5)
  574. # Energy_Miner('A型能量矿机', 200, 300, 2, 1)
  575. # Energy_Miner('B型能量矿机', 1000, 1800, 12, 1.2)
  576. # Energy_Miner('C型能量矿机', 5000, 10000, 65, 1.3)
  577. # Energy_Miner('D型能量矿机', 30000, 70000, 450, 1.5)
  578. # rule = supercomputing.find_one({"gerensuanli": {"$lte": 0}, "tuanduisuanli": {"$lte": 0}},
  579. # sort=[("level", pyDESCENDING)])
  580. # print(rule)
  581. # buy_records.update_many({},{"$set":{"state": 0}})