Commit 406ae23c by chongfu.liang

redis

parent 704d3484
...@@ -129,8 +129,6 @@ public class SellCouponOrderServiceImpl { ...@@ -129,8 +129,6 @@ public class SellCouponOrderServiceImpl {
private final String ngsCouponProductId = "76161384"; private final String ngsCouponProductId = "76161384";
private int num = 0;
/** /**
* 卖券订单创建 * 卖券订单创建
*/ */
...@@ -285,19 +283,15 @@ public class SellCouponOrderServiceImpl { ...@@ -285,19 +283,15 @@ public class SellCouponOrderServiceImpl {
String date = DateUtil.convert2String(new Date(), "yyyyMMdd"); String date = DateUtil.convert2String(new Date(), "yyyyMMdd");
String key = this.getFolwNo(partnerId, date); String key = this.getFolwNo(partnerId, date);
/*
int flowno = 0; int flowno = 0;
RedisTemplate redisTemplate = redisCache.getRedisTemplate(); RedisTemplate redisTemplate = redisCache.getRedisTemplate();
if (redisTemplate.opsForValue().setIfAbsent(key, 0)) { if (redisTemplate.opsForValue().setIfAbsent(key, 0)) {
redisTemplate.expire(key, 24, TimeUnit.HOURS); redisTemplate.expire(key, 24, TimeUnit.HOURS);
} else { } else {
flowno = redisTemplate.opsForValue().increment(key, 1).intValue(); flowno = redisTemplate.opsForValue().increment(key, 1).intValue();
} }
*/
num++;
int flowno = num;
String stationid = getStationId(date, partnerId, flowno); String stationid = getStationId(date, partnerId, flowno);
orderExtInfoDto.setStationId(stationid); orderExtInfoDto.setStationId(stationid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment