Commit dfa5297b by 杨树贤

还是修复各种状态问题

parent eb7fc761
...@@ -148,3 +148,5 @@ MENU_URL=http://data.liexin.net/api/config/ ...@@ -148,3 +148,5 @@ MENU_URL=http://data.liexin.net/api/config/
FOOTSTONE_URL=http://footstone.liexindev.net FOOTSTONE_URL=http://footstone.liexindev.net
#标签系统的地址 #标签系统的地址
TAG_URL=http://192.168.1.18:32581 TAG_URL=http://192.168.1.18:32581
SKIP_SEND_EMAIL=true
...@@ -11,6 +11,9 @@ class MessageService ...@@ -11,6 +11,9 @@ class MessageService
{ {
public function sendMessage($keyword, $data, $to_user = '', $cnUncode = false) public function sendMessage($keyword, $data, $to_user = '', $cnUncode = false)
{ {
if (config('website.SkipSendEmail')) {
return true;
}
// 推送给内部人员 // 推送给内部人员
if ($cnUncode) { if ($cnUncode) {
if (isset($data['data'])) { if (isset($data['data'])) {
......
...@@ -253,7 +253,8 @@ class SyncSupplierService ...@@ -253,7 +253,8 @@ class SyncSupplierService
$preStatus = null; $preStatus = null;
$redis = new RedisModel(); $redis = new RedisModel();
if ($isEntity) { if ($isEntity) {
if (!$redis->hget('supplier_status_before_disable', $supplierId)) { $cachedStatus = $redis->hget('supplier_status_before_disable', $supplierId);
if (!$cachedStatus && $cachedStatus !== "0") {
$redis->hset('supplier_status_before_disable', $supplierId, $status); $redis->hset('supplier_status_before_disable', $supplierId, $status);
} }
} else { } else {
...@@ -269,7 +270,6 @@ class SyncSupplierService ...@@ -269,7 +270,6 @@ class SyncSupplierService
if (!$isEntity && $preStatus == SupplierChannelModel::STATUS_DISABLE) { if (!$isEntity && $preStatus == SupplierChannelModel::STATUS_DISABLE) {
$preStatus = SupplierChannelModel::STATUS_IN_REVIEW; $preStatus = SupplierChannelModel::STATUS_IN_REVIEW;
} }
//修改供应商的状态 //修改供应商的状态
SupplierChannelModel::where('supplier_id', $supplierId)->update([ SupplierChannelModel::where('supplier_id', $supplierId)->update([
'is_entity' => $isEntityResult, 'is_entity' => $isEntityResult,
......
...@@ -41,5 +41,5 @@ return [ ...@@ -41,5 +41,5 @@ return [
], ],
'TagUrl' => env('TAG_URL'), 'TagUrl' => env('TAG_URL'),
'CloudUrl' => env('CLOUD_URL'), 'CloudUrl' => env('CLOUD_URL'),
'SkipSendEmail' => env('skip_send_email'),
]; ];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment