搬家调试

20230922-ljl-fixBug
qiushengjie 1 year ago
parent b76ccd18ae
commit c011367348

@ -39,7 +39,7 @@ public class TestRedisService extends SPIBaseService implements ExtensionService
redisService.pop(RedisKeyConst.MOVE_PRODUCT_PUBLISH_QUEUE);
}
for (long i = 85; i < 150; i++) {
for (long i = 115; i < 180; 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 = 30; i < 150; i++) {
for (long i = 115; i < 180; 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()));

@ -749,11 +749,11 @@ public class ProcessMovePublishToPicTaskService extends TaskBaseService {
Matcher matcher = pattern.matcher(reason);
if (matcher.find()) {
String propertyId = matcher.group(1);
Map<Long, List<StrObjMap>> productFormatNew = (Map<Long, List<StrObjMap>>) productDetailBase.get("productFormatNew");
JSONObject productFormatNew = (JSONObject)productDetailBase.get("productFormatNew");
if (productFormatNew.containsKey(Long.parseLong(propertyId))) {
List<StrObjMap> propertyList = (List<StrObjMap>) productFormatNew.get(Long.parseLong(propertyId));
JSONArray propertyList = (JSONArray) productFormatNew.get(Long.parseLong(propertyId));
if (!propertyList.isEmpty()) {
StrObjMap property = propertyList.get(0);
JSONObject property = (JSONObject)propertyList.get(0);
property.put("diy_type", 1);
}
}
@ -1348,22 +1348,8 @@ public class ProcessMovePublishToPicTaskService extends TaskBaseService {
}
Object productFormatNew = productData.get("productFormatNew");
String formatJson = JSON.toJSONString(productFormatNew);
log.info(formatJson);
JSONObject formatObj = JSON.parseObject(formatJson);
List<String> removeKeys = new ArrayList<>();
for (String key : formatObj.keySet()) {
Object value = formatObj.get(key);
java.util.List<?> list = (java.util.List<?>) value;
if (list.isEmpty()) {
removeKeys.add(key);
}
}
removeKeys.forEach(formatObj::remove);
log.info("转换后" + formatObj.toJSONString());
if (!Objects.isNull(productFormatNew)) {
param.setProductFormatNew(formatObj.toJSONString());
// param.setProductFormatNew("{\"631\":[{\"diy_type\":1,\"name\":\"嘻哈风\",\"value\":196227}],\"1467\":[{\"diy_type\":0,\"name\":\"59%-69%(含)\",\"value\":168368}],\"1551\":[{\"diy_type\":1,\"name\":\"超短裙\",\"value\":22064}],\"1687\":[{\"diy_type\":0,\"name\":\"改为具体的品牌,没有可以为空\",\"value\":0}],\"1878\":[{\"diy_type\":1,\"name\":\"高腰\",\"value\":16521}],\"2592\":[{\"diy_type\":1,\"name\":\"甜美\",\"value\":23925}],\"785\":[{\"diy_type\":0,\"name\":\"涤纶\",\"value\":25708}],\"813\":[{\"diy_type\":1,\"name\":\"X型\",\"value\":8017}],\"981\":[{\"diy_type\":1,\"name\":\"蛋糕裙\",\"value\":22253}]}");
param.setProductFormatNew(JSON.toJSONString(productFormatNew));
}
Long deliveryDelayDay = productData.getLong("deliveryDelayDay");

@ -950,7 +950,7 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
TreeMap<Double, Object> matchVids = new TreeMap<>(Collections.reverseOrder());
Map<String, String> matchSourceAttrs = new HashMap<>();
double maxPercent = -1;
String maxMatchAttrValue = attribute.getOptions().get(0).getValue();
String maxMatchAttrValue = ObjectUtil.isNotEmpty(attribute.getOptions())? attribute.getOptions().get(0).getValue():"";
StrObjMap sourceValueMap = searchSourceValue(sourceAttrs, attribute.getPropertyName());
String sourceValue = (String) sourceValueMap.get("sourceValue");

Loading…
Cancel
Save