From 8eceaf45f655426c543483e9ff178f037e48744d Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 24 May 2024 18:01:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cweb/controller/CommonController.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/cweb/src/main/java/com/cweb/controller/CommonController.java b/cweb/src/main/java/com/cweb/controller/CommonController.java index 8775a3b..b38e268 100644 --- a/cweb/src/main/java/com/cweb/controller/CommonController.java +++ b/cweb/src/main/java/com/cweb/controller/CommonController.java @@ -1,10 +1,17 @@ package com.cweb.controller; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; import com.hfkj.common.utils.RedisUtil; import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.entity.BsOrderGoods; +import com.hfkj.entity.GoodsLogistics; import com.hfkj.model.ResponseData; import com.hfkj.service.CommonService; +import com.hfkj.service.goods.BsOrderGoodsService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; @@ -13,7 +20,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.HashMap; import java.util.List; +import java.util.Map; @RestController @RequestMapping(value="/common") @@ -27,6 +36,8 @@ public class CommonController { @Autowired private RedisUtil redisUtil; + @Resource + private BsOrderGoodsService bsOrderGoodsService; @RequestMapping(value = "/getAllCity", method = RequestMethod.GET) @ResponseBody @@ -53,4 +64,20 @@ public class CommonController { } } + @RequestMapping(value="/getLogisticsMsg",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询物流") + public ResponseData getLogisticsMsg(@RequestParam(value = "logisticsNo" , required = true) String logisticsNo) { + try { + + GoodsLogistics logistics = (GoodsLogistics) bsOrderGoodsService.getLogisticsMsg(logisticsNo); + return ResponseMsgUtil.success(logistics); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } + + }