|
|
|
@ -211,12 +211,38 @@ class PartnerController extends ThinkController
|
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
|
$row = intval(I('row', 0));
|
|
|
|
|
$row = empty($row) ? 10 : $row;//每页条数
|
|
|
|
|
$p = $_REQUEST;
|
|
|
|
|
|
|
|
|
|
if(!IS_ROOT){
|
|
|
|
|
$this->OpAuthList= getModuleControllerAuth();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$map = ["_string"=>"1=1"];
|
|
|
|
|
$map = [];
|
|
|
|
|
if (!empty(I('partner_name'))) {
|
|
|
|
|
$map['partner_name'] = ['like', '%' . I('partner_name') . '%'];
|
|
|
|
|
}
|
|
|
|
|
if (!empty($p['verify_type'])) {
|
|
|
|
|
if($p['verify_type'] == 1){
|
|
|
|
|
$map['partner_id'] = 0;
|
|
|
|
|
}else{
|
|
|
|
|
$map['partner_id'] = ["neq",0];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!empty($p['verify_status'])) {
|
|
|
|
|
$map['verify_status'] = $p['verify_status'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])) {
|
|
|
|
|
$time_start = strtotime($_REQUEST['timestart']);
|
|
|
|
|
$time_end = strtotime($_REQUEST['timeend'])+ 86399;
|
|
|
|
|
$map["create_time"] =['BETWEEN',[$time_start, $time_end]];
|
|
|
|
|
} elseif (isset($_REQUEST['timestart'])) {
|
|
|
|
|
$time_start = strtotime($_REQUEST['timestart']);
|
|
|
|
|
$map["create_time"] =['EGT',$time_start];
|
|
|
|
|
} elseif (isset($_REQUEST['timeend'])) {
|
|
|
|
|
$time_end = strtotime($_REQUEST['timeend'])+ 86399;
|
|
|
|
|
$map["create_time"] = ['ELT',$time_end];
|
|
|
|
|
}
|
|
|
|
|
$model = M("partner_verify", 'tab_');
|
|
|
|
|
$data = $model->where($map)->page($page,$row)->order("FIELD(verify_log,0,1,-1),create_time desc")->select();
|
|
|
|
|
foreach ($data as $k => &$v) {
|
|
|
|
@ -241,8 +267,8 @@ class PartnerController extends ThinkController
|
|
|
|
|
$v['validity_time'] = $validity_start_time . '-' . $validity_end_time;
|
|
|
|
|
$create_time = date("Y-m-d H:i:s",$v["create_time"]);
|
|
|
|
|
|
|
|
|
|
$v["create"]= "{$v['create_admin_account']} <br> {$create_time}";
|
|
|
|
|
$v['verify_log'] = json_decode($v['verify_log'], true);
|
|
|
|
|
$v["create"]= "{$v['verify_log']['create_user']} <br> {$v['verify_log']['create_time']}";
|
|
|
|
|
if(isset($v['verify_log']['verify_user'])){
|
|
|
|
|
if($v['verify_status'] == -1){
|
|
|
|
|
$ts = "审核拒绝";
|
|
|
|
@ -435,12 +461,13 @@ class PartnerController extends ThinkController
|
|
|
|
|
$ids = $_REQUEST['ids'];
|
|
|
|
|
$dbres = M("partner_verify", 'tab_')->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
|
|
|
|
|
foreach($dbres as $k=>&$v){
|
|
|
|
|
if($v['status'] != 0) continue;
|
|
|
|
|
if($v['verify_status'] != 0) continue;
|
|
|
|
|
$v['verify_log'] = json_decode($v['verify_log'],true);
|
|
|
|
|
$v['verify_log']['verify_user']=$this->admininfo["username"];
|
|
|
|
|
$v['verify_log']['verify_time']=date("Y-m-d H:i:s");
|
|
|
|
|
$v['verify_log'] = json_encode($v['verify_log']);
|
|
|
|
|
$v['verify_status']=-1;
|
|
|
|
|
$v["create_time"]=time();
|
|
|
|
|
M("partner_verify", 'tab_')->save($v);
|
|
|
|
|
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('index')]);
|
|
|
|
|
}
|
|
|
|
@ -459,12 +486,13 @@ class PartnerController extends ThinkController
|
|
|
|
|
$PartnerVerify = M("partner_verify", 'tab_');
|
|
|
|
|
$dbres =$PartnerVerify->field("*")->where("id in ({$ids})")->select();
|
|
|
|
|
foreach($dbres as $k=>&$v){
|
|
|
|
|
if($v['status'] != 0) continue;
|
|
|
|
|
if($v['verify_status'] != 0) continue;
|
|
|
|
|
$v['verify_log'] = json_decode($v['verify_log'],true);
|
|
|
|
|
$v['verify_log']['verify_user']=$this->admininfo["username"];
|
|
|
|
|
$v['verify_log']['verify_time']=date("Y-m-d H:i:s");
|
|
|
|
|
$v['verify_log'] = json_encode($v['verify_log']);
|
|
|
|
|
$v['status']=1;
|
|
|
|
|
$v['verify_status']=1;
|
|
|
|
|
$v["create_time"]=time();
|
|
|
|
|
$partner_info = json_decode($v['partner_info'],true);
|
|
|
|
|
if($v['partner_id'] == 0){
|
|
|
|
|
//新增
|
|
|
|
|