From b64f3c43c9676ace873577fd336ef75316ff2964 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Mon, 19 Jun 2023 10:02:31 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/v1/order/StoreOrder.php | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/order/StoreOrder.php b/crmeb/app/adminapi/controller/v1/order/StoreOrder.php index 3e253858c..414a010d7 100644 --- a/crmeb/app/adminapi/controller/v1/order/StoreOrder.php +++ b/crmeb/app/adminapi/controller/v1/order/StoreOrder.php @@ -323,18 +323,42 @@ class StoreOrder extends AuthController $data = $this->request->postMore([ ['kuaidicom', ''], ['send_address', ''], - ['address', ''], - ['weight', ''], + ['orderId', ''], ['service_type', ''], ['cart_ids', []], ]); - foreach ($data['cart_ids'] as $cart) { - if (!isset($cart['cart_id']) || !$cart['cart_id'] || !isset($cart['cart_num']) || !$cart['cart_num']) { - return app('json')->fail(400159); + $orderInfo = $this->services->get($data['orderId'], ['user_address', 'cart_id']); + if (!$orderInfo) { + return app('json')->fail('订单没有查询到'); + } + $weight = '0'; + if ($data['cart_ids']) { + $cartIds = array_column($data['cart_ids'], 'cart_id'); + $cartList = app()->make(StoreOrderCartInfoServices::class)->getColumn([ + ['cart_id', 'in', $cartIds] + ], 'cart_info', 'cart_id'); + foreach ($data['cart_ids'] as $cart) { + if (!isset($cart['cart_id']) || !$cart['cart_id'] || !isset($cart['cart_num']) || !$cart['cart_num']) { + return app('json')->fail(400159); + } + if (isset($cartList[$cart['cart_id']])) { + $value = is_string($cartList[$cart['cart_id']]) ? json_decode($cartList[$cart['cart_id']], true) : $cartList[$cart['cart_id']]; + $weightnew = bcmul($value['attrInfo']['weight'], (string)$cart['cart_num'], 2); + $weight = bcadd($weightnew, $weight, 2); + } + } + } else { + $orderCartInfoList = app()->make(StoreOrderCartInfoServices::class)->getCartInfoPrintProduct($data['orderId']); + foreach ($orderCartInfoList as $item) { + $weightnew = bcmul($item['attrInfo']['weight'], (string)$item['cart_num'], 2); + $weight = bcadd($weightnew, $weight, 2); } } - + $data['address'] = $orderInfo['user_address']; + if ($weight > 0) { + $data['weight'] = $weight; + } return app('json')->success($services->express()->getPrice($data)); } From cb93a011726dda21bb1d1eb68646c61a738f39f8 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Mon, 19 Jun 2023 10:04:18 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/services/express/storage/Express.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmeb/crmeb/services/express/storage/Express.php b/crmeb/crmeb/services/express/storage/Express.php index 9421f4a22..1705ac371 100644 --- a/crmeb/crmeb/services/express/storage/Express.php +++ b/crmeb/crmeb/services/express/storage/Express.php @@ -180,7 +180,7 @@ class Express extends BaseExpress throw new ApiException('收件地址必须填写'); } $param = [ - 'kuaidi_num' => $data['kuaidicom'], + 'kuaidicom' => $data['kuaidicom'], 'send_address' => $data['send_address'], 'address' => $data['address'] ?? '', 'weight' => $data['weight'] ?? '', From 652a0e92cc0f67beabb7fa9257e11db962006f56 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Mon, 19 Jun 2023 10:07:36 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E5=95=86=E5=AE=B6=E5=AF=84=E4=BB=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/order/orderList/handle/orderSend.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/template/admin/src/pages/order/orderList/handle/orderSend.vue b/template/admin/src/pages/order/orderList/handle/orderSend.vue index 2eb526724..3f75ec4ed 100644 --- a/template/admin/src/pages/order/orderList/handle/orderSend.vue +++ b/template/admin/src/pages/order/orderList/handle/orderSend.vue @@ -157,7 +157,7 @@ - + @@ -201,6 +201,10 @@ export default { orderId(val) { if (this.virtual_type == 3) this.formItem.type = '3'; }, + modals(newVal) { + if (newVal) { + } + }, }, data() { return { @@ -293,12 +297,6 @@ export default { serviceTypeList: [], }; }, - watch: { - modals(newVal) { - if (newVal) { - } - }, - }, mounted() { this.kuaidiComsList(1); let delData; @@ -310,9 +308,11 @@ export default { }, methods: { watchPrice() { + console.log(1111); let data = { kuaidicom: this.formItem.delivery_code, send_address: this.formItem.to_addr, + orderId: this.orderId, service_type: this.formItem.service_type, cart_ids: [], }; From e2ae540c310c859388dab679e3242beec193bbab Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Mon, 19 Jun 2023 10:21:29 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/public/install/crmeb.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/crmeb/public/install/crmeb.sql b/crmeb/public/install/crmeb.sql index aafb84d66..28367a604 100755 --- a/crmeb/public/install/crmeb.sql +++ b/crmeb/public/install/crmeb.sql @@ -28438,6 +28438,7 @@ CREATE TABLE IF NOT EXISTS `eb_store_order` ( `pay_type` varchar(32) NOT NULL DEFAULT '' COMMENT '支付方式', `add_time` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建时间', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:待评价;-1:已退款)', + `is_stock_up` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否备货中', `refund_status` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '0 未退款 1 申请中 2 已退款', `refund_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '退款申请类型', `refund_express` varchar(255) NOT NULL DEFAULT '' COMMENT '退货快递单号', From 525be22b79f1cc1407b61b833b20d31d6c1b67f6 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 19 Jun 2023 11:04:15 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/other/export/ExportServices.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crmeb/app/services/other/export/ExportServices.php b/crmeb/app/services/other/export/ExportServices.php index dbc60b908..b522c5785 100644 --- a/crmeb/app/services/other/export/ExportServices.php +++ b/crmeb/app/services/other/export/ExportServices.php @@ -129,7 +129,11 @@ class ExportServices extends BaseServices } $custom_form = ''; foreach ($item['custom_form'] as $custom_form_value) { - $custom_form .= $custom_form_value['title'] . ':' . $custom_form_value['value'] . ';'; + if (is_string($custom_form_value['value'])) { + $custom_form .= $custom_form_value['title'] . ':' . $custom_form_value['value'] . ';'; + } elseif (is_array($custom_form_value['value'])) { + $custom_form .= $custom_form_value['title'] . ':' . implode(',', $custom_form_value['value']) . ';'; + } } $goodsName = []; From 5409048ff8caafb79476c5910fa3cc278b1429e3 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Mon, 19 Jun 2023 11:22:27 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=8F=91=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/order/StoreOrderController.php | 27 ++++++++- .../order/StoreOrderDeliveryServices.php | 60 +++++++++++++------ 2 files changed, 67 insertions(+), 20 deletions(-) diff --git a/crmeb/app/api/controller/v1/order/StoreOrderController.php b/crmeb/app/api/controller/v1/order/StoreOrderController.php index dfb54fa1f..32ead3580 100644 --- a/crmeb/app/api/controller/v1/order/StoreOrderController.php +++ b/crmeb/app/api/controller/v1/order/StoreOrderController.php @@ -34,6 +34,7 @@ use app\services\order\{OtherOrderServices, StoreOrderInvoiceServices, StoreOrderRefundServices, StoreOrderServices, + StoreOrderStatusServices, StoreOrderSuccessServices, StoreOrderTakeServices }; @@ -814,11 +815,11 @@ class StoreOrderController ]); if (md5(json_encode($data['data']) . $data['t']) != $data['sign']) { - return app('json')->fail(); + return app('json')->fail('验签失败'); } switch ($data['type']) { - case 'order_success': + case 'order_success'://下单成功 $update = [ 'label' => $data['data']['label'] ?? '', ]; @@ -829,6 +830,28 @@ class StoreOrderController $this->services->update(['task_id' => $data['task_id']], $update); } break; + case 'order_take'://取件 + if (isset($data['task_id'])) { + $orderInfo = $this->services->get(['task_id' => $data['task_id']]); + if (!$orderInfo) { + return app('json')->fail('订单不存在'); + } + $this->services->transaction(function () use ($data, $orderInfo) { + $this->services->update(['task_id' => $data['task_id']], [ + 'status' => 1, + 'is_stock_up' => 0 + ]); + /** @var StoreOrderStatusServices $services */ + $services = app()->make(StoreOrderStatusServices::class); + $services->save([ + 'oid' => $orderInfo->id, + 'change_time' => time(), + 'change_type' => 'delivery_goods', + 'change_message' => '已发货 快递公司:' . $orderInfo->delivery_name . ' 快递单号:' . $orderInfo->delivery_id + ]); + }); + } + break; } return app('json')->success(); diff --git a/crmeb/app/services/order/StoreOrderDeliveryServices.php b/crmeb/app/services/order/StoreOrderDeliveryServices.php index 777fed1eb..a65b69fa1 100644 --- a/crmeb/app/services/order/StoreOrderDeliveryServices.php +++ b/crmeb/app/services/order/StoreOrderDeliveryServices.php @@ -593,24 +593,48 @@ class StoreOrderDeliveryServices extends BaseServices } $orderInfo->delivery_id = $data['delivery_id']; } - $data['status'] = 1; - $orderInfo->delivery_type = $data['delivery_type']; - $orderInfo->delivery_name = $data['delivery_name']; - $orderInfo->status = $data['status']; - /** @var StoreOrderStatusServices $services */ - $services = app()->make(StoreOrderStatusServices::class); - $this->transaction(function () use ($id, $data, $services) { - $res = $this->dao->update($id, $data); - $res = $res && $services->save([ - 'oid' => $id, - 'change_time' => time(), - 'change_type' => 'delivery_goods', - 'change_message' => '已发货 快递公司:' . $data['delivery_name'] . ' 快递单号:' . $data['delivery_id'] - ]); - if (!$res) { - throw new AdminException(400529); - } - }); + if ($data['express_record_type'] != 3) { + $data['status'] = 1; + $orderInfo->delivery_type = $data['delivery_type']; + $orderInfo->delivery_name = $data['delivery_name']; + $orderInfo->status = $data['status']; + /** @var StoreOrderStatusServices $services */ + $services = app()->make(StoreOrderStatusServices::class); + $this->transaction(function () use ($id, $data, $services) { + $res = $this->dao->update($id, $data); + $res = $res && $services->save([ + 'oid' => $id, + 'change_time' => time(), + 'change_type' => 'delivery_goods', + 'change_message' => '已发货 快递公司:' . $data['delivery_name'] . ' 快递单号:' . $data['delivery_id'] + ]); + if (!$res) { + throw new AdminException(400529); + } + }); + } else { + + $update = [ + 'is_stock_up' => 1, + 'delivery_type' => $data['delivery_type'], + 'delivery_name' => $data['delivery_name'], + ]; + + /** @var StoreOrderStatusServices $services */ + $services = app()->make(StoreOrderStatusServices::class); + $this->transaction(function () use ($id, $data, $services, $update) { + $res = $this->dao->update($id, $update); + $res = $res && $services->save([ + 'oid' => $id, + 'change_time' => time(), + 'change_type' => 'stock_up_goods', + 'change_message' => '备货中 快递公司:' . $data['delivery_name'] . ' 快递单号:' . $data['delivery_id'] + ]); + if (!$res) { + throw new AdminException(400529); + } + }); + } return $dump; } From ea3f786905d2e7739badde0c4e576835db354847 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 19 Jun 2023 11:55:55 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E4=BA=91=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E4=B8=8A=E4=BC=A0=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/services/upload/storage/Jdoss.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/crmeb/crmeb/services/upload/storage/Jdoss.php b/crmeb/crmeb/services/upload/storage/Jdoss.php index 4435ded6d..34945bfed 100644 --- a/crmeb/crmeb/services/upload/storage/Jdoss.php +++ b/crmeb/crmeb/services/upload/storage/Jdoss.php @@ -114,6 +114,7 @@ class Jdoss extends BaseUpload 'region' => $this->storageRegion, 'endpoint' => "http://s3.{$this->storageRegion}.jdcloud-oss.com", 'signature_version' => 'v4', + 'use_path_style_endpoint' => true, 'credentials' => [ 'key' => $this->accessKey, 'secret' => $this->secretKey, @@ -326,11 +327,11 @@ class Jdoss extends BaseUpload 'CORSConfiguration' => [ // REQUIRED 'CORSRules' => [ // REQUIRED [ - 'AllowedHeaders' => ['Authorization'], - 'AllowedMethods' => ['POST', 'GET', 'PUT'], // REQUIRED + 'AllowedHeaders' => ['*'], + 'AllowedMethods' => ['POST', 'GET', 'PUT', 'DELETE', 'HEAD'], // REQUIRED 'AllowedOrigins' => ['*'], // REQUIRED - 'ExposeHeaders' => [], - 'MaxAgeSeconds' => 3000 + 'ExposeHeaders' => ['Etag'], + 'MaxAgeSeconds' => 0 ], ], ] @@ -353,14 +354,15 @@ class Jdoss extends BaseUpload 'PutObject', [ 'Bucket' => $this->storageName, 'Key' => $key, - 'SourceFile' => $path, +// 'SourceFile' => $path, 'ContentType' => $contentType ] ); - $request = $app->createPresignedRequest($cmd, $expires); + $request = $app->createPresignedRequest($cmd, $expires, ['Scheme' => 'https']); return [ - 'url' => (string)$request->getUri(), - 'type' => 'JDOSS' + 'upload_url' => (string)$request->getUri(), + 'type' => 'JDOSS', + 'url' => $this->uploadUrl . '/' . $key ]; } catch (\Throwable $e) { return $this->setError($e->getMessage()); From 927d993419ad15a9972bd36f2393c9808b5be2f9 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 19 Jun 2023 12:19:50 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E5=A4=A9=E7=BF=BC=E4=BA=91=E5=92=8C?= =?UTF-8?q?=E5=8D=8E=E4=B8=BA=E4=BA=91=E8=A7=86=E9=A2=91=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/services/upload/storage/Obs.php | 55 +++++++++++++++-- crmeb/crmeb/services/upload/storage/Tyoss.php | 59 ++++++++++++++++--- 2 files changed, 102 insertions(+), 12 deletions(-) diff --git a/crmeb/crmeb/services/upload/storage/Obs.php b/crmeb/crmeb/services/upload/storage/Obs.php index a8e881be3..c759a7591 100644 --- a/crmeb/crmeb/services/upload/storage/Obs.php +++ b/crmeb/crmeb/services/upload/storage/Obs.php @@ -6,6 +6,7 @@ use crmeb\exceptions\AdminException; use crmeb\exceptions\UploadException; use crmeb\services\upload\extend\obs\Client as TyClient; use crmeb\services\upload\BaseUpload; +use DateTimeInterface; use GuzzleHttp\Psr7\Utils; class Obs extends BaseUpload @@ -236,8 +237,8 @@ class Obs extends BaseUpload 'AllowedHeader' => ['*'], 'AllowedMethod' => ['PUT', 'GET', 'POST', 'DELETE', 'HEAD'], 'AllowedOrigin' => ['*'], - 'ExposeHeader' => ['ETag', 'Content-Length', 'x-cos-request-id'], - 'MaxAgeSeconds' => 100 + 'ExposeHeader' => ['ETag'], + 'MaxAgeSeconds' => 0 ]); return true; } catch (\Throwable $e) { @@ -249,15 +250,59 @@ class Obs extends BaseUpload * @return array * @date 2023/6/13 */ - public function getTempKeys() + public function getTempKeys($callbackUrl = '', $dir = '') { +// return [ +// 'access_key' => $this->accessKey, +// 'secret_key' => $this->secretKey, +// 'type' => 'OBS' +// ]; + // TODO: Implement getTempKeys() method. + $base64CallbackBody = base64_encode(json_encode([ + 'callbackUrl' => $callbackUrl, + 'callbackBody' => 'filename=${object}&size=${size}&mimeType=${mimeType}&height=${imageInfo.height}&width=${imageInfo.width}', + 'callbackBodyType' => "application/x-www-form-urlencoded" + ])); + + $policy = json_encode([ + 'expiration' => $this->gmtIso8601(time() + 300), + 'conditions' => + [ + [0 => 'content-length-range', 1 => 0, 2 => 1048576000], + ['bucket' => $this->storageName], + [0 => 'starts-with', 1 => '$key', 2 => $dir], + ] + ]); + $base64Policy = base64_encode($policy); + $signature = base64_encode(hash_hmac('sha1', $base64Policy, $this->secretKey, true)); return [ - 'access_key' => $this->accessKey, - 'secret_key' => $this->secretKey, + 'accessid' => $this->accessKey, + 'host' => $this->uploadUrl, + 'policy' => $base64Policy, + 'signature' => $signature, + 'expire' => time() + 30, + 'callback' => $base64CallbackBody, + 'cdn' => $this->cdn, 'type' => 'OBS' ]; } + /** + * 获取ISO时间格式 + * @param $time + * @return string + * @throws \Exception + */ + protected function gmtIso8601($time): string + { + $dtStr = date("c", $time); + $myDateTime = new \DateTime($dtStr); + $expiration = $myDateTime->format(DateTimeInterface::ISO8601); + $pos = strpos($expiration, '+'); + $expiration = substr($expiration, 0, $pos); + return $expiration . "Z"; + } + /** * 缩略图 * @param string $filePath diff --git a/crmeb/crmeb/services/upload/storage/Tyoss.php b/crmeb/crmeb/services/upload/storage/Tyoss.php index 7df3be61d..999976760 100644 --- a/crmeb/crmeb/services/upload/storage/Tyoss.php +++ b/crmeb/crmeb/services/upload/storage/Tyoss.php @@ -5,6 +5,7 @@ namespace crmeb\services\upload\storage; use crmeb\exceptions\AdminException; use crmeb\services\upload\extend\obs\Client as TyClient; use crmeb\services\upload\BaseUpload; +use DateTimeInterface; use GuzzleHttp\Psr7\Utils; class Tyoss extends BaseUpload @@ -364,8 +365,8 @@ class Tyoss extends BaseUpload 'AllowedHeader' => ['*'], 'AllowedMethod' => ['PUT', 'GET', 'POST', 'DELETE', 'HEAD'], 'AllowedOrigin' => ['*'], - 'ExposeHeader' => ['ETag', 'Content-Length', 'x-cos-request-id'], - 'MaxAgeSeconds' => 100 + 'ExposeHeader' => ['ETag'], + 'MaxAgeSeconds' => 0 ]); return true; } catch (\Throwable $e) { @@ -374,18 +375,62 @@ class Tyoss extends BaseUpload } /** + * @param string $callbackUrl + * @param string $dir * @return array - * @date 2023/6/13 + * @throws \Exception + * @author 吴汐 + * @email 442384644@qq.com + * @date 2023/06/19 */ - public function getTempKeys() + public function getTempKeys($callbackUrl = '', $dir = '') { + // TODO: Implement getTempKeys() method. + $base64CallbackBody = base64_encode(json_encode([ + 'callbackUrl' => $callbackUrl, + 'callbackBody' => 'filename=${object}&size=${size}&mimeType=${mimeType}&height=${imageInfo.height}&width=${imageInfo.width}', + 'callbackBodyType' => "application/x-www-form-urlencoded" + ])); + + $policy = json_encode([ + 'expiration' => $this->gmtIso8601(time() + 300), + 'conditions' => + [ + [0 => 'content-length-range', 1 => 0, 2 => 1048576000], + ['bucket' => $this->storageName], + [0 => 'starts-with', 1 => '$key', 2 => $dir], + ] + ]); + $base64Policy = base64_encode($policy); + $signature = base64_encode(hash_hmac('sha1', $base64Policy, $this->secretKey, true)); return [ - 'access_key' => $this->accessKey, - 'secret_key' => $this->secretKey, - 'type' => 'TYOSS' + 'accessid' => $this->accessKey, + 'host' => $this->uploadUrl, + 'policy' => $base64Policy, + 'signature' => $signature, + 'expire' => time() + 30, + 'callback' => $base64CallbackBody, + 'cdn' => $this->cdn, + 'type' => 'OBS' ]; } + /** + * 获取ISO时间格式 + * @param $time + * @return string + * @throws \Exception + */ + protected function gmtIso8601($time): string + { + $dtStr = date("c", $time); + $myDateTime = new \DateTime($dtStr); + $expiration = $myDateTime->format(DateTimeInterface::ISO8601); + $pos = strpos($expiration, '+'); + $expiration = substr($expiration, 0, $pos); + return $expiration . "Z"; + } + /** * 缩略图 * @param string $filePath From 049ceb4fbc44eea9f36619a16bb659f14e2eb54c Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 19 Jun 2023 14:59:26 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E6=8B=BC=E5=9B=A2=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/activity/combination/StorePinkDao.php | 2 +- .../activity/combination/StoreCombinationServices.php | 4 ++-- crmeb/app/services/activity/combination/StorePinkServices.php | 1 + .../pages/activity/goods_combination_details/index.vue | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crmeb/app/dao/activity/combination/StorePinkDao.php b/crmeb/app/dao/activity/combination/StorePinkDao.php index 6f3ad7cf0..b47ed69d1 100644 --- a/crmeb/app/dao/activity/combination/StorePinkDao.php +++ b/crmeb/app/dao/activity/combination/StorePinkDao.php @@ -132,7 +132,7 @@ class StorePinkDao extends BaseDao public function successList(int $uid) { return $this->search(['status' => 2, 'is_refund' => 0]) - ->where('uid', '<>', $uid) +// ->where('uid', '<>', $uid) ->select()->toArray(); } diff --git a/crmeb/app/services/activity/combination/StoreCombinationServices.php b/crmeb/app/services/activity/combination/StoreCombinationServices.php index 6a01a7456..242ef304c 100644 --- a/crmeb/app/services/activity/combination/StoreCombinationServices.php +++ b/crmeb/app/services/activity/combination/StoreCombinationServices.php @@ -393,11 +393,11 @@ class StoreCombinationServices extends BaseServices /** @var StorePinkServices $pinkService */ $pinkService = app()->make(StorePinkServices::class); - list($pink, $pindAll) = $pinkService->getPinkList($id, true);//拼团列表 + list($pink, $pinkAll) = $pinkService->getPinkList($id, true);//拼团列表 $data['pink_ok_list'] = $pinkService->getPinkOkList($uid); $data['pink_ok_sum'] = $pinkService->getPinkOkSumTotalNum(); $data['pink'] = $pink; - $data['pindAll'] = $pindAll; + $data['pinkAll'] = $pinkAll; /** @var StoreOrderServices $storeOrderServices */ $storeOrderServices = app()->make(StoreOrderServices::class); diff --git a/crmeb/app/services/activity/combination/StorePinkServices.php b/crmeb/app/services/activity/combination/StorePinkServices.php index 9715a4f06..933e3630f 100644 --- a/crmeb/app/services/activity/combination/StorePinkServices.php +++ b/crmeb/app/services/activity/combination/StorePinkServices.php @@ -157,6 +157,7 @@ class StorePinkServices extends BaseServices $where['cid'] = $id; $where['k_id'] = 0; $where['is_refund'] = 0; + $where['status'] = 1; $pinkList = $this->dao->pinkList($where); $ids = array_column($pinkList, 'id'); $orderIdKey = array_column($pinkList, 'order_id_key'); diff --git a/template/uni-app/pages/activity/goods_combination_details/index.vue b/template/uni-app/pages/activity/goods_combination_details/index.vue index 0b204114e..37bf4c431 100644 --- a/template/uni-app/pages/activity/goods_combination_details/index.vue +++ b/template/uni-app/pages/activity/goods_combination_details/index.vue @@ -618,7 +618,7 @@ '