From a9564eae9f0169ca39329b2f14a8f13d13358a0a Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期五, 17 十一月 2023 15:28:44 +0800
Subject: [PATCH] 11.7
---
cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java | 52 ++++++++++++++++++++++++++++++++++------------------
1 files changed, 34 insertions(+), 18 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 d1248d5..dd4a567 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
@@ -98,9 +98,17 @@
pmdsService.changeState(dto);
}
/**
- * 门票核销
+ * 根据id查询
*/
+ @RequestMapping("/base/pointMerchars/getById")
+ @ResponseBody
+ public PointsMerchandise getById(@RequestBody Integer id){
+ return pmdsService.getById(id);
+ }
+ /**
+ * 门票核销
+ */
@RequestMapping("/base/course/changeState")
@ResponseBody
public Object changeState(@RequestBody CourseChangeStateDTO dto){
@@ -286,22 +294,25 @@
cIds.add(pointsMerchandiseCity.getPointsMerchandiseId());
}
+ if (cIds.size()>0) {
- List<PointsMerchandise> merchandises = pmdsService.list(new QueryWrapper<PointsMerchandise>()
- .eq("state",1)
- .eq("shelves",1).in("id",cIds)
- .gt("endTime",new Date()));
- 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());
- integralCommodity.setGoodsType(merchandise.getType());
- commodity.add(integralCommodity);
+ List<PointsMerchandise> merchandises = pmdsService.list(new QueryWrapper<PointsMerchandise>()
+ .eq("state", 1)
+ .eq("shelves", 1).in("id", cIds)
+ .gt("endTime", new Date()));
+ 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());
+ integralCommodity.setGoodsType(merchandise.getType());
+ commodity.add(integralCommodity);
+ }
}
}
+
System.out.println(commodity);
return commodity;
}
@@ -778,7 +789,10 @@
ids.add(coupon.getId());
}
}
- List<UserCoupon> userCoupons = userCouponService.list(new QueryWrapper<UserCoupon>().eq("userId", appUserId).in("couponId",ids));
+ List<UserCoupon> userCoupons = new ArrayList<>();
+ if (ids.size()>0) {
+ userCoupons = userCouponService.list(new QueryWrapper<UserCoupon>().eq("userId", appUserId).in("couponId", ids));
+ }
if (pointsMerchandises.size() > 0 ){
for (UserPointsMerchandise pointsMerchandise : pointsMerchandises) {
PointsMerchandise merchandise = pmdsService.getById(pointsMerchandise.getPointsMerchandiseId());
@@ -969,7 +983,7 @@
@ResponseBody
@PostMapping("/base/pointMerchars/getSpecificsOfGoods")
public PointDetailsVo getSpecificsOfGoods(@RequestBody Long speMercharsId){
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
PointDetailsVo detailsVo = new PointDetailsVo();
UserPointsMerchandise byId = upmseService.getById(speMercharsId);
@@ -977,6 +991,7 @@
PointsMerchandise pmdsServiceById = pmdsService.getById(byId.getPointsMerchandiseId());
// 2.0
detailsVo.setCardType(pmdsServiceById.getCardType());
+ detailsVo.setExchangeAddrType(pmdsServiceById.getUseScope());
detailsVo.setExchangeType(pmdsServiceById.getRedemptionMethod());
detailsVo.setGoodType(pmdsServiceById.getType());
if (pmdsServiceById.getRedemptionMethod() == 1){
@@ -1154,8 +1169,9 @@
detailsVo.setBelongs(pmdsServiceById.getProvince()+pmdsServiceById.getCity());
break;
case 3:
- StoreDetailOfCourse courseOfStore = stoClient.getCourseOfStore(byId.getStoreId());
- detailsVo.setBelongs(courseOfStore.getStoreName()+" "+courseOfStore.getStoreAddr());
+// StoreDetailOfCourse courseOfStore = stoClient.getCourseOfStore(byId.getStoreId());
+// detailsVo.setBelongs(courseOfStore.getStoreName()+" "+courseOfStore.getStoreAddr());
+// detailsVo.setBelongs("---------------");
break;
default:
break;
--
Gitblit v1.7.1