| | |
| | | import com.dsh.activity.feignclient.account.StudentClient; |
| | | import com.dsh.activity.feignclient.account.model.AppUserByNameAndPhoneDTO; |
| | | import com.dsh.activity.feignclient.account.model.TCityManager; |
| | | import com.dsh.activity.feignclient.account.model.TStoreStaff; |
| | | import com.dsh.activity.feignclient.model.CouponExamineListSearch; |
| | | import com.dsh.activity.feignclient.model.CouponListOfSearch; |
| | | import com.dsh.activity.feignclient.model.TAppUser; |
| | |
| | | import com.dsh.activity.feignclient.other.StoreClient; |
| | | import com.dsh.activity.feignclient.other.model.CityDataAndProvinceDataVo; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.feignclient.other.model.StoreInfoDto; |
| | | import com.dsh.activity.feignclient.other.model.TOperatorCity; |
| | | import com.dsh.activity.model.CouponListVo; |
| | | import com.dsh.activity.model.CouponRecordQuery; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private StoreClient stoClient; |
| | | |
| | | |
| | | |
| | | @Resource |
| | |
| | | @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<>(); |
| | |
| | | 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()); |
| | | } |
| | | } |
| | | } |
| | |
| | | couponInfo.put("id",coupon.getId()); |
| | | couponInfo.put("auditStatus",coupon.getAuditStatus()); |
| | | couponInfo.put("publisherType",coupon.getPublisherType()); |
| | | if (coupon.getPublisherType() == 1){ |
| | | TCityManager byId = citClient.getById(coupon.getCityManagerId()); |
| | | couponInfo.put("province",byId.getProvince()); |
| | | couponInfo.put("city",byId.getCity()); |
| | | } |
| | | |
| | | couponInfo.put("name",coupon.getName()); |
| | | couponInfo.put("type",coupon.getType()); |
| | | JSONObject jsonObject = JSON.parseObject(coupon.getContent()); |
| | |
| | | List<CouponStore> list = couStoreService.list(new LambdaQueryWrapper<CouponStore>() |
| | | .eq(CouponStore::getCouponId,coupon.getId())); |
| | | if (list.size() > 0){ |
| | | // 获取门店ids |
| | | List<Integer> collect = list.stream().map(CouponStore::getStoreId).collect(Collectors.toList()); |
| | | List<Store> storeList = stoClient.queryStoreByIds(collect); |
| | | if (storeList.size() > 0){ |
| | | for (Store store : storeList) { |
| | | TStoreStaff list1 = stoStaClient.baseInfo(store.getStoreStaffId()); |
| | | |
| | | StoreInfoDto storeInfo = stoClient.getStoreInfo(store.getStoreStaffId()); |
| | | HashMap<String, Object> stringObjectHashMap = new HashMap<>(); |
| | | stringObjectHashMap.put("procity",store.getProvince()+store.getCity()); |
| | | stringObjectHashMap.put("storeAccount",list1.getName()+"+"+list1.getPhone()); |
| | | stringObjectHashMap.put("storeAccount",storeInfo.getInfo()); |
| | | stringObjectHashMap.put("storeName",store.getName()); |
| | | maps.add(stringObjectHashMap); |
| | | } |
| | |
| | | case 1: |
| | | coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); |
| | | break; |
| | | case 2: |
| | | coupon.setCash(dataVo.getRequiredCash()); |
| | | coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); |
| | | break; |
| | | |
| | | case 3: |
| | | coupon.setCash(dataVo.getRequiredCash()); |
| | | break; |
| | |
| | | } |
| | | 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); |