This item repair can be said to take a lot of detours, before the question to the complex, after modification, the task is completed automatically return to share ponds commission merchant
1 // to pond owners back bonus 2 . 3 $ OrderDetail = Db :: name ( 'hidden') -> WHERE ( 'ID', 'EQ', $ the orderId ) -> Find (); . 4 $ taskInfo = Db: : name ( 'task') -> WHERE ( 'ID', 'EQ', $ taskld ) -> Find (); // Get Information task according to the task number . 5 $ BusinessID = $ PDO -> Query ( 'SELECT from BusinessID Hide id` = `WHERE '. $ taskInfo [' fish_id ']) -> FETCH (); . 6 IF (hidden) { . 7 $ businessCommission = $ share_fish_percent * $ fish_pay_money / 100 ; 8 $fish_score= $ BusinessCommission ; . 9 // record changes in the details of funds 10 $ business_info = $ PDO -> Query ( 'SELECT * from hidden id` = `WHERE'. $ BusinessID [ 'BusinessID']) -> FETCH (); . 11 Db: : name ( 'business_account_detail') -> INSERT ([ 12 is ' business_id '=> $ BusinessID [' BusinessID '], 13 is ' Balance' => $ business_info [ 'Balance'], 14 'Commission' => $ business_info [ ' commission '], 15 'change_balance' => $fish_score, 16 'change_commission' => 0, 17 'business_balance' => $business_info['balance']+$fish_score, 18 'business_commission' => $business_info['commission'], 19 'content' => '分享鱼塘收益', 20 'type' => 7, 21 'created_at' => time() 22 ]); 23 $pdo->exec('update 隐藏 set balance=' . $fish_score . ' where `id`=' . $businessId['businessId']); 24 }