订单详情不加诊所限制(给互联网医院转的在线复诊留口子)

This commit is contained in:
2025-12-30 10:39:58 +08:00
parent 61508972c0
commit a8f0ea6c9e

View File

@@ -123,7 +123,7 @@ class SystemNoticeController extends BaseAppController
'scene_type' => 1,
'user_id' => \Yii::$app->user->identity->id,
'base_type' => 6
])->groupBy('notice_at')->orderBy('notice_at DESC');
])->orderBy('notice_at DESC');
$this->field = [
@@ -171,18 +171,18 @@ class SystemNoticeController extends BaseAppController
$type = $post['type'];
switch ($type) {
case 'all':
\Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND user_id='.\Yii::$app->user->identity->id.' AND store_id='.$post['store_id'])->execute();
\Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND user_id='.\Yii::$app->user->identity->id/*.' AND store_id='.$post['store_id']*/)->execute();
\Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=99 AND user_id='.\Yii::$app->user->identity->id)->execute();
break;
case 'system':
\Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND (base_type=3 or base_type=4 or base_type=5 or base_type=7) AND user_id='.\Yii::$app->user->identity->id.' AND store_id='.$post['store_id'])->execute();
\Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND (base_type=3 or base_type=4 or base_type=5 or base_type=7) AND user_id='.\Yii::$app->user->identity->id/*.' AND store_id='.$post['store_id']*/)->execute();
\Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=99 AND user_id='.\Yii::$app->user->identity->id)->execute();
break;
case 'order':
\Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=1 AND user_id='.\Yii::$app->user->identity->id.' AND store_id='.$post['store_id'])->execute();
\Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=1 AND user_id='.\Yii::$app->user->identity->id/*.' AND store_id='.$post['store_id']*/)->execute();
break;
case 'doctor_news':
\Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=6 AND user_id='.\Yii::$app->user->identity->id.' AND store_id='.$post['store_id'])->execute();
\Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=6 AND user_id='.\Yii::$app->user->identity->id/*.' AND store_id='.$post['store_id']*/)->execute();
break;
default:
throw new Exception('错误的type');