| | |
| | | public String index(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | return PREFIX + "TDiscount.html"; |
| | | } |
| | | @RequestMapping("/audit") |
| | |
| | | private CoursePackageDiscountClient coursePackageDiscountClient; |
| | | @RequestMapping("/info") |
| | | public String info( Integer id, Model model) { |
| | | TCoursePackage tCoursePackage1 = courseClient.queryByDiscountId(id); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(tCoursePackage1.getId()); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | |
| | | map.put("coursePackageDiscount", tCoursePackageDiscounts); |
| | | list.add(map); |
| | | } |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | model.addAttribute("type",tCoursePackage.getType()); |
| | | model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list)); |
| | | return PREFIX + "coursePackageDiscount.html"; |
| | | } |
| | | @RequestMapping("/infoOne") |
| | | public String infoOne( Integer id, Model model) { |
| | | Integer state = courseClient.queryDiscountById(id); |
| | | if(state==1){ |
| | | model.addAttribute("stateStr","待审核"); |
| | | model.addAttribute("state",1); |
| | | }else { |
| | | model.addAttribute("stateStr","未通过"); |
| | | model.addAttribute("state",3); |
| | | } |
| | | |
| | | TCoursePackage tCoursePackage1 = courseClient.queryByDiscountId(id); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(tCoursePackage1.getId()); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | // 拒绝理由 |
| | | StringBuilder reasons = new StringBuilder(""); |
| | | for (CoursePackagePaymentConfig coursePackagePaymentConfig : list4) { |
| | | if(coursePackagePaymentConfig.getCashPayment() == 0){ |
| | | continue; |
| | |
| | | } |
| | | map.put("payment", payment); |
| | | map.put("cashPayment", coursePackagePaymentConfig.getCashPayment()); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient.queryCoursePackageDiscountOne(coursePackagePaymentConfig.getId()); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient.queryCoursePackageDiscount(coursePackagePaymentConfig.getId()); |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) { |
| | | if (tCoursePackageDiscount.getAuditStatus()==3){ |
| | | reasons.append(tCoursePackageDiscount.getAuditRemark()+","); |
| | | model.addAttribute("type1",3); |
| | | }else{ |
| | | model.addAttribute("type1",-1); |
| | | } |
| | | } |
| | | map.put("coursePackageDiscount", tCoursePackageDiscounts); |
| | | list.add(map); |
| | | } |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | Integer type1 = tCoursePackage.getType(); |
| | | // 审核状态 |
| | | StringBuilder stringBuilder = new StringBuilder(""); |
| | | |
| | | switch (type1){ |
| | | case 1: |
| | | stringBuilder.append("待审核"); |
| | | break; |
| | | case 2: |
| | | stringBuilder.append("已通过"); |
| | | break; |
| | | case 3: |
| | | stringBuilder.append("未通过"); |
| | | break; |
| | | } |
| | | model.addAttribute("type",stringBuilder); |
| | | |
| | | String string = reasons.toString(); |
| | | if (!string.equals("")){ |
| | | String substring = string.substring(0, string.length() - 1); |
| | | model.addAttribute("reasons", substring); |
| | | }else{ |
| | | model.addAttribute("reasons", ""); |
| | | } |
| | | model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list)); |
| | | |
| | | return PREFIX1 + "coursePackageDiscount.html"; |
| | | } |
| | | |
| | |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | wrapper.eq(TStore::getId, UserExt.getUser().getObjectId()); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | wrapper.eq(TStore::getOperatorId, UserExt.getUser().getObjectId()); |
| | | } |
| | | List<TStore> list = storeService.list(wrapper); |
| | | Page<DiscountList> page = new PageFactory<DiscountList>().defaultPage(); |
| | | List<DiscountList> discountLists = courseClient.queryDiscountList(new QueryDiscountList(page.getCurrent(),page.getSize(),provinceCode,cityCode,name,type,list.stream().map(TStore::getId).collect(Collectors.toList()))); |