搬家调整

20230922-ljl-fixBug
qiushengjie 1 year ago
parent 8e2ef818eb
commit ca0530d91a

@ -81,8 +81,9 @@ public class GetProductInfoByProductId extends SPIBaseService implements Extensi
getAuthCode(); getAuthCode();
GetProductInfoRequestDTO fields = req.getData(); GetProductInfoRequestDTO fields = req.getData();
List<String> productIds = fields.getProductIds(); List<String> productIds = fields.getProductIds();
if (productIds.size() > 10) { int limitNum = 10;
return R.ok(Ret.fail("最多支持20个商品")); if (productIds.size() > limitNum) {
return R.ok(Ret.fail("最多支持"+limitNum+"个商品"));
} }
List<Object> productInfo = new ArrayList<>(); List<Object> productInfo = new ArrayList<>();
List<String> fetchFailIds = new ArrayList<>(); List<String> fetchFailIds = new ArrayList<>();

@ -81,8 +81,9 @@ public class GetProductInfoService extends SPIBaseService implements ExtensionSe
GetProductInfoRequestDTO fields = req.getData(); GetProductInfoRequestDTO fields = req.getData();
// List<String> sourceItemUrls = new ArrayList<>(); // List<String> sourceItemUrls = new ArrayList<>();
List<String> sourceItemUrls = fields.getSourceItemUrls(); List<String> sourceItemUrls = fields.getSourceItemUrls();
if (sourceItemUrls.size() > 10) { int limitNum = 10;
return R.ok(Ret.fail("最多支持20个商品")); if (sourceItemUrls.size() > limitNum) {
return R.ok(Ret.fail("最多支持 " +limitNum+"个商品"));
} }
// sourceItemUrls.add("https://detail.1688.com/offer/682805686164.html?spm=a2638t.b_90254924.bangdan-list.3.3872436cl59VWf&cosite=baidujj_pz&tracelog=p4p&_p_isad=1&clickid=3906df8adbe74c3faba6eefc496fa074&sessionid=3fa85d5fd57096560a3cfa71088c6e4a"); // sourceItemUrls.add("https://detail.1688.com/offer/682805686164.html?spm=a2638t.b_90254924.bangdan-list.3.3872436cl59VWf&cosite=baidujj_pz&tracelog=p4p&_p_isad=1&clickid=3906df8adbe74c3faba6eefc496fa074&sessionid=3fa85d5fd57096560a3cfa71088c6e4a");
// sourceItemUrls.add("https://detail.1688.com/offer/682805686164.html?spm=a2638t.b_90254924.bangdan-list.3.3872436cl59VWf&cosite=baidujj_pz&tracelog=p4p&_p_isad=1&clickid=3906df8adbe74c3faba6eefc496fa074&sessionid=3fa85d5fd57096560a3cfa71088c6e4a"); // sourceItemUrls.add("https://detail.1688.com/offer/682805686164.html?spm=a2638t.b_90254924.bangdan-list.3.3872436cl59VWf&cosite=baidujj_pz&tracelog=p4p&_p_isad=1&clickid=3906df8adbe74c3faba6eefc496fa074&sessionid=3fa85d5fd57096560a3cfa71088c6e4a");

@ -80,9 +80,9 @@ public class MoveReplenishTaskService extends TaskBaseService {
@Override @Override
public Object processTask(Object params) { public Object processTask(Object params) {
log.info("start MoveReplenishTask"); log.info("start MoveReplenishTask");
// moveService.replenishSolidRedisSkipQueue("move_product_publish_queue", ""); moveService.replenishSolidRedisSkipQueue("move_product_publish_queue", "");
// unlockTimeoutQueue.unlockSolidRedisSkipQueue("move_product_publish_to_pic_queue", ""); // unlockTimeoutQueue.unlockSolidRedisSkipQueue("move_product_publish_to_pic_queue", "");
// unlockTimeoutQueue.unlockSolidRedisSkipQueue("material_audit_status_queue", ""); unlockTimeoutQueue.unlockSolidRedisSkipQueue("material_audit_status_queue", "");
log.info("end move MoveReplenishTask service"); log.info("end move MoveReplenishTask service");
return null; return null;
} }

@ -5,10 +5,8 @@ import com.ms.api.dto.move.MoveProductDTO;
import com.ms.api.dto.move.SaveBatchMoveTaskRequestDTO; import com.ms.api.dto.move.SaveBatchMoveTaskRequestDTO;
import com.ms.api.tool.CommonTool; import com.ms.api.tool.CommonTool;
import java.util.ArrayList; import java.time.ZoneId;
import java.util.HashMap; import java.util.*;
import java.util.List;
import java.util.Map;
public class CommonToolTest { public class CommonToolTest {
@ -16,19 +14,22 @@ public class CommonToolTest {
// String s = CommonTool.getCurMonthLastTime(); // String s = CommonTool.getCurMonthLastTime();
// System.out.println(s); // System.out.println(s);
Map<String,List<MoveProductDTO>> start = new HashMap<>(); // Map<String,List<MoveProductDTO>> start = new HashMap<>();
List<MoveProductDTO> mList = new ArrayList<>(); // List<MoveProductDTO> mList = new ArrayList<>();
//
// MoveProductDTO moveProductDTO = new MoveProductDTO();
// moveProductDTO.setSource("1688");
// moveProductDTO.setIsFastMode(0);
// moveProductDTO.setCid("20219");
// moveProductDTO.setSourceImgUrl("https://cbu01.alicdn.com/img/ibank/O1CN01j9gsEX1LJpR9dXvjY_!!2215879181279-0-cib.jpg");
// moveProductDTO.setSourceItemId(734074040263L);
// moveProductDTO.setSourceTitle("半身裙女春夏2023新款裙裤短裙蓬蓬裙高腰百褶裙荷叶边超短裙");
// mList.add(moveProductDTO);
//
// start.put("products",mList);
// System.out.println(JSON.toJSONString(start));
ZoneId zoneId = ZoneId.systemDefault();
System.out.println("Current TimeZone is: " + zoneId.getId());
MoveProductDTO moveProductDTO = new MoveProductDTO();
moveProductDTO.setSource("1688");
moveProductDTO.setIsFastMode(0);
moveProductDTO.setCid("20219");
moveProductDTO.setSourceImgUrl("https://cbu01.alicdn.com/img/ibank/O1CN01j9gsEX1LJpR9dXvjY_!!2215879181279-0-cib.jpg");
moveProductDTO.setSourceItemId(734074040263L);
moveProductDTO.setSourceTitle("半身裙女春夏2023新款裙裤短裙蓬蓬裙高腰百褶裙荷叶边超短裙");
mList.add(moveProductDTO);
start.put("products",mList);
System.out.println(JSON.toJSONString(start));
} }
} }

Loading…
Cancel
Save