Merge branch 'master' into dev

# Conflicts:
#	app/common/dao/store/StoreActivityDao.php
This commit is contained in:
luofei 2024-01-27 17:47:23 +08:00
commit 85becee5f8
2 changed files with 6 additions and 3 deletions

View File

@ -55,8 +55,9 @@ class StoreActivityDao extends BaseDao
*/ */
public function product($userId, $location, $streetCode, $activityId) public function product($userId, $location, $streetCode, $activityId)
{ {
$limit = 5;
[$lat, $lng] = (new CityAreaDao())->getLngAndLat($location, $streetCode); [$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 = []; $cloud_product = [];
foreach ($cloud_product_arr as $key => $value) { foreach ($cloud_product_arr as $key => $value) {
$cloud_product[] = $value['product_id']; $cloud_product[] = $value['product_id'];
@ -74,7 +75,7 @@ class StoreActivityDao extends BaseDao
} }
/** @var SpuRepository $spuRep */ /** @var SpuRepository $spuRep */
$spuRep = app()->make(SpuRepository::class); $spuRep = app()->make(SpuRepository::class);
$products = $spuRep->getApiSearch($where, 1, 4, false, true); $products = $spuRep->getApiSearch($where, 1, $limit, false, true);
$canBuy = 1; $canBuy = 1;
if ($products['list']) { if ($products['list']) {
$list = $products['list']; $list = $products['list'];

View File

@ -512,7 +512,9 @@ class StoreOrderRepository extends BaseRepository
$finance = (new CommissionDao())->firstOrderCommission($order, $finance, $financeSn . ($i++)); $finance = (new CommissionDao())->firstOrderCommission($order, $finance, $financeSn . ($i++));
$addressCode = explode(',', $order['user_address_code']); $addressCode = explode(',', $order['user_address_code']);
// "惠农供销,谱写数字新篇章"活动首单分润,镇合伙人 // "惠农供销,谱写数字新篇章"活动首单分润,镇合伙人
(new CommissionDao())->sendCommission($order, $addressCode[3], 3); if (!empty($addressCode[3])) {
(new CommissionDao())->sendCommission($order, $addressCode[3], 3);
}
} }
} }
//分销判断 //分销判断