From 1508031ed0a0f59612d47a64161ac3f6508cd5af Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期三, 14 六月 2023 16:47:48 +0800 Subject: [PATCH] 更新代码 --- cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java | 35 +++++++++++++++++++++++++---------- 1 files changed, 25 insertions(+), 10 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 1bc34c5..1dc073f 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 @@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.dsh.account.feignclient.course.CoursePaymentClient; import com.dsh.account.feignclient.course.model.StuCourseResp; -import com.dsh.account.feignclient.course.model.TCoursePackagePayment; import com.dsh.account.mapper.TStudentMapper; import com.dsh.account.feignclient.other.ImgConfigClient; import com.dsh.account.feignclient.other.model.TImgConfig; @@ -17,8 +16,8 @@ import com.dsh.account.model.vo.classDetails.classInsVo.ClassInfoVo; import com.dsh.account.util.DateUtil; +import com.dsh.account.util.ResultUtil; import com.dsh.account.util.ToolUtil; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -35,9 +34,9 @@ */ @Service public class TAppUserServiceImpl extends ServiceImpl<TAppUserMapper, TAppUser> implements TAppUserService { - - @Autowired + + @Resource private TStudentMapper tsmapper; @Resource @@ -46,7 +45,7 @@ @Resource private CoursePaymentClient paymentClient; @Override - public ClassInfoVo queryUserOfStus(Integer id) { + public ClassInfoVo queryUserOfStus(Integer id,String longitude,String latitude) { TAppUser tAppUser = this.baseMapper.selectById(id); if (ToolUtil.isNotEmpty(tAppUser)){ List<TStudent> tStudents = tsmapper.selectList(new QueryWrapper<TStudent>() @@ -78,16 +77,20 @@ RegisteredCourse course = new RegisteredCourse(); course.setCourseId(tCoursePackagePayment.getCourseId()); course.setCourseName(tCoursePackagePayment.getCourseName()); - total = total + tCoursePackagePayment.getTotalCourseNums(); - deduct = deduct + tCoursePackagePayment.getDeductionNums(); - remain = remain + tCoursePackagePayment.getResidueNums(); + total = total + (ToolUtil.isEmpty(tCoursePackagePayment.getTotalCourseNums()) ? 0 : tCoursePackagePayment.getTotalCourseNums()); + deduct = deduct + (ToolUtil.isEmpty(tCoursePackagePayment.getDeductionNums()) ? 0 : tCoursePackagePayment.getDeductionNums()); + remain = remain + (ToolUtil.isEmpty(tCoursePackagePayment.getResidueNums())? 0 : tCoursePackagePayment.getResidueNums()); courseList.add(course); } } classInfoVo.setCourseList(courseList); + classInfoVo.setTotalNums(total); classInfoVo.setDeductedNums(deduct); classInfoVo.setRemainingNums(remain); + + +// classInfoVo.setWeekCourseList(); }else { classInfoVo.setIsThere(2); List<TImgConfig> tImgConfigs = configClient.getNoneStuImgs(); @@ -99,8 +102,20 @@ return null; } + + + /** + * 获取短信验证码 + * @param type 1:登录,2:注册,3:修改密码,4:忘记密码 + * @param phone + * @return + * @throws Exception + */ @Override - public boolean save(TAppUser entity) { - return super.save(entity); + public ResultUtil getSMSCode(Integer type, String phone) throws Exception { + if(type == 2){ +// this.baseMapper.selectOne(new EntityWrapper<>()) + } + return null; } } -- Gitblit v1.7.1