搬家调试

20230922-ljl-fixBug
qiushengjie 1 year ago
parent b8610024da
commit 527efe1e91

@ -35,11 +35,11 @@ public class TestRedisService extends SPIBaseService implements ExtensionService
initHandle(req); initHandle(req);
ItemDTO itemDTO = req.getData(); ItemDTO itemDTO = req.getData();
if(itemDTO.getTitle().equals("initProcess")){ if(itemDTO.getTitle().equals("initProcess")){
for (long i = 0; i < 5; i++) { for (long i = 85; i < 150; i++) {
redisService.pop(RedisKeyConst.MOVE_PRODUCT_PUBLISH_QUEUE); redisService.pop(RedisKeyConst.MOVE_PRODUCT_PUBLISH_QUEUE);
} }
for (long i = 90; i < 100; i++) { for (long i = 85; i < 150; i++) {
MoveProductPublishQueue data = moveProductPublishQueueService.selectByPrimaryKey(i); MoveProductPublishQueue data = moveProductPublishQueueService.selectByPrimaryKey(i);
if(data != null && data.getLocked() == 0){ if(data != null && data.getLocked() == 0){
redisService.push(RedisKeyConst.MOVE_PRODUCT_PUBLISH_QUEUE, String.valueOf(data.getMoveCollectTaskDetailId())); redisService.push(RedisKeyConst.MOVE_PRODUCT_PUBLISH_QUEUE, String.valueOf(data.getMoveCollectTaskDetailId()));
@ -53,7 +53,7 @@ public class TestRedisService extends SPIBaseService implements ExtensionService
redisService.pop(RedisKeyConst.MOVE_PRODUCT_PUBLISH_TO_PIC_QUEUE); redisService.pop(RedisKeyConst.MOVE_PRODUCT_PUBLISH_TO_PIC_QUEUE);
} }
for (long i = 98; i < 150; i++) { for (long i = 30; i < 150; i++) {
MoveProductPublishToPicQueue data = moveProductPublishToPicQueueService.selectByPrimaryKey(i); MoveProductPublishToPicQueue data = moveProductPublishToPicQueueService.selectByPrimaryKey(i);
if (data != null && data.getLocked() == 0) { if (data != null && data.getLocked() == 0) {
redisService.push(RedisKeyConst.MOVE_PRODUCT_PUBLISH_TO_PIC_QUEUE, String.valueOf(data.getMoveProductPublishToPicQueueId())); redisService.push(RedisKeyConst.MOVE_PRODUCT_PUBLISH_TO_PIC_QUEUE, String.valueOf(data.getMoveProductPublishToPicQueueId()));

@ -177,7 +177,7 @@ public class MoveService {
productDetailBase.put("categoryLeafId", queueMsg.getCid()); productDetailBase.put("categoryLeafId", queueMsg.getCid());
// 尺寸模版 // 尺寸模版
Long size = getSizeTemplateId(shopId, condition, moveBaseData); Long size = getSizeTemplateId(shopId, Long.parseLong(queueMsg.getCid()));
productDetailBase.put("sizeTemplateId", size); productDetailBase.put("sizeTemplateId", size);
// 发货时间 // 发货时间
@ -325,6 +325,9 @@ public class MoveService {
ProductGetProductUpdateRuleParam param = new ProductGetProductUpdateRuleParam(); ProductGetProductUpdateRuleParam param = new ProductGetProductUpdateRuleParam();
param.setCategoryId(Long.valueOf(cid)); param.setCategoryId(Long.valueOf(cid));
ApiResult<ProductGetProductUpdateRuleData> productUpdateRuleRet = DdRequestUtil.getBrandListV2FromDdNotEx(param, accessToken); ApiResult<ProductGetProductUpdateRuleData> productUpdateRuleRet = DdRequestUtil.getBrandListV2FromDdNotEx(param, accessToken);
if(!productUpdateRuleRet.isSuccess()){
return new HashMap<>();
}
ProductGetProductUpdateRuleData productUpdateRule = productUpdateRuleRet.getData(); ProductGetProductUpdateRuleData productUpdateRule = productUpdateRuleRet.getData();
if (!productUpdateRule.getAfterSaleRule().getSupplyDayReturnRule().getEnable() || ObjectUtil.isEmpty(productUpdateRule.getAfterSaleRule().getSupplyDayReturnRule().getOptions())) { if (!productUpdateRule.getAfterSaleRule().getSupplyDayReturnRule().getEnable() || ObjectUtil.isEmpty(productUpdateRule.getAfterSaleRule().getSupplyDayReturnRule().getOptions())) {
return new HashMap<>(); return new HashMap<>();
@ -358,8 +361,7 @@ public class MoveService {
return title; return title;
} }
public Long getSizeTemplateId(long shopId, MoveShopSettingBO condition, JSONObject moveBaseData) { public Long getSizeTemplateId(long shopId, long cid) {
long cid = moveBaseData.getLong("cid");
return getShopSettingSizeTemplateIdByCid(shopId, cid); return getShopSettingSizeTemplateIdByCid(shopId, cid);
} }

@ -2044,7 +2044,7 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
public Map<String, SkuDetailBO> buildSkuListAndSkuImages(JSONObject skuMap, JSONObject colorMap, JSONObject sizeMap) { public Map<String, SkuDetailBO> buildSkuListAndSkuImages(JSONObject skuMap, JSONObject colorMap, JSONObject sizeMap) {
double defaultPrice = getSkuDefaultPrice(skuMap); double defaultPrice = getSkuDefaultPrice(skuMap);
Map<String, SkuDetailBO> skuList = new HashMap<>(); Map<String, SkuDetailBO> skuList = new HashMap<>();
if (!colorMap.isEmpty() && !sizeMap.isEmpty()) { if (ObjectUtil.isNotEmpty(colorMap) && ObjectUtil.isNotEmpty(sizeMap)) {
for (String cAv : colorMap.keySet()) { for (String cAv : colorMap.keySet()) {
for (String sAv : sizeMap.keySet()) { for (String sAv : sizeMap.keySet()) {
SkuDetailBO skuDetail = new SkuDetailBO(); SkuDetailBO skuDetail = new SkuDetailBO();
@ -2061,7 +2061,7 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
} }
} }
} }
} else if (!colorMap.isEmpty()) { } else if (ObjectUtil.isNotEmpty(colorMap)) {
for (String cAv : colorMap.keySet()) { for (String cAv : colorMap.keySet()) {
SkuDetailBO skuDetail = new SkuDetailBO(); SkuDetailBO skuDetail = new SkuDetailBO();
skuDetail.setPrice(buildSkuPrice(skuMap, cAv, "", defaultPrice)); skuDetail.setPrice(buildSkuPrice(skuMap, cAv, "", defaultPrice));
@ -2076,7 +2076,7 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
skuList.put(keyString, skuDetail); skuList.put(keyString, skuDetail);
} }
} }
} else if (!sizeMap.isEmpty()) { } else if (ObjectUtil.isNotEmpty(sizeMap)) {
for (String sAv : sizeMap.keySet()) { for (String sAv : sizeMap.keySet()) {
SkuDetailBO skuDetail = new SkuDetailBO(); SkuDetailBO skuDetail = new SkuDetailBO();
skuDetail.setPrice(buildSkuPrice(skuMap, "", sAv, defaultPrice)); skuDetail.setPrice(buildSkuPrice(skuMap, "", sAv, defaultPrice));
@ -2288,8 +2288,8 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
boolean checkSize = false; boolean checkSize = false;
skuPropStr = skuPropStr.trim(); skuPropStr = skuPropStr.trim();
sAv = sAv.trim(); sAv = StringUtils.isNotBlank(sAv)? sAv.trim():"";
if (sAv.isEmpty() && skuPropStr.isEmpty()) { if (ObjectUtil.isNotEmpty(sAv) && ObjectUtil.isNotEmpty(skuPropStr)) {
checkSize = true; checkSize = true;
} else { } else {
String[] skuPropArr = skuPropStr.split(";"); String[] skuPropArr = skuPropStr.split(";");

Loading…
Cancel
Save