From 3ccf1e83d783e91598e2aa0ed9633a57fd101d55 Mon Sep 17 00:00:00 2001 From: nyoung <12190070+nyoungo@user.noreply.gitee.com> Date: Fri, 20 Sep 2024 11:16:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B1=BD=E4=BF=AE=E7=99=BB=E5=BD=95=20?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=20=E9=AA=8C=E8=AF=81=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/SysLoginController.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java index 81743e5c..cab37536 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java @@ -212,6 +212,10 @@ public class SysLoginController { AuthLoginReqVO authLoginReqVO = new AuthLoginReqVO(); authLoginReqVO.setUsername(loginBody.getUsername()); authLoginReqVO.setPassword(loginBody.getPassword()); + if(org.apache.commons.lang3.StringUtils.isEmpty(user.getMobile())){ + // 借用此字段设置需要填写手机号标志 为1时弹出验证手机号页面 + authLoginReqVO.setSocialState("1"); + } return success(loginService.login(authLoginReqVO)); } @@ -230,20 +234,16 @@ public class SysLoginController { } /** - * 汽修小程序注册方法 + * 汽修小程序更新用户手机号方法 * * @param registerVO 登录信息 * @return 结果 */ - @PostMapping("/registerQx") - @TenantIgnore + @PostMapping("/updateUserQx") public CommonResult registerQx(@RequestBody RegisterVO registerVO){ if(org.apache.commons.lang3.StringUtils.isEmpty(registerVO.getPhone())){ return error(500,"手机号不能为空"); } - if(org.apache.commons.lang3.StringUtils.isEmpty(registerVO.getPassword())){ - return error(500,"密码不能为空"); - } if(org.apache.commons.lang3.StringUtils.isEmpty(registerVO.getCode())){ return error(500,"验证码不能为空"); } @@ -253,12 +253,13 @@ public class SysLoginController { } redisCache2.deleteObject(registerVO.getPhone() + "-registerCode"); + + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); UserSaveReqVO userSaveReqVO = new UserSaveReqVO(); - userSaveReqVO.setUsername(registerVO.getPhone()); - userSaveReqVO.setPassword(passwordEncoder.encode(registerVO.getPassword())); + userSaveReqVO.setId(loginUser.getId()); userSaveReqVO.setMobile(registerVO.getPhone()); - userService.createUser(userSaveReqVO); - return success("注册成功"); + userService.updateUser(userSaveReqVO); + return success("成功"); } From 2cd0fea776437294476cd1b24675fed74cbf61f3 Mon Sep 17 00:00:00 2001 From: zhaotianfeng <12345678> Date: Fri, 20 Sep 2024 15:38:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?1=E3=80=81=E5=AE=A2=E6=88=B7=E5=85=B3?= =?UTF-8?q?=E8=81=94=E4=BC=9A=E5=91=98=EF=BC=9B2=E3=80=81=E8=90=A5?= =?UTF-8?q?=E9=94=80=E6=B4=BB=E5=8A=A8=E4=B8=8B=E5=8A=A0=E4=B8=8A=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E9=87=8D=E5=A4=8D=E5=8F=82=E4=B8=8E=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/custom/entity/CustomerMain.java | 6 ++++++ .../controller/admin/MemberLevelController.java | 13 ++++++++++++- .../yudao/module/member/entity/ActiveMain.java | 4 ++++ .../module/member/service/MemberLevelService.java | 9 +++++++++ .../member/service/impl/MemberLevelServiceImpl.java | 11 +++++++++++ 5 files changed, 42 insertions(+), 1 deletion(-) diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CustomerMain.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CustomerMain.java index d981777c..417179ba 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CustomerMain.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CustomerMain.java @@ -99,5 +99,11 @@ public class CustomerMain extends TenantBaseDO { * 客户状态 */ private String status; + /** + * + * 会员表id + * + */ + private String memberLevelId; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/controller/admin/MemberLevelController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/controller/admin/MemberLevelController.java index f0b923d1..471bdc71 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/controller/admin/MemberLevelController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/controller/admin/MemberLevelController.java @@ -19,6 +19,8 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.validation.Valid; +import java.util.List; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @@ -114,6 +116,15 @@ public class MemberLevelController { Page page = new Page<>(pageNo, pageSize); return success(levelService.queryListPage(pageReqVO,page)); } - + /** + * 获取全部会员 + * + **/ + @GetMapping("/all") + @Operation(summary = "获得全部会员") + @PreAuthorize("@ss.hasPermission('member:level:query')") + public CommonResult> getLevelAll(MemberLevelPageReqVO pageReqVO) { + return success(levelService.queryListAll(pageReqVO)); + } } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/entity/ActiveMain.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/entity/ActiveMain.java index f4bc091a..0edc1899 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/entity/ActiveMain.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/entity/ActiveMain.java @@ -61,5 +61,9 @@ public class ActiveMain extends TenantBaseDO { private String isPack; /**是否关联卡券*/ private String isCoupon; + /** + * 是否重复参与 + */ + private String isParticipate; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/service/MemberLevelService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/service/MemberLevelService.java index 0e2ea5d2..424efa4c 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/service/MemberLevelService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/service/MemberLevelService.java @@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** * 会员等级 Service 接口 * @@ -54,4 +56,11 @@ public interface MemberLevelService extends IService { **/ IPage queryListPage(MemberLevelPageReqVO pageReqVO, Page page); + /** + * 获取全部会员 + * + **/ + List queryListAll(MemberLevelPageReqVO pageReqVO); + + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/service/impl/MemberLevelServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/service/impl/MemberLevelServiceImpl.java index 7f4115fd..b5dd3b83 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/service/impl/MemberLevelServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/member/service/impl/MemberLevelServiceImpl.java @@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.member.service.MemberLevelService; import cn.iocoder.yudao.module.member.vo.MemberLevelPageReqVO; import cn.iocoder.yudao.module.member.vo.MemberLevelRespVO; import cn.iocoder.yudao.module.member.vo.MemberLevelSaveReqVO; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -14,6 +15,7 @@ import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; +import java.util.List; /** * 会员等级 Service 实现类 @@ -82,5 +84,14 @@ public class MemberLevelServiceImpl extends ServiceImpl queryListAll(MemberLevelPageReqVO pageReqVO) { + + QueryWrapper q = new QueryWrapper<>(); + q.eq("status","01"); + List memberLevels = this.levelMapper.selectList(q); + return memberLevels; + } + } \ No newline at end of file From 184f74e94b865f11b3b9f673f37fb32227e99990 Mon Sep 17 00:00:00 2001 From: zhaotianfeng <12345678> Date: Fri, 20 Sep 2024 15:59:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=AD=89=E7=BA=A7?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java | 2 ++ .../src/main/resources/mapper/custom/CustomerMainMapper.xml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java index 22a42ce9..a0ebcb1e 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java @@ -28,6 +28,8 @@ public class CustomerMainRespVO extends CustomerMain { List labelList; /**车辆品牌型号数组*/ List brandAndModel; + /**会员名称 */ + private String levelName; /**是否车主(0否1是)*/ private String isOwner; diff --git a/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml index b18584f2..9317ba0c 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml @@ -36,10 +36,12 @@ main.inviter AS inviter, main.inviter_type AS inviterType, main.status AS status, - group_concat(item.ser_content) AS serContents + group_concat(item.ser_content) AS serContents, + memberLevel.name AS levelName FROM base_customer_main main LEFT JOIN base_customer_item item ON main.id = item.cus_id AND item.deleted = 0 + LEFT JOIN dl_member_level memberLevel ON main.member_level_id = memberLevel.id main.deleted = 0