diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 5f98c6d27..c910dc112 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -149,10 +149,10 @@ class FinancePromoteController extends AdminController $insideBelong = 0; foreach ($data as $key => $value) { - if ($value['company_belong']=='外团') { - $outBelong+=$value['allcount']; - } else { + if ($value['company_belong']=='内团') { $insideBelong+=$value['allcount']; + } else { + $outBelong+=$value['allcount']; } } diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 6ad7ab8af..830528d3e 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -316,7 +316,11 @@ class StatementMangementController extends ThinkController } if ($id) { $upt = M('reward_record', 'tab_')->where(['id'=>$id])->save($data); - return $upt ? $this->success('更新成功', U('StatementMangement/rewardManageList')) : $this->error('更新失败'); + if ($upt === false) { + $this->error('保存失败'); + } else { + $this->success('保存成功', U('StatementMangement/rewardManageList')); + } } else { $data['create_time'] = time(); $data['creater_id'] = is_login(); @@ -609,7 +613,7 @@ class StatementMangementController extends ThinkController $statement = M('statement','tab_') ->field('ext_field') - ->where(['ext_field'=>['like','%,%']]) + ->where(['statement_type'=>2]) ->select(); $withdrawData = []; @@ -624,7 +628,10 @@ class StatementMangementController extends ThinkController } - $thisWithdraw = explode(',',$_REQUEST['withdraw']); +// $thisWithdraw = explode(',',$_REQUEST['withdraw']); + $thisWithdraw = explode(',',M('statement','tab_')->where(['id'=>$_REQUEST['id']])->find()['ext_field']); +// dump($thisWithdraw);die(); + foreach ($data as $key => $value) { // $data[$key]['settlement_begin_time'] = date("Y-m-d H:i:s", $data[$key]['settlement_begin_time']); @@ -795,6 +802,8 @@ class StatementMangementController extends ThinkController $is_save = M('statement','tab_')->where(['id'=>$_REQUEST['withdraw_id']])->save($data); +// echo M('statement','tab_')->_sql();die(); + if ($is_save) { $this->ajaxReturn(['status'=>1,'msg'=>'修改成功']); } else { diff --git a/Application/Admin/Model/WithdrawModel.class.php b/Application/Admin/Model/WithdrawModel.class.php index 75b82fb75..a591165cb 100644 --- a/Application/Admin/Model/WithdrawModel.class.php +++ b/Application/Admin/Model/WithdrawModel.class.php @@ -498,7 +498,7 @@ class WithdrawModel extends Model{ { $promoteGameRatioMap['status'] = 1; $promoteGameRatioMap['promote_id'] = $promote['id']; - $promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time') + $promoteGameRatios = M('promote_game_ratio', 'tab_')->field('game_id, ratio, turnover_ratio, begin_time, end_time') ->where($promoteGameRatioMap) ->order('update_time desc') ->select(); @@ -566,7 +566,7 @@ class WithdrawModel extends Model{ $promoteGameRatioMap['status'] = 1; $promoteGameRatioMap['promote_id'] = $promote['id']; - $promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time') + $promoteGameRatios = M('promote_game_ratio', 'tab_')->field('game_id, ratio, turnover_ratio, begin_time, end_time') ->where($promoteGameRatioMap) ->order('update_time desc') ->select(); diff --git a/Application/Admin/View/FinancePromote/index.html b/Application/Admin/View/FinancePromote/index.html index 2e1ae29a4..1e4a00369 100644 --- a/Application/Admin/View/FinancePromote/index.html +++ b/Application/Admin/View/FinancePromote/index.html @@ -258,7 +258,7 @@
账户余额
¥{$income.balance}已提现总金额
¥{$income.withdrawn_amount}未提现金额
¥{$income.not_withdrawn_amount}已实际提现总金额
¥{$income.withdrawn_amount}未实际提现金额
¥{$income.not_withdrawn_amount}结算周期
{$settlementCycle}