提交代码

dev
胡锐 6 months ago
parent 382d5e0f4f
commit 8eceaf45f6
  1. 27
      cweb/src/main/java/com/cweb/controller/CommonController.java

@ -1,10 +1,17 @@
package com.cweb.controller; package com.cweb.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; 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.RedisUtil;
import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsOrderGoods;
import com.hfkj.entity.GoodsLogistics;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.service.CommonService; import com.hfkj.service.CommonService;
import com.hfkj.service.goods.BsOrderGoodsService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -13,7 +20,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
@RestController @RestController
@RequestMapping(value="/common") @RequestMapping(value="/common")
@ -27,6 +36,8 @@ public class CommonController {
@Autowired @Autowired
private RedisUtil redisUtil; private RedisUtil redisUtil;
@Resource
private BsOrderGoodsService bsOrderGoodsService;
@RequestMapping(value = "/getAllCity", method = RequestMethod.GET) @RequestMapping(value = "/getAllCity", method = RequestMethod.GET)
@ResponseBody @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);
}
}
} }

Loading…
Cancel
Save