|
|
@@ -20,6 +20,7 @@ use app\common\model\external\ExternalConsultation;
|
|
|
use app\common\logic\BaseLogic;
|
|
|
use app\common\model\external\ExternalConsultationFollowLog;
|
|
|
use app\common\model\external\ExternalConsultationOrder;
|
|
|
+use think\facade\Cache;
|
|
|
use think\facade\Db;
|
|
|
|
|
|
|
|
|
@@ -190,6 +191,7 @@ class ExternalConsultationLogic extends BaseLogic
|
|
|
]);
|
|
|
|
|
|
Db::commit();
|
|
|
+ self::delCache($params['id']);
|
|
|
return true;
|
|
|
} catch (\Exception $e) {
|
|
|
Db::rollback();
|
|
|
@@ -197,6 +199,19 @@ class ExternalConsultationLogic extends BaseLogic
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+ public static function delCache($id)
|
|
|
+ {
|
|
|
+ $consultation_notific_arr = Cache::store('common_redis')->get('consultation_notific');
|
|
|
+ unset($consultation_notific_arr[$id]);
|
|
|
+ Cache::store('common_redis')->set('consultation_notific',$consultation_notific_arr);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ public static function selectCache()
|
|
|
+ {
|
|
|
+ $consultation_notific_arr = Cache::store('common_redis')->get('consultation_notific');
|
|
|
+ return count($consultation_notific_arr);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* @notes 删除
|