From 62a447d89331aee1feae7724c7616aa1bb2cfe79 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 16 十月 2024 14:28:37 +0800 Subject: [PATCH] 将CMQ替换为rabbitmq --- fanli/src/main/java/com/yeshi/fanli/controller/h5/H5PDDGoodsController.java | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5PDDGoodsController.java b/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5PDDGoodsController.java index 18cd5c2..e15907e 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5PDDGoodsController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5PDDGoodsController.java @@ -7,7 +7,10 @@ import javax.annotation.Resource; import com.yeshi.fanli.dto.pdd.PDDGoodsDetail; +import com.yeshi.fanli.entity.SystemEnum; +import com.yeshi.fanli.entity.SystemPIDInfo; import com.yeshi.fanli.exception.pdd.PDDApiException; +import com.yeshi.fanli.service.manger.PIDManager; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.pinduoduo.PinDuoDuoApiUtil; import org.springframework.stereotype.Controller; @@ -25,6 +28,10 @@ @Resource private PDDGoodsService pddGoodsService; + + @Resource + private PIDManager pidManager; + /** * 鑾峰彇鎷煎澶氱殑鍥炬枃璇︽儏 * @@ -34,15 +41,15 @@ * @param out */ @RequestMapping(value = "getImageList", method = RequestMethod.GET) - public void getCouponList(AcceptData acceptData, String callback, Long id, PrintWriter out) { - if (id == null || id == 0) { + public void getCouponList(AcceptData acceptData, String callback, String id, PrintWriter out) { + if (id == null ) { out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("璇蜂笂浼犲晢鍝両D"))); return; } PDDGoodsDetail pddGoods = null; try { - pddGoods = PinDuoDuoApiUtil.getGoodsDetail(id, PinDuoDuoApiUtil.PID_FANLI, Constant.PDD_SEARCH_CUSTOMER_PARAMS); + pddGoods = PinDuoDuoApiUtil.getGoodsDetail(id, pidManager.getPidCache(SystemEnum.blks, Constant.SOURCE_TYPE_PDD, SystemPIDInfo.PidType.fanli), Constant.PDD_SEARCH_CUSTOMER_PARAMS); } catch (PDDApiException e) { e.printStackTrace(); } -- Gitblit v1.8.0