提交代码

master
胡锐 6 months ago committed by yuanye
parent d2ea1553a5
commit 881c546422
  1. 27
      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);
}
}
}

Loading…
Cancel
Save