package cn.com.taiji.core.model.comm.protocol.inss.renewalInst; | |||||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest; | |||||
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstApplyResponse; | |||||
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstServiceCmd; | |||||
import cn.com.taiji.core.model.comm.protocol.valid.ErrorMsgBuilder; | |||||
import lombok.Getter; | |||||
import lombok.Setter; | |||||
import lombok.experimental.Accessors; | |||||
import javax.validation.constraints.NotBlank; | |||||
import javax.validation.constraints.NotNull; | |||||
@Getter | |||||
@Setter | |||||
@Accessors(chain = true) | |||||
public class RenewalInstApplyRequest extends AbstractSignTypeRequest<RenewalInstApplyResponse> { | |||||
public RenewalInstApplyRequest() { | |||||
super(RenewalInstServiceCmd.APPLY); | |||||
} | |||||
@NotBlank | |||||
private String orderNo;//订单号 | |||||
@NotBlank | |||||
private String cardId;//卡号 | |||||
@NotBlank | |||||
private String obuId;//签号 | |||||
@NotNull | |||||
private Integer cardVersion;//卡版本 | |||||
@NotNull | |||||
private Integer obuVersion;//签版本 | |||||
public void relatedValid(ErrorMsgBuilder builder) { | |||||
} | |||||
} |
package cn.com.taiji.core.model.comm.protocol.inss.renewalInst; | |||||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; | |||||
import lombok.Getter; | |||||
import lombok.Setter; | |||||
import lombok.experimental.Accessors; | |||||
@Getter | |||||
@Setter | |||||
@Accessors(chain = true) | |||||
public class RenewalInstApplyResponse extends AbstractSignTypeResponse { | |||||
private Integer stepNo;//步骤号 | |||||
private String cmd;//指令 | |||||
private String cmdType;//指令类型 | |||||
private String transOrderId;//二发订单号 | |||||
public RenewalInstApplyResponse() { | |||||
} | |||||
public RenewalInstApplyResponse(Integer stepNo, String cmd, String cmdType, String transOrderId) { | |||||
this.stepNo = stepNo; | |||||
this.cmd = cmd; | |||||
this.cmdType = cmdType; | |||||
this.transOrderId = transOrderId; | |||||
} | |||||
} |
package cn.com.taiji.core.model.comm.protocol.inss.renewalInst; | |||||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest; | |||||
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstCallBackResponse; | |||||
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstServiceCmd; | |||||
import cn.com.taiji.core.model.comm.protocol.valid.ErrorMsgBuilder; | |||||
import lombok.Getter; | |||||
import lombok.Setter; | |||||
import lombok.experimental.Accessors; | |||||
import javax.validation.constraints.NotBlank; | |||||
import javax.validation.constraints.NotNull; | |||||
@Getter | |||||
@Setter | |||||
@Accessors(chain = true) | |||||
public class RenewalInstCallBackRequest extends AbstractSignTypeRequest<RenewalInstCallBackResponse> { | |||||
public RenewalInstCallBackRequest() { | |||||
super(RenewalInstServiceCmd.CALLBACK); | |||||
} | |||||
@NotBlank | |||||
private String transOrderId;//交易编号 | |||||
@NotBlank | |||||
private String cmd;//指令 | |||||
@NotBlank | |||||
private String cmdResult;//指令结果 | |||||
@NotNull | |||||
private Integer stepNo; | |||||
public void relatedValid(ErrorMsgBuilder builder) { | |||||
} | |||||
} |
package cn.com.taiji.core.model.comm.protocol.inss.renewalInst; | |||||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; | |||||
import lombok.Getter; | |||||
import lombok.Setter; | |||||
import lombok.experimental.Accessors; | |||||
@Getter | |||||
@Setter | |||||
@Accessors(chain = true) | |||||
public class RenewalInstCallBackResponse extends AbstractSignTypeResponse { | |||||
private Integer stepNo; | |||||
private String cmd;//指令 | |||||
private String cmdType;//指令类型 | |||||
private String transOrderId;//二发订单号 | |||||
} |
package cn.com.taiji.core.model.comm.protocol.inss.renewalInst; | |||||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest; | |||||
import cn.com.taiji.core.model.comm.protocol.SignServiceCommand; | |||||
import cn.com.taiji.core.model.comm.protocol.SignServiceType; | |||||
import cn.com.taiji.core.model.comm.protocol.inss.InssServiceType; | |||||
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstApplyRequest; | |||||
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstCallBackRequest; | |||||
public enum RenewalInstServiceCmd implements SignServiceCommand { | |||||
APPLY("初始化命令", RenewalInstApplyRequest.class), | |||||
CALLBACK("激活指令回传", RenewalInstCallBackRequest.class); | |||||
private final String value; | |||||
private final Class<? extends AbstractSignTypeRequest<?>> reqClass; | |||||
RenewalInstServiceCmd(String value, Class<? extends AbstractSignTypeRequest<?>> reqClass) { | |||||
this.value = value; | |||||
this.reqClass = reqClass; | |||||
} | |||||
@Override | |||||
public SignServiceType getServiceType() { | |||||
return InssServiceType.RENEWALINST; | |||||
} | |||||
public static RenewalInstServiceCmd fromIfCode(String ifCode) { | |||||
return SignServiceCommand.fromName(RenewalInstServiceCmd.class, SignServiceCommand.getCmdStr(ifCode)); | |||||
} | |||||
@Override | |||||
public String getValue() { | |||||
return value; | |||||
} | |||||
@Override | |||||
public boolean isMyCommand(String ifCode) { | |||||
return this == fromIfCode(ifCode); | |||||
} | |||||
@Override | |||||
public Class<? extends AbstractSignTypeRequest<?>> getProtocolClass() { | |||||
return reqClass; | |||||
} | |||||
} |