From e1b6d608feb861b2d2df9d8c5e2ea775d177a8a5 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 29 Mar 2023 17:23:46 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8B=BC=E5=9B=A2?= =?UTF-8?q?=E6=8B=BC=E5=9B=A2=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E5=B1=95=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/src/pages/marketing/storeCombination/combinaList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/admin/src/pages/marketing/storeCombination/combinaList.vue b/template/admin/src/pages/marketing/storeCombination/combinaList.vue index ba22b23fd..c72384b70 100644 --- a/template/admin/src/pages/marketing/storeCombination/combinaList.vue +++ b/template/admin/src/pages/marketing/storeCombination/combinaList.vue @@ -249,7 +249,7 @@ export default { }, { title: '金额', - key: 'price', + key: 'total_price', }, { title: '订单状态', From 397ec0c48fc006d9f5b98f0be1881e3b902292a4 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 29 Mar 2023 17:24:17 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/api/controller/v1/admin/StoreOrderController.php | 2 +- crmeb/app/dao/activity/combination/StorePinkDao.php | 1 + crmeb/app/dao/order/StoreOrderDao.php | 9 ++++++--- .../services/activity/combination/StorePinkServices.php | 8 +++++++- template/uni-app/pages/goods/goods_return/index.vue | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/crmeb/app/api/controller/v1/admin/StoreOrderController.php b/crmeb/app/api/controller/v1/admin/StoreOrderController.php index 2bdcd8f91..f966fd6c4 100644 --- a/crmeb/app/api/controller/v1/admin/StoreOrderController.php +++ b/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); } diff --git a/crmeb/app/dao/activity/combination/StorePinkDao.php b/crmeb/app/dao/activity/combination/StorePinkDao.php index d6b18ffca..042272623 100644 --- a/crmeb/app/dao/activity/combination/StorePinkDao.php +++ b/crmeb/app/dao/activity/combination/StorePinkDao.php @@ -138,6 +138,7 @@ class StorePinkDao extends BaseDao /** * 获取拼团完成的个数 * @return float + * @throws \ReflectionException */ public function getPinkOkSumTotalNum() { diff --git a/crmeb/app/dao/order/StoreOrderDao.php b/crmeb/app/dao/order/StoreOrderDao.php index cb9c12c51..166e5a6df 100644 --- a/crmeb/app/dao/order/StoreOrderDao.php +++ b/crmeb/app/dao/order/StoreOrderDao.php @@ -446,8 +446,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 @@ -455,7 +456,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); } /** diff --git a/crmeb/app/services/activity/combination/StorePinkServices.php b/crmeb/app/services/activity/combination/StorePinkServices.php index 3033ddbeb..535ab831b 100644 --- a/crmeb/app/services/activity/combination/StorePinkServices.php +++ b/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) { diff --git a/template/uni-app/pages/goods/goods_return/index.vue b/template/uni-app/pages/goods/goods_return/index.vue index c1984e250..9062265cd 100644 --- a/template/uni-app/pages/goods/goods_return/index.vue +++ b/template/uni-app/pages/goods/goods_return/index.vue @@ -10,7 +10,7 @@ {{item.productInfo.store_name}} - {{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price)).toFixed(2)}} + {{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price/item.cart_num)).toFixed(2)}} x{{item.cart_num}} From 7451a0118b578d550ea5061e8b42e57a833f4a51 Mon Sep 17 00:00:00 2001 From: From-wh Date: Wed, 29 Mar 2023 17:25:27 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix:=20=E6=8B=BC=E5=9B=A2=E9=80=89=E8=B4=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uni-app/pages/activity/goods_combination_details/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d2d15da94..73e88b3cd 100644 --- a/template/uni-app/pages/activity/goods_combination_details/index.vue +++ b/template/uni-app/pages/activity/goods_combination_details/index.vue @@ -258,7 +258,7 @@ - Date: Wed, 29 Mar 2023 17:36:27 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=96=87=E5=AD=97?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity/integral/StoreIntegralOrderServices.php | 9 ++++----- .../admin/src/pages/user/list/handle/userDetails.vue | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/crmeb/app/services/activity/integral/StoreIntegralOrderServices.php b/crmeb/app/services/activity/integral/StoreIntegralOrderServices.php index c36a1b39f..b7d778696 100644 --- a/crmeb/app/services/activity/integral/StoreIntegralOrderServices.php +++ b/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; diff --git a/template/admin/src/pages/user/list/handle/userDetails.vue b/template/admin/src/pages/user/list/handle/userDetails.vue index acb6f4d18..895b76109 100644 --- a/template/admin/src/pages/user/list/handle/userDetails.vue +++ b/template/admin/src/pages/user/list/handle/userDetails.vue @@ -214,7 +214,7 @@ export default { minWidth: 120, }, { - title: '变化前积分', + title: '变化后积分', key: 'balance', minWidth: 120, }, From 56efb28b32f678874831b04552cc310518c61f50 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 30 Mar 2023 10:01:07 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E6=8B=BC=E5=9B=A2=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/v1/marketing/StoreCombination.php | 14 +++++++++++++- .../app/dao/activity/combination/StorePinkDao.php | 2 ++ crmeb/app/dao/order/StoreOrderDao.php | 4 ++-- .../combination/StoreCombinationServices.php | 4 ++-- .../activity/combination/StorePinkServices.php | 3 +++ .../admin/src/pages/marketing/live/creat_live.vue | 4 ++-- .../marketing/storeCombination/statistics.vue | 4 ++-- 7 files changed, 26 insertions(+), 9 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/marketing/StoreCombination.php b/crmeb/app/adminapi/controller/v1/marketing/StoreCombination.php index 11449be1c..a02808cd6 100644 --- a/crmeb/app/adminapi/controller/v1/marketing/StoreCombination.php +++ b/crmeb/app/adminapi/controller/v1/marketing/StoreCombination.php @@ -182,7 +182,11 @@ class StoreCombination extends AuthController /** * 拼团人列表 + * @param $id * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function order_pink($id) { @@ -207,12 +211,20 @@ class StoreCombination extends AuthController * 活动参与人 * @param $id * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function combinationStatisticsList($id) { + $where = $this->request->getMore([ + ['real_name', '', '', 'keyword'], + ['status', ''] + ]); + $where['cid'] = $id; /** @var StorePinkServices $storePinkServices */ $storePinkServices = app()->make(StorePinkServices::class); - $list = $storePinkServices->systemPage(['cid' => $id]); + $list = $storePinkServices->systemPage($where); return app('json')->success($list); } diff --git a/crmeb/app/dao/activity/combination/StorePinkDao.php b/crmeb/app/dao/activity/combination/StorePinkDao.php index 042272623..433086504 100644 --- a/crmeb/app/dao/activity/combination/StorePinkDao.php +++ b/crmeb/app/dao/activity/combination/StorePinkDao.php @@ -56,6 +56,8 @@ class StorePinkDao extends BaseDao { return $this->search($where)->when($where['k_id'] != 0, function ($query) use ($where) { $query->whereOr('id', $where['k_id']); + })->when(isset($where['keyword']) && $where['keyword'] != '', function ($query) use ($where) { + $query->where('uid|nickname', 'like', '%' . $where['keyword'] . '%'); })->with('getProduct')->when($page != 0, function ($query) use ($page, $limit) { $query->page($page, $limit); })->order('add_time desc')->select()->toArray(); diff --git a/crmeb/app/dao/order/StoreOrderDao.php b/crmeb/app/dao/order/StoreOrderDao.php index 166e5a6df..a32c3f941 100644 --- a/crmeb/app/dao/order/StoreOrderDao.php +++ b/crmeb/app/dao/order/StoreOrderDao.php @@ -967,9 +967,9 @@ class StoreOrderDao extends BaseDao */ public function combinationStatisticsOrder($id, $where, $page = 0, $limit = 0) { - return $this->search($where)->where('combination_id', $id) + return $this->search($where)->where('combination_id', $id)->where('paid', 1)->whereIn('refund_type', [0, 3])->where('is_del', 0) ->when($page && $limit, function ($query) use ($page, $limit) { $query->page($page, $limit); - })->field(['order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->select()->toArray(); + })->field(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray(); } } diff --git a/crmeb/app/services/activity/combination/StoreCombinationServices.php b/crmeb/app/services/activity/combination/StoreCombinationServices.php index 07b7f34ec..a894d7789 100644 --- a/crmeb/app/services/activity/combination/StoreCombinationServices.php +++ b/crmeb/app/services/activity/combination/StoreCombinationServices.php @@ -643,8 +643,8 @@ class StoreCombinationServices extends BaseServices $spread_count = $pinkServices->getDistinctCount([['cid', '=', $id], ['k_id', '>', 0]], 'uid', false); $start_count = $pinkServices->count(['cid' => $id, 'k_id' => 0]); $success_count = $pinkServices->count(['cid' => $id, 'k_id' => 0, 'status' => 2]); - $pay_price = $orderServices->sum(['combination_id' => $id, 'paid' => 1], 'pay_price', true); - $pay_count = $orderServices->getDistinctCount([['combination_id', '=', $id], ['paid', '=', 1]], 'uid', false); + $pay_price = $orderServices->sum([['combination_id', '=', $id], ['paid', '=', 1], ['refund_type', 'in', [0, 3]], ['is_del', '=', 0]], 'pay_price', false); + $pay_count = $orderServices->getDistinctCount([['combination_id', '=', $id], ['paid', '=', 1], ['refund_type', 'in', [0, 3]], ['is_del', '=', 0]], 'uid', false); return compact('people_count', 'spread_count', 'start_count', 'success_count', 'pay_price', 'pay_count'); } diff --git a/crmeb/app/services/activity/combination/StorePinkServices.php b/crmeb/app/services/activity/combination/StorePinkServices.php index 535ab831b..4da1e716c 100644 --- a/crmeb/app/services/activity/combination/StorePinkServices.php +++ b/crmeb/app/services/activity/combination/StorePinkServices.php @@ -56,6 +56,9 @@ class StorePinkServices extends BaseServices /** * @param array $where * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function systemPage(array $where) { diff --git a/template/admin/src/pages/marketing/live/creat_live.vue b/template/admin/src/pages/marketing/live/creat_live.vue index 4b5e22794..8f64caad3 100644 --- a/template/admin/src/pages/marketing/live/creat_live.vue +++ b/template/admin/src/pages/marketing/live/creat_live.vue @@ -117,7 +117,7 @@ /> - + diff --git a/template/admin/src/pages/marketing/storeCombination/statistics.vue b/template/admin/src/pages/marketing/storeCombination/statistics.vue index 41b6fb337..a3567354e 100644 --- a/template/admin/src/pages/marketing/storeCombination/statistics.vue +++ b/template/admin/src/pages/marketing/storeCombination/statistics.vue @@ -42,7 +42,7 @@ search enter-button v-model="pagination.real_name" - placeholder="请输入用户姓名|手机号|UID" + :placeholder="type == 1 ? '请输入用户|订单号|UID' : '请输入用户姓名|UID'" @on-search="searchList" /> @@ -292,7 +292,7 @@ export default { }, { title: '金额', - key: 'price', + key: 'total_price', }, { title: '订单状态', From 92721fca42900f607fb213c494656cb9a27c250e Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 30 Mar 2023 12:16:11 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BB=A3=E7=90=86=E5=95=86=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=B7=BB=E5=8A=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 --- .../adminapi/controller/v1/agent/AgentManage.php | 2 +- .../app/adminapi/controller/v1/agent/Division.php | 9 +++++++-- crmeb/app/dao/BaseDao.php | 4 +++- crmeb/app/dao/user/UserDao.php | 1 + crmeb/app/services/agent/DivisionServices.php | 10 ++++++++-- crmeb/app/services/user/UserServices.php | 1 + template/admin/src/pages/division/agent/index.vue | 10 +++++----- template/admin/src/pages/division/list/index.vue | 15 +++++---------- 8 files changed, 31 insertions(+), 21 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/agent/AgentManage.php b/crmeb/app/adminapi/controller/v1/agent/AgentManage.php index 7decf21f9..0383da60e 100644 --- a/crmeb/app/adminapi/controller/v1/agent/AgentManage.php +++ b/crmeb/app/adminapi/controller/v1/agent/AgentManage.php @@ -60,7 +60,7 @@ class AgentManage extends AuthController public function get_badge() { $where = $this->request->getMore([ - ['data', ''], + ['data', '', '', 'time'], ['nickname', ''], ]); return app('json')->success(['res' => $this->services->getSpreadBadge($where)]); diff --git a/crmeb/app/adminapi/controller/v1/agent/Division.php b/crmeb/app/adminapi/controller/v1/agent/Division.php index cbdc965ca..50cf1baa5 100644 --- a/crmeb/app/adminapi/controller/v1/agent/Division.php +++ b/crmeb/app/adminapi/controller/v1/agent/Division.php @@ -121,19 +121,24 @@ class Division extends AuthController * 保存代理商 * @param UserServices $userServices * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function divisionAgentSave(UserServices $userServices) { $data = $this->request->postMore([ + ['division_id', 0], ['uid', 0], ['division_percent', 0], ['division_end_time', ''], ['division_status', 1], ['edit', 0], ]); - $userInfo = $userServices->get((int)$data['uid']); + $userInfo = $userServices->count(['uid' => (int)$data['uid']]); if (!$userInfo) throw new AdminException(100100); - $data['division_id'] = $this->adminInfo['division_id']; + $divisionUserInfo = $userServices->count(['uid' => (int)$data['division_id'], 'is_division' => 1, 'division_id' => $data['division_id']]); + if (!$divisionUserInfo) throw new AdminException(100100); $this->services->divisionAgentSave($data); return app('json')->success(100000); } diff --git a/crmeb/app/dao/BaseDao.php b/crmeb/app/dao/BaseDao.php index d1e69ece7..8563bd493 100644 --- a/crmeb/app/dao/BaseDao.php +++ b/crmeb/app/dao/BaseDao.php @@ -304,13 +304,14 @@ abstract class BaseDao $with = []; $otherWhere = []; $responses = new \ReflectionClass($this->setModel()); + foreach ($where as $key => $value) { $method = 'search' . Str::studly($key) . 'Attr'; if ($responses->hasMethod($method)) { $with[] = $key; } else { if ($key != 'timeKey') { - $otherWhere[] = $value; + $otherWhere[] = is_array($value) ? $value : [$key, '=', $value]; } } } @@ -320,6 +321,7 @@ abstract class BaseDao /** * 根据搜索器获取搜索内容 * @param $where + * @param $search * @return BaseModel * @throws \ReflectionException * @author 吴汐 diff --git a/crmeb/app/dao/user/UserDao.php b/crmeb/app/dao/user/UserDao.php index 715374a5c..3c5a74a39 100644 --- a/crmeb/app/dao/user/UserDao.php +++ b/crmeb/app/dao/user/UserDao.php @@ -176,6 +176,7 @@ class UserDao extends BaseDao * 获取推广员ids * @param array $where * @return array + * @throws \ReflectionException */ public function getAgentUserIds(array $where) { diff --git a/crmeb/app/services/agent/DivisionServices.php b/crmeb/app/services/agent/DivisionServices.php index cfdb5a65a..ddcfab914 100644 --- a/crmeb/app/services/agent/DivisionServices.php +++ b/crmeb/app/services/agent/DivisionServices.php @@ -222,9 +222,11 @@ class DivisionServices extends BaseServices if ($uid && !$userInfo) throw new AdminException(400214); $field = []; if ($uid) { + $field[] = Form::number('division_id', '事业部UID', $userInfo['division_id'] ?? '')->disabled(true)->style(['width' => '173px']); $field[] = Form::number('uid', '用户UID', $userInfo['uid'] ?? '')->disabled(true)->style(['width' => '173px']); $field[] = Form::hidden('edit', 1); } else { + $field[] = Form::number('division_id', '事业部UID')->style(['width' => '173px']); $field[] = Form::number('uid', '用户UID')->style(['width' => '173px']); $field[] = Form::hidden('edit', 0); } @@ -238,20 +240,24 @@ class DivisionServices extends BaseServices * 保存代理商 * @param $data * @return bool + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function divisionAgentSave($data) { /** @var UserServices $userServices */ $userServices = app()->make(UserServices::class); $uid = $data['uid']; - $userInfo = $userServices->getUserInfo($uid, 'is_division,division_id,agent_id'); $agentData = [ + 'division_id' => $data['division_id'], 'division_status' => $data['division_status'], 'division_percent' => $data['division_percent'], 'division_change_time' => time(), 'division_end_time' => strtotime($data['division_end_time']), + 'division_type' => 2, ]; - $division_info = $userServices->getUserInfo($userInfo['division_id'], 'division_end_time,division_percent'); + $division_info = $userServices->getUserInfo($data['division_id'], 'division_end_time,division_percent'); if ($division_info) { if ($agentData['division_percent'] > $division_info['division_percent']) throw new AdminException(400448); if ($agentData['division_end_time'] > $division_info['division_end_time']) throw new AdminException(400449); diff --git a/crmeb/app/services/user/UserServices.php b/crmeb/app/services/user/UserServices.php index 408b5e9f9..dd15649fd 100644 --- a/crmeb/app/services/user/UserServices.php +++ b/crmeb/app/services/user/UserServices.php @@ -237,6 +237,7 @@ class UserServices extends BaseServices * 获取分销员ids * @param array $where * @return array + * @throws \ReflectionException */ public function getAgentUserIds(array $where) { diff --git a/template/admin/src/pages/division/agent/index.vue b/template/admin/src/pages/division/agent/index.vue index 556e2403b..7c0ad66b1 100644 --- a/template/admin/src/pages/division/agent/index.vue +++ b/template/admin/src/pages/division/agent/index.vue @@ -27,6 +27,11 @@ + + + + + Date: Thu, 30 Mar 2023 12:22:22 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/order/StoreOrderController.php | 59 ++++--------------- 1 file changed, 11 insertions(+), 48 deletions(-) diff --git a/crmeb/app/api/controller/v1/order/StoreOrderController.php b/crmeb/app/api/controller/v1/order/StoreOrderController.php index 40643831f..a0d5db7c8 100644 --- a/crmeb/app/api/controller/v1/order/StoreOrderController.php +++ b/crmeb/app/api/controller/v1/order/StoreOrderController.php @@ -94,6 +94,10 @@ class StoreOrderController * @param Request $request * @param ShippingTemplatesServices $services * @return mixed + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function confirm(Request $request, ShippingTemplatesServices $services) { @@ -297,23 +301,6 @@ class StoreOrderController } } - /** - * TODO 支付宝单独支付 弃用 - * @param OrderPayServices $payServices - * @param OtherOrderServices $services - * @param string $key - * @param string $quitUrl - * @return mixed - * @throws \think\db\exception\DataNotFoundException - * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException - */ -// public function aliPay(OrderPayServices $payServices, OtherOrderServices $services, string $key, string $quitUrl) -// { -// $payInfo = $this->services->aliPayOrder($payServices, $services, $key, $quitUrl); -// return app('json')->success(['pay_content' => $payInfo]); -// } - /** * 订单列表 * @param Request $request @@ -467,8 +454,14 @@ class StoreOrderController /** * 订单 查看物流 * @param Request $request + * @param StoreOrderCartInfoServices $services + * @param ExpressServices $expressServices * @param $uni + * @param string $type * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function express(Request $request, StoreOrderCartInfoServices $services, ExpressServices $expressServices, $uni, $type = '') { @@ -535,6 +528,7 @@ class StoreOrderController * @param Request $request * @param StoreOrderCartInfoServices $cartInfoServices * @param StoreProductReplyServices $replyServices + * @return \think\Response|void * @throws \Psr\SimpleCache\InvalidArgumentException */ public function comment(Request $request, StoreOrderCartInfoServices $cartInfoServices, StoreProductReplyServices $replyServices) @@ -728,37 +722,6 @@ class StoreOrderController return app('json')->fail(100028); } - /** - * 订单申请退款审核 - * @param Request $request - * @param StoreOrderRefundServices $services - */ - public function refund_verify(Request $request, StoreOrderRefundServices $services) - { -// $data = $request->postMore([ -// ['text', ''], -// ['refund_reason_wap_img', ''], -// ['refund_reason_wap_explain', ''], -// ['uni', ''], -// ['refund_type', 1], -// ['cart_id', 0], -// ['refund_num', 0] -// ]); -// $uni = $data['uni']; -// unset($data['uni']); -// if ($data['refund_reason_wap_img'] != '') { -// $data['refund_reason_wap_img'] = explode(',', $data['refund_reason_wap_img']); -// } else { -// $data['refund_reason_wap_img'] = []; -// } -// if (!$uni || $data['text'] == '' || $data['refund_num'] <= 0) return app('json')->fail('参数错误!'); -// $res = $services->orderApplyRefund($this->services->getUserOrderDetail($uni, (int)$request->uid()), $data['text'], $data['refund_reason_wap_explain'], $data['refund_reason_wap_img'], $data['refund_type'], $data['cart_id'], $data['refund_num']); -// if ($res) -// return app('json')->success('提交申请成功'); -// else -// return app('json')->fail('提交失败'); - } - /** * 用户退货提交快递单号 * @param Request $request