|
|
@@ -27,7 +27,10 @@ class MasterWorkerMessageLists extends BaseWorkerDataLists
|
|
|
switch ($msgType){
|
|
|
case 1:
|
|
|
$where[] = ['master_worker_id', '=', $this->userId];
|
|
|
- $where[] = ['show_type', '=', YesNoEnum::NO];
|
|
|
+ $where[] = ['show_type', '=', YesNoEnum::NO] ;
|
|
|
+ if(ServiceWorkLog::where($where)->count() === 0){
|
|
|
+ array_pop($where);
|
|
|
+ }
|
|
|
$lists = ServiceWorkLog::where($where)
|
|
|
->limit($this->limitOffset, $this->limitLength)
|
|
|
->order(['id' => 'desc'])
|
|
|
@@ -38,6 +41,9 @@ class MasterWorkerMessageLists extends BaseWorkerDataLists
|
|
|
case 3:
|
|
|
$where[] = ['worker_id', '=', $this->userId];
|
|
|
$where[] = ['show_type', '=', YesNoEnum::NO];
|
|
|
+ if(MasterWorkerAccountLog::where($where)->count() === 0){
|
|
|
+ array_pop($where);
|
|
|
+ }
|
|
|
$lists = MasterWorkerAccountLog::where($where)
|
|
|
->append(['action_text'])
|
|
|
->limit($this->limitOffset, $this->limitLength)
|