作者 王智

接口

... ... @@ -480,16 +480,16 @@ class Index extends Api
->where(['s.cloud_type' => 2])
->where(['s.plane_type' => 4])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as aid,p.name as aname,s.plane_type as aplane_type,s.status as astatus,s.user_id as auser_id')
->field('s.id as bid,p.name as bname,s.plane_type as bplane_type,s.status as bstatus,s.user_id as buser_id')
->select();
foreach ($xiawu4 as $k => $v) {
if ($v['auser_id'] != null) {
$user = Db::name('user')->where(['id' => $v['auser_id']])->find();
$xiawu4[$k]['anickname'] = $user['nickname'];
$xiawu4[$k]['avip'] = $user['vip'];
if ($v['buser_id'] != null) {
$user = Db::name('user')->where(['id' => $v['buser_id']])->find();
$xiawu4[$k]['bnickname'] = $user['nickname'];
$xiawu4[$k]['bvip'] = $user['vip'];
} else {
$xiawu4[$k]['anickname'] = null;
$xiawu4[$k]['avip'] = null;
$xiawu4[$k]['bnickname'] = null;
$xiawu4[$k]['bvip'] = null;
}
}
foreach ($xiawu1 as $key => $vo) {
... ...