返回商户头像,只有审核通过更改

This commit is contained in:
liu 2024-03-21 11:48:27 +08:00
parent de32a8dc0e
commit 19b1cde138
2 changed files with 10 additions and 4 deletions

View File

@ -1908,8 +1908,11 @@ class ProductRepository extends BaseRepository
*/ */
public function switchStatus($id, $data, $admin_info = []) public function switchStatus($id, $data, $admin_info = [])
{ {
$data['is_used'] =1; if ($data['status'] == 1) {
$data['is_show'] =1; $data['is_used'] =1;
$data['is_show'] =1;
}
$product = $this->getSearch([])->find($id); $product = $this->getSearch([])->find($id);
$this->dao->update($id, $data); $this->dao->update($id, $data);
$status = $data['status']; $status = $data['status'];
@ -1942,8 +1945,10 @@ class ProductRepository extends BaseRepository
*/ */
public function batchSwitchStatus(array $id, array $data, $admin_info = []) public function batchSwitchStatus(array $id, array $data, $admin_info = [])
{ {
$data['is_show'] =1; if ($data['status'] == 1) {
$data['is_used'] =1; $data['is_used'] =1;
$data['is_show'] =1;
}
$productData = $this->getSearch([])->where('product_id', 'in', $id)->select(); $productData = $this->getSearch([])->where('product_id', 'in', $id)->select();
foreach ($productData as $product) { foreach ($productData as $product) {
$product_type = $product['product_type']; $product_type = $product['product_type'];

View File

@ -361,6 +361,7 @@ class MerchantIntention extends BaseController
->select(); ->select();
//后期看改 //后期看改
foreach ($list as $k => &$v){ foreach ($list as $k => &$v){
$v['mer_avatar'] = Merchant::getDB()->where('uid',$v['uid'])->value('mer_avatar');
$v['check_name'] = "小方"; $v['check_name'] = "小方";
$v['check_phone'] = "18715236963"; $v['check_phone'] = "18715236963";
} }