From 7d22ca5a1c9416e84430a3997664e17861a2951e Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期五, 11 四月 2025 21:04:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0' into 2.0
---
cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java | 272 +++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 195 insertions(+), 77 deletions(-)
diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
index 87aa09e..59bfd58 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
@@ -10,11 +10,9 @@
import com.dsh.activity.feignclient.course.model.CoursePackagePaymentConfig;
import com.dsh.activity.feignclient.model.*;
import com.dsh.activity.feignclient.other.OperatorClient;
+import com.dsh.activity.feignclient.other.SiteClient;
import com.dsh.activity.feignclient.other.StoreClient;
-import com.dsh.activity.feignclient.other.model.Store;
-import com.dsh.activity.feignclient.other.model.StoreDetailOfCourse;
-import com.dsh.activity.feignclient.other.model.StoreInfoDto;
-import com.dsh.activity.feignclient.other.model.TOperatorCity;
+import com.dsh.activity.feignclient.other.model.*;
import com.dsh.activity.model.CoachChangeStateVO;
import com.dsh.activity.model.PointMerchandiseIncomeVo;
import com.dsh.activity.model.PointMerchandiseVo;
@@ -27,6 +25,7 @@
import com.dsh.activity.util.*;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -78,6 +77,8 @@
@Resource
private CouponCityService ccityService;
+ @Autowired
+ private SiteClient siteClient;
@Resource
@@ -225,10 +226,12 @@
String endTime = (String) stringObjectMap.get("endTime");
stringObjectMap.put("timeValue", startTime + "至" + endTime);
int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
- .eq(UserPointsMerchandise::getPointsMerchandiseId, o));
+ .eq(UserPointsMerchandise::getPointsMerchandiseId, o)
+ .eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1));
int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
.eq(UserPointsMerchandise::getPointsMerchandiseId, o)
- .eq(UserPointsMerchandise::getStatus, 2));
+ .eq(UserPointsMerchandise::getStatus, 2)
+ .eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1));
stringObjectMap.put("hasExchangeQty", count1);
stringObjectMap.put("hasPickQty", count2);
@@ -287,18 +290,21 @@
@Autowired
private PointsMerchandiseStoreService pointsMerchandiseStoreService;
+
+ @Autowired
+ private CouponStoreService couponStoreService;
+
@ResponseBody
@PostMapping("/base/pointMerchars/convertGoods")
public List<IntegralCommodity> getConvertibleGoods(@RequestBody Location location) throws Exception {
List<IntegralCommodity> commodity = new ArrayList<>();
Map<String, String> geocode = gdMapGeocodingUtil.geocode(location.getLon(), location.getLat());
+ if(null == geocode){
+ return new ArrayList<>();
+ }
String provinceCode = geocode.get("provinceCode");
String cityCode = geocode.get("cityCode");
-
-
-// if(null != geocode) {
-
List<Store> stores = storeClient.queryStoreList(new QueryStoreList(provinceCode, cityCode));
Store s = null;
Double d = 0D;
@@ -310,65 +316,82 @@
d = wgs84;
}
}
-// }
-
-// List<PointsMerchandiseCity> cityCode1 = pmdsCityService.list(new QueryWrapper<PointsMerchandiseCity>().eq("cityCode", cityCode));
List<Integer> cIds = new ArrayList<>();
-// for (PointsMerchandiseCity pointsMerchandiseCity : cityCode1) {
-// cIds.add(pointsMerchandiseCity.getPointsMerchandiseId());
-// }
-
List<PointsMerchandiseStore> storesids = pointsMerchandiseStoreService.list(new QueryWrapper<PointsMerchandiseStore>().eq("storeId", s.getId()));
for (PointsMerchandiseStore storesid : storesids) {
cIds.add(storesid.getPointsMerchandiseId());
}
-// if (cIds.size()>0) {
-
- List<PointsMerchandise> merchandises = pmdsService.list(new QueryWrapper<PointsMerchandise>().in("id", cIds)
+ QueryWrapper<PointsMerchandise> wrapper = new QueryWrapper<PointsMerchandise>()
.eq("state", 1)
.eq("shelves", 1)
- .gt("endTime", new Date()).last("ORDER BY sort desc,insertTime desc"));
+ .gt("endTime", new Date())
+ .eq("status", 1);
+ if(cIds.size() > 0){
+ wrapper.in("id", cIds);
+ }
+ List<PointsMerchandise> merchandises = pmdsService.list(wrapper.last("ORDER BY sort desc,insertTime desc"));
if (merchandises.size() > 0) {
for (PointsMerchandise merchandise : merchandises) {
IntegralCommodity integralCommodity = new IntegralCommodity();
integralCommodity.setCommodityId(merchandise.getId());
integralCommodity.setCommodityImg(merchandise.getCover());
integralCommodity.setCommodityName(merchandise.getName());
- integralCommodity.setCommodityPrice(merchandise.getPrice());
+ if(merchandise.getRedemptionMethod() == 1){
+ integralCommodity.setIntegral(merchandise.getIntegral());
+ }
+ if(merchandise.getRedemptionMethod() == 2){
+ integralCommodity.setCommodityPrice(merchandise.getPrice());
+ integralCommodity.setIntegral(merchandise.getIntegral());
+ }
+ if(merchandise.getRedemptionMethod() == 3){
+ integralCommodity.setCommodityPrice(merchandise.getPrice());
+ }
+ integralCommodity.setRedemptionMethod(merchandise.getRedemptionMethod());
integralCommodity.setGoodsType(merchandise.getType());
integralCommodity.setSort(merchandise.getSort());
commodity.add(integralCommodity);
}
-// }
}
- System.out.println(commodity);
+ List<CouponStore> storeId = couponStoreService.list(new QueryWrapper<CouponStore>().eq("storeId", s.getId()));
+ List<Integer> storeCoupons = new ArrayList<>();
+ for (CouponStore couponStore : storeId) {
+ storeCoupons.add(couponStore.getCouponId());
+ }
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ QueryWrapper<Coupon> queryWrapper = new QueryWrapper<Coupon>()
+ .eq("state", 1).gt("endTime", sdf.format(new Date()));
+ if(storeCoupons.size() > 0){
+ queryWrapper.in("id", storeCoupons);
+ }
+ List<Coupon> list = couponService.list(queryWrapper.last(" ORDER BY insertTime desc"));
+ if (!list.isEmpty()){
+ for (Coupon coupon : list) {
+ IntegralCommodity integralCommodity = new IntegralCommodity();
+ integralCommodity.setCommodityId(coupon.getId());
+ integralCommodity.setCommodityImg(coupon.getCover());
+ integralCommodity.setCommodityName(coupon.getName());
+ if(coupon.getRedemptionMethod() == 1){
+ integralCommodity.setIntegral(coupon.getIntegral().intValue());
+ }
+ if(coupon.getRedemptionMethod() == 2){
+ integralCommodity.setCommodityPrice(coupon.getCash());
+ integralCommodity.setIntegral(coupon.getIntegral().intValue());
+ }
+ integralCommodity.setRedemptionMethod(coupon.getRedemptionMethod());
+ integralCommodity.setGoodsType(4);
+ commodity.add(integralCommodity);
+ }
+ }
return commodity;
}
- @Resource
- private CoursePackageClient coursePackageClient;
- @Autowired
- private PointsMerchandiseService pointsMerchandiseService;
@ResponseBody
@PostMapping("/base/pointMerchars/getCommoditys")
public PointMerchandiseVo getVicinityGoods(@RequestBody CommodityRequest request) {
-// if (request.getShopId()!=null){
-// List<CoursePackage> coursePackages = coursePackageClient.queryByStoreId(request.getShopId());
-// List<Integer> coursIds = new ArrayList<>();
-// for (CoursePackage coursePackage : coursePackages) {
-// coursIds.add(coursePackage.getId());
-// }
-// List<PointsMerchandise> points = pointsMerchandiseService.list(new QueryWrapper<PointsMerchandise>().eq("state",1).eq("shelves",1).in("coursePackageId", coursIds));
-// PointMerchandiseVo pointMerchandiseVo = new PointMerchandiseVo();
-// pointMerchandiseVo.setMerchandises(points);
-// return pointMerchandiseVo;
-//
-// }
-
PointMerchandiseVo pointMerchandiseVo = new PointMerchandiseVo();
List<PointsMerchandise> list = new ArrayList<>();
@@ -387,7 +410,11 @@
list = pmdsService.list(new QueryWrapper<PointsMerchandise>()
.eq("state", 1)
- .eq("shelves", 1).le("startTime", new Date()).ge("endTime", new Date()));
+ .eq("shelves", 1)
+ .le("startTime", new Date())
+ .ge("endTime", new Date())
+ .eq("status", 1)
+ );
if (list.size() > 0) {
Iterator<PointsMerchandise> iterator = list.iterator();
while (iterator.hasNext()) {
@@ -435,7 +462,7 @@
detailsVo.setGoodName(coursePackage.getName());
detailsVo.setBelongsScope(merchandise.getUserPopulation());
int coursePackageNums = upmseService.count(new QueryWrapper<UserPointsMerchandise>()
- .eq("pointsMerchandiseId", merchandise.getId()));
+ .eq("pointsMerchandiseId", merchandise.getId()).eq("payStatus", 2).eq("state", 1));
detailsVo.setRedeemedNum(coursePackageNums);
detailsVo.setResidueNum(Math.max(merchandise.getQuantityIssued() - coursePackageNums, 0));
detailsVo.setPerLimit(merchandise.getPickUpQuantity());
@@ -498,7 +525,7 @@
detailsVo.setGoodName(merchandise.getName());
detailsVo.setBelongsScope(merchandise.getUserPopulation());
int count = upmseService.count(new QueryWrapper<UserPointsMerchandise>()
- .eq("pointsMerchandiseId", merchandise.getId()));
+ .eq("pointsMerchandiseId", merchandise.getId()).eq("payStatus", 2).eq("state", 1));
detailsVo.setRedeemedNum(count);
detailsVo.setResidueNum(Math.max(merchandise.getQuantityIssued() - count, 0));
detailsVo.setPerLimit(merchandise.getPickUpQuantity());
@@ -553,7 +580,7 @@
detailsVo.setGoodName(coupon.getName());
detailsVo.setBelongsScope(coupon.getUserPopulation());
int couponNums = upmseService.count(new QueryWrapper<UserPointsMerchandise>()
- .eq("pointsMerchandiseId", merchandise.getId()));
+ .eq("pointsMerchandiseId", merchandise.getId()).eq("payStatus", 2).eq("state", 1));
detailsVo.setRedeemedNum(couponNums);
detailsVo.setResidueNum(Math.max(coupon.getQuantityIssued() - couponNums, 0));
detailsVo.setPerLimit(coupon.getPickUpQuantity());
@@ -633,7 +660,7 @@
detailsVo.setGoodName(coursePackage.getName());
detailsVo.setBelongsScope(merchandise.getUserPopulation());
int coursePackageNums = upmseService.count(new QueryWrapper<UserPointsMerchandise>()
- .eq("pointsMerchandiseId", merchandise.getId()));
+ .eq("pointsMerchandiseId", merchandise.getId()).eq("payStatus", 2).eq("state", 1));
detailsVo.setRedeemedNum(coursePackageNums);
detailsVo.setResidueNum(Math.max(merchandise.getQuantityIssued() - coursePackageNums, 0));
detailsVo.setPerLimit(merchandise.getPickUpQuantity());
@@ -696,7 +723,7 @@
detailsVo.setGoodName(merchandise.getName());
detailsVo.setBelongsScope(merchandise.getUserPopulation());
int count = upmseService.count(new QueryWrapper<UserPointsMerchandise>()
- .eq("pointsMerchandiseId", merchandise.getId()));
+ .eq("pointsMerchandiseId", merchandise.getId()).eq("payStatus", 2).eq("state", 1));
detailsVo.setRedeemedNum(count);
detailsVo.setResidueNum(Math.max(merchandise.getQuantityIssued() - count, 0));
detailsVo.setPerLimit(merchandise.getPickUpQuantity());
@@ -883,7 +910,7 @@
//detailsResponse.setRid(rid);
// todo 修改区域id 临时
// 根据门店id 写死区域id 后续调整为门票指定多个区域
- // 以下代码均为临时代码
+ // 以下代码均为临时代码===============================
for (Integer integer : collect) {
ArrayList<Integer> list2 = new ArrayList<>();
if (integer==2024){
@@ -897,14 +924,32 @@
ArrayList<Integer> list3 = new ArrayList<>();
list3.add(44);
detailsResponse.setRid(list3);
- }else {
- ArrayList<Integer> list3 = new ArrayList<>();
- list3.add(43);
- detailsResponse.setRid(list3);
+ }else if(pointsMerchandise.getPointsMerchandiseId()==197) {
+ ArrayList<Integer> list4 = new ArrayList<>();
+ list4.add(43);
+ detailsResponse.setRid(list4);
}
}
}
+ //======================================================
}
+ }else{
+ // todo 返回门店id 和场地id
+ // 查询指定场地
+ List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>()
+ .eq(PointsMerchandiseStore::getPointsMerchandiseId, merchandise.getId()));
+ // 门店
+ ArrayList<Integer> list3 = new ArrayList<>();
+ // 场地
+ ArrayList<Integer> list4 = new ArrayList<>();
+ for (PointsMerchandiseStore temp : list) {
+ Integer storeId = temp.getStoreId();
+ Integer siteId = temp.getSiteId();
+ list3.add(storeId);
+ list4.add(siteId);
+ }
+ detailsResponse.setRid(list4);
+ detailsResponse.setSid(list3);
}
@@ -918,14 +963,11 @@
String endDate = dateFormat.format(end);
detailsResponse.setStartTime(startDate);
detailsResponse.setEndTime(startDate);
-
Date now = new Date();
Calendar cal1 = Calendar.getInstance();
cal1.setTime(pointsMerchandise.getInsertTime());
-
Calendar cal2 = Calendar.getInstance();
cal2.setTime(now);
-
// Compare the year, month, and day of the two Calendar instances
boolean isSameDate = cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) &&
cal1.get(Calendar.MONTH) == cal2.get(Calendar.MONTH) &&
@@ -1185,8 +1227,11 @@
ArrayList<String> list1 = new ArrayList<>(list11);
list1.add(coursePackage.getCoverDrawing());
detailsVo.setPics(list1);
- CoursePackagePaymentConfig coursePackagePaymentConfig = cpClient.queryConfigCoursePackData(pmdsServiceById.getCoursePackageConfigId());
- detailsVo.setClassHours(coursePackagePaymentConfig.getClassHours());
+ detailsVo.setClassHours(0);
+ if(coursePackage.getType() != 3){
+ CoursePackagePaymentConfig coursePackagePaymentConfig = cpClient.queryConfigCoursePackData(pmdsServiceById.getCoursePackageConfigId());
+ detailsVo.setClassHours(coursePackagePaymentConfig.getClassHours());
+ }
Collections.sort(detailsVo.getPics(), (s1, s2) -> {
if (s1.equals(coursePackage.getCoverDrawing())) {
return -1; // s1排在前面
@@ -1336,7 +1381,6 @@
@PostMapping("/base/pointMerchars/updateDetailsUserPointMercase")
public void updateDetailsUserPointMercase(@RequestBody UserPointsMerchandise merchandise) {
merchandise.setUserId(null);
- merchandise.setPointsMerchandiseId(null);
upmseService.updateById(merchandise);
}
@@ -1373,7 +1417,8 @@
public int queryUserHasGoodsNums(@RequestBody AppUserGoodResp goodResp) {
int count = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
.eq(UserPointsMerchandise::getUserId, goodResp.getAppUserId())
- .eq(UserPointsMerchandise::getPointsMerchandiseId, goodResp.getGoodId()));
+ .eq(UserPointsMerchandise::getPointsMerchandiseId, goodResp.getGoodId())
+ .eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1));
System.out.println(count);
return count;
}
@@ -1382,7 +1427,8 @@
@PostMapping("/base/pointMerchars/queryUserHasGoodsNums1")
public int queryUserHasGoodsNums1(@RequestBody AppUserGoodResp goodResp) {
int count = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
- .eq(UserPointsMerchandise::getPointsMerchandiseId, goodResp.getGoodId()));
+ .eq(UserPointsMerchandise::getPointsMerchandiseId, goodResp.getGoodId())
+ .eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1));
System.out.println(count);
return count;
}
@@ -1413,8 +1459,6 @@
@PostMapping("/base/pointMerchars/getConsumeDetails")
public List<ConsumeDetail> getConsumeDetails(@RequestBody BillingDataRequestVo requestVo) {
return upmseService.getConsumeDetails(requestVo);
-
-
}
@@ -1520,17 +1564,20 @@
List<Map<String, Object>> mapList = new ArrayList<>();
LambdaQueryWrapper<UserPointsMerchandise> userPointsMerchandiseLambdaQueryWrapper = new LambdaQueryWrapper<>();
userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getPointsMerchandiseId, pointMercharsPayedVo.getId());
+ userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1);
if (ToolUtil.isNotEmpty(pointMercharsPayedVo.getStatus())) {
userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getStatus, pointMercharsPayedVo.getStatus());
}
- List<UserPointsMerchandise> list = upmseService.list(userPointsMerchandiseLambdaQueryWrapper);
+ List<UserPointsMerchandise> list = upmseService.list(userPointsMerchandiseLambdaQueryWrapper.orderByDesc(UserPointsMerchandise::getPaymentTime));
System.out.println(list);
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if (list.size() > 0) {
for (UserPointsMerchandise pointsMerchandise : list) {
Map<String, Object> map = new HashMap<>();
map.put("id", pointsMerchandise.getId());
map.put("userId", pointsMerchandise.getUserId());
map.put("status", pointsMerchandise.getStatus());
+ map.put("payTime", sdf.format(pointsMerchandise.getPaymentTime()));
mapList.add(map);
}
}
@@ -1614,6 +1661,9 @@
case 3:
infoOneVo.setExchangeArea("指定门店");
break;
+ case 4:
+ infoOneVo.setExchangeArea("指定场地");
+ break;
default:
break;
}
@@ -1651,37 +1701,87 @@
List<StoreVos> storeVos = new ArrayList<>();
List<PointsMerchandiseStore> list = pmdstoService.list(new QueryWrapper<PointsMerchandiseStore>()
.eq("pointsMerchandiseId", id));
- if (list.size() > 0) {
- List<Integer> collect = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList());
- List<Store> stores = stoClient.queryStoreByIds(collect);
- if (stores.size() > 0) {
- for (Store store : stores) {
- StoreVos storeVos1 = new StoreVos();
- storeVos1.setNum1(store.getProvince() + "省" + store.getCity() + "市");
- if (store.getOperatorId() == 0) {
- storeVos1.setNum2("平台");
- } else {
+ PointsMerchandise byId = pmdsService.getById(id);
- storeVos1.setNum2(store.getOName());
+ if (list.size() > 0) {
+
+ if (byId.getUseScope()==3){
+ // 如果是指定门店
+ List<Integer> collect = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList());
+
+ List<Store> stores = stoClient.queryStoreByIds(collect);
+ if (stores.size() > 0) {
+ int a = 0;
+ for (Store store : stores) {
+ StoreVos storeVos1 = new StoreVos();
+ storeVos1.setNum1(store.getProvince() + "省" + store.getCity() + "市");
+ if (store.getOperatorId()==null){
+ storeVos1.setNum2("平台");
+ }else if (store.getOperatorId() == 0) {
+ storeVos1.setNum2("平台");
+ } else {
+ storeVos1.setNum2(store.getOName());
+ }
+ storeVos1.setNum3(store.getName());
+ storeVos1.setNum4(store.getIds());
+ storeVos.add(storeVos1);
}
- storeVos1.setNum3(store.getName());
- storeVos1.setNum4(store.getIds());
- storeVos.add(storeVos1);
}
+ }else if (byId.getUseScope()==4){
+ // 如果是指定场地
+ List<Integer> collect1 = list.stream().map(PointsMerchandiseStore::getSiteId).distinct().collect(Collectors.toList());
+ int temp =0;
+ List<Integer> collect = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList());
+ List<Store> stores1 = new ArrayList<>();
+ for (Integer integer : collect) {
+ List<Integer> list1 = new ArrayList<>();
+ list1.add(integer);
+ List<Store> stores = stoClient.queryStoreByIds(list1);
+ stores1.addAll(stores);
+ }
+ List<Store> stores = stoClient.queryStoreByIds(collect);
+ while (temp!=collect1.size()){
+ for (Store store : stores1) {
+ Integer integer = collect1.get(temp);
+ Site site = siteClient.querySiteById(integer);
+ StoreVos storeVos1 = new StoreVos();
+ storeVos1.setNum5(site.getName());
+ storeVos1.setNum1(store.getProvince() + "省" + store.getCity() + "市");
+ if (store.getOperatorId()==null){
+ storeVos1.setNum2("平台");
+ }else if (store.getOperatorId() == 0) {
+ storeVos1.setNum2("平台");
+ } else {
+ storeVos1.setNum2(store.getOName());
+ }
+ storeVos1.setNum3(store.getName());
+ storeVos1.setNum4(store.getIds());
+ storeVos.add(storeVos1);
+ temp++;
+ }
+ }
+
+
}
+
}
return storeVos;
}
+
@ResponseBody
@PostMapping("/base/pointMerchars/updateGoodsDetail")
public boolean updateGoodsDetail(@RequestBody Map<String, Object> map) {
try {
+ String name = (String) map.get("name");
Integer pointMerchandiseId = (Integer) map.get("pointMerchandiseId");
PointsMerchandise byId1 = pmdsService.getById(pointMerchandiseId);
if (Integer.valueOf(map.get("type").toString()) != 1) {
byId1.setStatus(2);
+ }
+ if(StringUtils.hasLength(name)){
+ byId1.setName(name);
}
Integer quantityIssued = (Integer) map.get("quantityIssued");
Integer pickUpQuantity = (Integer) map.get("pickUpQuantity");
@@ -1712,6 +1812,7 @@
public Integer add(@RequestBody PointsMerchandise pointsMerchandise) {
Integer storeId = pointsMerchandise.getShelves();
pointsMerchandise.setShelves(1);
+ pointsMerchandise.setInsertTime(new Date());
boolean save = pmdsService.save(pointsMerchandise);
if (save && ToolUtil.isNotEmpty(storeId) && pointsMerchandise.getType() == 2) {
PointsMerchandiseStore pointsMerchandiseStore = new PointsMerchandiseStore();
@@ -1733,6 +1834,20 @@
public Boolean addOther(@RequestBody String pam) {
Boolean save = false;
String[] split = pam.split("_");
+ if (split.length>2){
+ if (StringUtils.hasLength(split[2])){
+ for (String s : split[2].split(",")) {
+ PointsMerchandiseStore pointsMerchandiseStore = new PointsMerchandiseStore();
+ pointsMerchandiseStore.setPointsMerchandiseId(Integer.valueOf(split[0]));
+ pointsMerchandiseStore.setSiteId(Integer.valueOf(s));
+ Site site = siteClient.querySiteById(Integer.valueOf(s));
+ pointsMerchandiseStore.setStoreId(site.getStoreId());
+ save = pmdstoService.save(pointsMerchandiseStore);
+ }
+ // 这个门票是选择的场地
+ return save;
+ }
+ }
for (String s : split[1].split(",")) {
PointsMerchandiseStore pointsMerchandiseStore = new PointsMerchandiseStore();
pointsMerchandiseStore.setPointsMerchandiseId(Integer.valueOf(split[0]));
@@ -1741,6 +1856,7 @@
}
return save;
}
+
@PostMapping("/base/pointMerchars/addCitys")
public Boolean addCitys(@RequestBody ArrayList<Map<String, String>> objects) {
@@ -1834,6 +1950,8 @@
List<Integer> ids = queryDataFee.getIds();
if (ids.size() == 0) {
ids.add(-1);
+ }else{
+
}
List<PointsMerchandise> list1 = pmdsService.list(new LambdaQueryWrapper<PointsMerchandise>().eq(PointsMerchandise::getRedemptionMethod, 3));
LambdaQueryWrapper<UserPointsMerchandise> vipPaymentLambdaQueryWrapper = new LambdaQueryWrapper<>();
--
Gitblit v1.7.1