From 56ca235aa1c8640490b8a5ce3976f33126468fb3 Mon Sep 17 00:00:00 2001 From: "home.fengxinyhyl" Date: Sat, 20 Apr 2024 19:27:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/user/UserDao.php | 2 + .../store/product/ProductRepository.php | 2 +- .../user/UserAssetsLogRepository.php | 2 + .../repositories/user/UserRepository.php | 3 + app/controller/admin/user/User.php | 3 +- view/admin/src/router/modules/user.js | 6 + .../merchant/list/handle/merEditForm.vue | 18 -- view/admin/src/views/merchant/type/index.vue | 12 +- .../src/views/merchant/type/typeEditForm.vue | 47 +++-- view/admin/src/views/user/deposit/list.vue | 166 ++++++++++++++++++ view/admin/src/views/user/list/index.vue | 9 +- .../admin/src/views/user/list/userDetails.vue | 10 ++ .../src/views/product/addProduct/index.vue | 4 +- 13 files changed, 229 insertions(+), 55 deletions(-) create mode 100644 view/admin/src/views/user/deposit/list.vue diff --git a/app/common/dao/user/UserDao.php b/app/common/dao/user/UserDao.php index 955fa16..f5660c8 100755 --- a/app/common/dao/user/UserDao.php +++ b/app/common/dao/user/UserDao.php @@ -89,6 +89,8 @@ class UserDao extends BaseDao return $query->where('User.user_type', $where['user_type']); })->when(isset($where['is_lottery']) && $where['is_lottery'] !== '', function (BaseQuery $query) use ($where) { return $query->where('User.is_lottery', $where['is_lottery']); + })->when(isset($where['is_hot']) && $where['is_hot'] !== '', function (BaseQuery $query) use ($where) { + return $query->where('User.is_hot', $where['is_hot']); })->when(isset($where['uid']) && $where['uid'] !== '', function (BaseQuery $query) use ($where) { return $query->where('User.uid', $where['uid']); })->when(isset($where['status']) && $where['status'] !== '', function (BaseQuery $query) use ($where) { diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index defdaef..af13c39 100755 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -168,7 +168,7 @@ class ProductRepository extends BaseRepository Elm::number('hot_integral_rate', '爆单区返佣比例:')->placeholder('请输入爆单区返佣比例') ->max(100)->min(0)->required(), Elm::number('hot_integral_total', '爆单区返佣积分:')->placeholder('请输入爆单区返佣积分') - ->max(100)->min(0)->required(), + ->min(0)->required(), // Elm::number('order_sum', '营业额:')->placeholder('请输入营业额')->min(0)->required(), diff --git a/app/common/repositories/user/UserAssetsLogRepository.php b/app/common/repositories/user/UserAssetsLogRepository.php index 7a4800a..4bc07ce 100644 --- a/app/common/repositories/user/UserAssetsLogRepository.php +++ b/app/common/repositories/user/UserAssetsLogRepository.php @@ -356,6 +356,8 @@ class UserAssetsLogRepository extends BaseRepository continue; } + $this->userRepository->update($order['uid'], array('is_hot' => 1)); + $item = $hotRepository->getWhere(['uid' => $order['uid']]); if ($item) { $item['total'] += $product['hot_integral_total'] * $productItem['product_num']; diff --git a/app/common/repositories/user/UserRepository.php b/app/common/repositories/user/UserRepository.php index 368e47a..0e762d9 100755 --- a/app/common/repositories/user/UserRepository.php +++ b/app/common/repositories/user/UserRepository.php @@ -19,6 +19,7 @@ use app\common\model\user\User; use app\common\model\wechat\WechatUser; use app\common\repositories\BaseRepository; use app\common\repositories\community\CommunityRepository; +use app\common\repositories\store\order\StoreOrderHotRepository; use app\common\repositories\store\order\StoreOrderRepository; use app\common\repositories\store\service\StoreServiceRepository; use app\common\repositories\system\attachment\AttachmentRepository; @@ -1623,6 +1624,8 @@ class UserRepository extends BaseRepository // 添加用户扩展信息 $info['extend_info'] = app()->make(UserFieldsRepository::class)->info((int)$uid, false)['extend_info']; $info['assets'] = app()->make(UserAssetsRepository::class)->assets($uid); + $hot = app(StoreOrderHotRepository::class)->getWhere(['uid' => $uid]); + $info['hot']= $hot ? $hot->toArray(): array('total' => 0, 'current' => 0); return $info; } diff --git a/app/controller/admin/user/User.php b/app/controller/admin/user/User.php index 52f1386..1ca2918 100755 --- a/app/controller/admin/user/User.php +++ b/app/controller/admin/user/User.php @@ -100,7 +100,8 @@ class User extends BaseController 'member_level', 'keyword', 'birthday', - 'is_lottery' + 'is_lottery', + 'is_hot' ]); [$page, $limit] = $this->getPage(); return app('json')->success($this->repository->getList($where, $page, $limit)); diff --git a/view/admin/src/router/modules/user.js b/view/admin/src/router/modules/user.js index d9c68ca..d53ebb0 100644 --- a/view/admin/src/router/modules/user.js +++ b/view/admin/src/router/modules/user.js @@ -49,6 +49,12 @@ const userRouter = name: 'deposit', meta: { title: '预存管理', noCache: true } }, + { + path: 'deposit/list', + component: () => import('@/views/user/list'), + name: 'depositList', + meta: { title: '预存列表', noCache: true } + }, { path: 'label', component: () => import('@/views/user/group'), diff --git a/view/admin/src/views/merchant/list/handle/merEditForm.vue b/view/admin/src/views/merchant/list/handle/merEditForm.vue index 6ab715e..8b28696 100644 --- a/view/admin/src/views/merchant/list/handle/merEditForm.vue +++ b/view/admin/src/views/merchant/list/handle/merEditForm.vue @@ -260,24 +260,6 @@ -
-
财务帐号
- - - - - - - -
当开启自动分账时,每个子商户在微信后台的分账商户号,即特约子商户号
-
-
-
diff --git a/view/admin/src/views/merchant/type/index.vue b/view/admin/src/views/merchant/type/index.vue index df69e29..11c2ed8 100644 --- a/view/admin/src/views/merchant/type/index.vue +++ b/view/admin/src/views/merchant/type/index.vue @@ -24,13 +24,7 @@ prop="merchant_count" min-width="120" /> - - - + .input_inline ::v-deep .el-input { width: 200px; - margin-right: 5px; + margin-right: 5px; } diff --git a/view/admin/src/views/merchant/type/typeEditForm.vue b/view/admin/src/views/merchant/type/typeEditForm.vue index 222f7d2..52320df 100644 --- a/view/admin/src/views/merchant/type/typeEditForm.vue +++ b/view/admin/src/views/merchant/type/typeEditForm.vue @@ -21,21 +21,21 @@ /> - - - - - - - - 元 - - - + + + + + + + + + + + + + + + @@ -117,10 +117,10 @@ > - - + + - + + + diff --git a/view/admin/src/views/user/list/index.vue b/view/admin/src/views/user/list/index.vue index 6d6f549..c231940 100644 --- a/view/admin/src/views/user/list/index.vue +++ b/view/admin/src/views/user/list/index.vue @@ -25,6 +25,12 @@ + + + + + + 搜索 @@ -470,7 +476,8 @@ export default { group_id: '', fields_type: '', fields_value: '', - is_lottery: '' + is_lottery: '', + is_hot: '', }, address: [], grid: { diff --git a/view/admin/src/views/user/list/userDetails.vue b/view/admin/src/views/user/list/userDetails.vue index c2aaf55..0fd8b1e 100644 --- a/view/admin/src/views/user/list/userDetails.vue +++ b/view/admin/src/views/user/list/userDetails.vue @@ -79,6 +79,16 @@
{{psInfo.assets.stock}}
+
    +
  • +
    爆单积分最大值
    +
    {{psInfo.hot.total}}
    +
  • +
  • +
    当前爆单积分
    +
    {{psInfo.hot.current}}
    +
  • +
diff --git a/view/mer/src/views/product/addProduct/index.vue b/view/mer/src/views/product/addProduct/index.vue index 7a7ab5d..3def0cd 100644 --- a/view/mer/src/views/product/addProduct/index.vue +++ b/view/mer/src/views/product/addProduct/index.vue @@ -46,7 +46,7 @@ - + 普通商品 爆单商品 @@ -1331,6 +1331,7 @@ const defaultObj = { image: '', slider_image: [], store_name: '', + is_hot:0, store_info: '', keyword: '', brand_id: '', // 品牌id @@ -2641,6 +2642,7 @@ export default { attrValue: info.attrValue, slider_image: info.slider_image, store_name: info.store_name, + is_hot: info.is_hot ? info.is_hot :0, store_info: info.store_info, good_ids: info.good_ids || [], keyword: info.keyword,