搬家调试

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

@ -35,11 +35,11 @@ public class TestRedisService extends SPIBaseService implements ExtensionService
initHandle(req);
ItemDTO itemDTO = req.getData();
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);
}
for (long i = 90; i < 100; i++) {
for (long i = 85; i < 150; i++) {
MoveProductPublishQueue data = moveProductPublishQueueService.selectByPrimaryKey(i);
if(data != null && data.getLocked() == 0){
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);
}
for (long i = 98; i < 150; i++) {
for (long i = 30; i < 150; i++) {
MoveProductPublishToPicQueue data = moveProductPublishToPicQueueService.selectByPrimaryKey(i);
if (data != null && data.getLocked() == 0) {
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());
// 尺寸模版
Long size = getSizeTemplateId(shopId, condition, moveBaseData);
Long size = getSizeTemplateId(shopId, Long.parseLong(queueMsg.getCid()));
productDetailBase.put("sizeTemplateId", size);
// 发货时间
@ -325,6 +325,9 @@ public class MoveService {
ProductGetProductUpdateRuleParam param = new ProductGetProductUpdateRuleParam();
param.setCategoryId(Long.valueOf(cid));
ApiResult<ProductGetProductUpdateRuleData> productUpdateRuleRet = DdRequestUtil.getBrandListV2FromDdNotEx(param, accessToken);
if(!productUpdateRuleRet.isSuccess()){
return new HashMap<>();
}
ProductGetProductUpdateRuleData productUpdateRule = productUpdateRuleRet.getData();
if (!productUpdateRule.getAfterSaleRule().getSupplyDayReturnRule().getEnable() || ObjectUtil.isEmpty(productUpdateRule.getAfterSaleRule().getSupplyDayReturnRule().getOptions())) {
return new HashMap<>();
@ -358,8 +361,7 @@ public class MoveService {
return title;
}
public Long getSizeTemplateId(long shopId, MoveShopSettingBO condition, JSONObject moveBaseData) {
long cid = moveBaseData.getLong("cid");
public Long getSizeTemplateId(long shopId, long 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) {
double defaultPrice = getSkuDefaultPrice(skuMap);
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 sAv : sizeMap.keySet()) {
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()) {
SkuDetailBO skuDetail = new SkuDetailBO();
skuDetail.setPrice(buildSkuPrice(skuMap, cAv, "", defaultPrice));
@ -2076,7 +2076,7 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
skuList.put(keyString, skuDetail);
}
}
} else if (!sizeMap.isEmpty()) {
} else if (ObjectUtil.isNotEmpty(sizeMap)) {
for (String sAv : sizeMap.keySet()) {
SkuDetailBO skuDetail = new SkuDetailBO();
skuDetail.setPrice(buildSkuPrice(skuMap, "", sAv, defaultPrice));
@ -2288,8 +2288,8 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
boolean checkSize = false;
skuPropStr = skuPropStr.trim();
sAv = sAv.trim();
if (sAv.isEmpty() && skuPropStr.isEmpty()) {
sAv = StringUtils.isNotBlank(sAv)? sAv.trim():"";
if (ObjectUtil.isNotEmpty(sAv) && ObjectUtil.isNotEmpty(skuPropStr)) {
checkSize = true;
} else {
String[] skuPropArr = skuPropStr.split(";");

Loading…
Cancel
Save