master
zhanglingsheng 5 years ago
parent 391eed0b78
commit 988bf99086

@ -70,20 +70,48 @@ unset($_REQUEST['parent_id']);
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find());
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
$list_data = D(self::model_name)->where($map)->order('id DESC')->page($p,$row)->select();
$arr['time'] = time();
ksort($arr);
reset($arr);
$sign = md5(http_build_query($arr) . 'wmkjtx_kj213');
$arr['sign'] = $sign;
$reData = curl_post('http://oa.76ba.com/api/wanmeng/platformAccount',$arr);
$reData = json_decode($reData,true)['data'];
$oa = array_column($reData, 'platform_account');
// $arr['time'] = time();
// $arr['page'] = 1;
// $arr['pageSize'] = 1000;
// ksort($arr);
// reset($arr);
// $sign = md5(http_build_query($arr) . 'wmkjtx_kj213');
// $arr['sign'] = $sign;
// $reData = curl_post('http://oa.76ba.com/api/wanmeng/platformAccount',$arr);
// $reData = json_decode($reData,true)['data'];
// $oa = array_column($reData, 'platform_account');
// foreach($list_data as $k => $v)
// {
// if($v['oa_associated'] != 1) {
// $oa_val = in_array($v['account'], $oa) ? 1 : 0;
// $list_data[$k]['oa_associated'] = $oa_val;
// M('promote','tab_')->where(['id' => $v['id']])->setField(['oa_associated' => $oa_val]);
// }
// }
$oa_data = [];
foreach($list_data as $k => $v)
{
if($v['oa_associated'] != 1) {
$oa_val = in_array($v['account'], $oa) ? 1 : 0;
$list_data[$k]['oa_associated'] = $oa_val;
M('promote','tab_')->where(['id' => $v['id']])->setField(['oa_associated' => $oa_val]);
$oa_data[] = $v['account'];
}
}
if(!empty($oa_data))
{
$arr['time'] = time();
$arr['account'] = implode(",", $oa_data);
ksort($arr);
reset($arr);
$sign = md5(http_build_query($arr) . 'wmkjtx_kj213');
$arr['sign'] = $sign;
$reData = curl_post('http://oa.76ba.com/api/wanmeng/verifyBind',$arr);
$reData = json_decode($reData,true)['data'];
foreach($list_data as $k => $v)
{
if(in_array($v['account'], $reData))
{
$list_data[$k]['oa_associated'] = $reData[$v['account']];
M('promote','tab_')->where(['id' => $v['id']])->setField(['oa_associated' => $reData[$v['account']]]);
}
}
}
$count = D(self::model_name)->count();

@ -173,7 +173,7 @@
<th>商务专员</th>
<th>状态</th>
<th>身份状态</th>
<th>oa-关联</th>
<th>oa关联</th>
<th>可申请游戏</th>
<th>操作</th>
</tr>

Loading…
Cancel
Save