From 4b4449fbe5a57e2faed798623219ef4468615103 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Sat, 27 Jan 2024 14:33:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/store/StoreActivityDao.php | 2 +- app/common/dao/store/product/CloudProductDao.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/common/dao/store/StoreActivityDao.php b/app/common/dao/store/StoreActivityDao.php index 373965d0..3b6361fc 100755 --- a/app/common/dao/store/StoreActivityDao.php +++ b/app/common/dao/store/StoreActivityDao.php @@ -56,7 +56,7 @@ class StoreActivityDao extends BaseDao public function product($userId, $location, $streetCode, $activityId) { [$lat, $lng] = (new CityAreaDao())->getLngAndLat($location, $streetCode); - $cloud_product_arr = (new CloudProductDao())->getByDistance($lat, $lng, ['activity_id' => $activityId], 4); + $cloud_product_arr = (new CloudProductDao())->getByDistance($lat, $lng, ['activity_id' => $activityId], 5); $cloud_product = []; foreach ($cloud_product_arr as $key => $value) { $cloud_product[] = $value['product_id']; diff --git a/app/common/dao/store/product/CloudProductDao.php b/app/common/dao/store/product/CloudProductDao.php index e648bee8..13e75597 100755 --- a/app/common/dao/store/product/CloudProductDao.php +++ b/app/common/dao/store/product/CloudProductDao.php @@ -41,7 +41,7 @@ class CloudProductDao extends BaseDao { $query = CloudProduct::where('status', 1) ->where($where) - ->whereIn('store_name', ['耶贝尔柔韧布质竹纸特惠装(10包)', '家家宜除菌洗衣液阳光清香1千克', '家家宜除菌洗衣粉阳光清香1千克-New版', '家家宜柠檬高效除油洗洁精1.12千克']) + ->whereIn('store_name', ['耶贝尔柔韧布质竹纸特惠装(10包)', '家家宜除菌洗衣液阳光清香1千克', '家家宜除菌洗衣粉阳光清香1千克-New版', '家家宜柠檬高效除油洗洁精1.12千克', '蔺艺挂面1.5千克']) ->whereIn('type_id', [10, 17]) ->whereNotNull('lat') ->whereNotNull('long') From 98697a31eb09a3b00a3883d1c85fb8c57500cb8b Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 27 Jan 2024 16:55:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/store/StoreActivityDao.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/common/dao/store/StoreActivityDao.php b/app/common/dao/store/StoreActivityDao.php index 3b6361fc..0c6b973e 100755 --- a/app/common/dao/store/StoreActivityDao.php +++ b/app/common/dao/store/StoreActivityDao.php @@ -55,8 +55,9 @@ class StoreActivityDao extends BaseDao */ public function product($userId, $location, $streetCode, $activityId) { + $limit = 5; [$lat, $lng] = (new CityAreaDao())->getLngAndLat($location, $streetCode); - $cloud_product_arr = (new CloudProductDao())->getByDistance($lat, $lng, ['activity_id' => $activityId], 5); + $cloud_product_arr = (new CloudProductDao())->getByDistance($lat, $lng, ['activity_id' => $activityId], $limit); $cloud_product = []; foreach ($cloud_product_arr as $key => $value) { $cloud_product[] = $value['product_id']; @@ -74,7 +75,7 @@ class StoreActivityDao extends BaseDao } /** @var SpuRepository $spuRep */ $spuRep = app()->make(SpuRepository::class); - $products = $spuRep->getApiSearch($where, 1, 4, false, true); + $products = $spuRep->getApiSearch($where, 1, $limit, false, true); $canBuy = 1; if ($products['list']) { $list = $products['list']; From f4c83b013a5034d37d02d232a585388d8cfc9286 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 27 Jan 2024 17:30:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=9B=9E=E8=B0=83=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/order/StoreOrderRepository.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index d96a2a66..bf82f02d 100755 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -512,7 +512,9 @@ class StoreOrderRepository extends BaseRepository $finance = (new CommissionDao())->firstOrderCommission($order, $finance, $financeSn . ($i++)); $addressCode = explode(',', $order['user_address_code']); // "惠农供销,谱写数字新篇章"活动首单分润,镇合伙人 - (new CommissionDao())->sendCommission($order, $addressCode[3], 3); + if (!empty($addressCode[3])) { + (new CommissionDao())->sendCommission($order, $addressCode[3], 3); + } } } //分销判断