From 9191ca6c595fb8345d8d85603c0f86712ed6f1ab Mon Sep 17 00:00:00 2001 From: XinWei <2718030729@qq.com> Date: Sun, 29 Sep 2024 23:34:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=98=E8=B4=B9=E4=BC=9A=E5=91=98=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/user/UserBalanceUpdateForm.vue | 134 ++++++++ .../views/mall/promotion/user/UserForm.vue | 179 ++++++++++ .../promotion/user/UserLevelUpdateForm.vue | 101 ++++++ .../promotion/user/UserPointUpdateForm.vue | 128 +++++++ .../user/components/balance-list.vue | 14 + .../promotion/user/detail/UserAccountInfo.vue | 87 +++++ .../promotion/user/detail/UserAddressList.vue | 54 +++ .../promotion/user/detail/UserBasicInfo.vue | 85 +++++ .../user/detail/UserBrokerageList.vue | 125 +++++++ .../promotion/user/detail/UserCouponList.vue | 190 +++++++++++ .../user/detail/UserExperienceRecordList.vue | 158 +++++++++ .../user/detail/UserFavoriteList.vue | 96 ++++++ .../promotion/user/detail/UserOrderList.vue | 279 +++++++++++++++ .../promotion/user/detail/UserPointList.vue | 152 +++++++++ .../promotion/user/detail/UserSignList.vue | 135 ++++++++ .../mall/promotion/user/detail/index.vue | 135 ++++++++ .../src/views/mall/promotion/user/index.vue | 319 ++++++++++++++++++ .../admin/user/MemberUserController.java | 2 +- .../admin/user/vo/MemberUserPageReqVO.java | 2 + .../dal/dataobject/user/MemberUserDO.java | 4 + .../dal/mysql/user/MemberUserMapper.java | 1 + .../service/user/MemberUserServiceImpl.java | 13 +- 22 files changed, 2388 insertions(+), 5 deletions(-) create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/UserBalanceUpdateForm.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/UserForm.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/UserLevelUpdateForm.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/UserPointUpdateForm.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/components/balance-list.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/UserAccountInfo.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/UserAddressList.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/UserBasicInfo.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/UserBrokerageList.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/UserCouponList.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/UserExperienceRecordList.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/UserFavoriteList.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/UserOrderList.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/UserPointList.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/UserSignList.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/detail/index.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/user/index.vue diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/UserBalanceUpdateForm.vue b/yudao-admin-vue3/src/views/mall/promotion/user/UserBalanceUpdateForm.vue new file mode 100644 index 0000000..372ff7a --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/UserBalanceUpdateForm.vue @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + 增加 + 减少 + + + + + + + + + + + 确 定 + 取 消 + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/UserForm.vue b/yudao-admin-vue3/src/views/mall/promotion/user/UserForm.vue new file mode 100644 index 0000000..0da4ef6 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/UserForm.vue @@ -0,0 +1,179 @@ + + + + + + + + + + {{ dict.label }} + + + + + + + + + + + + + + + + {{ dict.label }} + + + + + + + + + + + + + + + + + + + + + 确 定 + 取 消 + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/UserLevelUpdateForm.vue b/yudao-admin-vue3/src/views/mall/promotion/user/UserLevelUpdateForm.vue new file mode 100644 index 0000000..e583f4a --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/UserLevelUpdateForm.vue @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + 确 定 + 取 消 + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/UserPointUpdateForm.vue b/yudao-admin-vue3/src/views/mall/promotion/user/UserPointUpdateForm.vue new file mode 100644 index 0000000..967ebe0 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/UserPointUpdateForm.vue @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + 增加 + 减少 + + + + + + + + + + + 确 定 + 取 消 + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/components/balance-list.vue b/yudao-admin-vue3/src/views/mall/promotion/user/components/balance-list.vue new file mode 100644 index 0000000..3e9d178 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/components/balance-list.vue @@ -0,0 +1,14 @@ + + + + + 余额列表 + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserAccountInfo.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserAccountInfo.vue new file mode 100644 index 0000000..56a6ab6 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserAccountInfo.vue @@ -0,0 +1,87 @@ + + + + + + + {{ user.levelName || '无' }} + + + + + + {{ user.experience || 0 }} + + + + + + {{ user.point || 0 }} + + + + + + {{ user.totalPoint || 0 }} + + + + + + {{ fenToYuan(wallet.balance || 0) }} + + + + + + {{ fenToYuan(wallet.totalExpense || 0) }} + + + + + + {{ fenToYuan(wallet.totalRecharge || 0) }} + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserAddressList.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserAddressList.vue new file mode 100644 index 0000000..a37caba --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserAddressList.vue @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserBasicInfo.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserBasicInfo.vue new file mode 100644 index 0000000..d07b1b2 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserBasicInfo.vue @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + {{ user.name || '空' }} + + + + + + {{ user.nickname }} + + + + + + {{ user.mobile }} + + + + + + + + + + + + {{ user.areaName }} + + + + + + {{ user.registerIp }} + + + + + + {{ user.birthday ? formatDate(user.birthday) : '空' }} + + + + + + {{ user.createTime ? formatDate(user.createTime) : '空' }} + + + + + + {{ user.loginDate ? formatDate(user.loginDate) : '空' }} + + + + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserBrokerageList.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserBrokerageList.vue new file mode 100644 index 0000000..db88787 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserBrokerageList.vue @@ -0,0 +1,125 @@ + + + + + + + 全部 + 一级推广人 + 二级推广人 + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + + 一级 + 二级 + + + + + + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserCouponList.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserCouponList.vue new file mode 100644 index 0000000..2279b8a --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserCouponList.vue @@ -0,0 +1,190 @@ + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 回收 + + + + + + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserExperienceRecordList.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserExperienceRecordList.vue new file mode 100644 index 0000000..64414ad --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserExperienceRecordList.vue @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + +{{ scope.row.experience }} + + + {{ scope.row.experience }} + + + + + + + {{ scope.row.totalExperience }} + + + + + + + + + + + + + + + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserFavoriteList.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserFavoriteList.vue new file mode 100644 index 0000000..afab9a0 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserFavoriteList.vue @@ -0,0 +1,96 @@ + + + + + + + + + + + + + {{ floatToFixed2(row.price) }}元 + + + + + + + + + + + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserOrderList.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserOrderList.vue new file mode 100644 index 0000000..bae0bf0 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserOrderList.vue @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + + + + 重置 + + + + + + + + + + + + + + 详情 + + + + + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserPointList.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserPointList.vue new file mode 100644 index 0000000..9754b29 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserPointList.vue @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + 搜索 + + + + 重置 + + + + + + + + + + + + + + +{{ scope.row.point }} + + {{ scope.row.point }} + + + + + + + + + + + + + + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserSignList.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserSignList.vue new file mode 100644 index 0000000..c897274 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/UserSignList.vue @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + +{{ scope.row.point }} + + {{ scope.row.point }} + + + + + + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/detail/index.vue b/yudao-admin-vue3/src/views/mall/promotion/user/detail/index.vue new file mode 100644 index 0000000..6237cca --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/detail/index.vue @@ -0,0 +1,135 @@ + + + + + + + + + + + 编辑 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 余额(WIP) + + + + + + + 售后管理(WIP) + + + + + + + + + + + + + + + + + + + diff --git a/yudao-admin-vue3/src/views/mall/promotion/user/index.vue b/yudao-admin-vue3/src/views/mall/promotion/user/index.vue new file mode 100644 index 0000000..85e5f0b --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/user/index.vue @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + + + + 重置 + + 发送优惠券 + + + + + + + + + + + + + + + + + + + + + + {{ tagName }} + + + + + + + + + + + + + + + + 详情 + handleCommand(command, scope.row)" + > + + + 更多 + + + + + 编辑 + + + 修改等级 + + + 修改积分 + + + 修改余额 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java index ae75442..9a4de1e 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java @@ -84,7 +84,7 @@ public class MemberUserController { @Operation(summary = "更新会员用户余额") @PreAuthorize("@ss.hasPermission('member:user:update-balance')") public CommonResult updateUserBalance(@Valid @RequestBody Long id) { - // todo @jason:增加一个【修改余额】 + // 这个功能加在了pay模块里 return success(true); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserPageReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserPageReqVO.java index abb9428..0882893 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserPageReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserPageReqVO.java @@ -41,6 +41,8 @@ public class MemberUserPageReqVO extends PageParam { @Schema(description = "用户分组编号", example = "1") private Long groupId; + @Schema(description = "是否付费会员", example = "1") + private Integer isPaidMember; // TODO 芋艿:注册用户类型; // TODO 芋艿:登录用户类型; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUserDO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUserDO.java index 97ddc19..bd2ec47 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUserDO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUserDO.java @@ -142,4 +142,8 @@ public class MemberUserDO extends TenantBaseDO { */ private Long groupId; + /** + * 是否付费会员(0:不是 1:是) + */ + private Integer isPaidMember; } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/user/MemberUserMapper.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/user/MemberUserMapper.java index 3f87102..0fcce12 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/user/MemberUserMapper.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/user/MemberUserMapper.java @@ -47,6 +47,7 @@ public interface MemberUserMapper extends BaseMapperX { .betweenIfPresent(MemberUserDO::getCreateTime, reqVO.getCreateTime()) .eqIfPresent(MemberUserDO::getLevelId, reqVO.getLevelId()) .eqIfPresent(MemberUserDO::getGroupId, reqVO.getGroupId()) + .eqIfPresent(MemberUserDO::getIsPaidMember, reqVO.getIsPaidMember()) .apply(StrUtil.isNotEmpty(tagIdSql), tagIdSql) .orderByDesc(MemberUserDO::getId)); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserServiceImpl.java index 2a67aee..5993c20 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserServiceImpl.java @@ -8,6 +8,7 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.member.controller.admin.user.vo.MemberUserPageReqVO; import cn.iocoder.yudao.module.member.controller.admin.user.vo.MemberUserUpdateReqVO; import cn.iocoder.yudao.module.member.controller.app.user.vo.*; @@ -284,10 +285,14 @@ public class MemberUserServiceImpl implements MemberUserService { public void updateUserLevel(Long id, Long levelId, Integer experience) { // 0 代表无等级:防止UpdateById时,会被过滤掉的问题 levelId = ObjectUtil.defaultIfNull(levelId, 0L); - memberUserMapper.updateById(new MemberUserDO() - .setId(id) - .setLevelId(levelId).setExperience(experience) - ); + MemberUserDO memberUserDO = new MemberUserDO().setId(id).setLevelId(levelId).setExperience(experience); + // 暂时这样设计:如果等级为0则设置付费会员状态为0,否则则设置为付费会员状态(1) + if (levelId == 0){ + memberUserDO.setIsPaidMember(0); + }else{ + memberUserDO.setIsPaidMember(1); + } + memberUserMapper.updateById(memberUserDO); } @Override