feat(商城): 代码优化

master
wayn 5 years ago
parent 43c5a7b913
commit ce78fb2ae1

@ -148,9 +148,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
unrecv++;
} else if (OrderUtil.isConfirmStatus(order) || OrderUtil.isAutoConfirmStatus(order)) {
uncomment += order.getComments();
} else {
// todo
}
} // todo
}
success.add("unpaid", unpaid);
success.add("unship", unship);

@ -51,9 +51,9 @@ public class CancelOrderTask extends Task {
IOrderGoodsService orderGoodsService = SpringContextUtil.getBean(IOrderGoodsService.class);
IGoodsProductService productService = SpringContextUtil.getBean(IGoodsProductService.class);
RedisCache redisCache = SpringContextUtil.getBean(RedisCache.class);
Set<Long> zset = redisCache.getCacheZset("order_zset", 0, System.currentTimeMillis());
if (CollectionUtils.isNotEmpty(zset) && zset.contains(this.orderId)) {
for (Long orderId : zset) {
Set<Long> zSet = redisCache.getCacheZset("order_zset", 0, System.currentTimeMillis());
if (CollectionUtils.isNotEmpty(zSet) && zSet.contains(this.orderId)) {
for (Long orderId : zSet) {
log.info("redis内未付款---" + orderId);
final Long num = redisCache.deleteZsetObject("order_zset", orderId);
if (num != null && num > 0) {

Loading…
Cancel
Save