123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace App\Task;
- use App\Service\Bus\ShanduiBonusServices;
- use App\Model\Transit\TransitWalletTradeList;
- use App\Library\Log;
- class HandleShanduiBonus
- {
- public function execute()
- {
- try {
- $data = TransitWalletTradeList::from('transit_wallet_trade_list as twtl')
- ->leftJoin('transit_wallet as tw','twtl.transferto_address','tw.receive_wallet')
- ->where('twtl.process_status',1)
- ->select('twtl.rid','twtl.tx_hash','twtl.transferto_address','twtl.coin_name','twtl.amount','twtl.sendback_address','twtl.sendback_amount','twtl.sendback_coin_name','tw.rid as transit_wallet_id','tw.send_wallet','tw.send_wallet_privatekey')
- ->limit(100)
- ->get();
- if($data->count() > 0){
-
- $shanduiBonus_services = new ShanduiBonusServices();
-
- $res = $shanduiBonus_services->handleGrant($data);
- }else{
-
- }
- }catch (\Exception $e){
-
- }
- }
-
- protected function log($log_title,$message,$remarks='info'){
- Log::get($remarks,$log_title)->info($message);
- }
- }
|