Merge pull request 'hotfix/and_bug' (#20) from hotfix/and_bug into release

优化下游推广公司搜索
master
陈志 4 years ago
commit 7286e3d157

@ -40,16 +40,20 @@ class PromoteCompanyController extends ThinkController
$is_export = true;
$this->getAggregatePackage();
}
$map = [];
$promotemap=[];
$map = [
"_string" => "1 = 1"
];
$promotemap=[
"_string" => "1 = 1"
];
$company_name = trim(I('company_name'));
//市场部权限begin
$pro_id = getMarketAuthPromoteId();
if($pro_id){
$promotemap["_string"]="p.id in ({$pro_id})";
$promotemap["_string"] .=" AND p.id in ({$pro_id})";
$c_id = throwPromoteIdToCompanyId($pro_id);
$map["_string"]="id in ({$c_id})";
$map["_string"] .=" AND id in ({$c_id})";
}
//市场部权限end
@ -74,11 +78,7 @@ class PromoteCompanyController extends ThinkController
$g_name = $_REQUEST['game_name'];
$g_id = M("Game","tab_")->where("relation_game_name = '{$g_name}'")->field("relation_game_id")->find()['relation_game_id'];
// $reg_str = "([^0-9]|^){$g_id },";
if (isset($map["_string"])) {
$map['_string'] = ' AND concat(",", game_ids, ",") like "%,' . $g_id . ',%"';
}else{
$map["_string"] = ' concat(",", game_ids, ",") like "%,' . $g_id . ',%"';
}
$map["_string"] .= ' AND concat(",", game_ids, ",") like "%,' . $g_id . ',%"';
// $map["game_ids"]=["EXP","REGEXP '{$reg_str}'"];
}
@ -93,11 +93,8 @@ class PromoteCompanyController extends ThinkController
$c_id = -1;
}
$c_id = implode(",", $c_id);
if(isset($map["_string"])){
$map["_string"] .= " ADN id in ($c_id)";
}else{
$map["_string"] = " id in ($c_id)";
}
$map["_string"] .= " AND id in ($c_id)";
}

@ -171,9 +171,9 @@
,util = layui.util;
var data1 =data;
var data2 = [];
if (JSON.parse(data1).data_president) {
var data2 = JSON.parse(data1).data_president.split(",");
data2 = JSON.parse(data1).data_president.split(",");
}
// var dataTransfers = transfer.getData('key123');
// $('#promote_data').val(JSON.stringify(dataTransfers));
@ -210,13 +210,12 @@
}
// data2.push(data[0]['value']);
console.log(data2)
transfer.reload('key123',{elem: '#test4',data: JSON.parse(data1).list,title: ['全部成员', '选中成员'],showSearch: true,value: data2,id: 'key123'});
dataTransfer = transfer.getData('key123');
$('#promote_data').val(JSON.stringify(dataTransfer));
return;
}
}
})

Loading…
Cancel
Save