优化推广公司添加排序

master
chenzhi 4 years ago
parent 4a3cb6f6bb
commit f169d65c1c

@ -150,7 +150,7 @@ class CompanyStatementController extends ThinkController
$data = M("company_statement","tab_") $data = M("company_statement","tab_")
->field("id,withdraw_type,company_name,company_belong,statement_begin_time,statement_end_time,statement_money,platform_amount,verify_status,verify_log,confirm_status,confirm_log,op_time,remark") ->field("id,withdraw_type,company_name,company_belong,statement_begin_time,statement_end_time,statement_money,platform_amount,verify_status,verify_log,confirm_status,confirm_log,op_time,remark")
->where($map) ->where($map)
->order("FIELD(verify_status,0,1,-1,2,3,-2,-3),id desc")->page($page,$row)->select(); ->order("statement_begin_time desc,id desc")->page($page,$row)->select();
foreach($data as $k => &$v) { foreach($data as $k => &$v) {

@ -1054,7 +1054,7 @@ class CompanyStatementPoolController extends ThinkController
$mentBtn = [ $mentBtn = [
"verifyAgree"=>"<a class='butn' id='verifyAgree'>审批通过</a>", "verifyAgree"=>"<a class='butn' id='verifyAgree'>审批通过</a>",
"verifyRefuse"=>"<a class='butn' id='verifyRefuse' style='background-color: red;'>审核拒绝</a>", "verifyRefuse"=>"<a class='butn' id='verifyRefuse' style='background-color: red;'>审核拒绝</a>",
"export"=>"<a class='butn' id='export'>批量导出</a>" "export"=>"<a class='butn' id='export'>导出</a>"
]; ];
$resarr = []; $resarr = [];
foreach ($mentBtn as $k => $v) { foreach ($mentBtn as $k => $v) {

@ -259,7 +259,7 @@ class PromoteCompanyController extends ThinkController
$map["create_time"] = ['ELT',$time_end]; $map["create_time"] = ['ELT',$time_end];
} }
$model = M("promote_company_verify", 'tab_'); $model = M("promote_company_verify", 'tab_');
$data = $model->where($map)->page($page,$row)->order("FIELD(verify_status,0,1,-1,-2,2),id desc")->select(); $data = $model->where($map)->page($page,$row)->order("create_time desc")->select();
foreach ($data as $k => &$v) { foreach ($data as $k => &$v) {
$v['company_info'] = json_decode($v['company_info'],true); $v['company_info'] = json_decode($v['company_info'],true);
if($v['company_id'] == 0){ if($v['company_id'] == 0){
@ -362,6 +362,7 @@ class PromoteCompanyController extends ThinkController
$v['verify_log']['market_time']=date("Y-m-d H:i:s"); $v['verify_log']['market_time']=date("Y-m-d H:i:s");
$v['verify_log'] = json_encode($v['verify_log']); $v['verify_log'] = json_encode($v['verify_log']);
$v['verify_status']=-1; $v['verify_status']=-1;
$v["create_time"] = time();
M("PromoteCompanyVerify", 'tab_')->save($v); M("PromoteCompanyVerify", 'tab_')->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"市场部审核",'url'=>U('index')]); addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"市场部审核",'url'=>U('index')]);
} }
@ -381,6 +382,7 @@ class PromoteCompanyController extends ThinkController
$v['verify_log']['admin_time']=date("Y-m-d H:i:s"); $v['verify_log']['admin_time']=date("Y-m-d H:i:s");
$v['verify_log'] = json_encode($v['verify_log']); $v['verify_log'] = json_encode($v['verify_log']);
$v['verify_status']=-2; $v['verify_status']=-2;
$v["create_time"] = time();
M("PromoteCompanyVerify", 'tab_')->save($v); M("PromoteCompanyVerify", 'tab_')->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('index')]); addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('index')]);
} }

@ -157,6 +157,7 @@ class PromoteCompanyService
$verifyLog['admin_time'] = date("Y-m-d H:i:s"); $verifyLog['admin_time'] = date("Y-m-d H:i:s");
$application['verify_log'] = json_encode($verifyLog); $application['verify_log'] = json_encode($verifyLog);
$application['verify_status'] = 2; $application['verify_status'] = 2;
$application["create_time"] = time();
$companyInfo = json_decode($application['company_info'], true); $companyInfo = json_decode($application['company_info'], true);
$creator = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['username' => $verifyLog['create_user']])->find(); $creator = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['username' => $verifyLog['create_user']])->find();
@ -311,6 +312,7 @@ class PromoteCompanyService
$application['verify_log']['market_time'] = date("Y-m-d H:i:s"); $application['verify_log']['market_time'] = date("Y-m-d H:i:s");
$application['verify_log'] = json_encode($application['verify_log']); $application['verify_log'] = json_encode($application['verify_log']);
$application['verify_status'] = 1; $application['verify_status'] = 1;
$application["create_time"] = time();
M('promote_company_verify', 'tab_')->where(['id' => $application['id']])->save($application); M('promote_company_verify', 'tab_')->where(['id' => $application['id']])->save($application);
addOperationLog(['op_type'=>1, 'key'=> $application['id'], "op_name"=>"市场部审核", 'url'=>U('index')]); addOperationLog(['op_type'=>1, 'key'=> $application['id'], "op_name"=>"市场部审核", 'url'=>U('index')]);
return $application; return $application;

Loading…
Cancel
Save