需求描述
现在我们有一个接受供应商订单状态通知的接口,目前支持的功能有退款,改签,后续可能需要接入新功能,比如航变,订单状态改变之类。接口的请求格式一致,接口如下:
请求
package com.ahut.contract.flight;
/**
* @desc : 供应商通知请求
* @author : cheng
* @date : 2019-03-04 21:18
*/
public class VendorOrderNotifyRequest {
/**
* 数据
*/
private String data;
/**
* 依据tag判断事件类型
*/
private String tag;
/**
* 创建时间
*/
private long createTime;
/**
* 签名
*/
private String sign;
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public long getCreateTime() {
return createTime;
}
public void setCreateTime(long createTime) {
this.createTime = createTime;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
}
响应
package com.ahut.contract.flight;
/**
* @desc : 供应商通知响应
* @author : cheng
* @date : 2019-03-04 21:21
*/
public class VendorOrderNotifyResponse {
private int code;
private String message;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
请求统一入口接口
package com.ahut.flight.service;
import com.ahut.contract.flight.VendorOrderNotifyRequest;
import com.ahut.contract.flight.VendorOrderNotifyResponse;
/**
* @desc :
* @author : cheng
* @date : 2019-03-04 21:16
*/
public interface VendorOrderNotifyService {
/**
* @desc :
* @author : cheng
* @date : 2019-03-04 21:24
*/
VendorOrderNotifyResponse orderNoti