| | |
| | | System.out.println("=========coursePackagePaymentConfig=============>" + coursePackagePaymentConfig); |
| | | // model.addAttribute("couponIds", "3,2"); |
| | | } |
| | | |
| | | return PREFIX + "coursePackage_info.html"; |
| | | } |
| | | |
| | |
| | | } |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | model.addAttribute("type",tCoursePackage.getType()); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient.queryByCoursePackageId1(tCoursePackage.getId()); |
| | | if (tCoursePackageDiscounts.size()>0){ |
| | | TCoursePackageDiscount tCoursePackageDiscount = tCoursePackageDiscounts.get(0); |
| | | model.addAttribute("audit",tCoursePackageDiscount.getAuditStatus()); |
| | | StringBuilder stringBuilder = new StringBuilder(" "); |
| | | // 如果折扣未通过 |
| | | if (tCoursePackageDiscount.getAuditStatus() == 3){ |
| | | model.addAttribute("state","未通过"); |
| | | for (TCoursePackageDiscount coursePackageDiscount : tCoursePackageDiscounts) { |
| | | stringBuilder.append(coursePackageDiscount.getAuditRemark()+","); |
| | | } |
| | | if (!stringBuilder.equals("")){ |
| | | String string = stringBuilder.toString(); |
| | | String substring = string.substring(0, string.length() - 1); |
| | | model.addAttribute("reasons",substring); |
| | | }else{ |
| | | model.addAttribute("reasons",stringBuilder); |
| | | } |
| | | }else{ |
| | | model.addAttribute("reasons",stringBuilder); |
| | | } |
| | | if(tCoursePackageDiscount.getAuditStatus() == 2){ |
| | | model.addAttribute("state","已通过"); |
| | | } |
| | | if (tCoursePackageDiscount.getAuditStatus() == 1){ |
| | | model.addAttribute("state","待审核"); |
| | | } |
| | | }else{ |
| | | model.addAttribute("audit",2); |
| | | model.addAttribute("state",0); |
| | | model.addAttribute("reasons",""); |
| | | } |
| | | |
| | | model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list)); |
| | | return PREFIX + "coursePackageDiscount.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到报名列表页 |
| | |
| | | model.addAttribute("auditStatus", tCoursePackage.getAuditStatus()); |
| | | |
| | | model.addAttribute("authRemark", tCoursePackage.getAuthRemark()); |
| | | String classStartTime = tCoursePackage.getClassStartTime(); |
| | | String classEndTime = tCoursePackage.getClassEndTime(); |
| | | if (tCoursePackage.getStartTime()!=null) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String dateString = sdf.format(tCoursePackage.getStartTime()); |
| | | String dateString1 = sdf.format(tCoursePackage.getEndTime()); |
| | | model.addAttribute("holi", dateString + " - " + dateString1); |
| | | } |
| | | String[] split1 = classStartTime.split(","); |
| | | String[] split2 = classEndTime.split(","); |
| | | |
| | | model.addAttribute("classTime", tCoursePackage.getClassStartTime() + ":00 - " + tCoursePackage.getClassEndTime() + ":00"); |
| | | List<String> listtime = new ArrayList<>(); |
| | | |
| | | for (int i = 0; i < split1.length; i++) { |
| | | String o = split1[i]+"-"+split2[i]; |
| | | listtime.add(o); |
| | | } |
| | | |
| | | |
| | | model.addAttribute("time1",listtime.remove(0)); |
| | | if (listtime.size()!=0) { |
| | | model.addAttribute("times", listtime); |
| | | } |
| | | model.addAttribute("classTime", |
| | | tCoursePackage.getClassStartTime() + ":00 - " |
| | | + tCoursePackage.getClassEndTime() + ":00"); |
| | | String[] split = tCoursePackage.getClassWeeks().split(";"); |
| | | List<String> list5 = Arrays.asList("周一", "周二", "周三", "周四", "周五", "周六", "周日"); |
| | | List<Map<String, Object>> classWeeks = new ArrayList<>(); |
| | |
| | | model.addAttribute("playPaiCoin", coursePackagePaymentConfig.getPlayPaiCoin() == 0 ? false : true);} |
| | | model.addAttribute("coursePackagePaymentConfig", list4.remove(0)); |
| | | model.addAttribute("coursePackagePaymentConfigs", list4); |
| | | |
| | | Integer type = tCoursePackage.getType(); |
| | | model.addAttribute("type",type); |
| | | return PREFIX + "examineCoursePackage_info.html"; |
| | | } |
| | | |
| | |
| | | @ResponseBody |
| | | @PostMapping("/queryCity") |
| | | public List<Map<String, Object>> queryCity(String code){ |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | String cityCode = null; |
| | |
| | | List<TSite> list = siteService.list(new QueryWrapper<TSite>().select("id","name").eq("storeId", storeId).eq("state", 1)); |
| | | return list; |
| | | } |
| | | /** |
| | | * 根据门店id获取场地 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/querySite1") |
| | | public List<TSite> querySite1(Integer storeId,Integer type){ |
| | | List<TSite> list = new ArrayList<>(); |
| | | if (type==1){ |
| | | list = siteService.list(new QueryWrapper<TSite>() |
| | | .select("id","name") |
| | | .eq("storeId", storeId) |
| | | .eq("state", 1) |
| | | .eq("ishalf",type)); |
| | | }else{ |
| | | list = siteService.list(new QueryWrapper<TSite>() |
| | | .select("id","name") |
| | | .eq("storeId", storeId) |
| | | .eq("state", 1) |
| | | ); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | if(objectType == 3) {// 门店 |
| | | storeIds.add(objectId); |
| | | } |
| | | Page<Map<String, Object>> mapPage = coursePackageService.queryCoursePackageLists(provinceCode, cityCode, coursePackageTypeId, storeIds, name, status, state); |
| | | Page<Map<String, Object>> mapPage = coursePackageService.queryCoursePackageLists(provinceCode, |
| | | cityCode, coursePackageTypeId, storeIds, name, status, state); |
| | | return super.packForBT(mapPage); |
| | | } |
| | | |