liujie
2023-10-23 36688cafd4ec450a1cf8055edfb4303c047eb083
修改bug
16个文件已修改
318 ■■■■ 已修改文件
cloud-server-account/src/main/java/com/dsh/account/controller/CityManagerController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/controller/UseBenefitsController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/feignclient/activity/MerChandiseClient.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/TAppUserService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/impl/CityManagerServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/impl/RechargeRecordsServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java 194 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/resources/mapper/TStoreMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/model/ReservationSite.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/util/DateComparisonExample.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/controller/CityManagerController.java
@@ -39,8 +39,8 @@
    /**
     * 获取已有城市管理的省、市
     */
    @ResponseBody
    @RequestMapping("/cityManager/listAll")
    public List<CityManager> listAll(){
        return cityManagerService.listAll();
    }
cloud-server-account/src/main/java/com/dsh/account/controller/UseBenefitsController.java
@@ -92,13 +92,13 @@
                detailsVo.setUserPhone(tAppUser.getPhone());
                detailsVo.setIsVip(tAppUser.getIsVip());
                if(tAppUser.getGender()!=null){
                    detailsVo.setSex(tAppUser.getGender() == 1 ? "男" : "女");
                }
                System.out.println("============="+tAppUser);
                if (tAppUser.getBirthday()!=null){
                detailsVo.setBirthday(format1.format(tAppUser.getBirthday()));}
                detailsVo.setBirthday(format1.format(tAppUser.getBirthday()));
                }
                detailsVo.setAddress(tAppUser.getProvince()+tAppUser.getCity());
                if(tAppUser.getVipEndTime()!=null){
@@ -316,6 +316,23 @@
    @ResponseBody
    @PostMapping("/api/useBenefit/goodsDetailsOne")
    @ApiOperation(value = "积分商城-商品详情", tags = {"APP-使用福利"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(value = "商品id", name = "goodId", required = true, dataType = "int"),
    })
    public ResultUtil<ProductDetailsVo> goodsDetailsOne(Integer goodId){
        try {
            return ResultUtil.success(tauService.goodsDetailsOne(goodId));
        }catch (Exception e){
            return ResultUtil.runErr();
        }
    }
    /**
     * 实体、门票、优惠券为默认门店|课包为默认学员
     */
cloud-server-account/src/main/java/com/dsh/account/feignclient/activity/MerChandiseClient.java
@@ -29,6 +29,10 @@
    ProductDetailsVo getGoodDetailsWithId(@RequestBody ProductDetailRequest detailRequest);
    @PostMapping("/base/pointMerchars/getGoodDetailsWithIdOne")
    ProductDetailsVo getGoodDetailsWithIdOne(@RequestBody Integer id);
    @PostMapping("/base/pointMerchars/getDetailsOfExchange")
    ExchangeDetailsVo getIntegralExchangeDetails(@RequestBody Integer appUserId);
@@ -53,9 +57,16 @@
    @PostMapping("/base/pointMerchars/queryUserHasGoodsNums")
    int queryUserHasGoodsNums(@RequestBody AppUserGoodResp goodResp);
    @PostMapping("/base/pointMerchars/queryUserHasGoodsNums1")
    int queryUserHasGoodsNums1(@RequestBody AppUserGoodResp goodResp);
    @PostMapping("/base/pointMerchars/deletePaymentRecord")
    void deletePaymentRecord(@RequestBody String code);
}
cloud-server-account/src/main/java/com/dsh/account/service/TAppUserService.java
@@ -168,4 +168,16 @@
    List<DayData> getDayUserCount(UserInfoQueryDTO dto);
    List<GroupCityInfoVO> groupCityInfo(UserInfoQueryDTO dto);
    ProductDetailsVo goodsDetailsOne(Integer goodId);
}
cloud-server-account/src/main/java/com/dsh/account/service/impl/CityManagerServiceImpl.java
@@ -16,6 +16,6 @@
public class CityManagerServiceImpl extends ServiceImpl<CityManagerMapper, CityManager> implements ICityManagerService {
    @Override
    public List<CityManager> listAll() {
        return this.list();
        return this.baseMapper.selectList(null);
    }
}
cloud-server-account/src/main/java/com/dsh/account/service/impl/RechargeRecordsServiceImpl.java
@@ -127,8 +127,7 @@
                details.add(consumeDetail);
            }
        }
