优化奖罚排序

master
chenzhi 4 years ago
parent 401ad97cbc
commit 3053461ee5

@ -327,6 +327,7 @@ class StatementMangementController extends ThinkController
->field('r.id')
->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT')
->where($map)
->order("r.id desc")
->group('r.id')
->select();
@ -345,10 +346,11 @@ class StatementMangementController extends ThinkController
$list = M('reward_record', 'tab_')->alias('r')
->field('
r.id, r.relation_game_id, r.settlement_time, r.confirm_time, r.content, r.reward_type, r.creater_id,
r.id, r.relation_game_id, r.settlement_time, r.confirm_time, r.content, r.reward_type, r.creater_id,r.create_time,
rd.id as rid, rd.type as detail_type, rd.company_type as detail_company_type, rd.company_id as detail_company_id , rd.company_name as detail_company_name, rd.settlement_type as detail_settlement_type, rd.promote_account as detail_promote_account,rd.amount as detail_amount
')
->where($map)
->order("rid desc")
->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT')->select();
if ($list) {
$record = [];
@ -397,7 +399,7 @@ class StatementMangementController extends ThinkController
if ($page) {
$this->assign('_page', $page);
}
ksort($record);
krsort($record);
$this->assign('list', $record);
$this->assign('promoters', array_column(M('promote', 'tab_')->where(['level'=>1])->field('id, nickname, account')->select(), null, 'id'));

Loading…
Cancel
Save