From d299420aba3a19363755cee0c2b2d8ae93fea928 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 01 九月 2025 15:44:30 +0800
Subject: [PATCH] bug修改
---
cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java | 28 +++++++++++++---------------
1 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java b/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java
index 9328463..24c8dc4 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java
@@ -57,11 +57,9 @@
private RedisUtil redisUtil;
-
-
-
/**
* 获取购买会员支付成功页面的优惠券
+ *
* @param uid
* @return
* @throws Exception
@@ -69,19 +67,19 @@
@Override
public List<CouponListVo> queryCouponList(Integer uid, Integer distributionMethod) throws Exception {
String value = redisUtil.getValue("VIP_P_" + uid);
- if(ToolUtil.isEmpty(value)){
- Thread.sleep(5000);
+ if (ToolUtil.isEmpty(value)) {
+ Thread.sleep(3000);
value = redisUtil.getValue("VIP_P_" + uid);
}
List<CouponListVo> listVos = new ArrayList<>();
- if(ToolUtil.isEmpty(value)){
+ if (ToolUtil.isNotEmpty(value)) {
List<Long> longs = JSON.parseArray(value, Long.class);
List<UserCoupon> list = userCouponService.getBaseMapper().selectBatchIds(longs);
List<Integer> collect = list.stream().map(UserCoupon::getCouponId).collect(Collectors.toList());
List<Coupon> coupons = couponService.getBaseMapper().selectBatchIds(collect);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for (Coupon coupon : coupons) {
- if (coupon.getDistributionMethod()!=2){
+ if (coupon.getDistributionMethod() != 2) {
continue;
}
CouponListVo couponListVo = new CouponListVo();
@@ -113,7 +111,6 @@
}
-
@Override
public Map<String, Object> queryConponRuleOfJson(Integer id) {
return this.baseMapper.queryConponRuleOfJson(id);
@@ -135,16 +132,17 @@
@Override
public List<Map<String, Object>> queryCouponListOfSearch1(CouponListOfSearch ofSearch) {
- return this.baseMapper.queryCouponListOfSearch1(ofSearch.getName(),ofSearch.getType(),ofSearch.getDistributionMethod(),ofSearch.getUserPopulation(),ofSearch.getStatus(),ofSearch.getState(),ofSearch.getPage(),ofSearch.getCityCode(),ofSearch.getStoreId());
- }
- @Override
- public List<Map<String, Object>> queryCouponExamineList(CouponExamineListSearch ofSearch) {
- return this.baseMapper.queryCouponExamineList(ofSearch.getName(),ofSearch.getType(),ofSearch.getUserPopulation(),ofSearch.getDistributionMethod(),ofSearch.getAuditStatus(),ofSearch.getPage());
+ return this.baseMapper.queryCouponListOfSearch1(ofSearch.getName(), ofSearch.getType(), ofSearch.getDistributionMethod(), ofSearch.getUserPopulation(), ofSearch.getStatus(), ofSearch.getState(), ofSearch.getPage(), ofSearch.getCityCode(), ofSearch.getStoreId());
}
@Override
- public List<Map<String, Object>> listRecord(Page<Object> objectPage, Integer id, List<Integer> ids, Integer type) {
- return this.baseMapper.listRecord(objectPage,id,ids,type);
+ public List<Map<String, Object>> queryCouponExamineList(CouponExamineListSearch ofSearch) {
+ return this.baseMapper.queryCouponExamineList(ofSearch.getName(), ofSearch.getType(), ofSearch.getUserPopulation(), ofSearch.getDistributionMethod(), ofSearch.getAuditStatus(), ofSearch.getPage());
+ }
+
+ @Override
+ public List<Map<String, Object>> listRecord(Integer id, List<Integer> ids, Integer type) {
+ return this.baseMapper.listRecord(id, ids, type);
}
@Override
--
Gitblit v1.7.1