//            4.智慧球场
        //    4.智慧球场
        List<Map<String,Object>> list = stClient.game(appUserId);
        if (list.size() > 0 ){
            for (Map<String,Object> booking : list) {
@@ -142,7 +141,7 @@
        }
//            5.充值
       //  5.充值
        List<RechargeRecords> rechargeRecords = this.baseMapper.selectList(new QueryWrapper<RechargeRecords>()
                .eq("payStatus", 2)
                .eq("appUserId", appUserId)
cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java
@@ -1010,6 +1010,10 @@
        detailsVo.setGoodId(goodId);
        return mcClient.getGoodDetailsWithId(detailsVo);
    }
    @Override
    public ProductDetailsVo goodsDetailsOne(Integer goodId ) {
        return mcClient.getGoodDetailsWithIdOne(goodId);
    }
    @Override
    public StuAndStoreResponse queryAppUserDefaultStuAndStore(Integer userIdFormRedis,Integer pointsMerId, String lat, String lon,Integer isCourse) {
@@ -1096,7 +1100,8 @@
        if (ToolUtil.isNotEmpty(count) && count >= merchandise.getPickUpQuantity()){
            return ResultUtil.error("超过限领数量");
        }
        if (ToolUtil.isNotEmpty(count) && count >= merchandise.getQuantityIssued()){
        int count1 = mcClient.queryUserHasGoodsNums1(goodResp);
        if (ToolUtil.isNotEmpty(count1) && count1 >= merchandise.getQuantityIssued()){
            return ResultUtil.error("超过发放数量");
        }
cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
@@ -233,7 +233,191 @@
                .eq("pointsMerchandiseId",goodId));
    }
    @PostMapping("/base/pointMerchars/getGoodDetailsWithIdOne")
    public ProductDetailsVo getGoodDetailsWithIdOne(@RequestBody Integer id){
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        ProductDetailsVo detailsVo = new ProductDetailsVo();
        PointsMerchandise merchandise = pmdsService.getById(id);
        detailsVo.setCardType(merchandise.getCardType());
        switch (merchandise.getType()){
            case 2:
//                课包
                CoursePackage coursePackage = cpClient.queryCoursePackageById(merchandise.getCoursePackageId());
                detailsVo.setGoodId(coursePackage.getId());
                List<String> list1 = new ArrayList<>();
                list1.add(coursePackage.getCoverDrawing());
                list1.addAll(Arrays.asList(StrUtils.splitStr2StrArr(coursePackage.getDetailDrawing(), ",")));
                detailsVo.setPics(list1);
                Collections.sort(detailsVo.getPics(), (s1, s2) -> {
                    if (s1.equals(coursePackage.getCoverDrawing())) {
                        return -1; // s1排在前面
                    } else if (s2.equals(coursePackage.getCoverDrawing())) {
                        return 1; // s2排在前面
                    } else {
                        return 0; // 保持原顺序
                    }
                });
                detailsVo.setGoodName(coursePackage.getName());
                detailsVo.setBelongsScope(merchandise.getUserPopulation());
                int coursePackageNums = upmseService.count(new QueryWrapper<UserPointsMerchandise>()
                        .eq("pointsMerchandiseId",merchandise.getId() ));
                detailsVo.setRedeemedNum(coursePackageNums);
                detailsVo.setResidueNum(Math.max(merchandise.getQuantityIssued() - coursePackageNums, 0));
                detailsVo.setPerLimit(merchandise.getPickUpQuantity());
                if (merchandise.getRedemptionMethod() == 1){
                    detailsVo.setExchangeType(1);
                    detailsVo.setIntegral(merchandise.getIntegral());
                }else {
                    detailsVo.setExchangeType(2);
                    detailsVo.setIntegral(merchandise.getIntegral());
                    detailsVo.setCash(merchandise.getCash());
                }
                detailsVo.setCost(merchandise.getPrice());
                if (merchandise.getUseScope() == 1){
                    detailsVo.setExchangeAddrType(1);
                    detailsVo.setBelongs("全国通用");
                }else if (merchandise.getUseScope() == 2){
                    detailsVo.setExchangeAddrType(2);
                    detailsVo.setBelongs(merchandise.getProvince()+"|"+merchandise.getCity() + "用户可用");
                }else {
                    detailsVo.setExchangeAddrType(3);
                    List<PointsMerchandiseStore> list = pmdstoService.list(new QueryWrapper<PointsMerchandiseStore>()
                            .eq("pointsMerchandiseId",merchandise.getId() ));
                    PointsMerchandiseStore pointsMerchandiseStore = list.get(0);
                    StoreDetailOfCourse courseOfStore = stoClient.getCourseOfStore(pointsMerchandiseStore.getStoreId());
                    detailsVo.setBelongs(courseOfStore.getStoreName()+"可用");
                }
                List<CoursePackagePaymentConfig> courseConfigList = cpcfigClient.getCourseConfigList(coursePackage.getId());
                for (CoursePackagePaymentConfig coursePackagePaymentConfig : courseConfigList) {
                    if (Objects.equals(coursePackagePaymentConfig.getId(), merchandise.getCoursePackageConfigId())){
                        detailsVo.setCourseHours(coursePackagePaymentConfig.getClassHours());
                        break;
                    }
                }
                detailsVo.setStartTime(format.format(merchandise.getStartTime()));
                detailsVo.setEndTime(format.format(merchandise.getEndTime()));
                detailsVo.setContents(merchandise.getRedemptionInstructions());
                detailsVo.setGoodType(merchandise.getType());
                break;
            case 1:
            case 3:
                detailsVo.setGoodId(merchandise.getId());
                List<String> list2 = new ArrayList<>();
                String cover = merchandise.getCover();
                list2.addAll(Arrays.asList(StrUtils.splitStr2StrArr(merchandise.getProductImages(), ",")));
                detailsVo.setPics(list2);
                Collections.sort(detailsVo.getPics(), (s1, s2) -> {
                    if (s1.equals(merchandise.getCover())) {
                        return -1; // s1排在前面
                    } else if (s2.equals(merchandise.getCover())) {
                        return 1; // s2排在前面
                    } else {
                        return 0; // 保持原顺序
                    }
                });
                detailsVo.setPics(list2);
                detailsVo.setGoodName(merchandise.getName());
                detailsVo.setBelongsScope(merchandise.getUserPopulation());
                int count = upmseService.count(new QueryWrapper<UserPointsMerchandise>()
                        .eq("pointsMerchandiseId",merchandise.getId() ));
                detailsVo.setRedeemedNum(count);
                detailsVo.setResidueNum(Math.max(merchandise.getQuantityIssued() - count, 0));
                detailsVo.setPerLimit(merchandise.getPickUpQuantity());
                detailsVo.setExchangeType(merchandise.getRedemptionMethod());
                if (merchandise.getRedemptionMethod() == 1){
                    detailsVo.setIntegral(merchandise.getIntegral());
                }else {
                    detailsVo.setIntegral(merchandise.getIntegral());
                    detailsVo.setCash(merchandise.getCash());
                }
                detailsVo.setCost(merchandise.getPrice());
                if (merchandise.getUseScope() == 1){
                    detailsVo.setExchangeAddrType(1);
                    detailsVo.setBelongs("全国通用");
                }else if (merchandise.getUseScope() == 2){
                    detailsVo.setExchangeAddrType(2);
                    detailsVo.setBelongs(merchandise.getProvince()+"|"+merchandise.getCity() + "用户可用");
                }else {
                    detailsVo.setExchangeAddrType(3);
                    List<PointsMerchandiseStore> list = pmdstoService.list(new QueryWrapper<PointsMerchandiseStore>()
                            .eq("pointsMerchandiseId",merchandise.getId() ));
                    PointsMerchandiseStore pointsMerchandiseStore = list.get(0);
                    StoreDetailOfCourse courseOfStore = stoClient.getCourseOfStore(pointsMerchandiseStore.getStoreId());
                    detailsVo.setBelongs(courseOfStore.getStoreName()+"可用");
                }
                detailsVo.setStartTime(format.format(merchandise.getStartTime()));
                detailsVo.setEndTime(format.format(merchandise.getEndTime()));
                detailsVo.setContents(merchandise.getRedemptionInstructions());
                detailsVo.setGoodType(merchandise.getType());
                break;
            case 4:
//                优惠券
                Coupon coupon = iCouponService.getById(id);
                detailsVo.setGoodId(coupon.getId());
                List<String> list3 = new ArrayList<>();
                list3.add(ToolUtil.isEmpty(coupon.getCover()) ? "" : coupon.getCover());
                if (ToolUtil.isNotEmpty(coupon.getProductImages())){
                    list3.addAll(Arrays.asList(StrUtils.splitStr2StrArr(coupon.getProductImages(), ",")));
                }
                detailsVo.setPics(list3);
                Collections.sort(detailsVo.getPics(), (s1, s2) -> {
                    if (s1.equals(coupon.getCover())) {
                        return -1; // s1排在前面
                    } else if (s2.equals(coupon.getCover())) {
                        return 1; // s2排在前面
                    } else {
                        return 0; // 保持原顺序
                    }
                });
                detailsVo.setGoodName(coupon.getName());
                detailsVo.setBelongsScope(coupon.getUserPopulation());
                int couponNums = upmseService.count(new QueryWrapper<UserPointsMerchandise>()
                        .eq("pointsMerchandiseId",merchandise.getId() ));
                detailsVo.setRedeemedNum(couponNums);
                detailsVo.setResidueNum(Math.max(coupon.getQuantityIssued() - couponNums, 0));
                detailsVo.setPerLimit(coupon.getPickUpQuantity());
                detailsVo.setExchangeType(coupon.getRedemptionMethod());
                if (coupon.getRedemptionMethod() == 1){
                    detailsVo.setIntegral(coupon.getIntegral().intValue());
                }else {
                    detailsVo.setIntegral(coupon.getIntegral().intValue());
                    detailsVo.setCash(coupon.getCash());
                }
                if (coupon.getUseScope() == 1){
                    detailsVo.setExchangeAddrType(1);
                    detailsVo.setBelongs("全国通用");
                }else if (coupon.getUseScope() == 2){
                    detailsVo.setExchangeAddrType(2);
                    List<CouponCity> list = ccityService.list(new LambdaQueryWrapper<CouponCity>()
                            .eq(CouponCity::getCouponId, coupon.getId()));
                    if (list.size() > 0){
                        detailsVo.setBelongs(list.get(0).getProvince()+"|"+list.get(0).getCity() + "用户可用");
                    }
                }else {
                    detailsVo.setExchangeAddrType(3);
                    List<CouponStore> list = cstoreService.list(new QueryWrapper<CouponStore>()
                            .eq("couponId",coupon.getId() ));
                    StoreDetailOfCourse courseOfStore = stoClient.getCourseOfStore(list.get(0).getStoreId());
                    detailsVo.setBelongs(courseOfStore.getStoreName()+"可用");
                }
                detailsVo.setStartTime(format.format(coupon.getStartTime()));
                detailsVo.setEndTime(format.format(coupon.getEndTime()));
                detailsVo.setContents(coupon.getIllustrate());
                detailsVo.setGoodType(4);
                break;
            default:
                break;
        }
        return detailsVo;
    }
    @PostMapping("/base/pointMerchars/getGoodDetails")
    public ProductDetailsVo getGoodDetailsWithId(@RequestBody ProductDetailRequest detailRequest){
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
@@ -637,7 +821,15 @@
    @PostMapping("/base/pointMerchars/queryUserHasGoodsNums")
    public int queryUserHasGoodsNums(@RequestBody AppUserGoodResp goodResp){
        int count = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
                .eq(UserPointsMerchandise::getUserId,goodResp.getGoodId())
                .eq(UserPointsMerchandise::getUserId,goodResp.getAppUserId())
                .eq(UserPointsMerchandise::getPointsMerchandiseId,goodResp.getGoodId()));
        System.out.println(count);
        return count;
    }
    @ResponseBody
    @PostMapping("/base/pointMerchars/queryUserHasGoodsNums1")
    public int queryUserHasGoodsNums1(@RequestBody AppUserGoodResp goodResp){
        int count = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
                .eq(UserPointsMerchandise::getPointsMerchandiseId,goodResp.getGoodId()));
        System.out.println(count);
        return count;
cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageServiceImpl.java
@@ -172,7 +172,11 @@
            coursePackageListVo.setApplicantsNumber(integer);
            coursePackageListVo.setPayType(coursePackage.getPayType());
            coursePackageListVo.setPlayPaiCoin(coursePackagePaymentConfig.getPlayPaiCoin());
            //会员显示原价和会员价(最低)。非会员显示会员价和支付价(最低)
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java
@@ -113,7 +113,7 @@
//        }
        model.addAttribute("yysList",list1);
        return PREFIX + "tShop_add.html";
        return PREFIX + "TShop_add.html";
    }
    @RequestMapping("/tShop_add_one")
    public String tCompetitionAddOne(Integer id,Model model) {
@@ -122,7 +122,7 @@
        String roleid = UserExt.getUser().getRoleid();
        model.addAttribute("id",id);
        return PREFIX + "tShop_add_one.html";
        return PREFIX + "TShop_add_one.html";
    }
    @RequestMapping("/tShop_add_two")
    public String tCompetitionAddTwo(Integer id,Model model) {
@@ -187,13 +187,13 @@
        User byId1 = userMapper.selectById(byId.getStoreStaffId());
        model.addAttribute("city",byId1);
        model.addAttribute("type",1);
        return PREFIX + "tShop_edit.html";
        return PREFIX + "TShop_edit.html";
    }
    @RequestMapping("/tShop_update1/{id}")
    public String tCityUpdate1(@PathVariable Integer id, Model model) {
        TStoreOther byId = storeOtherService.getById(id);
        model.addAttribute("item",byId);
        return PREFIX + "tShop_edit_one.html";
        return PREFIX + "TShop_edit_one.html";
    }
