44323
2023-11-17 e863d3485d077c90988c81a756b37ef21cf4962e
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TDiscountController.java
@@ -180,6 +180,7 @@
        List<Map<String, Object>> list = new ArrayList<>();
        // 拒绝理由
        StringBuilder reasons = new StringBuilder("");
        int a =0;
        for (CoursePackagePaymentConfig coursePackagePaymentConfig : list4) {
            if(coursePackagePaymentConfig.getCashPayment() == 0){
                continue;
@@ -196,13 +197,25 @@
            }
            map.put("payment",  payment);
            map.put("cashPayment", coursePackagePaymentConfig.getCashPayment());
            List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient.queryCoursePackageDiscount(coursePackagePaymentConfig.getId());
            for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) {
                if (tCoursePackageDiscount.getAuditStatus()==3){
                    reasons.append(tCoursePackageDiscount.getAuditRemark()+",");
                    a = 3;
                    model.addAttribute("type1",3);
                }else{
                    break;
                }else if (tCoursePackageDiscount.getAuditStatus()==2){
                    a=2;
                    model.addAttribute("type1",-1);
                }else{
                    a=1;
                    model.addAttribute("type1",-1);
                    break;
                }
            }
            for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) {
                if (tCoursePackageDiscount.getAuditStatus()==3){
                    reasons.append(tCoursePackageDiscount.getAuditRemark()+",");
                }
            }
            map.put("coursePackageDiscount", tCoursePackageDiscounts);
@@ -213,7 +226,7 @@
        // 审核状态
        StringBuilder stringBuilder = new StringBuilder("");
        switch (type1){
        switch (a){
            case 1:
                stringBuilder.append("待审核");
                break;
@@ -234,6 +247,7 @@
            model.addAttribute("reasons", "");
        }
        model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list));
        model.addAttribute("type2",tCoursePackage.getType());
        return PREFIX1 + "coursePackageDiscount.html";
    }
@@ -254,7 +268,9 @@
        }
        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())));
        List<DiscountList> discountLists = courseClient.queryDiscountList(new QueryDiscountList
                (page.getCurrent(),page.getSize(),provinceCode,cityCode,name,type,
                        list.stream().map(TStore::getId).collect(Collectors.toList())));
        for (DiscountList discountList : discountLists) {
            for (TStore tStore : list) {
                if(discountList.getStoreId().equals(tStore.getId())){