|
|
@@ -1,15 +1,17 @@ |
|
|
package com.iformall.service.impl; |
|
|
package com.iformall.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
|
|
import com.iformall.common.ErrorCode; |
|
|
import com.iformall.common.IdWorker; |
|
|
import com.iformall.common.IdWorker; |
|
|
import com.iformall.domain.po.*; |
|
|
import com.iformall.domain.po.*; |
|
|
import com.iformall.enums.EnumBusiness; |
|
|
|
|
|
import com.iformall.enums.EnumScoreType; |
|
|
|
|
|
import com.iformall.enums.EnumUserType; |
|
|
|
|
|
import com.iformall.enums.EnumYesOrNo; |
|
|
|
|
|
|
|
|
import com.iformall.enums.*; |
|
|
|
|
|
import com.iformall.exception.MallinkException; |
|
|
import com.iformall.mapper.AliBusinessCircleOrderMapper; |
|
|
import com.iformall.mapper.AliBusinessCircleOrderMapper; |
|
|
import com.iformall.service.*; |
|
|
import com.iformall.service.*; |
|
|
|
|
|
import com.iformall.utils.RedisLock; |
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@@ -24,6 +26,11 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder |
|
|
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
|
|
|
|
|
|
|
|
|
private static final String ALI_CIRCLE_KEY = "CIRCLE:ALI:"; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
RedisLock redisLock; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
AliBusinessCircleOrderMapper aliBusinessCircleOrderMapper; |
|
|
AliBusinessCircleOrderMapper aliBusinessCircleOrderMapper; |
|
|
|
|
|
|
|
|
@@ -71,144 +78,177 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void createOrder(AliBusinessCircleOrder record) { |
|
|
public void createOrder(AliBusinessCircleOrder record) { |
|
|
AliBusinessCircleOrder byTransactionId = this.getOrderByTransactionId(record.getTransactionId(),record.getTenantId()); |
|
|
|
|
|
if(byTransactionId != null){ |
|
|
|
|
|
logger.error("--Ali商圈付款--订单消息已存在---byTransactionId="+byTransactionId.getTransactionId()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
Date now = new Date(); |
|
|
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
|
|
record.setId(idWorker.nextId()); |
|
|
|
|
|
record.setCreateTime(now); |
|
|
|
|
|
record.setUpdateTime(now); |
|
|
|
|
|
|
|
|
String lockKey = StringUtils.join(ALI_CIRCLE_KEY,record.getTransactionId(), ":",EnumYesOrNo.NO.getCode(),":","lock"); |
|
|
|
|
|
long time = System.currentTimeMillis() + 2000; |
|
|
|
|
|
String timeStr = String.valueOf(time); |
|
|
|
|
|
if (redisLock.lock2(lockKey, timeStr)) { |
|
|
|
|
|
AliBusinessCircleOrder byTransactionId = this.getOrderByTransactionId(record.getTransactionId(),record.getTenantId()); |
|
|
|
|
|
if(byTransactionId != null){ |
|
|
|
|
|
logger.error("--Ali商圈付款--订单消息已存在---byTransactionId="+byTransactionId.getTransactionId()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
Date now = new Date(); |
|
|
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
|
|
record.setId(idWorker.nextId()); |
|
|
|
|
|
record.setCreateTime(now); |
|
|
|
|
|
record.setUpdateTime(now); |
|
|
|
|
|
|
|
|
//TODO 第三方获取门店(标识可能发生变化) |
|
|
|
|
|
|
|
|
//TODO 第三方获取门店(标识可能发生变化) |
|
|
// WxMerchant wxMerchant = wxMerchantService.getById(Long.parseLong(record.getMallStoreId())); |
|
|
// WxMerchant wxMerchant = wxMerchantService.getById(Long.parseLong(record.getMallStoreId())); |
|
|
WxMerchant wxMerchant = wxMerchantService.getMerchantByEncode(record.getMallStoreId()); |
|
|
|
|
|
if(wxMerchant != null){ |
|
|
|
|
|
record.setMerchantId(wxMerchant.getId()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
logger.error("--Ali商圈付款通知消息未找到门店--mallStoreId="+record.getMallStoreId()); |
|
|
|
|
|
} |
|
|
|
|
|
AliPayCUser userQ = new AliPayCUser(); |
|
|
|
|
|
userQ.updateTenantInfo(record); |
|
|
|
|
|
userQ.setAlipayUserId(record.getBuyerId()); |
|
|
|
|
|
AliPayCUser aliUser = aliPayCUserService.getByAliPayUserId(userQ); |
|
|
|
|
|
if(aliUser != null){ |
|
|
|
|
|
// WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.findInfoByPhone(aliUser, aliUser.getPhone()); |
|
|
|
|
|
WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.registerByPhone(aliUser, aliUser.getPhone()); |
|
|
|
|
|
if(infoByPhone != null ){ |
|
|
|
|
|
record.setCUserId(infoByPhone.getId()); |
|
|
|
|
|
|
|
|
WxMerchant wxMerchant = wxMerchantService.getMerchantByEncode(record.getMallStoreId()); |
|
|
|
|
|
if(wxMerchant != null){ |
|
|
|
|
|
record.setMerchantId(wxMerchant.getId()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
logger.error("--Ali商圈付款通知消息未找到门店--mallStoreId="+record.getMallStoreId()); |
|
|
|
|
|
} |
|
|
|
|
|
AliPayCUser userQ = new AliPayCUser(); |
|
|
|
|
|
userQ.updateTenantInfo(record); |
|
|
|
|
|
userQ.setAlipayUserId(record.getBuyerId()); |
|
|
|
|
|
AliPayCUser aliUser = aliPayCUserService.getByAliPayUserId(userQ); |
|
|
|
|
|
if(aliUser != null){ |
|
|
|
|
|
// WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.findInfoByPhone(aliUser, aliUser.getPhone()); |
|
|
|
|
|
WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.registerByPhone(aliUser, aliUser.getPhone()); |
|
|
|
|
|
if(infoByPhone != null ){ |
|
|
|
|
|
record.setCUserId(infoByPhone.getId()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
logger.error("--Ali商圈付款通知消息未找到会员--aliUserId="+record.getBuyerId()); |
|
|
|
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
logger.error("--Ali商圈付款通知消息未找到会员--aliUserId="+record.getBuyerId()); |
|
|
logger.error("--Ali商圈付款通知消息未找到会员--aliUserId="+record.getBuyerId()); |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
|
|
|
logger.error("--Ali商圈付款通知消息未找到会员--aliUserId="+record.getBuyerId()); |
|
|
|
|
|
} |
|
|
|
|
|
aliBusinessCircleOrderMapper.insertNoticeOrder(record); |
|
|
|
|
|
|
|
|
aliBusinessCircleOrderMapper.insertNoticeOrder(record); |
|
|
|
|
|
|
|
|
if(record.getCUserId() == null){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
Integer businessId = EnumBusiness.BUSINESS_ID6.getCode(); |
|
|
|
|
|
if(wxMerchant != null){ |
|
|
|
|
|
businessId = wxMerchant.getBusinessId(); |
|
|
|
|
|
} |
|
|
|
|
|
WxCreditHistory creditHistory = new WxCreditHistory(); |
|
|
|
|
|
creditHistory.setTenantId(record.getFinalTenantId()); |
|
|
|
|
|
creditHistory.setOperatorType(EnumUserType.ALI_CIRCLE.getCode()); |
|
|
|
|
|
creditHistory.setOperatorId(record.getCUserId()); |
|
|
|
|
|
creditHistory.setCUserId(record.getCUserId()); |
|
|
|
|
|
creditHistory.setCreateDate(now); |
|
|
|
|
|
creditHistory.setCouponId(record.getId()); |
|
|
|
|
|
creditHistory.setBusinessId(businessId); |
|
|
|
|
|
creditHistory.setMerchantId(record.getMerchantId()); |
|
|
|
|
|
creditHistory.setCreditType(EnumScoreType.CONSUMPTION.getCode()); |
|
|
|
|
|
creditHistory.setSpend(record.getPayAmount()); |
|
|
|
|
|
creditHistory.setChangePurpose("Ali商圈消费:消费商户["+record.getMallName()+"] ("+record.getPayAmountStr()+"元) "); |
|
|
|
|
|
creditHistory = creditHistoryService.saveOrUpdate(creditHistory,record.getTenantId()); |
|
|
|
|
|
Integer creditNum = 0; |
|
|
|
|
|
if (creditHistory.getCreditNum() != null) { |
|
|
|
|
|
creditNum = creditHistory.getCreditNum(); |
|
|
|
|
|
|
|
|
if(record.getCUserId() == null){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
Integer businessId = EnumBusiness.BUSINESS_ID6.getCode(); |
|
|
|
|
|
if(wxMerchant != null){ |
|
|
|
|
|
businessId = wxMerchant.getBusinessId(); |
|
|
|
|
|
} |
|
|
|
|
|
WxCreditHistory creditHistory = new WxCreditHistory(); |
|
|
|
|
|
creditHistory.setTenantId(record.getFinalTenantId()); |
|
|
|
|
|
creditHistory.setOperatorType(EnumUserType.ALI_CIRCLE.getCode()); |
|
|
|
|
|
creditHistory.setOperatorId(record.getCUserId()); |
|
|
|
|
|
creditHistory.setCUserId(record.getCUserId()); |
|
|
|
|
|
creditHistory.setCreateDate(now); |
|
|
|
|
|
creditHistory.setCouponId(record.getId()); |
|
|
|
|
|
creditHistory.setBusinessId(businessId); |
|
|
|
|
|
creditHistory.setMerchantId(record.getMerchantId()); |
|
|
|
|
|
creditHistory.setCreditType(EnumScoreType.CONSUMPTION.getCode()); |
|
|
|
|
|
creditHistory.setSpend(record.getPayAmount()); |
|
|
|
|
|
creditHistory.setChangePurpose("Ali商圈消费:消费商户["+record.getMallName()+"] ("+record.getPayAmountStr()+"元) "); |
|
|
|
|
|
creditHistory = creditHistoryService.saveOrUpdate(creditHistory,record.getTenantId()); |
|
|
|
|
|
Integer creditNum = 0; |
|
|
|
|
|
if (creditHistory.getCreditNum() != null) { |
|
|
|
|
|
creditNum = creditHistory.getCreditNum(); |
|
|
|
|
|
} |
|
|
|
|
|
if(creditNum == 0){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
record.setIncreasedPoints(creditNum); |
|
|
|
|
|
record.setPointsUpdateTime(creditHistory.getCreateDate()); |
|
|
|
|
|
this.updatePoints(record); |
|
|
} |
|
|
} |
|
|
if(creditNum == 0){ |
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redisLock.unlock(lockKey, timeStr); |
|
|
|
|
|
}else{ |
|
|
|
|
|
logger.debug("CacheAspect 读库等待中, key:{}: " + lockKey); |
|
|
|
|
|
try { |
|
|
|
|
|
Thread.sleep(2000); |
|
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
}finally { |
|
|
|
|
|
redisLock.unlock(lockKey, timeStr); |
|
|
} |
|
|
} |
|
|
record.setIncreasedPoints(creditNum); |
|
|
|
|
|
record.setPointsUpdateTime(creditHistory.getCreateDate()); |
|
|
|
|
|
this.updatePoints(record); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void insertRefundNoticeOrder(AliBusinessCircleOrder record) { |
|
|
public void insertRefundNoticeOrder(AliBusinessCircleOrder record) { |
|
|
AliBusinessCircleOrder order = this.getOrderByTransactionId(record.getTransactionId(),record.getTenantId()); |
|
|
|
|
|
if(order == null){ |
|
|
|
|
|
logger.error("--Ali商圈退款--付款消息未找到--transactionId="+record.getTransactionId()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
List<AliBusinessCircleOrder> refundOrders = this.getRefundOrderByTransactionId(record.getTransactionId(),record.getTenantId()); |
|
|
|
|
|
Integer amount = order.getPayAmount(); |
|
|
|
|
|
Integer increasedPoints = order.getIncreasedPoints(); |
|
|
|
|
|
Integer refundAmount = 0; |
|
|
|
|
|
Integer refundIncreasedPoints = 0; |
|
|
|
|
|
|
|
|
|
|
|
if(refundOrders != null && refundOrders.size()>0){ |
|
|
|
|
|
for (AliBusinessCircleOrder ro:refundOrders) { |
|
|
|
|
|
refundAmount += ro.getRefundAmount(); |
|
|
|
|
|
refundIncreasedPoints += ro.getIncreasedPoints(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if(refundAmount >= amount){ |
|
|
|
|
|
logger.error("--Ali商圈退款--已经退款--transactionId="+record.getTransactionId()); |
|
|
|
|
|
}else if((refundAmount + record.getRefundAmount()) > amount ){ |
|
|
|
|
|
logger.error("--Ali商圈退款--退款金额超限--transactionId="+record.getTransactionId()); |
|
|
|
|
|
|
|
|
String lockKey = StringUtils.join(ALI_CIRCLE_KEY,record.getTransactionId(), ":",EnumYesOrNo.NO.getCode(),":","lock"); |
|
|
|
|
|
long time = System.currentTimeMillis() + 2000; |
|
|
|
|
|
String timeStr = String.valueOf(time); |
|
|
|
|
|
if (redisLock.lock2(lockKey, timeStr)) { |
|
|
|
|
|
AliBusinessCircleOrder order = this.getOrderByTransactionId(record.getTransactionId(),record.getTenantId()); |
|
|
|
|
|
if(order == null){ |
|
|
|
|
|
logger.error("--Ali商圈退款--付款消息未找到--transactionId="+record.getTransactionId()); |
|
|
}else{ |
|
|
}else{ |
|
|
Date now = new Date(); |
|
|
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
|
|
record.setId(idWorker.nextId()); |
|
|
|
|
|
record.setCreateTime(now); |
|
|
|
|
|
record.setUpdateTime(now); |
|
|
|
|
|
|
|
|
List<AliBusinessCircleOrder> refundOrders = this.getRefundOrderByTransactionId(record.getTransactionId(),record.getTenantId()); |
|
|
|
|
|
Integer amount = order.getPayAmount(); |
|
|
|
|
|
Integer increasedPoints = order.getIncreasedPoints(); |
|
|
|
|
|
Integer refundAmount = 0; |
|
|
|
|
|
Integer refundIncreasedPoints = 0; |
|
|
|
|
|
|
|
|
record.setCUserId(order.getCUserId()); |
|
|
|
|
|
record.setMerchantId(order.getMerchantId()); |
|
|
|
|
|
aliBusinessCircleOrderMapper.insertRefundNoticeOrder(record); |
|
|
|
|
|
|
|
|
|
|
|
if(order.getEarnPoints().equals(EnumYesOrNo.YES.getCode())){ |
|
|
|
|
|
WxCreditHistory creditHistory = new WxCreditHistory(); |
|
|
|
|
|
creditHistory.setTenantId(record.getFinalTenantId()); |
|
|
|
|
|
creditHistory.setOperatorType(EnumUserType.ALI_CIRCLE.getCode()); |
|
|
|
|
|
creditHistory.setOperatorId(record.getCUserId()); |
|
|
|
|
|
creditHistory.setCUserId(record.getCUserId()); |
|
|
|
|
|
creditHistory.setCreateDate(new Date()); |
|
|
|
|
|
creditHistory.setCouponId(record.getId()); |
|
|
|
|
|
creditHistory.setMerchantId(record.getMerchantId()); |
|
|
|
|
|
creditHistory.setCreditType(EnumScoreType.REFUND_CONSUMPTION.getCode()); |
|
|
|
|
|
int points = 0; |
|
|
|
|
|
if((refundAmount + record.getRefundAmount()) == amount){ |
|
|
|
|
|
points = increasedPoints - refundIncreasedPoints; |
|
|
|
|
|
}else{ |
|
|
|
|
|
points = new BigDecimal(order.getIncreasedPoints()) |
|
|
|
|
|
.divide(new BigDecimal(order.getPayAmount()),2,BigDecimal.ROUND_HALF_UP) |
|
|
|
|
|
.multiply(new BigDecimal(record.getRefundAmount())) |
|
|
|
|
|
.intValue(); |
|
|
|
|
|
|
|
|
if(refundOrders != null && refundOrders.size()>0){ |
|
|
|
|
|
for (AliBusinessCircleOrder ro:refundOrders) { |
|
|
|
|
|
refundAmount += ro.getRefundAmount(); |
|
|
|
|
|
refundIncreasedPoints += ro.getIncreasedPoints(); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if(refundAmount >= amount){ |
|
|
|
|
|
logger.error("--Ali商圈退款--已经退款--transactionId="+record.getTransactionId()); |
|
|
|
|
|
}else if((refundAmount + record.getRefundAmount()) > amount ){ |
|
|
|
|
|
logger.error("--Ali商圈退款--退款金额超限--transactionId="+record.getTransactionId()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
Date now = new Date(); |
|
|
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
|
|
record.setId(idWorker.nextId()); |
|
|
|
|
|
record.setCreateTime(now); |
|
|
|
|
|
record.setUpdateTime(now); |
|
|
|
|
|
|
|
|
creditHistory.setCreditNum(points); |
|
|
|
|
|
creditHistory.setSpend(0-record.getRefundAmount()); |
|
|
|
|
|
creditHistory.setChangePurpose("Ali商圈消费退款:商户["+record.getMallName()+"] ("+record.getRefundAmountStr()+"元) "); |
|
|
|
|
|
creditHistory = creditHistoryService.saveOrUpdate(creditHistory,record.getTenantId()); |
|
|
|
|
|
Integer creditNum = 0; |
|
|
|
|
|
if (creditHistory.getCreditNum() != null) { |
|
|
|
|
|
creditNum = creditHistory.getCreditNum(); |
|
|
|
|
|
} |
|
|
|
|
|
if(creditNum == 0){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
record.setCUserId(order.getCUserId()); |
|
|
|
|
|
record.setMerchantId(order.getMerchantId()); |
|
|
|
|
|
aliBusinessCircleOrderMapper.insertRefundNoticeOrder(record); |
|
|
|
|
|
|
|
|
|
|
|
if(order.getEarnPoints().equals(EnumYesOrNo.YES.getCode())){ |
|
|
|
|
|
WxCreditHistory creditHistory = new WxCreditHistory(); |
|
|
|
|
|
creditHistory.setTenantId(record.getFinalTenantId()); |
|
|
|
|
|
creditHistory.setOperatorType(EnumUserType.ALI_CIRCLE.getCode()); |
|
|
|
|
|
creditHistory.setOperatorId(record.getCUserId()); |
|
|
|
|
|
creditHistory.setCUserId(record.getCUserId()); |
|
|
|
|
|
creditHistory.setCreateDate(new Date()); |
|
|
|
|
|
creditHistory.setCouponId(record.getId()); |
|
|
|
|
|
creditHistory.setMerchantId(record.getMerchantId()); |
|
|
|
|
|
creditHistory.setCreditType(EnumScoreType.REFUND_CONSUMPTION.getCode()); |
|
|
|
|
|
int points = 0; |
|
|
|
|
|
if((refundAmount + record.getRefundAmount()) == amount){ |
|
|
|
|
|
points = increasedPoints - refundIncreasedPoints; |
|
|
|
|
|
}else{ |
|
|
|
|
|
points = new BigDecimal(order.getIncreasedPoints()) |
|
|
|
|
|
.divide(new BigDecimal(order.getPayAmount()),2,BigDecimal.ROUND_HALF_UP) |
|
|
|
|
|
.multiply(new BigDecimal(record.getRefundAmount())) |
|
|
|
|
|
.intValue(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
creditHistory.setCreditNum(points); |
|
|
|
|
|
creditHistory.setSpend(0-record.getRefundAmount()); |
|
|
|
|
|
creditHistory.setChangePurpose("Ali商圈消费退款:商户["+record.getMallName()+"] ("+record.getRefundAmountStr()+"元) "); |
|
|
|
|
|
creditHistory = creditHistoryService.saveOrUpdate(creditHistory,record.getTenantId()); |
|
|
|
|
|
Integer creditNum = 0; |
|
|
|
|
|
if (creditHistory.getCreditNum() != null) { |
|
|
|
|
|
creditNum = creditHistory.getCreditNum(); |
|
|
|
|
|
} |
|
|
|
|
|
if(creditNum == 0){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
record.setIncreasedPoints(creditNum); |
|
|
|
|
|
record.setPointsUpdateTime(creditHistory.getCreateDate()); |
|
|
|
|
|
this.updatePoints(record); |
|
|
|
|
|
|
|
|
record.setIncreasedPoints(creditNum); |
|
|
|
|
|
record.setPointsUpdateTime(creditHistory.getCreateDate()); |
|
|
|
|
|
this.updatePoints(record); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
redisLock.unlock(lockKey, timeStr); |
|
|
|
|
|
}else{ |
|
|
|
|
|
logger.debug("CacheAspect 读库等待中, key:{}: " + lockKey); |
|
|
|
|
|
try { |
|
|
|
|
|
Thread.sleep(2000); |
|
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
}finally { |
|
|
|
|
|
redisLock.unlock(lockKey, timeStr); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -219,5 +259,4 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder |
|
|
aliBusinessCircleOrderMapper.updatePoints(record); |
|
|
aliBusinessCircleOrderMapper.updatePoints(record); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |