|
|
|
@ -26,7 +26,8 @@ class PartnerController extends ThinkController
|
|
|
|
|
public function lists()
|
|
|
|
|
{
|
|
|
|
|
$model = M($this->modelName, 'tab_');
|
|
|
|
|
$map = [];
|
|
|
|
|
$now = time();
|
|
|
|
|
$map = ["_string" => "1=1 "];
|
|
|
|
|
$id = intval(I('id', 0));
|
|
|
|
|
if (!empty($id)) {
|
|
|
|
|
$map['tab_partner.id'] = $id;
|
|
|
|
@ -56,6 +57,14 @@ class PartnerController extends ThinkController
|
|
|
|
|
$time_end = strtotime($_REQUEST['timeend'])+ 86399;
|
|
|
|
|
$map["_string"] = "(contract_start_time <= {$time_end} ) OR (contract_end_time <= {$time_end})";
|
|
|
|
|
}
|
|
|
|
|
if (!empty(I('contract_type'))) {
|
|
|
|
|
if(I('contract_type') == 1){
|
|
|
|
|
$map['_string'] .= " AND (contract_end_time = 0 OR contract_end_time > {$now})";
|
|
|
|
|
}else{
|
|
|
|
|
$map['_string'] .= " AND (contract_end_time <= {$now} AND contract_end_time != 0)";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($_REQUEST['original_package_name']) {
|
|
|
|
|
$game_map['original_package_name'] = ['like',"%{$_REQUEST['original_package_name']}%"];
|
|
|
|
@ -241,6 +250,14 @@ class PartnerController extends ThinkController
|
|
|
|
|
$contract_end_time = $value['contract_end_time'] ? time_format($value['contract_end_time'], 'Y/m/d') : '-';
|
|
|
|
|
}
|
|
|
|
|
$value['contract_time'] = $contract_start_time . '-' . $contract_end_time;
|
|
|
|
|
//判断合同是否过期
|
|
|
|
|
if($value['contract_end_time'] == 0){
|
|
|
|
|
$value['contract_str'] = "未过期";
|
|
|
|
|
}elseif($value['contract_end_time']-0+86399 < time()){
|
|
|
|
|
$value['contract_str'] = "<span style='color:red;'>已过期</span>";
|
|
|
|
|
}else{
|
|
|
|
|
$value['contract_str'] = "未过期";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$validity_start_time = $value['validity_start_time'] ? time_format($value['validity_start_time'], 'Y/m/d') : '-';
|
|
|
|
|
if($value['validity_start_time']){
|
|
|
|
@ -265,7 +282,7 @@ class PartnerController extends ThinkController
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dd($parseData);
|
|
|
|
|
if($is_export){
|
|
|
|
|
$this->assign('listData', $parseData);
|
|
|
|
|
$GetData = $_GET;
|
|
|
|
|