From 89b00738329409c174582672a2bfb7712d54952d Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Mon, 25 Dec 2023 17:02:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/order/StoreOtherOrderRepository.php | 15 --------------- app/controller/api/Common.php | 13 +++++++++++++ route/api.php | 1 + 3 files changed, 14 insertions(+), 15 deletions(-) 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/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/route/api.php b/route/api.php index 7296ca0b..9c82c21e 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'); From e2641be239c6aae5e84f275190ab8a394a52c2c2 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Mon, 25 Dec 2023 17:24:21 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/merchant/store/product/ProductLabel.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } From 0336d6a59bfa14c8df32e4ba193d318ad3b377d7 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Mon, 25 Dec 2023 17:30:57 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/merchant/store/product/ProductLabel.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controller/merchant/store/product/ProductLabel.php b/app/controller/merchant/store/product/ProductLabel.php index 4aa28e59..c1a5bf66 100644 --- a/app/controller/merchant/store/product/ProductLabel.php +++ b/app/controller/merchant/store/product/ProductLabel.php @@ -62,7 +62,8 @@ class ProductLabel extends BaseController $data = $this->checkParams($validate); if (!$this->repository->check($data['label_name'], $this->request->merId(),$id)) return app('json')->fail('名称重复'); - $getOne = $this->repository->getWhere(['product_label_id' => $id,'mer_id' => $this->request->merId()]); + //'mer_id' => $this->request->merId() + $getOne = $this->repository->getWhere(['product_label_id' => $id]); if (!$getOne) return app('json')->fail('数据不存在'); $this->repository->update($id, $data); return app('json')->success('编辑成功'); From 968504744a47808217c4ed2f7888cac9bc816cda Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Mon, 25 Dec 2023 17:36:07 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 2 +- app/controller/merchant/store/product/ProductLabel.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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/merchant/store/product/ProductLabel.php b/app/controller/merchant/store/product/ProductLabel.php index c1a5bf66..4aa28e59 100644 --- a/app/controller/merchant/store/product/ProductLabel.php +++ b/app/controller/merchant/store/product/ProductLabel.php @@ -62,8 +62,7 @@ class ProductLabel extends BaseController $data = $this->checkParams($validate); if (!$this->repository->check($data['label_name'], $this->request->merId(),$id)) return app('json')->fail('名称重复'); - //'mer_id' => $this->request->merId() - $getOne = $this->repository->getWhere(['product_label_id' => $id]); + $getOne = $this->repository->getWhere(['product_label_id' => $id,'mer_id' => $this->request->merId()]); if (!$getOne) return app('json')->fail('数据不存在'); $this->repository->update($id, $data); return app('json')->success('编辑成功');