From bc450db52e66b5888213cb402c7f21f1b41e59bd Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 20 Apr 2023 14:03:20 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=95=86=E5=93=81?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=A7=AF=E5=88=86=E6=A0=B7=E5=BC=8F=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/v1/order/StoreIntegralOrderController.php | 3 +++
.../activity/integral/StoreIntegralOrderServices.php | 7 ++++++-
.../services/activity/integral/StoreIntegralServices.php | 9 ++++++++-
template/uni-app/pages/points_mall/exchange_record.vue | 1 +
4 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/crmeb/app/api/controller/v1/order/StoreIntegralOrderController.php b/crmeb/app/api/controller/v1/order/StoreIntegralOrderController.php
index 6953e0838..9e0ebd99c 100644
--- a/crmeb/app/api/controller/v1/order/StoreIntegralOrderController.php
+++ b/crmeb/app/api/controller/v1/order/StoreIntegralOrderController.php
@@ -121,6 +121,7 @@ class StoreIntegralOrderController
/**
* 订单 查看物流
* @param Request $request
+ * @param ExpressServices $expressServices
* @param $uni
* @return mixed
*/
@@ -128,6 +129,8 @@ class StoreIntegralOrderController
{
if (!$uni || !($order = $this->services->getUserOrderDetail($uni, $request->uid()))) return app('json')->fail(410173);
if ($order['delivery_type'] != 'express' || !$order['delivery_id']) return app('json')->fail(410206);
+ $order['price'] = (int)$order['price'];
+ $order['total_price'] = (int)$order['total_price'];
$cacheName = 'integral' . $order['order_id'] . $order['delivery_id'];
return app('json')->success([
'order' => $order,
diff --git a/crmeb/app/services/activity/integral/StoreIntegralOrderServices.php b/crmeb/app/services/activity/integral/StoreIntegralOrderServices.php
index b7d778696..4a0035a63 100644
--- a/crmeb/app/services/activity/integral/StoreIntegralOrderServices.php
+++ b/crmeb/app/services/activity/integral/StoreIntegralOrderServices.php
@@ -120,6 +120,8 @@ class StoreIntegralOrderServices extends BaseServices
} else if ($order['status'] == 3) {
$order['status_name'] = '已完成';
}
+ $order['price'] = (int)$order['price'];
+ $order['total_price'] = (int)$order['total_price'];
return $order;
}
@@ -139,6 +141,8 @@ class StoreIntegralOrderServices extends BaseServices
} else if ($item['status'] == 3) {
$item['status_name'] = '已完成';
}
+ $item['price'] = (int)$item['price'];
+ $item['total_price'] = (int)$item['total_price'];
}
return $data;
}
@@ -338,11 +342,12 @@ class StoreIntegralOrderServices extends BaseServices
}
$data = [];
$attrValue = is_object($attrValue) ? $attrValue->toArray() : $attrValue;
+ $attrValue['price'] = (int)$attrValue['price'];
/** @var UserBillServices $userBillServices */
$userBillServices = app()->make(UserBillServices::class);
$data['integral'] = bcsub((string)$user['integral'], (string)$userBillServices->getBillSum(['uid' => $user['uid'], 'is_frozen' => 1]), 0);
$data['num'] = $num;
- $data['total_price'] = bcmul($num, $attrValue['price'], 2);
+ $data['total_price'] = bcmul($num, $attrValue['price']);
$data['productInfo'] = $attrValue;
return $data;
}
diff --git a/crmeb/app/services/activity/integral/StoreIntegralServices.php b/crmeb/app/services/activity/integral/StoreIntegralServices.php
index 9e7a5b58a..b9c0c3a38 100644
--- a/crmeb/app/services/activity/integral/StoreIntegralServices.php
+++ b/crmeb/app/services/activity/integral/StoreIntegralServices.php
@@ -119,7 +119,7 @@ class StoreIntegralServices extends BaseServices
if (!$data) {
throw new AdminException(400337);
}
- if(!$data['attrs']) throw new AdminException(400337);
+ if (!$data['attrs']) throw new AdminException(400337);
$attrs = [];
foreach ($data['attrs'] as $k => $v) {
$attrs[$v['product_id']][] = $v;
@@ -283,6 +283,7 @@ class StoreIntegralServices extends BaseServices
$siteUrl = sys_config('site_url');
$storeInfo['image'] = set_file_url($storeInfo['image'], $siteUrl);
$storeInfo['image_base'] = set_file_url($storeInfo['image'], $siteUrl);
+ $storeInfo['product_price'] = (int)$storeInfo['product_price'];
$storeInfo['sale_stock'] = 0;
if ($storeInfo['stock'] > 0) $storeInfo['sale_stock'] = 1;
$uid = $request->uid();
@@ -296,6 +297,12 @@ class StoreIntegralServices extends BaseServices
/** @var StoreProductAttrServices $storeProductAttrServices */
$storeProductAttrServices = app()->make(StoreProductAttrServices::class);
list($productAttr, $productValue) = $storeProductAttrServices->getProductAttrDetail($id, $uid, 0, 4, $storeInfo['product_id']);
+ foreach ($productValue as &$item) {
+ $item['cost'] = (int)$item['cost'];
+ $item['ot_price'] = (int)$item['ot_price'];
+ $item['price'] = (int)$item['price'];
+ $item['vip_price'] = (int)$item['vip_price'];
+ }
$data['productAttr'] = $productAttr;
$data['productValue'] = $productValue;
/** @var StoreVisitServices $storeVisit */
diff --git a/template/uni-app/pages/points_mall/exchange_record.vue b/template/uni-app/pages/points_mall/exchange_record.vue
index 6babd7dc7..de8041627 100644
--- a/template/uni-app/pages/points_mall/exchange_record.vue
+++ b/template/uni-app/pages/points_mall/exchange_record.vue
@@ -18,6 +18,7 @@
{{ item.store_name }}
{{item.suk}}
+ {{$t(`积分`)}}:{{item.total_price}}
From 7f88449b793486f9a1ba05cefd13dc471a045628 Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 20 Apr 2023 14:03:47 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E6=8B=BC=E5=9B=A2=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E6=8B=BC=E5=9B=A2=E7=94=A8=E6=88=B7=E5=A4=B4=E5=83=8F=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/services/activity/combination/StorePinkServices.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/crmeb/app/services/activity/combination/StorePinkServices.php b/crmeb/app/services/activity/combination/StorePinkServices.php
index 4da1e716c..f17b9193f 100644
--- a/crmeb/app/services/activity/combination/StorePinkServices.php
+++ b/crmeb/app/services/activity/combination/StorePinkServices.php
@@ -184,6 +184,7 @@ class StorePinkServices extends BaseServices
$v['s'] = date('s', (int)$v['stop_time']);
$pinkAll[] = $v['id'];//开团团长ID
$v['stop_time'] = (int)$v['stop_time'];
+ $v['avatar'] = set_file_url($v['avatar']);
}
return [$list, $pinkAll];
}
From 1ee52e47443ab93696feb8375f07b1b1c177ec9f Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 20 Apr 2023 14:04:15 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E7=A7=92=E6=9D=80=E5=95=86=E5=93=81?=
=?UTF-8?q?=E5=B7=B2=E5=94=AE=E6=95=B0=E9=87=8F=E6=98=BE=E7=A4=BA=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/services/activity/seckill/StoreSeckillServices.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crmeb/app/services/activity/seckill/StoreSeckillServices.php b/crmeb/app/services/activity/seckill/StoreSeckillServices.php
index b47a78054..a53b0e9d3 100644
--- a/crmeb/app/services/activity/seckill/StoreSeckillServices.php
+++ b/crmeb/app/services/activity/seckill/StoreSeckillServices.php
@@ -469,7 +469,7 @@ class StoreSeckillServices extends BaseServices
/** @var StoreProductServices $storeProductService */
$storeProductService = app()->make(StoreProductServices::class);
$productInfo = $storeProductService->get($storeInfo['product_id']);
- $storeInfo['total'] = $productInfo['sales'] + $productInfo['ficti'];
+ $storeInfo['total'] = $productInfo['sales'] + $productInfo['ficti'] + $storeInfo['sales'];
if (sys_config('share_qrcode', 0) && request()->isWechat()) {
/** @var QrcodeServices $qrcodeService */