From 5e1cb83a4ee1baa5d51e47488cd2a633a07606a6 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 12 Jun 2023 09:13:09 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=90=8E=E7=BC=80=E5=85=BC=E5=AE=B9=E5=A4=A7?= =?UTF-8?q?=E5=86=99=E5=AD=97=E6=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/services/upload/storage/Cos.php | 2 +- crmeb/crmeb/services/upload/storage/Jdoss.php | 2 +- crmeb/crmeb/services/upload/storage/Local.php | 2 +- crmeb/crmeb/services/upload/storage/Obs.php | 2 +- crmeb/crmeb/services/upload/storage/Oss.php | 2 +- crmeb/crmeb/services/upload/storage/Qiniu.php | 2 +- crmeb/crmeb/services/upload/storage/Tyoss.php | 2 +- template/admin/src/pages/notify/smsConfig/index.vue | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crmeb/crmeb/services/upload/storage/Cos.php b/crmeb/crmeb/services/upload/storage/Cos.php index a7ea05bac..3e26b9601 100644 --- a/crmeb/crmeb/services/upload/storage/Cos.php +++ b/crmeb/crmeb/services/upload/storage/Cos.php @@ -139,7 +139,7 @@ class Cos extends BaseUpload return $this->setError('上传的文件不存在'); } if ($this->validate) { - if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { + if (!in_array(strtolower(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION)), $this->validate['fileExt'])) { return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { diff --git a/crmeb/crmeb/services/upload/storage/Jdoss.php b/crmeb/crmeb/services/upload/storage/Jdoss.php index b8c5d1f72..71b6b2512 100644 --- a/crmeb/crmeb/services/upload/storage/Jdoss.php +++ b/crmeb/crmeb/services/upload/storage/Jdoss.php @@ -129,7 +129,7 @@ class Jdoss extends BaseUpload return $this->setError('上传的文件不存在'); } if ($this->validate) { - if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { + if (!in_array(strtolower(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION)), $this->validate['fileExt'])) { return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { diff --git a/crmeb/crmeb/services/upload/storage/Local.php b/crmeb/crmeb/services/upload/storage/Local.php index 366eb3d62..1c878147e 100644 --- a/crmeb/crmeb/services/upload/storage/Local.php +++ b/crmeb/crmeb/services/upload/storage/Local.php @@ -116,7 +116,7 @@ class Local extends BaseUpload return $this->setError('上传的文件不存在'); } if ($this->validate) { - if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { + if (!in_array(strtolower(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION)), $this->validate['fileExt'])) { return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { diff --git a/crmeb/crmeb/services/upload/storage/Obs.php b/crmeb/crmeb/services/upload/storage/Obs.php index c5a9910f5..20b03af90 100644 --- a/crmeb/crmeb/services/upload/storage/Obs.php +++ b/crmeb/crmeb/services/upload/storage/Obs.php @@ -59,7 +59,7 @@ class Obs extends BaseUpload return $this->setError('上传的文件不存在'); } if ($this->validate) { - if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { + if (!in_array(strtolower(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION)), $this->validate['fileExt'])) { return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { diff --git a/crmeb/crmeb/services/upload/storage/Oss.php b/crmeb/crmeb/services/upload/storage/Oss.php index f45da416b..012c3d201 100644 --- a/crmeb/crmeb/services/upload/storage/Oss.php +++ b/crmeb/crmeb/services/upload/storage/Oss.php @@ -130,7 +130,7 @@ class Oss extends BaseUpload return $this->setError('上传的文件不存在'); } if ($this->validate) { - if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { + if (!in_array(strtolower(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION)), $this->validate['fileExt'])) { return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { diff --git a/crmeb/crmeb/services/upload/storage/Qiniu.php b/crmeb/crmeb/services/upload/storage/Qiniu.php index b9dae7968..1558c50cc 100644 --- a/crmeb/crmeb/services/upload/storage/Qiniu.php +++ b/crmeb/crmeb/services/upload/storage/Qiniu.php @@ -126,7 +126,7 @@ class Qiniu extends BaseUpload return $this->setError('上传的文件不存在'); } if ($this->validate) { - if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { + if (!in_array(strtolower(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION)), $this->validate['fileExt'])) { return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { diff --git a/crmeb/crmeb/services/upload/storage/Tyoss.php b/crmeb/crmeb/services/upload/storage/Tyoss.php index 1e90dad7c..2233ba07f 100644 --- a/crmeb/crmeb/services/upload/storage/Tyoss.php +++ b/crmeb/crmeb/services/upload/storage/Tyoss.php @@ -58,7 +58,7 @@ class Tyoss extends BaseUpload return $this->setError('上传的文件不存在'); } if ($this->validate) { - if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { + if (!in_array(strtolower(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION)), $this->validate['fileExt'])) { return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { diff --git a/template/admin/src/pages/notify/smsConfig/index.vue b/template/admin/src/pages/notify/smsConfig/index.vue index 40f321d8e..4c4c089cb 100644 --- a/template/admin/src/pages/notify/smsConfig/index.vue +++ b/template/admin/src/pages/notify/smsConfig/index.vue @@ -137,7 +137,7 @@ export default { }; }, created() { - this.onIsLogin(); + // this.onIsLogin(); }, methods: { onChangePhone() { From 21e83a76dc21c387984de8715a33aa2701f35938 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Mon, 12 Jun 2023 09:59:52 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=95=86=E5=AE=B6?= =?UTF-8?q?=E5=AF=84=E4=BB=B6=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/v1/order/StoreOrder.php | 4 +- .../v1/order/StoreOrderController.php | 38 +++++++++++++++++++ crmeb/app/api/route/v1.php | 1 + .../services/express/storage/Express.php | 2 +- 4 files changed, 42 insertions(+), 3 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/order/StoreOrder.php b/crmeb/app/adminapi/controller/v1/order/StoreOrder.php index 7d6f50e40..d0ed1fbe8 100644 --- a/crmeb/app/adminapi/controller/v1/order/StoreOrder.php +++ b/crmeb/app/adminapi/controller/v1/order/StoreOrder.php @@ -242,7 +242,7 @@ class StoreOrder extends AuthController ['delivery_id', ''],//快递单号 ['delivery_code', ''],//快递公司编码 - ['express_record_type', 2],//发货记录类型 + ['express_record_type', 2],//发货记录类型:2=电子面单;3=商家寄件 ['express_temp_id', ""],//电子面单模板 ['to_name', ''],//寄件人姓名 ['to_tel', ''],//寄件人电话 @@ -465,7 +465,7 @@ class StoreOrder extends AuthController */ public function order_info($id) { - if (!$id || !($orderInfo = $this->services->get($id, [], ['refund','invoice']))) { + if (!$id || !($orderInfo = $this->services->get($id, [], ['refund', 'invoice']))) { return app('json')->fail(400118); } /** @var UserServices $services */ diff --git a/crmeb/app/api/controller/v1/order/StoreOrderController.php b/crmeb/app/api/controller/v1/order/StoreOrderController.php index 613d27b48..6a7e9134e 100644 --- a/crmeb/app/api/controller/v1/order/StoreOrderController.php +++ b/crmeb/app/api/controller/v1/order/StoreOrderController.php @@ -793,4 +793,42 @@ class StoreOrderController $cartProduct['order_id'] = $this->services->value(['id' => $cartInfo['oid']], 'order_id'); return app('json')->success($cartProduct); } + + /** + * 商家寄件回调 + * @param Request $request + * @return \think\Response + * @author 等风来 + * @email 136327134@qq.com + * @date 2023/6/12 + */ + public function callBack(Request $request) + { + $data = $request->postMore([ + ['t', ''], + ['sign', ''], + ['type', ''], + ['data', ''], + ]); + + if (md5(json_encode($data['data']) . $data['t']) != $data['sign']) { + return app('json')->fail(); + } + + switch ($data['type']) { + case 'order_success': + $update = [ + 'label' => $data['data']['label'] ?? '', + ]; + if (isset($data['kuaidinum'])) { + $update['delivery_id'] = $data['kuaidinum']; + } + if (isset($data['task_id'])) { + $this->services->update(['task_id' => $data['task_id']], $update); + } + break; + } + + return app('json')->success(); + } } diff --git a/crmeb/app/api/route/v1.php b/crmeb/app/api/route/v1.php index 5aba54cd7..586fe4b64 100644 --- a/crmeb/app/api/route/v1.php +++ b/crmeb/app/api/route/v1.php @@ -18,6 +18,7 @@ Route::group(function () { Route::any('wechat/serve', 'v1.wechat.WechatController/serve')->option(['real_name' => '公众号服务']);//公众号服务 Route::any('wechat/miniServe', 'v1.wechat.WechatController/miniServe')->option(['real_name' => '小程序服务']);//公众号服务 Route::any('pay/notify/:type', 'v1.PayController/notify')->option(['real_name' => '支付回调']);//支付回调 + Route::any('order_call_back', 'v1.order.StoreOrderController/callBack')->option(['real_name' => '商家寄件回调']);//商家寄件回调 Route::get('get_script', 'v1.PublicController/getScript')->option(['real_name' => '获取统计代码']);//获取统计代码 Route::get('version', 'v1.PublicController/getVersion')->option(['real_name' => '获取代码版本号']); })->option(['mark' => 'serve', 'mark_name' => '服务接口']); diff --git a/crmeb/crmeb/services/express/storage/Express.php b/crmeb/crmeb/services/express/storage/Express.php index 38c7b9b6b..b9258fa45 100644 --- a/crmeb/crmeb/services/express/storage/Express.php +++ b/crmeb/crmeb/services/express/storage/Express.php @@ -96,7 +96,7 @@ class Express extends BaseExpress 'send_real_name' => $data['send_real_name'], 'send_phone' => $data['send_phone'], 'send_address' => $data['send_address'], - 'call_back_url' => sys_config(''), + 'call_back_url' => sys_config('site_url') . '/api/order_call_back', 'return_type' => $siid ? '10' : '20', 'siid' => $siid, 'tempid' => $data['tempid'], From 3425e2bff89f2c62306fd7b2c00fc12f887ee7a5 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 12 Jun 2023 10:32:46 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=AB=AF=E6=9F=A5=E7=9C=8B=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/api/controller/v1/PublicController.php | 2 +- crmeb/app/model/user/User.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crmeb/app/api/controller/v1/PublicController.php b/crmeb/app/api/controller/v1/PublicController.php index 377c6c25e..c543d8376 100644 --- a/crmeb/app/api/controller/v1/PublicController.php +++ b/crmeb/app/api/controller/v1/PublicController.php @@ -217,8 +217,8 @@ class PublicController /** * 图片上传 * @param Request $request + * @param SystemAttachmentServices $services * @return mixed - * @throws \Psr\SimpleCache\InvalidArgumentException */ public function upload_image(Request $request, SystemAttachmentServices $services) { diff --git a/crmeb/app/model/user/User.php b/crmeb/app/model/user/User.php index 4cfb748d5..a2baa425f 100644 --- a/crmeb/app/model/user/User.php +++ b/crmeb/app/model/user/User.php @@ -69,10 +69,10 @@ class User extends BaseModel return app('request')->ip(); } - protected function getPhoneAttr($value) - { - return $value && app('request')->hasMacro('adminInfo') && app('request')->adminInfo()['level'] != 0 ? substr_replace($value, '****', 3, 4) : $value; - } +// protected function getPhoneAttr($value) +// { +// return $value && app('request')->hasMacro('adminInfo') && app('request')->adminInfo()['level'] != 0 ? substr_replace($value, '****', 3, 4) : $value; +// } /** * 链接会员登陆设置表 From c4a21a16e0ed9e7f89feb86361e111995d61137d Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 12 Jun 2023 11:21:42 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=8E=92=E5=BA=8F=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/article/ArticleCategoryDao.php | 4 ++-- crmeb/app/dao/diy/PageCategoryDao.php | 2 +- crmeb/app/dao/order/StoreOrderDao.php | 6 +++--- crmeb/app/dao/shipping/ShippingTemplatesDao.php | 2 +- crmeb/app/dao/system/SystemMenusDao.php | 4 ++-- crmeb/app/dao/system/config/SystemConfigDao.php | 2 +- crmeb/app/dao/user/MemberShipDao.php | 2 +- crmeb/app/dao/user/UserAddressDao.php | 2 +- crmeb/app/dao/user/UserLabelCateDao.php | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/crmeb/app/dao/article/ArticleCategoryDao.php b/crmeb/app/dao/article/ArticleCategoryDao.php index dfd266a10..b0734c33b 100644 --- a/crmeb/app/dao/article/ArticleCategoryDao.php +++ b/crmeb/app/dao/article/ArticleCategoryDao.php @@ -59,7 +59,7 @@ class ArticleCategoryDao extends BaseDao public function getArticleCategory() { return $this->search(['hidden' => 0, 'is_del' => 0, 'status' => 1, 'pid' => 0])->with(['children']) - ->order('sort DESC') + ->order('sort DESC,id DESC') ->field('id,pid,title') ->select()->toArray(); } @@ -77,7 +77,7 @@ class ArticleCategoryDao extends BaseDao ->where('hidden', 0) ->where('is_del', 0) ->where('status', 1) - ->order('sort DESC') + ->order('sort DESC,id DESC') ->field('id,pid,title') ->select()->toArray(); } diff --git a/crmeb/app/dao/diy/PageCategoryDao.php b/crmeb/app/dao/diy/PageCategoryDao.php index a147ef424..9a14f7753 100644 --- a/crmeb/app/dao/diy/PageCategoryDao.php +++ b/crmeb/app/dao/diy/PageCategoryDao.php @@ -47,7 +47,7 @@ class PageCategoryDao extends BaseDao { return $this->search($where)->field($field)->when($page && $limit, function ($query) use ($page, $limit) { $query->page(); - })->order('sort desc')->select()->toArray(); + })->order('sort desc,id DESC')->select()->toArray(); } } diff --git a/crmeb/app/dao/order/StoreOrderDao.php b/crmeb/app/dao/order/StoreOrderDao.php index 6a351008a..5c239fb6b 100644 --- a/crmeb/app/dao/order/StoreOrderDao.php +++ b/crmeb/app/dao/order/StoreOrderDao.php @@ -702,7 +702,7 @@ class StoreOrderDao extends BaseDao $query->field("sum($sumField) as number,FROM_UNIXTIME($group, '$timeUinx') as time"); $query->group("FROM_UNIXTIME($group, '$timeUinx')"); }) - ->order('pay_time ASC')->select()->toArray(); + ->order('pay_time ASC,id DESC')->select()->toArray(); } /**时间分组订单数统计 @@ -730,7 +730,7 @@ class StoreOrderDao extends BaseDao $query->field("count($sumField) as number,FROM_UNIXTIME(pay_time, '$timeUinx') as time"); $query->group("FROM_UNIXTIME(pay_time, '$timeUinx')"); }) - ->order('pay_time ASC')->select()->toArray(); + ->order('pay_time ASC,id DESC')->select()->toArray(); } /**时间段支付订单人数 @@ -773,7 +773,7 @@ class StoreOrderDao extends BaseDao $query->field("count(distinct uid) as number,FROM_UNIXTIME(pay_time, '$timeUinx') as time"); $query->group("FROM_UNIXTIME(pay_time, '$timeUinx')"); }) - ->order('pay_time ASC')->select()->toArray(); + ->order('pay_time ASC,id DESC')->select()->toArray(); } diff --git a/crmeb/app/dao/shipping/ShippingTemplatesDao.php b/crmeb/app/dao/shipping/ShippingTemplatesDao.php index 66c32e815..42b0a0896 100644 --- a/crmeb/app/dao/shipping/ShippingTemplatesDao.php +++ b/crmeb/app/dao/shipping/ShippingTemplatesDao.php @@ -53,7 +53,7 @@ class ShippingTemplatesDao extends BaseDao */ public function getShippingList(array $where, int $page, int $limit) { - return $this->search($where)->order('sort DESC')->page($page, $limit)->select()->toArray(); + return $this->search($where)->order('sort DESC,id DESC')->page($page, $limit)->select()->toArray(); } /** diff --git a/crmeb/app/dao/system/SystemMenusDao.php b/crmeb/app/dao/system/SystemMenusDao.php index 952ceee3a..8f39cd767 100644 --- a/crmeb/app/dao/system/SystemMenusDao.php +++ b/crmeb/app/dao/system/SystemMenusDao.php @@ -128,7 +128,7 @@ class SystemMenusDao extends BaseDao public function menusSelect(array $where, $type = 1) { if ($type == 1) { - return $this->search($where)->field('id,pid,menu_name,menu_path,unique_auth,sort')->order('sort DESC')->select(); + return $this->search($where)->field('id,pid,menu_name,menu_path,unique_auth,sort')->order('sort DESC,id DESC')->select(); } else { return $this->search($where)->group('pid')->column('pid'); } @@ -143,7 +143,7 @@ class SystemMenusDao extends BaseDao public function getSearchList() { return $this->search(['is_show' => 1, 'auth_type' => 1, 'is_del' => 0, 'is_show_path' => 0]) - ->field('id,pid,menu_name,menu_path,unique_auth,sort')->order('sort DESC')->select(); + ->field('id,pid,menu_name,menu_path,unique_auth,sort')->order('sort DESC,id DESC')->select(); } /** diff --git a/crmeb/app/dao/system/config/SystemConfigDao.php b/crmeb/app/dao/system/config/SystemConfigDao.php index d093c2c23..8afaf35d0 100644 --- a/crmeb/app/dao/system/config/SystemConfigDao.php +++ b/crmeb/app/dao/system/config/SystemConfigDao.php @@ -84,7 +84,7 @@ class SystemConfigDao extends BaseDao { $where['tab_id'] = $tabId; if ($status == 1) $where['status'] = $status; - return $this->search($where)->order('sort desc')->select()->toArray(); + return $this->search($where)->order('sort desc,id DESC')->select()->toArray(); } /** diff --git a/crmeb/app/dao/user/MemberShipDao.php b/crmeb/app/dao/user/MemberShipDao.php index a6720c2d4..2ec8fd55b 100644 --- a/crmeb/app/dao/user/MemberShipDao.php +++ b/crmeb/app/dao/user/MemberShipDao.php @@ -50,7 +50,7 @@ class MemberShipDao extends BaseDao */ public function getApiList(array $where) { - return $this->search()->where($where)->order('sort desc')->select()->toArray(); + return $this->search()->where($where)->order('sort desc,id DESC')->select()->toArray(); } diff --git a/crmeb/app/dao/user/UserAddressDao.php b/crmeb/app/dao/user/UserAddressDao.php index 2ad2d13da..bce2de1cd 100644 --- a/crmeb/app/dao/user/UserAddressDao.php +++ b/crmeb/app/dao/user/UserAddressDao.php @@ -44,6 +44,6 @@ class UserAddressDao extends BaseDao */ public function getList(array $where, string $field = '*', int $page, int $limit): array { - return $this->search($where)->field($field)->page($page, $limit)->order('is_default DESC')->select()->toArray(); + return $this->search($where)->field($field)->page($page, $limit)->order('is_default DESC,id DESC')->select()->toArray(); } } diff --git a/crmeb/app/dao/user/UserLabelCateDao.php b/crmeb/app/dao/user/UserLabelCateDao.php index c5adb29fa..bd192c3da 100644 --- a/crmeb/app/dao/user/UserLabelCateDao.php +++ b/crmeb/app/dao/user/UserLabelCateDao.php @@ -45,7 +45,7 @@ class UserLabelCateDao extends BaseDao { return $this->search($where)->when($page && $limit, function ($query) use ($page, $limit) { $query->page($page, $limit); - })->order('sort DESC')->select()->toArray(); + })->order('sort DESC,id DESC')->select()->toArray(); } /** @@ -59,6 +59,6 @@ class UserLabelCateDao extends BaseDao { return $this->getModel()->when(count($with), function ($query) use ($with) { $query->with($with); - })->order('sort DESC')->select()->toArray(); + })->order('sort DESC,id DESC')->select()->toArray(); } } From 539dc36745583ecbbce00784c86cfb6b2c675840 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 12 Jun 2023 18:10:25 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A5=BD=E5=8F=8B?= =?UTF-8?q?=E4=BB=A3=E4=BB=98=E6=9B=B4=E6=96=B0=E8=AE=A2=E5=8D=95=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/api/controller/v1/order/StoreOrderController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crmeb/app/api/controller/v1/order/StoreOrderController.php b/crmeb/app/api/controller/v1/order/StoreOrderController.php index 6a7e9134e..5b2ba4b07 100644 --- a/crmeb/app/api/controller/v1/order/StoreOrderController.php +++ b/crmeb/app/api/controller/v1/order/StoreOrderController.php @@ -255,10 +255,11 @@ class StoreOrderController $orderInfo = $this->services->get(['order_id' => $uni]); $uid = $type == 1 ? (int)$request->uid() : $orderInfo->uid; $orderInfo->is_channel = $this->getChennel[$request->getFromType()] ?? ($request->isApp() ? 0 : 1); + $orderInfo->order_id = $uid != $orderInfo->pay_uid ? app()->make(StoreOrderCreateServices::class)->getNewOrderId('cp') : $uni; $orderInfo->pay_uid = $uid; $orderInfo->save(); $orderInfo = $orderInfo->toArray(); - $order = $this->services->get(['order_id' => $uni]); + $order = $this->services->get(['order_id' => $orderInfo['order_id']]); if (!$order) return app('json')->fail(410173); if ($order['paid'])