From d6b8fa208c467a272034154acc940369f073f1dc Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 1 Dec 2020 13:55:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=87=E6=80=BB=E5=88=B7=E6=96=B0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/OldCountController.class.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Application/Admin/Controller/OldCountController.class.php b/Application/Admin/Controller/OldCountController.class.php index f510d5dc3..49cb28cdd 100644 --- a/Application/Admin/Controller/OldCountController.class.php +++ b/Application/Admin/Controller/OldCountController.class.php @@ -10,6 +10,40 @@ namespace Admin\Controller; class OldCountController extends \Think\Controller { + public function oldRewardChange() { + + $data = M("company_statement_info","tab_") + ->where("(fine > 0 or reward > 0) and company_type = 2") + ->select(); + + foreach ($data as $key => $value) { + + $statement_info = json_decode($value['statement_info'],true); + $statement_info[0]['game_list'][0]['fine'] = $value['fine']; + $statement_info[0]['game_list'][0]['reward'] = $value['reward']; + $statement_info = json_encode($statement_info); + + M("company_statement_info","tab_")->where(['id'=>$value['id']])->save(['statement_info'=>$statement_info]); + + } + + + $pool_data = M("company_statement_pool",'tab_')->where(['id'=>['in',[22,27]]])->select(); + foreach ($pool_data as $key => $value) { + + $save = json_decode($value['verify_log'],true); + $save['firstverify_user'] = $save['verify_user']; + $save['firstverify_time'] = $save['verify_time']; + $save = json_encode($save); + + M('company_statement_pool','tab_')->where(['id'=>$value['id']])->save(['verify_log'=>$save]); + + } + + echo "success"; + + } + public function changeCompanyGameidToPromoteGameid() { //默认设为