Merge branch 'dev' of https://gitea.lihaink.cn/mkm/shop-new into dev
This commit is contained in:
commit
2b732fb5f4
@ -1908,8 +1908,11 @@ class ProductRepository extends BaseRepository
|
||||
*/
|
||||
public function switchStatus($id, $data, $admin_info = [])
|
||||
{
|
||||
$data['is_used'] =1;
|
||||
$data['is_show'] =1;
|
||||
if ($data['status'] == 1) {
|
||||
$data['is_used'] =1;
|
||||
$data['is_show'] =1;
|
||||
}
|
||||
|
||||
$product = $this->getSearch([])->find($id);
|
||||
$this->dao->update($id, $data);
|
||||
$status = $data['status'];
|
||||
@ -1942,8 +1945,10 @@ class ProductRepository extends BaseRepository
|
||||
*/
|
||||
public function batchSwitchStatus(array $id, array $data, $admin_info = [])
|
||||
{
|
||||
$data['is_show'] =1;
|
||||
$data['is_used'] =1;
|
||||
if ($data['status'] == 1) {
|
||||
$data['is_used'] =1;
|
||||
$data['is_show'] =1;
|
||||
}
|
||||
$productData = $this->getSearch([])->where('product_id', 'in', $id)->select();
|
||||
foreach ($productData as $product) {
|
||||
$product_type = $product['product_type'];
|
||||
|
@ -318,9 +318,9 @@ class MerchantIntention extends BaseController
|
||||
return app('json')->fail('参数缺失请检查');
|
||||
}
|
||||
if($data['type'] == 3){
|
||||
$data['type'] = Enum::TypeSupplyChain;
|
||||
$mer_type_id = Enum::TypeSupplyChain;
|
||||
}else{
|
||||
$data['type'] = Enum::RetailMerchants;
|
||||
$mer_type_id = Enum::RetailMerchants;
|
||||
}
|
||||
$checkIntention = \app\common\model\system\merchant\MerchantIntention::getDB()->where('mer_id',$data['mer_id'])->where('status',0)->count();
|
||||
if($checkIntention){
|
||||
@ -335,7 +335,7 @@ class MerchantIntention extends BaseController
|
||||
$data['mer_name'] = $merchantInfo->mer_name;
|
||||
$data['name'] = $merchantInfo->real_name;
|
||||
$data['merchant_category_id'] = $merchantInfo->category_id;
|
||||
$data['mer_type_id'] = $data['type'];
|
||||
$data['mer_type_id'] = $mer_type_id;
|
||||
$data['status'] = 0;
|
||||
$data['create_time'] = date('Y-m-d H:i:s',time());
|
||||
$intention = $this->repository->create($data);
|
||||
@ -361,8 +361,9 @@ class MerchantIntention extends BaseController
|
||||
->select();
|
||||
//后期看改
|
||||
foreach ($list as $k => &$v){
|
||||
$v['mer_avatar'] = Merchant::getDB()->where('uid',$v['uid'])->value('mer_avatar');
|
||||
$v['check_name'] = "小方";
|
||||
$v['check_num'] = "18715236963";
|
||||
$v['check_phone'] = "18715236963";
|
||||
}
|
||||
|
||||
return app('json')->success($list);
|
||||
|
Loading…
x
Reference in New Issue
Block a user