取消修改oa-换绑

master
zhanglingsheng 5 years ago
parent d7c241855a
commit 74f016adb2

@ -307,8 +307,7 @@ class FengHuoApi2Controller extends GetInfoBaseController{
$order = 'm.create_time asc'; $order = 'm.create_time asc';
$data = M('mend as m', 'tab_') $data = M('mend as m', 'tab_')
->join('tab_user as u on m.user_id = u.id','LEFT') ->join('tab_user as u on m.user_id = u.id','LEFT')
->join('tab_promote as p on m.promote_id_to = p.id','LEFT') ->field('m.user_id,m.create_time,m.promote_account,m.promote_account_to,m.bind_type,m.user_account,u.register_time')
->field('m.user_id,m.create_time,m.promote_account,m.promote_account_to,m.bind_type,m.user_account,u.register_time,p.company_belong')
->where($where) ->where($where)
->order($order) ->order($order)
->page($page, $row) ->page($page, $row)
@ -316,12 +315,12 @@ class FengHuoApi2Controller extends GetInfoBaseController{
foreach ($data as $k => $v) { foreach ($data as $k => $v) {
$bindType = $v['bind_type']; $bindType = $v['bind_type'];
if ($v['company_belong'] == 1 || $bindType == 2) { if ($bindType == 1) {
$data[$k]['bind_type'] = 'Out';
} elseif($bindType == 1) {
$data[$k]['bind_type'] = 'In'; $data[$k]['bind_type'] = 'In';
}elseif($bindType == 2){
$data[$k]['bind_type'] = 'Out';
} }
unset($data[$k]['company_belong']);
} }
if ($data) { if ($data) {
$result = [ $result = [
@ -337,6 +336,7 @@ class FengHuoApi2Controller extends GetInfoBaseController{
} }
Log::write('bindHistory:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($result), 'INFO'); Log::write('bindHistory:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($result), 'INFO');
return $this->ajaxReturn($result); return $this->ajaxReturn($result);
} }
} }
Loading…
Cancel
Save