更新设置

This commit is contained in:
mkm 2023-11-10 13:46:17 +08:00
parent c14d83bdb3
commit 3b80a8cc34
5 changed files with 10 additions and 4 deletions

View File

@ -12,6 +12,7 @@
namespace app\controller\merchant\store\product;
use app\common\model\store\StoreCategory;
use app\common\model\system\merchant\Merchant;
use app\common\repositories\store\order\StoreCartRepository;
use app\common\repositories\store\product\ProductAttrValueRepository;
@ -84,6 +85,11 @@ class Product extends BaseController
{
$params = $this->request->params($this->repository::CREATE_PARAMS);
$data = $this->repository->checkParams($params,$this->request->merId());
$cate_id=StoreCategory::where('pid',$data['cate_id'])->where('level',2)->value('store_category_id');
if(!$cate_id){
return app('json')->fail('请先添加第三级分类');
}
$data['cate_id']=$cate_id;
$data['mer_id'] = $this->request->merId();
if ($data['is_gift_bag'] && !$this->repository->checkMerchantBagNumber($data['mer_id']))
return app('json')->fail('礼包数量超过数量限制');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long