diff --git a/app/admin/lists/merchant/MerchantLists.php b/app/admin/lists/merchant/MerchantLists.php index 3b505ff..0903dfd 100644 --- a/app/admin/lists/merchant/MerchantLists.php +++ b/app/admin/lists/merchant/MerchantLists.php @@ -44,7 +44,7 @@ class MerchantLists extends BaseAdminDataLists implements ListsSearchInterface */ public function lists(): array { - return Merchant::where($this->searchWhere)->withoutField(['update_time','delete_time']) + return Merchant::where($this->searchWhere)->where('status',1)->withoutField(['update_time','delete_time']) ->limit($this->limitOffset, $this->limitLength) ->order(['mer_id' => 'desc']) ->select()->each(function($data){ diff --git a/app/admin/lists/supplier/SupplierLists.php b/app/admin/lists/supplier/SupplierLists.php index dcd374f..5428fd4 100644 --- a/app/admin/lists/supplier/SupplierLists.php +++ b/app/admin/lists/supplier/SupplierLists.php @@ -44,7 +44,7 @@ class SupplierLists extends BaseAdminDataLists implements ListsSearchInterface */ public function lists(): array { - return Supplier::where($this->searchWhere)->withoutField(['update_time','delete_time']) + return Supplier::where($this->searchWhere)->where('status',1)->withoutField(['update_time','delete_time']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function($data){ diff --git a/app/admin/logic/merchant/MerchantLogic.php b/app/admin/logic/merchant/MerchantLogic.php index 3afcefa..a927e2a 100644 --- a/app/admin/logic/merchant/MerchantLogic.php +++ b/app/admin/logic/merchant/MerchantLogic.php @@ -175,12 +175,12 @@ class MerchantLogic extends BaseLogic 'mark'=>$params['mark']??'', 'apply_status'=>-1 ]; + Merchant::where('mer_id', $params['mer_id'])->update([ + 'status' => 0, + ]); Db::name('user_auth_shop')->where('id',$params['apply_id'])->update($data); - } - Merchant::where('mer_id', $params['mer_id'])->update([ - 'status' => $params['status'], - ]); + if(!empty($apply_info['jg_register_id'])){ (new JgPushService()) -> sendMsg($apply_info['jg_register_id'],'您的经销入驻请求审核'.($params['status']==1?'通过':'被拒绝'),'/pages/bindDistribution/index'); } diff --git a/app/admin/logic/supplier/SupplierLogic.php b/app/admin/logic/supplier/SupplierLogic.php index 24e0c6f..10112bd 100644 --- a/app/admin/logic/supplier/SupplierLogic.php +++ b/app/admin/logic/supplier/SupplierLogic.php @@ -122,12 +122,12 @@ class SupplierLogic extends BaseLogic 'mark'=>$params['mark']??'', 'apply_status'=>-1 ]; + Supplier::where('id', $params['id'])->update([ + 'status' => 0, + ]); Db::name('user_auth_shop')->where('id',$params['apply_id'])->update($data); - } - Supplier::where('id', $params['id'])->update([ - 'status' => $params['status'], - ]); + if(!empty($apply_info['jg_register_id'])){ (new JgPushService()) -> sendMsg($apply_info['jg_register_id'],'您的供应入驻请求审核'.($params['status']==1?'通过':'被拒绝'),'/pages/bindSupplier/index'); }