| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @ResponseBody |
| | | @RequestMapping("/finance/rechargeList") |
| | | public List<RechargeRecordsVO> rechargeList(@RequestBody RechargeRecordsQuery query){ |
| | | return rechargeRecordsService.rechargeList(query); |
| | | List<RechargeRecordsVO> rechargeRecordsVOS = rechargeRecordsService.rechargeList(query); |
| | | for (RechargeRecordsVO rechargeRecordsVO : rechargeRecordsVOS) { |
| | | TAppUser byId = appUserService.getById(rechargeRecordsVO.getAppUserId()); |
| | | if (byId==null)continue; |
| | | Date vipEndTime = byId.getVipEndTime(); |
| | | if (vipEndTime==null){ |
| | | rechargeRecordsVO.setType(2); |
| | | continue; |
| | | } |
| | | if (rechargeRecordsVO.getPayTime().after(vipEndTime)){ |
| | | rechargeRecordsVO.setType(2); |
| | | }else{ |
| | | rechargeRecordsVO.setType(1); |
| | | } |
| | | } |
| | | return rechargeRecordsVOS; |
| | | } |
| | | /** |
| | | * 数据统计-充值记录列表数据 |
| | |
| | | System.out.println("======giftSelect=========giftSearchDto===="+giftSearchDto); |
| | | TAppUser one = appUserService.getOne(new QueryWrapper<TAppUser>().eq("name", giftSearchDto.getName()) |
| | | .eq("phone", giftSearchDto.getPhone())); |
| | | |
| | | |
| | | // Integer appId = studentService.getGiftSelect(giftSearchDto); |
| | | TCoursePackagePayment1 coursePackagePaymentById = paymentClient.getCoursePackagePaymentById1(giftSearchDto.getId()); |
| | | // System.out.println("=======giftSelect======appId====>"+appId); |
| | |
| | | selectDto.setId(student.getId()); |
| | | list.add(selectDto); |
| | | } |
| | | // 只筛选当前用户已经购买了这个课程的学员 |
| | | |
| | | System.out.println("=======giftSelect======selectDtos====>"+list); |
| | | return list; |
| | | } |
| | |
| | | |
| | | |
| | | <select id="rechargeList" resultType="com.dsh.account.model.vo.RechargeRecordsVO"> |
| | | select t1.* from t_recharge_records t1 |
| | | select t1.*,t2.name,t2.phone,CONCAT(t2.province,t2.city)as provinceAndCity from t_recharge_records t1 |
| | | left join t_app_user t2 on t1.appUserId = t2.id |
| | | <where> |
| | | <if test="query.amount!=null and query.amount!= ''"> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | and t1.payStatus = 2 |
| | | </where> |
| | | </select> |
| | | <select id="listAll" resultType="com.dsh.account.entity.VipPayment"> |
| | |
| | | @Autowired |
| | | private TCoursePackageDiscountService coursePackageDiscountService; |
| | | |
| | | |
| | | /** |
| | | * 编辑了课包 课时规格 重新修改折扣绑定的configId |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageDiscount/update") |
| | | public void update(@RequestBody TCoursePackageDiscount tCoursePackageDiscount){ |
| | | coursePackageDiscountService.updateById(tCoursePackageDiscount); |
| | | } |
| | | |
| | | /** |
| | | * 获取根据课包id获取课包折扣 |
| | | */ |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackagePaymentConfig/addCoursePackagePaymentConfig") |
| | | public void addCoursePackagePaymentConfig(@RequestBody CoursePackagePaymentConfig coursePackagePaymentConfig){ |
| | | public int addCoursePackagePaymentConfig(@RequestBody CoursePackagePaymentConfig coursePackagePaymentConfig){ |
| | | coursePackagePaymentConfigService.save(coursePackagePaymentConfig); |
| | | return coursePackagePaymentConfig.getId(); |
| | | } |
| | | |
| | | |
| | |
| | | @ResponseBody |
| | | public void toClass(@RequestBody ToClassDto toClassDto) throws ParseException { |
| | | System.out.println("===========到达getSelect======="+toClassDto); |
| | | TCoursePackagePayment orinPay = paymentService.getOne(new QueryWrapper<TCoursePackagePayment>().eq("id", toClassDto.getId())); |
| | | TCoursePackagePayment studentPay = paymentService.getOne(new QueryWrapper<TCoursePackagePayment>().eq("studentId", toClassDto.getToStudentId()).eq("coursePackageId",orinPay.getCoursePackageId())); |
| | | TCoursePackagePayment orinPay = |
| | | paymentService.getOne(new QueryWrapper<TCoursePackagePayment>().eq("id", toClassDto.getId())); |
| | | TCoursePackagePayment studentPay = paymentService.getOne |
| | | (new QueryWrapper<TCoursePackagePayment>() |
| | | .eq("studentId", toClassDto.getToStudentId()) |
| | | .eq("coursePackageId",orinPay.getCoursePackageId())); |
| | | if (studentPay!=null) { |
| | | System.out.println("======orinPay=====>" + orinPay); |
| | | System.out.println("======studentPay=====>" + studentPay); |
| | | Integer laveClassHours = orinPay.getLaveClassHours(); |
| | | Integer totalClassHours = orinPay.getTotalClassHours(); |
| | | |
| | | orinPay.setTotalClassHours(0); |
| | | orinPay.setLaveClassHours(0); |
| | | orinPay.setStatus(1); |
| | | orinPay.setAppUserId(null); |
| | | paymentService.updateById(orinPay); |
| | | |
| | | //删除orin的排课记录 |
| | | List<CoursePackageStudent> studentCourse1 = coursePackageStudentService.list(new QueryWrapper<CoursePackageStudent>().eq("studentId", orinPay.getStudentId()).eq("coursePackageId", orinPay.getCoursePackageId())); |
| | | List<Long> collect1 = studentCourse1.stream().map(CoursePackageStudent::getCoursePackageSchedulingId).collect(Collectors.toList()); |
| | |
| | | |
| | | <where> |
| | | <if test="null != tStudentId"> |
| | | py.studentId = #{tStudentId} |
| | | and py.studentId = #{tStudentId} |
| | | </if> |
| | | and pg.type!=3 |
| | | </where> |
| | |
| | | */ |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CoursePackageDiscountClient { |
| | | |
| | | /** |
| | | * 编辑了课包 课时规格 重新修改折扣绑定的configId |
| | | */ |
| | | @PostMapping("/coursePackageDiscount/update") |
| | | void update(@RequestBody TCoursePackageDiscount tCoursePackageDiscount); |
| | | /** |
| | | * 获取根据课包id获取课包折扣 |
| | | */ |
| | |
| | | * @param coursePackagePaymentConfig |
| | | */ |
| | | @PostMapping("/coursePackagePaymentConfig/addCoursePackagePaymentConfig") |
| | | void addCoursePackagePaymentConfig(CoursePackagePaymentConfig coursePackagePaymentConfig); |
| | | int addCoursePackagePaymentConfig(CoursePackagePaymentConfig coursePackagePaymentConfig); |
| | | |
| | | |
| | | /** |
| | |
| | | // 添加运营商商户认证 |
| | | operatorUser.setAlipayProportion("未设置"); |
| | | operatorUser.setWechatProportion("未设置"); |
| | | operatorUser.setWechatAudit(0); |
| | | operatorUser.setAlipayAudit(0); |
| | | operatorUserService.save(operatorUser); |
| | | user.setObjectId(data.getId()); |
| | | userService.updateById(user); |
| | |
| | | List<TStore> operatorId = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)); |
| | | model.addAttribute("stores",operatorId); |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | |
| | | // 查询这个运营商管理的省 |
| | | TOperator id = tOperatorService.getOne(new QueryWrapper<TOperator>().eq("id", UserExt.getUser().getObjectId())); |
| | | if (id.getType()==1){ |
| | |
| | | } |
| | | model.addAttribute("operator",objectId); |
| | | } |
| | | if (UserExt.getUser().getObjectType()==1) |
| | | model.addAttribute("operator",0); |
| | | if (UserExt.getUser().getObjectType()==1) model.addAttribute("operator",0); |
| | | TStore byId = storeService.getById(UserExt.getUser().getObjectId()); |
| | | if (UserExt.getUser().getObjectType()==3) model.addAttribute("operator",byId.getOperatorId()); |
| | | return PREFIX + "TCompetition_add.html"; |
| | | } |
| | | |
| | |
| | | model.addAttribute("userName",tAppUser.getName()); |
| | | model.addAttribute("tStudentDto",tStudentDto); |
| | | |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String formattedDate = dateFormat.format(new Date()); |
| | | model.addAttribute("reDate", formattedDate); |
| | | |
| | |
| | | @RequestMapping("/classList/{tStudentId}") |
| | | @ResponseBody |
| | | public ResultUtil listClass(@PathVariable("tStudentId") Integer tStudentId) { |
| | | // 需要过滤体验课 |
| | | List<ClassListDto> classListDtos = courseStuddentClient.listClass(tStudentId); |
| | | for (ClassListDto classListDto : classListDtos) { |
| | | classListDto.setHasClassHours(classListDto.getTotalClassHours()-classListDto.getLaveClassHours()); |
| | | if (classListDto.getClassType()==2){ |
| | | classListDto.setTotalClassHours(null); |
| | | classListDto.setHasClassHours(null); |
| | | classListDto.setLaveClassHours(null); |
| | | } |
| | | } |
| | | Map<String,List<ClassListDto>> map = new HashMap<>(); |
| | | map.put("items",classListDtos); |
| | | return new ResultUtil<>(0,0,null,map,null); |
| | |
| | | public ResultUtil giftSelect(GiftSearchDto giftSearchDto) { |
| | | |
| | | List<SelectDto> selectDtos = appUserClient.giftSelect(giftSearchDto); |
| | | // 只查询当前用户下 同时也报名了该课程的学员 |
| | | for (SelectDto selectDto : selectDtos) { |
| | | // 获取课包id |
| | | TCoursePackagePayment tCoursePackagePayment = coursePackagePaymentClient.queryCoursePackagePaymentById(giftSearchDto.getId()); |
| | | |
| | | Integer coursePackageId = tCoursePackagePayment.getCoursePackageId(); |
| | | // 学员id 拿到学员id 判断当前学员是否报名了这门课程 |
| | | Long id = selectDto.getId(); |
| | | // |
| | | } |
| | | Map<String,List<SelectDto>> map = new HashMap<>(); |
| | | map.put("options",selectDtos); |
| | | // Map<String,List<SelectDto>> map = new HashMap<>(); |
| | |
| | | ToClassDto toClassDto = new ToClassDto(); |
| | | toClassDto.setToStudentId(toStudentId); |
| | | toClassDto.setId(id); |
| | | |
| | | courseStuddentClient.toClass(toClassDto); |
| | | |
| | | // Map<String,List<SelectDto>> map = new HashMap<>(); |
| | |
| | | } |
| | | coursePackageClient.updateCoursePackage(coursePackage); |
| | | coursePackagePaymentConfigClient.delCoursePackagePaymentConfig(coursePackage.getId()); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient |
| | | .queryByCoursePackageId(coursePackage.getId()); |
| | | |
| | | JSONArray jsonArray = JSON.parseArray(coursePackagePaymentConfig); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | |
| | | coursePackagePaymentConfig1.setCashPayment(cashPayment); |
| | | coursePackagePaymentConfig1.setPlayPaiCoin(playPaiCoin); |
| | | coursePackagePaymentConfig1.setCouponIds(couponIds); |
| | | coursePackagePaymentConfigClient.addCoursePackagePaymentConfig(coursePackagePaymentConfig1); |
| | | int i1 = coursePackagePaymentConfigClient.addCoursePackagePaymentConfig(coursePackagePaymentConfig1); |
| | | |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) { |
| | | tCoursePackageDiscount.setCoursePackagePaymentConfigId(i1); |
| | | coursePackageDiscountClient.update(tCoursePackageDiscount); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public ResultUtil cancellationRecord(Long id, String cancelClasses, Integer deductClassHour) { |
| | | // CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingClient.queryCoursePackageSchedulingById(id); |
| | | |
| | | List<CoursePackageScheduling> coursePackageSchedulings = coursePackageSchedulingClient.queryCoursePackageSchedulingsById(id); |
| | | List<Long> integers = new ArrayList<>(); |
| | | for (CoursePackageScheduling coursePackageScheduling : coursePackageSchedulings) { |
| | | integers.add(coursePackageScheduling.getId()); |
| | | coursePackageScheduling.setCancelClasses(cancelClasses); |
| | | coursePackageScheduling.setDeductClassHour(deductClassHour); |
| | | } |
| | | |
| | | |
| | | List<CoursePackageScheduling> coursePackageSchedulings = coursePackageSchedulingClient.queryCoursePackageSchedulingsById(id); |
| | | // for (CoursePackageScheduling coursePackageScheduling : coursePackageSchedulings) { |
| | | |
| | | // if(coursePackageScheduling.getStatus() == 1 || coursePackageScheduling.getStatus() == 4){ |
| | | // return ResultUtil.error("不能添加消课凭证"); |
| | | // } |
| | | // coursePackageScheduling.setCancelClasses(cancelClasses); |
| | | // coursePackageScheduling.setDeductClassHour(deductClassHour); |
| | | coursePackageSchedulingClient.editCoursePackageScheduling(coursePackageSchedulings); |
| | | |
| | | List<CoursePackageStudent> coursePackageStudents = coursePackageStudentClient.queryByCoursePackageSchedulingId(integers); |
| | | for (CoursePackageStudent coursePackageStudent : coursePackageStudents) { |
| | | for (CoursePackageScheduling coursePackageScheduling : coursePackageSchedulings) { |
| | | if (coursePackageStudent.getSignInOrNot()==2){ |
| | | break; |
| | | } |
| | | integers.add(coursePackageScheduling.getId()); |
| | | coursePackageScheduling.setCancelClasses(cancelClasses); |
| | | coursePackageScheduling.setDeductClassHour(deductClassHour); |
| | | } |
| | | |
| | | if(coursePackageStudent.getReservationStatus() == 0){ |
| | | continue; |
| | | } |
| | |
| | | |
| | | |
| | | } |
| | | coursePackageSchedulingClient.editCoursePackageScheduling(coursePackageSchedulings); |
| | | // } |
| | | |
| | | return ResultUtil.success(); |
| | |
| | | <result column="handleTime" property="handleTime"/> |
| | | <result column="insertTime" property="insertTime"/> |
| | | <result column="state" property="state"/> |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | <#button name="补课" icon="fa-refresh" clickFun="RegistrationRecord.makeUpMissedLessons()" space="true"/> |
| | | <#button name="更换假期班" icon="fa-refresh" clickFun="RegistrationRecord.holiClass()" space="true"/> |
| | | <#button name="换课" icon="fa-refresh" clickFun="RegistrationRecord.transClass()" space="true"/> |
| | | |
| | | </div> |
| | | <#table id="managerTable"/> |
| | | </div> |
| | |
| | | "label": "已上课时数", |
| | | "name": "hasClassHours", |
| | | "id": "u:b55a5ac7f49d", |
| | | "value": "$totalClassHours-$totalClassHours" |
| | | }, |
| | | { |
| | | "type": "text", |
| | |
| | | }, |
| | | "id": "u:fcd7f36c5f88", |
| | | "level": "link", |
| | | "disabledOn": "this.laveClassHours === 0" |
| | | "disabledOn": "this.laveClassHours === 0 || this.classType===2" |
| | | }, |
| | | { |
| | | "type": "button", |
| | |
| | | }, |
| | | "id": "u:ae1e6e73beb9", |
| | | "level": "link", |
| | | "disabledOn": "this.laveClassHours === 0" |
| | | "disabledOn": "this.laveClassHours === 0 || this.classType===2" |
| | | }, |
| | | { |
| | | "type": "button", |
| | |
| | | } |
| | | }, |
| | | "id": "u:dd3110deaf9d", |
| | | "level": "link" |
| | | "level": "link", |
| | | "disabledOn": "this.classType===2" |
| | | } |
| | | ] |
| | | } |
| | |
| | | if (row.status === 0 ) { |
| | | if (value) { |
| | | var moneyValues = value.split(','); |
| | | var moneyText = moneyValues[0] + '元/' + moneyValues[1] + '玩湃币'; |
| | | return moneyText;} |
| | | } |
| | | |
| | | else { |
| | | if (row.payType === 4){ |
| | | var moneyText = moneyValues[0] + '元/' + moneyValues[1] + '币'; |
| | | return moneyText;} |
| | | } else { |
| | | console.log("看看支付方式") |
| | | console.log(row.payType) |
| | | if (row.payType == "手动支付"){ |
| | | console.log("元") |
| | | return row.payMoney+'元' |
| | | }else if (row.payType === 3){ |
| | | return row.payMoney+'玩湃币' }else { |
| | | }else if (row.payType == "玩湃币"){ |
| | | console.log("币") |
| | | return row.payMoney+'币' } |
| | | else { |
| | | console.log("不会吧") |
| | | return row.payMoney+'元' |
| | | } |
| | | |