同步优惠卷

This commit is contained in:
2026-07-01 14:53:41 +08:00
parent 9b94911319
commit 28a927a053

View File

@@ -123,6 +123,7 @@ public class LbUserCouponServiceImpl
new LambdaQueryWrapper<LbUser>() new LambdaQueryWrapper<LbUser>()
.eq(LbUser::getTenantId, tid) .eq(LbUser::getTenantId, tid)
.ge(LbUser::getUpdatedAt, startDate) .ge(LbUser::getUpdatedAt, startDate)
.ge(LbUser::getCoupon, 100)
.isNotNull(LbUser::getMobile) .isNotNull(LbUser::getMobile)
.ne(LbUser::getMobile, "") .ne(LbUser::getMobile, "")
.orderByDesc(LbUser::getUpdatedAt) .orderByDesc(LbUser::getUpdatedAt)
@@ -229,12 +230,18 @@ public class LbUserCouponServiceImpl
while (fetched < totalNeeded) { while (fetched < totalNeeded) {
int limit = Math.min(pageSize, totalNeeded - fetched); int limit = Math.min(pageSize, totalNeeded - fetched);
int cate = 2;
int type = 1;
String uri = couponApiBaseUrl + (couponApiBaseUrl.contains("?") ? "&" : "?") String uri = couponApiBaseUrl + (couponApiBaseUrl.contains("?") ? "&" : "?")
+ "cate=2&type=1&page=" + page + "&limit=" + limit; + "cate=" + cate + "&type=" + type + "&page=" + page + "&limit=" + limit;
long timestamp = System.currentTimeMillis() / 1000; long timestamp = System.currentTimeMillis() / 1000;
String noncestr = randomNoncestr(); String noncestr = randomNoncestr();
Map<String, Object> signParams = new LinkedHashMap<>(); Map<String, Object> signParams = new LinkedHashMap<>();
signParams.put("cate", cate);
signParams.put("type", type);
signParams.put("page", page);
signParams.put("limit", limit);
signParams.put("timestamp", timestamp); signParams.put("timestamp", timestamp);
signParams.put("noncestr", noncestr); signParams.put("noncestr", noncestr);
String sign = HxrGoodsSignUtil.computeSign(signParams, ctx.appStr().trim()); String sign = HxrGoodsSignUtil.computeSign(signParams, ctx.appStr().trim());