作者 lishaoshuai
1 个管道 的构建 通过 耗费 0 秒

红点漏洞修复

... ... @@ -127,14 +127,19 @@ class LeaveController extends RestBaseController
*/
public function getUnread() {
$condition['parent_id'] = 0;
$condition['is_read'] = 0;
$condition['to_uid|from_uid'] = $this->userId;
$check = Db::name('leave')->where($condition)->field('is_read')->find();
if($check) {
$condition['is_read'] = 0;
$result = Db::name('leave')->where($condition)->field('is_read')->find();
if($result) {
$is_unread = 1;
} else {
$is_unread = 0;
}
} else {
$is_unread = 0;
}
$this->success('获取成功',['is_unread'=>$is_unread]);
}
}
\ No newline at end of file
... ...