作者 王智

xiugao

... ... @@ -1021,27 +1021,36 @@ class User extends Api
$List = [];
$SonUserArray = Db::name('group')->where('fuser_id', $UserId)->order('createtime desc')->select();
if (!empty($SonUserArray)) {
foreach ($SonUserArray as $k => $v) {
if ($params['status'] == 1) {
//未测试
if ($params['status'] == 1) {
//未测试
foreach ($SonUserArray as $k => $v) {
$Weiceshi = Db::name('sleep')->where('user_id', $v['user_id'])->find();
if (empty($Weiceshi)) {
$UserArray[] = $v['user_id'];
}
} elseif ($params['status'] == 2) {
//未下单
}
}
if ($params['status'] == 2) {
//未下单
foreach ($SonUserArray as $k => $v) {
$WeiOrder = Db::name('order')->where('user_id', $v['user_id'])->find();
if (empty($WeiOrder)) {
$UserArray[] = $v['user_id'];
}
} elseif ($params['status'] == 3) {
//已下单
}
}
if ($params['status'] == 3) {
//已下单
foreach ($SonUserArray as $k => $v) {
$UpOrder = Db::name('order')->where('user_id', $v['user_id'])->where('status', 'IN', '1,2')->find();
if (!empty($UpOrder)) {
$UserArray[] = $v['user_id'];
}
} elseif ($params['status'] == 4) {
//已完成
}
}
if ($params['status'] == 4) {
//已完成
foreach ($SonUserArray as $k => $v) {
$OnOrder = Db::name('order')->where('user_id', $v['user_id'])->where('status', 3)->find();
if (!empty($OnOrder)) {
$UserArray[] = $v['user_id'];
... ...