diff --git a/app/common/repositories/store/order/StoreOtherOrderRepository.php b/app/common/repositories/store/order/StoreOtherOrderRepository.php index 8d6a19e0..4f935036 100644 --- a/app/common/repositories/store/order/StoreOtherOrderRepository.php +++ b/app/common/repositories/store/order/StoreOtherOrderRepository.php @@ -218,12 +218,6 @@ class StoreOtherOrderRepository extends BaseRepository 'user_type' => $storeOrderStatusRepository::U_TYPE_USER, ]; - if ($order->order_type == 0) { - //发起队列物流信息处理 - //event('order.sendGoodsCode', $order); - Queue::push(SendGoodsCodeJob::class, $order); - } - // 商户流水账单数据 $finance[] = [ 'order_id' => $order->order_id, @@ -351,18 +345,9 @@ class StoreOtherOrderRepository extends BaseRepository } $financialRecordRepository->insertAll($finance); $storeOrderStatusRepository->batchCreateLog($orderStatus); - if (count($groupOrder['give_coupon_ids']) > 0) - $groupOrder['give_coupon_ids'] = app()->make(StoreCouponRepository::class)->getGiveCoupon($groupOrder['give_coupon_ids'])->column('coupon_id'); $groupOrder->save(); }); - if (count($groupOrder['give_coupon_ids']) > 0) { - try { - Queue::push(PayGiveCouponJob::class, ['ids' => $groupOrder['give_coupon_ids'], 'uid' => $groupOrder['uid']]); - } catch (Exception $e) { - } - } - Queue::push(SendSmsJob::class, ['tempId' => 'ORDER_PAY_SUCCESS', 'id' => $groupOrder->group_order_id]); Queue::push(SendSmsJob::class, ['tempId' => 'ADMIN_PAY_SUCCESS_CODE', 'id' => $groupOrder->group_order_id]); Queue::push(UserBrokerageLevelJob::class, ['uid' => $groupOrder->uid, 'type' => 'pay_money', 'inc' => $groupOrder->pay_price]); diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index fa29b0a6..4e9a127f 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2346,7 +2346,7 @@ class ProductRepository extends BaseRepository foreach ($data['attrValue'] as $k => $item) { //$data['attrValue'][$k]['stock'] = 0; } - app()->make(ProductLabelRepository::class)->checkHas($merId, $data['mer_labels']); + app()->make(ProductLabelRepository::class)->checkHas(0, $data['mer_labels']); $count = app()->make(StoreCategoryRepository::class)->getWhereCount(['store_category_id' => $data['cate_id'], 'is_show' => 1]); if (!$count) throw new ValidateException('平台分类不存在或不可用'); app()->make(StoreProductValidate::class)->check($data); diff --git a/app/controller/api/Common.php b/app/controller/api/Common.php index 680bd4fe..1ba6ea6d 100644 --- a/app/controller/api/Common.php +++ b/app/controller/api/Common.php @@ -32,6 +32,8 @@ use app\common\repositories\user\UserSignRepository; use app\common\repositories\user\UserVisitRepository; use app\common\repositories\wechat\TemplateMessageRepository; use app\common\repositories\wechat\WechatUserRepository; +use app\common\repositories\store\product\ProductLabelRepository; + use app\common\model\system\merchant\Merchant; use crmeb\basic\BaseController; use crmeb\services\AlipayService; @@ -593,4 +595,15 @@ class Common extends BaseController } } + + /** + * 商品标签 + */ + public function label_lst(ProductLabelRepository $repository) + { + [$page, $limit] = $this->getPage(); + $where = $this->request->params(['name', 'type', 'status']); + $data = $repository->getList($where,$page, $limit); + return app('json')->success($data); + } } diff --git a/app/controller/merchant/store/product/ProductLabel.php b/app/controller/merchant/store/product/ProductLabel.php index 56dca928..4aa28e59 100644 --- a/app/controller/merchant/store/product/ProductLabel.php +++ b/app/controller/merchant/store/product/ProductLabel.php @@ -30,7 +30,9 @@ class ProductLabel extends BaseController { [$page, $limit] = $this->getPage(); $where = $this->request->params(['name', 'type', 'status']); - $where['mer_id'] = $this->request->merId(); + if($where['type']!=1){ + $where['mer_id'] = $this->request->merId(); + } $data = $this->repository->getList($where,$page, $limit); return app('json')->success($data); } diff --git a/route/api.php b/route/api.php index 6c5c5b31..e321a766 100644 --- a/route/api.php +++ b/route/api.php @@ -21,6 +21,7 @@ use think\facade\Route; Route::group('api/', function () { Route::any('test', 'api.Auth/test'); + Route::get('label_lst', 'api.Common/label_lst'); Route::any('system_group_value', 'api.Common/system_group_value'); Route::any('demo_ceshi', 'api.Demo/index'); Route::any('dotest', 'api.Auth/dotest');