|
|
@ -65,6 +65,11 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
$reg_str = "([^0-9]|^){$g_id },";
|
|
|
|
$reg_str = "([^0-9]|^){$g_id },";
|
|
|
|
$map["game_ids"]=["EXP","REGEXP '{$reg_str}'"];
|
|
|
|
$map["game_ids"]=["EXP","REGEXP '{$reg_str}'"];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($_REQUEST['is_sign_contact'])) {
|
|
|
|
|
|
|
|
$map["is_sign_contact"]=$_REQUEST['is_sign_contact'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($_REQUEST['pay_type'])) {
|
|
|
|
if (isset($_REQUEST['pay_type'])) {
|
|
|
|
$pay_type = $_REQUEST['pay_type'];
|
|
|
|
$pay_type = $_REQUEST['pay_type'];
|
|
|
|
$promote_id = M("president_deposit","tab_")->where("pay_type = '$pay_type'")->group("promote_id")->getField("promote_id",true);
|
|
|
|
$promote_id = M("president_deposit","tab_")->where("pay_type = '$pay_type'")->group("promote_id")->getField("promote_id",true);
|
|
|
@ -86,6 +91,7 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// dd($map);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$page = intval(I('get.p', 0));
|
|
|
|
$page = intval(I('get.p', 0));
|
|
|
@ -114,7 +120,7 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
$v["company_belong"] = getCompanyBlong($v["company_belong"]);
|
|
|
|
$v["company_belong"] = getCompanyBlong($v["company_belong"]);
|
|
|
|
$v["develop_type"] = getCompanyRelation($v["develop_type"]);
|
|
|
|
$v["develop_type"] = getCompanyRelation($v["develop_type"]);
|
|
|
|
$v['company_type'] = $v['company_type'] == 2 ? '个人' : '公司';
|
|
|
|
$v['company_type'] = $v['company_type'] == 2 ? '个人' : '公司';
|
|
|
|
$v['is_sign_contract'] = $v['is_sign_contract'] ? '是' : '否';
|
|
|
|
$v['is_sign_contact'] = $v['is_sign_contact'] ? '是' : '否';
|
|
|
|
|
|
|
|
|
|
|
|
$contract_start_time = $v['company_info']['contact_begin'] ?
|
|
|
|
$contract_start_time = $v['company_info']['contact_begin'] ?
|
|
|
|
time_format($v['company_info']['contact_begin'], 'Y/m/d') : '-';
|
|
|
|
time_format($v['company_info']['contact_begin'], 'Y/m/d') : '-';
|
|
|
@ -127,6 +133,9 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
$validity_end_time = $v['company_info']['validity_end_time'] ?
|
|
|
|
$validity_end_time = $v['company_info']['validity_end_time'] ?
|
|
|
|
time_format($v['company_info']['validity_end_time'], 'Y/m/d') : '-';
|
|
|
|
time_format($v['company_info']['validity_end_time'], 'Y/m/d') : '-';
|
|
|
|
$v['validity_time'] = $validity_start_time . '-' . $validity_end_time;
|
|
|
|
$v['validity_time'] = $validity_start_time . '-' . $validity_end_time;
|
|
|
|
|
|
|
|
if(!$is_export){
|
|
|
|
|
|
|
|
$v['can_del'] = $this->promoteCompanyIsCanDel($v["id"]) ? 1 : 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
//遍历获取游戏信息
|
|
|
|
//遍历获取游戏信息
|
|
|
|
if(empty($v["game_ids"])){
|
|
|
|
if(empty($v["game_ids"])){
|
|
|
|
$senddata=false;
|
|
|
|
$senddata=false;
|
|
|
@ -1200,7 +1209,7 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
$promoteres = M("Promote","tab_")
|
|
|
|
$promoteres = M("Promote","tab_")
|
|
|
|
->alias('p')
|
|
|
|
->alias('p')
|
|
|
|
->field("p.id,p.company_id,p.account,p.game_ids,d.amount,IFNULL(d.pay_way,-1) pay_way,d.status,d.pay_type")
|
|
|
|
->field("p.id,p.company_id,p.account,p.game_ids,d.amount,IFNULL(d.pay_way,-1) pay_way,d.status,d.pay_type")
|
|
|
|
->join("tab_president_deposit as d ON p.id = d.promote_id")
|
|
|
|
->join("tab_president_deposit as d ON p.id = d.promote_id","left")
|
|
|
|
->where($promotemap)
|
|
|
|
->where($promotemap)
|
|
|
|
->select();
|
|
|
|
->select();
|
|
|
|
// dd($promoteres);
|
|
|
|
// dd($promoteres);
|
|
|
@ -1316,6 +1325,15 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
$rid = M('game', 'tab_')->field('relation_game_id')->where(["id"=>["in",$ids]])->group("relation_game_id")->select();
|
|
|
|
$rid = M('game', 'tab_')->field('relation_game_id')->where(["id"=>["in",$ids]])->group("relation_game_id")->select();
|
|
|
|
return implode(",",array_column($rid,'relation_game_id'));
|
|
|
|
return implode(",",array_column($rid,'relation_game_id'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function promoteCompanyIsCanDel($company_id){
|
|
|
|
|
|
|
|
$r = M("Promote","tab_")->where("company_id={$company_id}")->count();
|
|
|
|
|
|
|
|
if($r > 0){
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|