...
|
...
|
@@ -127,11 +127,16 @@ class LeaveController extends RestBaseController |
|
|
*/
|
|
|
public function getUnread() {
|
|
|
$condition['parent_id'] = 0;
|
|
|
$condition['is_read'] = 0;
|
|
|
$condition['to_uid|from_uid'] = $this->userId;
|
|
|
$result = Db::name('leave')->where($condition)->field('is_read')->find();
|
|
|
if($result) {
|
|
|
$is_unread = 1;
|
|
|
$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;
|
|
|
}
|
...
|
...
|
|