@@ -213,7 +213,7 @@
        model.addAttribute("item",byId);
        model.addAttribute("list1",list1);
        return PREFIX + "tShop_edit_two.html";
        return PREFIX + "TShop_edit_two.html";
    }
    @RequestMapping("/tShop_update_one1/{id}")
    public String tCityUpdateOne1(@PathVariable Integer id, Model model) {
@@ -227,7 +227,7 @@
        model.addAttribute("list",list);
        model.addAttribute("list1",list1);
        return PREFIX + "tShop_add_three.html";
        return PREFIX + "TShop_add_three.html";
    }
@@ -254,14 +254,14 @@
        User byId1 = userMapper.selectById(byId.getStoreStaffId());
        model.addAttribute("city",byId1);
        model.addAttribute("type",0);
        return PREFIX + "tShop_edit.html";
        return PREFIX + "TShop_edit.html";
    }
    @RequestMapping("/tShop_gift/{id}")
    public String tCityGift(@PathVariable Integer id, Model model) {
        TStore byId = storeService.getById(id);
        model.addAttribute("welfarePicture",byId.getWelfarePicture());
        model.addAttribute("id",id);
        return PREFIX + "tShop_img.html";
        return PREFIX + "TShop_img.html";
    }
    @RequestMapping("/tShop_indexSet/{id}")
    public String tCityIndexSet(@PathVariable Integer id, Model model) {
@@ -282,7 +282,7 @@
        StoreConfig c8 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,8));
        model.addAttribute("c8",c8);
        model.addAttribute("id",id);
        return PREFIX + "tShop_imgAll.html";
        return PREFIX + "TShop_imgAll.html";
    }
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java
@@ -611,6 +611,7 @@
    @RequestMapping("/add")
    public String tCompetitionAdd(Model model) {
        List<CityManager> province = cityManagerClient.listAll();
        System.out.println(province);
        // 已有城市管理的省
        ArrayList<String> list1 = new ArrayList<>();
        // 已有城市管理的市
@@ -642,7 +643,7 @@
        model.addAttribute("objectType",objectType);
        model.addAttribute("objectId",objectId);
        model.addAttribute("stores",stores);
        return PREFIX + "tSite_add.html";
        return PREFIX + "TSite_add.html";
    }
cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
@@ -76,7 +76,7 @@
    <select id="queryListOfpage" resultType="java.util.Map">
        SELECT `id`, `operatorId`, `province`, `city`, `name`,ids
        from t_store
        where 1=1
        where state=1
        <if test="provinceCode != null and provinceCode!=''">
            and provinceCode = #{provinceCode}
        </if>
cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js
@@ -861,15 +861,7 @@
        return Feng.error('限领数量不能为空!');
    }
    //
    // let quantityHas = $("#quantityHas").val();
    // if (quantityIssued <= quantityHas){
    //     return Feng.error('发放数量小于已领数量!');
    // }
    // let nums = $("#nums").val();
    // if (quantityIssued <= nums){
    //     return Feng.error('发放数量小于已领数量!');
    // }
cloud-server-other/src/main/java/com/dsh/other/model/ReservationSite.java
@@ -25,7 +25,7 @@
    private Integer payType;
    @ApiModelProperty(value = "场地名称", dataType = "String", required = false)
    private String nextName;
    @ApiModelProperty(value = "是否半场 1是 2否",required = false)
    @ApiModelProperty(value = "是否半场 1是 2否",required = true)
    private Integer isHalf;
    @ApiModelProperty(value = "半场名称",required = false)
    private String halfName;
cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
@@ -320,17 +320,18 @@
     */
    @Override
    public ResultUtil reservationSite(Integer uid, ReservationSite reservationSite) throws Exception {
        Site site = this.getById(reservationSite.getId());
        AppUser appUser = appUserClient.queryAppUser(uid);
        String[] split = reservationSite.getTimes().split(";");
        for (String s : split) {
            String day = s.split(" ")[0];
            String time = s.split(" ")[1];
            List<QuerySiteTimes> querySiteTimes = querySiteTimes(reservationSite.getId(), day,reservationSite.getHalfName(),reservationSite.getNextName());
            for (QuerySiteTimes querySiteTime : querySiteTimes) {
                if(querySiteTime.getTime().equals(time) && querySiteTime.getSelectable() == 0){
                    return ResultUtil.error("【" + s + "】时间段已被使用");
                    return ResultUtil.error("【" + s + "】" +
                            "时间段已被使用");
                }
            }
        }
@@ -365,7 +366,7 @@
            UserCoupon userCoupon = userCouponClient.queryUserCouponById(new QueryUserCouponByIdAndUserId(reservationSite.getCouponId(),uid));
            if(userCoupon.getStatus() == 2){
            if(userCoupon!=null && userCoupon.getStatus() == 2){
                return ResultUtil.error("优惠券已被核销");
            }
            Coupon coupon = couponClient.queryCouponById(userCoupon.getCouponId());
@@ -373,7 +374,7 @@
            if(System.currentTimeMillis() >= time){
                return ResultUtil.error("优惠券已过期");
            }
            if(coupon.getType() == 1){//满减
            if(userCoupon!=null && coupon.getType() == 1){//满减
//                {"conditionalAmount":50,"deductionAmount":10,"experienceName":""}
                JSONObject jsonObject = JSON.parseObject(coupon.getContent());
                Double num1 = jsonObject.getDouble("conditionalAmount");
@@ -384,7 +385,7 @@
                payMoney = new BigDecimal(payMoney).subtract(new BigDecimal(num2)).setScale(2, RoundingMode.HALF_EVEN).doubleValue();
            }
            if(coupon.getType() == 2){//代金券
            if(userCoupon!=null && coupon.getType() == 2){//代金券
                JSONObject jsonObject = JSON.parseObject(coupon.getContent());
                Double num1 = jsonObject.getDouble("conditionalAmount");
                if(payMoney.compareTo(num1) <= 0){
@@ -723,7 +724,11 @@
                return ResultUtil.error("玩湃币不足");
            }
        }else{
            payMoney = new BigDecimal(site.getCashPrice()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue();
            if(reservationSite.getIsHalf()==2){
                payMoney = new BigDecimal(site.getCashPrice()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue();
            }else {
                payMoney = new BigDecimal(site.getCashPriceOne()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue();
            }
        }
        //校验优惠券
cloud-server-other/src/main/java/com/dsh/other/util/DateComparisonExample.java
@@ -11,14 +11,6 @@
import java.util.Date;
public class DateComparisonExample {
    public static void main(String[] args) {
        String stringValue = "2023-10-18 00:20:00 - 2023-10-18 00:21:00";
        Date startDate = parseDate("2023-10-18 00:19:00");
        Date endDate = parseDate("2023-10-18 00:21:00");
        boolean isBetween = isStringDateBetween(stringValue, startDate, endDate);
        System.out.println("字符串时间是否在两个 Date 类型之间?" + isBetween);
    }
    private static Date parseDate(String dateString) {
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");