puzhibing
2023-06-14 9144acea1ad8f6222ca2db17cf8ef7ffb18e7428
cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java
@@ -17,6 +17,8 @@
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;
@@ -35,7 +37,7 @@
 */
@Service
public class TAppUserServiceImpl extends ServiceImpl<TAppUserMapper, TAppUser> implements TAppUserService {
    @Autowired
    private TStudentMapper tsmapper;
@@ -46,7 +48,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 +80,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 +105,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;
    }
}