Переглянути джерело

鹭燕大药房推送接口

huangwenjie 7 роки тому
батько
коміт
7b0a70ee0a

+ 44 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/controller/express/LuyanExpressApiController.java

@ -0,0 +1,44 @@
package com.yihu.wlyy.web.third.gateway.controller.express;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * 提供给鹭燕物流调用的接口
 * @author huangwenjie
 * @date 2018/3/26 14:05
 */
@RestController
@RequestMapping(value = "/wlyygc/express/luyan")
@Api(description = "鹭燕物流相关接口")
public class LuyanExpressApiController extends BaseController {
	private static Logger logger = LoggerFactory.getLogger(LuyanExpressApiController.class);
	
	@RequestMapping(value="/routepushservice",method = RequestMethod.POST)
	@ApiOperation("接受顺丰推送过来的路由信息")
	@ObserverRequired
	public String SFRoutePushService (
			@ApiParam(name="prescriptionCode", value="处方编码") @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode,
			@ApiParam(name="mailno", value="快递单号") @RequestParam(value = "mailno",required = true) String mailno,
			@ApiParam(name="routinfo", value="入参报文") @RequestParam(value = "routinfo",required = true) String routinfo){
		try {
			System.out.println(routinfo);
			return write(200, "查询成功!");
		}catch (Exception e){
			logger.error("接收路演大药房信息推送失败,入参JSON:"+routinfo);
			//日志文件中记录异常信息
			error(e);
			//返回接口异常信息处理结果
			return error(-1, "请求失败!");
		}
	}
}