Bläddra i källkod

Merge branch 'v4.7.0dev' into v5.0.0dev

evoxwht 2 år sedan
förälder
incheckning
5585c699a8

+ 1 - 1
crmeb/app/api/controller/v1/admin/StoreOrderController.php

@@ -113,7 +113,7 @@ class StoreOrderController
     public function detail(Request $request, StoreOrderServices $services, UserServices $userServices, $orderId)
     {
         $economizeServices = app()->make(StoreOrderEconomizeServices::class);
-        $orderData = $services->getUserOrderByKey($economizeServices, $orderId, (int)$request->uid());
+        $orderData = $services->getUserOrderByKey($economizeServices, $orderId, 0);
         $orderData['nickname'] = $userServices->value(['uid' => $orderData['uid']], 'nickname');
         return app('json')->success($orderData);
     }

+ 1 - 0
crmeb/app/dao/activity/combination/StorePinkDao.php

@@ -138,6 +138,7 @@ class StorePinkDao extends BaseDao
     /**
      * 获取拼团完成的个数
      * @return float
+     * @throws \ReflectionException
      */
     public function getPinkOkSumTotalNum()
     {

+ 6 - 3
crmeb/app/dao/order/StoreOrderDao.php

@@ -447,8 +447,9 @@ class StoreOrderDao extends BaseDao
 
     /**
      * 获取订单详情
-     * @param $uid
-     * @param $key
+     * @param string $key
+     * @param int $uid
+     * @param array $with
      * @return array|\think\Model|null
      * @throws \think\db\exception\DataNotFoundException
      * @throws \think\db\exception\DbException
@@ -456,7 +457,9 @@ class StoreOrderDao extends BaseDao
      */
     public function getUserOrderDetail(string $key, int $uid, $with = [])
     {
-        return $this->getOne(['order_id|unique' => $key, 'uid' => $uid, 'is_del' => 0], '*', $with);
+        $where = ['order_id|unique' => $key, 'is_del' => 0];
+        if ($uid > 0) $where = $where + ['uid' => $uid];
+        return $this->getOne($where, '*', $with);
     }
 
     /**

+ 7 - 1
crmeb/app/services/activity/combination/StorePinkServices.php

@@ -88,6 +88,9 @@ class StorePinkServices extends BaseServices
      * 参团人员
      * @param int $id
      * @return array
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function getPinkMember(int $id)
     {
@@ -96,8 +99,11 @@ class StorePinkServices extends BaseServices
 
     /**
      * 拼团退款
-     * @param $id
+     * @param $order
      * @return bool
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function setRefundPink($order)
     {

+ 4 - 5
crmeb/app/services/activity/integral/StoreIntegralOrderServices.php

@@ -160,8 +160,7 @@ class StoreIntegralOrderServices extends BaseServices
         if (!$addressId) {
             throw new ApiException(410045);
         }
-        if (!$addressInfo = $addressServices->getOne(['uid' => $uid, 'id' => $addressId, 'is_del' => 0]))
-        throw new ApiException(410046);
+        if (!$addressInfo = $addressServices->getOne(['uid' => $uid, 'id' => $addressId, 'is_del' => 0])) throw new ApiException(410046);
         $addressInfo = $addressInfo->toArray();
         $total_price = bcmul($productInfo['price'], $num, 2);
         /** @var UserBillServices $userBillServices */
@@ -226,7 +225,7 @@ class StoreIntegralOrderServices extends BaseServices
             $res2 = false !== $userServices->bcDec($userInfo['uid'], 'integral', $priceIntegral, 'uid');
             /** @var UserBillServices $userBillServices */
             $userBillServices = app()->make(UserBillServices::class);
-            $res3 = $userBillServices->income('storeIntegral_use_integral', $uid, $priceIntegral, $userInfo['integral'], $orderId);
+            $res3 = $userBillServices->income('storeIntegral_use_integral', $uid, $priceIntegral, $userInfo['integral'] - $priceIntegral, $orderId);
             $res2 = $res2 && false != $res3;
         }
         if (!$res2) {
@@ -334,7 +333,7 @@ class StoreIntegralOrderServices extends BaseServices
         /** @var StoreProductAttrValueServices $StoreProductAttrValueServices */
         $StoreProductAttrValueServices = app()->make(StoreProductAttrValueServices::class);
         $attrValue = $StoreProductAttrValueServices->uniqueByField($unique, 'product_id,suk,price,image,unique');
-        if(!$attrValue || !isset($attrValue['storeIntegral']) || !$attrValue['storeIntegral']){
+        if (!$attrValue || !isset($attrValue['storeIntegral']) || !$attrValue['storeIntegral']) {
             throw new ApiException(410295);
         }
         $data = [];
@@ -734,7 +733,7 @@ class StoreIntegralOrderServices extends BaseServices
         if (!$remark) throw new AdminException(400106);
         if (!$id) throw new AdminException(100100);
         if (!$order = $this->dao->get($id)) {
-           throw new AdminException(100025);
+            throw new AdminException(100025);
         }
 
         $order->remark = $remark;

+ 1 - 1
template/admin/src/pages/marketing/storeCombination/combinaList.vue

@@ -249,7 +249,7 @@ export default {
         },
         {
           title: '金额',
-          key: 'price',
+          key: 'total_price',
         },
         {
           title: '订单状态',

+ 1 - 1
template/admin/src/pages/user/list/handle/userDetails.vue

@@ -214,7 +214,7 @@ export default {
                     minWidth: 120,
                   },
                   {
-                    title: '变化积分',
+                    title: '变化积分',
                     key: 'balance',
                     minWidth: 120,
                   },

+ 1 - 1
template/uni-app/pages/activity/goods_combination_details/index.vue

@@ -258,7 +258,7 @@
 		<!-- #ifdef MP -->
 		<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
 		<!-- #endif -->
-		<product-window :attr='attribute' :limitNum='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
+		<product-window :attr='attribute' :limitNum='attribute.productSelect.quota' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
 			@ChangeCartNum="ChangeCartNum" @iptCartNum="iptCartNum" @attrVal="attrVal" @getImg="showImg">
 		</product-window>
 		<swiperPrevie ref="cusSwiperImg" :list="storeInfo.images"></swiperPrevie>

+ 1 - 1
template/uni-app/pages/goods/goods_return/index.vue

@@ -10,7 +10,7 @@
 					<view class='text acea-row row-between'>
 						<view class='name line2'>{{item.productInfo.store_name}}</view>
 						<view class='money'>
-							<view>{{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price)).toFixed(2)}}
+							<view>{{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price/item.cart_num)).toFixed(2)}}
 							</view>
 							<view class='num'>x{{item.cart_num}}</view>
 						</view>