|
@@ -9,6 +9,10 @@ import java.time.LocalDateTime;
|
|
|
import java.time.ZoneId;
|
|
import java.time.ZoneId;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.time.temporal.ChronoUnit;
|
|
import java.time.temporal.ChronoUnit;
|
|
|
|
|
+import java.nio.charset.StandardCharsets;
|
|
|
|
|
+import java.nio.file.Files;
|
|
|
|
|
+import java.nio.file.Path;
|
|
|
|
|
+import java.nio.file.Paths;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
import java.util.concurrent.*;
|
|
import java.util.concurrent.*;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -61,8 +65,10 @@ import com.fs.live.param.LiveOrderFinishParam;
|
|
|
import com.fs.live.service.*;
|
|
import com.fs.live.service.*;
|
|
|
import com.fs.live.vo.*;
|
|
import com.fs.live.vo.*;
|
|
|
import com.fs.store.cache.IFsExpressCacheService;
|
|
import com.fs.store.cache.IFsExpressCacheService;
|
|
|
|
|
+import com.fs.store.enums.OrderInfoEnum;
|
|
|
import com.fs.store.cache.IFsStoreProductAttrValueCacheService;
|
|
import com.fs.store.cache.IFsStoreProductAttrValueCacheService;
|
|
|
import com.fs.store.cache.impl.IFsStoreProductCacheServiceImpl;
|
|
import com.fs.store.cache.impl.IFsStoreProductCacheServiceImpl;
|
|
|
|
|
+import com.fs.store.config.StoreConfig;
|
|
|
import com.fs.store.domain.*;
|
|
import com.fs.store.domain.*;
|
|
|
import com.fs.store.dto.*;
|
|
import com.fs.store.dto.*;
|
|
|
import com.fs.store.enums.*;
|
|
import com.fs.store.enums.*;
|
|
@@ -1858,7 +1864,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
Long attrValueId = param.getAttrValueId();
|
|
Long attrValueId = param.getAttrValueId();
|
|
|
String attrValueCacheKey = String.format("product:attr:value:id:%s", attrValueId);
|
|
String attrValueCacheKey = String.format("product:attr:value:id:%s", attrValueId);
|
|
|
String attrValueCacheJson = stringRedisTemplate.opsForValue().get(attrValueCacheKey);
|
|
String attrValueCacheJson = stringRedisTemplate.opsForValue().get(attrValueCacheKey);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (StringUtils.isNotEmpty(attrValueCacheJson)) {
|
|
if (StringUtils.isNotEmpty(attrValueCacheJson)) {
|
|
|
try {
|
|
try {
|
|
|
// 缓存命中,解析 JSON 字符串
|
|
// 缓存命中,解析 JSON 字符串
|
|
@@ -1870,11 +1876,11 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
attrValueCacheJson = null;
|
|
attrValueCacheJson = null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (fsStoreProductAttrValueForDelivery == null) {
|
|
if (fsStoreProductAttrValueForDelivery == null) {
|
|
|
// 缓存未命中或解析失败,查询数据库
|
|
// 缓存未命中或解析失败,查询数据库
|
|
|
fsStoreProductAttrValueForDelivery = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueById(attrValueId);
|
|
fsStoreProductAttrValueForDelivery = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueById(attrValueId);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 将结果存入缓存,设置过期时间为12小时
|
|
// 将结果存入缓存,设置过期时间为12小时
|
|
|
if (fsStoreProductAttrValueForDelivery != null) {
|
|
if (fsStoreProductAttrValueForDelivery != null) {
|
|
|
String jsonStr = JSON.toJSONString(fsStoreProductAttrValueForDelivery);
|
|
String jsonStr = JSON.toJSONString(fsStoreProductAttrValueForDelivery);
|
|
@@ -1882,7 +1888,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (param.getCityId() != null) {
|
|
if (param.getCityId() != null) {
|
|
|
// payDelivery = handleDeliveryMoney(param.getCityId(), fsStoreProduct, param.getTotalNum(), fsStoreProductAttrValueForDelivery);
|
|
// payDelivery = handleDeliveryMoney(param.getCityId(), fsStoreProduct, param.getTotalNum(), fsStoreProductAttrValueForDelivery);
|
|
|
totalPrice = totalPrice.add(payDelivery);
|
|
totalPrice = totalPrice.add(payDelivery);
|
|
@@ -1912,7 +1918,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
Long attrValueId = param.getAttrValueId();
|
|
Long attrValueId = param.getAttrValueId();
|
|
|
String attrValueCacheKey = String.format("product:attr:value:id:%s", attrValueId);
|
|
String attrValueCacheKey = String.format("product:attr:value:id:%s", attrValueId);
|
|
|
String attrValueCacheJson = stringRedisTemplate.opsForValue().get(attrValueCacheKey);
|
|
String attrValueCacheJson = stringRedisTemplate.opsForValue().get(attrValueCacheKey);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (StringUtils.isNotEmpty(attrValueCacheJson)) {
|
|
if (StringUtils.isNotEmpty(attrValueCacheJson)) {
|
|
|
try {
|
|
try {
|
|
|
// 缓存命中,解析 JSON 字符串
|
|
// 缓存命中,解析 JSON 字符串
|
|
@@ -1924,11 +1930,11 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
attrValueCacheJson = null;
|
|
attrValueCacheJson = null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (fsStoreProductAttrValue == null) {
|
|
if (fsStoreProductAttrValue == null) {
|
|
|
// 缓存未命中或解析失败,查询数据库
|
|
// 缓存未命中或解析失败,查询数据库
|
|
|
fsStoreProductAttrValue = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueById(attrValueId);
|
|
fsStoreProductAttrValue = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueById(attrValueId);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 将结果存入缓存,设置过期时间为12小时
|
|
// 将结果存入缓存,设置过期时间为12小时
|
|
|
if (fsStoreProductAttrValue != null) {
|
|
if (fsStoreProductAttrValue != null) {
|
|
|
String jsonStr = JSON.toJSONString(fsStoreProductAttrValue);
|
|
String jsonStr = JSON.toJSONString(fsStoreProductAttrValue);
|
|
@@ -2178,11 +2184,11 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
public static class ShippingTemplateCacheData {
|
|
public static class ShippingTemplateCacheData {
|
|
|
private Map<Long, Integer> shippingTemplatesMap;
|
|
private Map<Long, Integer> shippingTemplatesMap;
|
|
|
private Map<Long, FsShippingTemplatesRegion> shippingTemplatesRegionMap;
|
|
private Map<Long, FsShippingTemplatesRegion> shippingTemplatesRegionMap;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
public ShippingTemplateCacheData() {
|
|
public ShippingTemplateCacheData() {
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- public ShippingTemplateCacheData(Map<Long, Integer> shippingTemplatesMap,
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public ShippingTemplateCacheData(Map<Long, Integer> shippingTemplatesMap,
|
|
|
Map<Long, FsShippingTemplatesRegion> shippingTemplatesRegionMap) {
|
|
Map<Long, FsShippingTemplatesRegion> shippingTemplatesRegionMap) {
|
|
|
this.shippingTemplatesMap = shippingTemplatesMap;
|
|
this.shippingTemplatesMap = shippingTemplatesMap;
|
|
|
this.shippingTemplatesRegionMap = shippingTemplatesRegionMap;
|
|
this.shippingTemplatesRegionMap = shippingTemplatesRegionMap;
|
|
@@ -2200,15 +2206,15 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
// 优化:直接字符串拼接,避免创建List和Stream中间对象
|
|
// 优化:直接字符串拼接,避免创建List和Stream中间对象
|
|
|
String ids = String.valueOf(fsStoreProduct.getTempId());
|
|
String ids = String.valueOf(fsStoreProduct.getTempId());
|
|
|
String cityIds = cityId + ",0";
|
|
String cityIds = cityId + ",0";
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 构建缓存 key:基于 tempId 和 cityIds
|
|
// 构建缓存 key:基于 tempId 和 cityIds
|
|
|
String cacheKey = String.format("shipping:template:%s:city:%s", ids, cityIds);
|
|
String cacheKey = String.format("shipping:template:%s:city:%s", ids, cityIds);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 先查缓存(使用 JSON 字符串存储,避免 FastJSON autoType 问题)
|
|
// 先查缓存(使用 JSON 字符串存储,避免 FastJSON autoType 问题)
|
|
|
String cacheJson = stringRedisTemplate.opsForValue().get(cacheKey);
|
|
String cacheJson = stringRedisTemplate.opsForValue().get(cacheKey);
|
|
|
Map<Long, Integer> shippingTemplatesMap = null;
|
|
Map<Long, Integer> shippingTemplatesMap = null;
|
|
|
Map<Long, FsShippingTemplatesRegion> shippingTemplatesRegionMap = null;
|
|
Map<Long, FsShippingTemplatesRegion> shippingTemplatesRegionMap = null;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (StringUtils.isNotEmpty(cacheJson)) {
|
|
if (StringUtils.isNotEmpty(cacheJson)) {
|
|
|
try {
|
|
try {
|
|
|
// 缓存命中,解析 JSON 字符串
|
|
// 缓存命中,解析 JSON 字符串
|
|
@@ -2224,25 +2230,25 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
cacheJson = null;
|
|
cacheJson = null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (shippingTemplatesMap == null || shippingTemplatesRegionMap == null) {
|
|
if (shippingTemplatesMap == null || shippingTemplatesRegionMap == null) {
|
|
|
// 缓存未命中或解析失败,查询数据库并计算
|
|
// 缓存未命中或解析失败,查询数据库并计算
|
|
|
List<FsShippingTemplates> shippingTemplatesList = shippingTemplatesService.selectFsShippingTemplatesByIds(ids);
|
|
List<FsShippingTemplates> shippingTemplatesList = shippingTemplatesService.selectFsShippingTemplatesByIds(ids);
|
|
|
List<FsShippingTemplatesRegion> shippingTemplatesRegionList = shippingTemplatesRegionService.selectFsShippingTemplatesRegionListByTempIdsAndCityIds(ids, cityIds);
|
|
List<FsShippingTemplatesRegion> shippingTemplatesRegionList = shippingTemplatesRegionService.selectFsShippingTemplatesRegionListByTempIdsAndCityIds(ids, cityIds);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 优化:使用传统for循环替代Stream操作,减少对象创建
|
|
// 优化:使用传统for循环替代Stream操作,减少对象创建
|
|
|
shippingTemplatesMap = new HashMap<>(shippingTemplatesList.size());
|
|
shippingTemplatesMap = new HashMap<>(shippingTemplatesList.size());
|
|
|
for (FsShippingTemplates template : shippingTemplatesList) {
|
|
for (FsShippingTemplates template : shippingTemplatesList) {
|
|
|
shippingTemplatesMap.put(template.getId(), template.getType());
|
|
shippingTemplatesMap.put(template.getId(), template.getType());
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 优化:使用传统for循环替代Stream操作,减少对象创建
|
|
// 优化:使用传统for循环替代Stream操作,减少对象创建
|
|
|
shippingTemplatesRegionMap = new HashMap<>(shippingTemplatesRegionList.size());
|
|
shippingTemplatesRegionMap = new HashMap<>(shippingTemplatesRegionList.size());
|
|
|
for (FsShippingTemplatesRegion region : shippingTemplatesRegionList) {
|
|
for (FsShippingTemplatesRegion region : shippingTemplatesRegionList) {
|
|
|
// 相同tempId时,后面的值覆盖前面的值
|
|
// 相同tempId时,后面的值覆盖前面的值
|
|
|
shippingTemplatesRegionMap.put(region.getTempId(), region);
|
|
shippingTemplatesRegionMap.put(region.getTempId(), region);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 将计算结果放入缓存(使用 JSON 字符串存储),设置过期时间为12小时
|
|
// 将计算结果放入缓存(使用 JSON 字符串存储),设置过期时间为12小时
|
|
|
ShippingTemplateCacheData cacheData = new ShippingTemplateCacheData(shippingTemplatesMap, shippingTemplatesRegionMap);
|
|
ShippingTemplateCacheData cacheData = new ShippingTemplateCacheData(shippingTemplatesMap, shippingTemplatesRegionMap);
|
|
|
String jsonStr = JSON.toJSONString(cacheData);
|
|
String jsonStr = JSON.toJSONString(cacheData);
|
|
@@ -2251,17 +2257,17 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
Long tempId = Long.valueOf(fsStoreProduct.getTempId());
|
|
Long tempId = Long.valueOf(fsStoreProduct.getTempId());
|
|
|
double num = 0d;
|
|
double num = 0d;
|
|
|
Integer templateType = shippingTemplatesMap.get(tempId);
|
|
Integer templateType = shippingTemplatesMap.get(tempId);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 如果传入的 fsStoreProductAttrValue 不为空,直接使用;如果为空,查询数据库
|
|
// 如果传入的 fsStoreProductAttrValue 不为空,直接使用;如果为空,查询数据库
|
|
|
FsStoreProductAttrValue productAttrValue = fsStoreProductAttrValue;
|
|
FsStoreProductAttrValue productAttrValue = fsStoreProductAttrValue;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (productAttrValue == null) {
|
|
if (productAttrValue == null) {
|
|
|
// 查询商品属性值,使用缓存
|
|
// 查询商品属性值,使用缓存
|
|
|
Long productId = fsStoreProduct.getProductId();
|
|
Long productId = fsStoreProduct.getProductId();
|
|
|
String productAttrCacheKey = String.format("product:attr:value:productId:%s", productId);
|
|
String productAttrCacheKey = String.format("product:attr:value:productId:%s", productId);
|
|
|
String productAttrCacheJson = stringRedisTemplate.opsForValue().get(productAttrCacheKey);
|
|
String productAttrCacheJson = stringRedisTemplate.opsForValue().get(productAttrCacheKey);
|
|
|
List<FsStoreProductAttrValue> productAttrValues = null;
|
|
List<FsStoreProductAttrValue> productAttrValues = null;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (StringUtils.isNotEmpty(productAttrCacheJson)) {
|
|
if (StringUtils.isNotEmpty(productAttrCacheJson)) {
|
|
|
try {
|
|
try {
|
|
|
// 缓存命中,解析 JSON 字符串
|
|
// 缓存命中,解析 JSON 字符串
|
|
@@ -2273,11 +2279,11 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
productAttrCacheJson = null;
|
|
productAttrCacheJson = null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (productAttrValues == null) {
|
|
if (productAttrValues == null) {
|
|
|
// 缓存未命中或解析失败,查询数据库
|
|
// 缓存未命中或解析失败,查询数据库
|
|
|
productAttrValues = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(productId);
|
|
productAttrValues = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(productId);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 将结果存入缓存(包括空 list),设置过期时间为12小时
|
|
// 将结果存入缓存(包括空 list),设置过期时间为12小时
|
|
|
if (productAttrValues == null) {
|
|
if (productAttrValues == null) {
|
|
|
productAttrValues = new ArrayList<>(); // 确保不为 null,空数据也缓存空 list
|
|
productAttrValues = new ArrayList<>(); // 确保不为 null,空数据也缓存空 list
|
|
@@ -2285,11 +2291,11 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
String jsonStr = JSON.toJSONString(productAttrValues);
|
|
String jsonStr = JSON.toJSONString(productAttrValues);
|
|
|
stringRedisTemplate.opsForValue().set(productAttrCacheKey, jsonStr, 12, TimeUnit.HOURS);
|
|
stringRedisTemplate.opsForValue().set(productAttrCacheKey, jsonStr, 12, TimeUnit.HOURS);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (productAttrValues.isEmpty()) {
|
|
if (productAttrValues.isEmpty()) {
|
|
|
return storePostage;
|
|
return storePostage;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
productAttrValue = productAttrValues.get(0);
|
|
productAttrValue = productAttrValues.get(0);
|
|
|
}
|
|
}
|
|
|
Integer totalNum = Integer.valueOf(totalNumSize);
|
|
Integer totalNum = Integer.valueOf(totalNumSize);
|
|
@@ -3260,21 +3266,28 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
LiveUserFirstEntry liveUserFirstEntry = liveUserFirstEntryService.selectEntityByLiveIdUserId(liveOrder.getLiveId(), Long.parseLong(liveOrder.getUserId()));
|
|
LiveUserFirstEntry liveUserFirstEntry = liveUserFirstEntryService.selectEntityByLiveIdUserId(liveOrder.getLiveId(), Long.parseLong(liveOrder.getUserId()));
|
|
|
- liveOrder.setCompanyId(liveUserFirstEntry.getCompanyId());
|
|
|
|
|
- liveOrder.setCompanyUserId(liveUserFirstEntry.getCompanyUserId());
|
|
|
|
|
- liveOrder.setTuiUserId(liveUserFirstEntry.getCompanyUserId());
|
|
|
|
|
|
|
+ Long companyId = liveUserFirstEntry.getCompanyId();
|
|
|
|
|
+ Long companyUserId = liveUserFirstEntry.getCompanyUserId();
|
|
|
|
|
+ if (companyId != null && companyId == -1L && companyUserId != null && companyUserId == -1L) {
|
|
|
|
|
+ StoreConfig storeConfig = loadStoreConfig();
|
|
|
|
|
+ companyId = storeConfig.getDefaultLiveCompanyId() != null ? storeConfig.getDefaultLiveCompanyId() : 309L;
|
|
|
|
|
+ companyUserId = storeConfig.getDefaultLiveCompanyUserId() != null ? storeConfig.getDefaultLiveCompanyUserId() : 8647L;
|
|
|
|
|
+ }
|
|
|
|
|
+ liveOrder.setCompanyId(companyId);
|
|
|
|
|
+ liveOrder.setCompanyUserId(companyUserId);
|
|
|
|
|
+ liveOrder.setTuiUserId(companyUserId);
|
|
|
|
|
|
|
|
String orderSn = SnowflakeUtils.nextId();
|
|
String orderSn = SnowflakeUtils.nextId();
|
|
|
log.info("订单生成:" + orderSn);
|
|
log.info("订单生成:" + orderSn);
|
|
|
liveOrder.setOrderCode(orderSn);
|
|
liveOrder.setOrderCode(orderSn);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 查询商品属性值,使用缓存
|
|
// 查询商品属性值,使用缓存
|
|
|
FsStoreProductAttrValue fsStoreProductAttrValue = null;
|
|
FsStoreProductAttrValue fsStoreProductAttrValue = null;
|
|
|
if (!Objects.isNull(liveOrder.getAttrValueId())) {
|
|
if (!Objects.isNull(liveOrder.getAttrValueId())) {
|
|
|
Long attrValueId = liveOrder.getAttrValueId();
|
|
Long attrValueId = liveOrder.getAttrValueId();
|
|
|
String attrValueCacheKey = String.format("product:attr:value:id:%s", attrValueId);
|
|
String attrValueCacheKey = String.format("product:attr:value:id:%s", attrValueId);
|
|
|
String attrValueCacheJson = stringRedisTemplate.opsForValue().get(attrValueCacheKey);
|
|
String attrValueCacheJson = stringRedisTemplate.opsForValue().get(attrValueCacheKey);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (StringUtils.isNotEmpty(attrValueCacheJson)) {
|
|
if (StringUtils.isNotEmpty(attrValueCacheJson)) {
|
|
|
try {
|
|
try {
|
|
|
// 缓存命中,解析 JSON 字符串
|
|
// 缓存命中,解析 JSON 字符串
|
|
@@ -3286,11 +3299,11 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
attrValueCacheJson = null;
|
|
attrValueCacheJson = null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (fsStoreProductAttrValue == null) {
|
|
if (fsStoreProductAttrValue == null) {
|
|
|
// 缓存未命中或解析失败,查询数据库
|
|
// 缓存未命中或解析失败,查询数据库
|
|
|
fsStoreProductAttrValue = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueById(attrValueId);
|
|
fsStoreProductAttrValue = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueById(attrValueId);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 将结果存入缓存,设置过期时间为12小时
|
|
// 将结果存入缓存,设置过期时间为12小时
|
|
|
if (fsStoreProductAttrValue != null) {
|
|
if (fsStoreProductAttrValue != null) {
|
|
|
String jsonStr = JSON.toJSONString(fsStoreProductAttrValue);
|
|
String jsonStr = JSON.toJSONString(fsStoreProductAttrValue);
|
|
@@ -3298,7 +3311,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 计算价格(仿照 FsStoreOrderServiceImpl):
|
|
// 计算价格(仿照 FsStoreOrderServiceImpl):
|
|
|
// totalPrice = 商品总价(不含邮费)
|
|
// totalPrice = 商品总价(不含邮费)
|
|
|
// payPostage = 应付邮费
|
|
// payPostage = 应付邮费
|
|
@@ -3586,4 +3599,12 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
public void handleOrderStatus(LiveOrder liveOrder) {
|
|
public void handleOrderStatus(LiveOrder liveOrder) {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ private StoreConfig loadStoreConfig() {
|
|
|
|
|
+ String configJson = configService.selectConfigByKey("store.config");
|
|
|
|
|
+ if (StringUtils.isEmpty(configJson)) {
|
|
|
|
|
+ return new StoreConfig();
|
|
|
|
|
+ }
|
|
|
|
|
+ return JSONUtil.toBean(configJson, StoreConfig.class);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|