| | |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassInfoVo; |
| | | |
| | | import com.dsh.account.util.DateUtil; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.dsh.account.util.ResultUtil; |
| | | import com.dsh.account.util.ToolUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | */ |
| | | @Service |
| | | public class TAppUserServiceImpl extends ServiceImpl<TAppUserMapper, TAppUser> implements TAppUserService { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private TStudentMapper tsmapper; |
| | |
| | | @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>() |
| | |
| | | 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(); |
| | |
| | | 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; |
| | | } |
| | | } |