nickchange
2023-11-17 4a055748da8c4e8baf002dff7b74e12ec150610a
cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java
@@ -108,7 +108,7 @@
    @ResponseBody
    @PostMapping("/coupon/queryCouponByUser/{userId}")
    public List<Integer> queryCouponByUser(@PathVariable("userId") Integer userId){
        List<Coupon> list = couponService.list(new QueryWrapper<Coupon>().eq("distributionMethod", 2).eq("userPopulation",2)
        List<Coupon> list = couponService.list(new QueryWrapper<Coupon>().eq("distributionMethod", 2)
                .le("startTime", new Date()).ge("endTime", new Date()).eq("auditStatus", 2)
                .eq("state", 1));
@@ -305,6 +305,7 @@
    @PostMapping("/base/coupon/queryCouponListSearch")
    public List<Map<String,Object>> getCouponListOfSearch(@RequestBody CouponListOfSearch ofSearch){
        List<Map<String, Object>> mapList1 = couponService.queryCouponListOfSearch(ofSearch);
        List<Map<String, Object>> mapList = new ArrayList<>();
        if (ofSearch.getStoreIds()==null){
            ArrayList<Integer> list = new ArrayList<>();
@@ -438,11 +439,7 @@
                Integer publisherType = (Integer) stringObjectMap.get("publisherType");
                if (publisherType!=null) {
                    if (publisherType == 1) {
                        Integer cityManagerId = (Integer) stringObjectMap.get("cityManagerId");
                        TCityManager byId = citClient.getById(cityManagerId);
                        stringObjectMap.put("province", byId.getProvince());
                        stringObjectMap.put("city", byId.getCity());
                    }
                }
            }
@@ -644,21 +641,18 @@
            }
            if (dataVo.getUserType() == 1){
                coupon.setPublisherType(2);
                coupon.setAuditStatus(2);
                coupon.setCityManagerId(dataVo.getCityManagerId());
            }
            if (dataVo.getUserType() == 2){
                coupon.setPublisherType(1);
                coupon.setAuditStatus(1);
                coupon.setCityManagerId(dataVo.getCityManagerId());
            }
            if(dataVo.getObjType()!=1){
                coupon.setAuditStatus(1);
            }
            if (dataVo.getUserType()==1){
            if (dataVo.getUserType() == 3){
                coupon.setPublisherType(3);
                coupon.setAuditStatus(2);
            }else{
                coupon.setAuditStatus(1);
            }
            if(dataVo.getObjType()!=1){
                coupon.setAuditStatus(1);
                coupon.setCityManagerId(dataVo.getCityManagerId());
            }
            boolean save = couponService.save(coupon);