diff --git a/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoByProductId.java b/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoByProductId.java index 4a8017f2..2452a8f2 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoByProductId.java +++ b/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoByProductId.java @@ -81,8 +81,9 @@ public class GetProductInfoByProductId extends SPIBaseService implements Extensi getAuthCode(); GetProductInfoRequestDTO fields = req.getData(); List productIds = fields.getProductIds(); - if (productIds.size() > 10) { - return R.ok(Ret.fail("最多支持20个商品")); + int limitNum = 10; + if (productIds.size() > limitNum) { + return R.ok(Ret.fail("最多支持"+limitNum+"个商品")); } List productInfo = new ArrayList<>(); List fetchFailIds = new ArrayList<>(); diff --git a/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoService.java b/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoService.java index 83c9d2c4..2c35641e 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoService.java +++ b/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoService.java @@ -81,8 +81,9 @@ public class GetProductInfoService extends SPIBaseService implements ExtensionSe GetProductInfoRequestDTO fields = req.getData(); // List sourceItemUrls = new ArrayList<>(); List sourceItemUrls = fields.getSourceItemUrls(); - if (sourceItemUrls.size() > 10) { - return R.ok(Ret.fail("最多支持20个商品")); + int limitNum = 10; + 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"); diff --git a/ms-biz/src/main/java/com/ms/api/task/MoveReplenishTaskService.java b/ms-biz/src/main/java/com/ms/api/task/MoveReplenishTaskService.java index 04e1a64c..3912f38f 100644 --- a/ms-biz/src/main/java/com/ms/api/task/MoveReplenishTaskService.java +++ b/ms-biz/src/main/java/com/ms/api/task/MoveReplenishTaskService.java @@ -80,9 +80,9 @@ public class MoveReplenishTaskService extends TaskBaseService { @Override public Object processTask(Object params) { 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("material_audit_status_queue", ""); + unlockTimeoutQueue.unlockSolidRedisSkipQueue("material_audit_status_queue", ""); log.info("end move MoveReplenishTask service"); return null; } diff --git a/ms-deploy/src/test/java/com/ms/test/CommonToolTest.java b/ms-deploy/src/test/java/com/ms/test/CommonToolTest.java index f711b6b8..a488886e 100644 --- a/ms-deploy/src/test/java/com/ms/test/CommonToolTest.java +++ b/ms-deploy/src/test/java/com/ms/test/CommonToolTest.java @@ -5,10 +5,8 @@ import com.ms.api.dto.move.MoveProductDTO; import com.ms.api.dto.move.SaveBatchMoveTaskRequestDTO; import com.ms.api.tool.CommonTool; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.time.ZoneId; +import java.util.*; public class CommonToolTest { @@ -16,19 +14,22 @@ public class CommonToolTest { // String s = CommonTool.getCurMonthLastTime(); // System.out.println(s); - Map> start = new HashMap<>(); - List mList = new ArrayList<>(); +// Map> start = new HashMap<>(); +// List 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)); } }