From 14be887ebb1fcc162a8175162fdce3347f6e98ae Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 25 Jan 2021 15:38:36 +0800 Subject: [PATCH] =?UTF-8?q?1.28=E5=8A=9F=E8=83=BD=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 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/OldCountController.class.php b/Application/Admin/Controller/OldCountController.class.php index 2bacb3e9e..f9d2a5551 100644 --- a/Application/Admin/Controller/OldCountController.class.php +++ b/Application/Admin/Controller/OldCountController.class.php @@ -364,14 +364,29 @@ class OldCountController extends \Think\Controller 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[0]['fine'] = $value['fine']; + $statement_info[0]['reward'] = $value['reward']; $statement_info = json_encode($statement_info); M("company_lack_statement_info","tab_")->where(['id'=>$value['id']])->save(['statement_info'=>$statement_info]); } + $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]['fine'] = $value['fine']; + $statement_info[0]['reward'] = $value['reward']; + $statement_info = json_encode($statement_info); + + M("company_statement_info","tab_")->where(['id'=>$value['id']])->save(['statement_info'=>$statement_info]); + + } + echo "success"; }