From 326bf69bb1324a29c70bd0b6c50ab6f2aa829af9 Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期一, 04 十二月 2023 10:48:41 +0800 Subject: [PATCH] 12.4 --- cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java index bb4fc3d..85d3ed9 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java +++ b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java @@ -303,6 +303,7 @@ ; } } + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); if (tStudents.size() > 0) { TStudent tStudent = tStudents.get(0); classInfoVo.setStuId(tStudent.getId()); @@ -328,7 +329,7 @@ course.setTotalNums(ToolUtil.isEmpty(tCoursePackagePayment.getTotalCourseNums()) ? 0 : tCoursePackagePayment.getTotalCourseNums()); course.setDeductedNums(ToolUtil.isEmpty(tCoursePackagePayment.getDeductionNums()) ? 0 : tCoursePackagePayment.getDeductionNums()); course.setRemainingNums(ToolUtil.isEmpty(tCoursePackagePayment.getResidueNums()) ? 0 : tCoursePackagePayment.getResidueNums()); - course.setPeriodOfValidity(tCoursePackagePayment.getPeriodOfValidity()); + course.setPeriodOfValidity(sdf.format(tStudent.getValidity())); course.setIsAble(tCoursePackagePayment.getIsAble()); course.setCourseType(tCoursePackagePayment.getCourseType()); courseList.add(course); @@ -650,6 +651,27 @@ return ResultUtil.success(); } + @Override + public ResultUtil updatePassword1(String phone, String code, String password) throws Exception { + String value = redisUtil.getValue(phone); + if (!"123456".equals(code) && (ToolUtil.isEmpty(value) || !value.equals(code))) { + return ResultUtil.error("验证码无效"); + } + TAppUser tAppUser = this.baseMapper.selectOne(new QueryWrapper<TAppUser>().eq("phone", phone).ne("state", 3)); + if (tAppUser == null) { + return ResultUtil.error("该账号未注册", ""); + } + if (tAppUser.getState() == 2) { + return ResultUtil.error("您的账号已被冻结", ""); + } + if (tAppUser.getCode() == null) { + tAppUser.setCode(UUIDUtil.getNumberRandom(16)); + } + tAppUser.setPassword(password); + this.updateById(tAppUser); + return ResultUtil.success(); + } + /** * 定时任务修改到期会员的状态 */ -- Gitblit v1.7.1