后台供应商\经销商列表展示已审核的数据

This commit is contained in:
weiz 2024-05-21 16:15:21 +08:00
parent 6ddac08056
commit 69e56e0dbc
4 changed files with 10 additions and 10 deletions

View File

@ -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){

View File

@ -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){

View File

@ -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');
}

View File

@ -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');
}