OA关联-修改为全部重新获取

master
zhanglingsheng 5 years ago
parent 41e976e9da
commit a6d0bfc2d9

@ -100,7 +100,8 @@ unset($_REQUEST['parent_id']);
}
}
$promote = D(self::model_name)->field('id,account')->where(['oa_associated' => 0])->order('id DESC')->select();
// $promote = D(self::model_name)->field('id,account')->where(['oa_associated' => 0])->order('id DESC')->select(); //只获取之前未关联
$promote = D(self::model_name)->field('id,account')->order('id DESC')->select(); //全部重新获取
$oa_data = array_column($oa_data, 'platform_account');
foreach($promote as $k => $v) {
$v['account'] = trim($v['account']);
@ -115,10 +116,10 @@ unset($_REQUEST['parent_id']);
if(I('oa_associated',-1) == -1) {
foreach($list_data as $k => $v)
{
$list_data[$k]['account'] = trim($v['account']);
if($v['oa_associated'] != 1) {
$oa_data[] = $list_data[$k]['account'];
}
// $list_data[$k]['account'] = trim($v['account']);
// if($v['oa_associated'] != 1) {
$oa_data[] = trim($v['account']);
// }
}
if(!empty($oa_data))
{

Loading…
Cancel
Save