|
@@ -4643,7 +4643,13 @@ public class OrderServiceImpl implements OrderService {
|
|
|
}
|
|
|
// 2. 计算积分抵扣后的总价格
|
|
|
if (isCalculateScorePrice.get()) {
|
|
|
- Integer scoreLimit = haiKongProperties.getMemberScoreLimit();
|
|
|
+ // HAIKONG_MEMBER_SCORE_LIMIT 系统参数,海控平台统一30积分1块钱
|
|
|
+ String scoreLimitStr = sysConfigDao.queryByKey(Constants.HAIKONG_MEMBER_SCORE_LIMIT);
|
|
|
+ if (org.springframework.util.StringUtils.isEmpty(scoreLimitStr)) {
|
|
|
+ LOGGER.error("计算优惠价格时,未设置统一的抵扣规则!");
|
|
|
+ throw new ServiceException(String.format("请先设置统一的积分规则,设置方式:【系统管理】-->【系统参数】,参数名为:【%s】", Constants.HAIKONG_MEMBER_SCORE_LIMIT));
|
|
|
+ }
|
|
|
+ Integer scoreLimit = Integer.parseInt(scoreLimitStr);
|
|
|
if (score < scoreLimit) {
|
|
|
LOGGER.error("用户【{}】的积分数量为:{},最低需要{}积分才能抵扣!", memberCode, score, scoreLimit);
|
|
|
calculateOrderDiscountPriceResponseVO.setAfterScore(score);
|