统一快递单号,出货单号命名为(expressNum,deliveryNum)

This commit is contained in:
Bo 2021-08-15 20:00:06 +08:00
parent 7cd3135e54
commit 2d5f955aeb
7 changed files with 45 additions and 45 deletions

View File

@ -55,7 +55,7 @@ public class ExpSubsPushApiController extends BaseController {
//接受topgp订阅 //接受topgp订阅
@Log(title = "快递订阅", businessType = BusinessType.OTHER) @Log(title = "快递订阅", businessType = BusinessType.OTHER)
@CrossOrigin @CrossOrigin
@ApiOperation(value="topgp订阅快递",notes = "request body格式 {\"requestId\":\"1628584040740\",\"deliveryNo\":\"S301-2108020001\",\"expressNo\":\"300444235610\",\"company\":\"annengwuliu\",\"phone\":\"13800138000\"}") @ApiOperation(value="topgp订阅快递",notes = "request body格式 {\"requestId\":\"1628584040740\",\"deliveryNum\":\"S301-2108020001\",\"expressNum\":\"300444235610\",\"company\":\"annengwuliu\",\"phone\":\"13800138000\"}")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String", dataTypeClass = String.class), @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String", dataTypeClass = String.class),
@ApiImplicitParam(name = "requestJson", value = "请求json",required = true, paramType = "body", dataType = "String", dataTypeClass = String.class) @ApiImplicitParam(name = "requestJson", value = "请求json",required = true, paramType = "body", dataType = "String", dataTypeClass = String.class)
@ -69,8 +69,8 @@ public class ExpSubsPushApiController extends BaseController {
@Log(title = "TOPGP出货已转签收", businessType = BusinessType.OTHER) @Log(title = "TOPGP出货已转签收", businessType = BusinessType.OTHER)
@CrossOrigin @CrossOrigin
@ApiOperation(value="接受TOPGP已转签收消息推送",notes = "request body格式 {\"requestId\":\"topgpSign1628584040740\"," + @ApiOperation(value="接受TOPGP已转签收消息推送",notes = "request body格式 {\"requestId\":\"topgpSign1628584040740\"," +
"\"signedInfoList\":[{\"deliveryNo\":\"S301-2108020001\",\"signNo\":\"S501-2108020001\"},{\"deliveryNo\":\"S301-2108020002\",\"signNo\":\"S501-2108020002\"}]," + "\"signedInfoList\":[{\"deliveryNum\":\"S301-2108020001\",\"signNo\":\"S501-2108020001\"},{\"deliveryNum\":\"S301-2108020002\",\"signNo\":\"S501-2108020002\"}]," +
"\"expressNo\":\"300444235610\",\"company\":\"annengwuliu\",\"phone\":\"13800138000\",\"status\":\"0\"}" "\"expressNum\":\"300444235610\",\"company\":\"annengwuliu\",\"phone\":\"13800138000\",\"status\":\"0\"}"
) )
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String", dataTypeClass = String.class), @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String", dataTypeClass = String.class),

View File

@ -28,11 +28,11 @@ public class ExpTopgpLog extends BaseEntity
/** 快递单 */ /** 快递单 */
@Excel(name = "快递单") @Excel(name = "快递单")
private String expressNumber; private String expressNum;
/** 出货单号 */ /** 出货单号 */
@Excel(name = "出货单号") @Excel(name = "出货单号")
private String deliveryNumber; private String deliveryNum;
/** 请求报文 */ /** 请求报文 */
@Excel(name = "请求报文") @Excel(name = "请求报文")
@ -77,23 +77,23 @@ public class ExpTopgpLog extends BaseEntity
{ {
return requestType; return requestType;
} }
public void setExpressNumber(String expressNumber) public void setExpressNum(String expressNum)
{ {
this.expressNumber = expressNumber; this.expressNum = expressNum;
} }
public String getExpressNumber() public String getExpressNum()
{ {
return expressNumber; return expressNum;
} }
public void setDeliveryNumber(String deliveryNumber) public void setDeliveryNum(String deliveryNum)
{ {
this.deliveryNumber = deliveryNumber; this.deliveryNum = deliveryNum;
} }
public String getDeliveryNumber() public String getDeliveryNum()
{ {
return deliveryNumber; return deliveryNum;
} }
public void setRequestStr(String requestStr) public void setRequestStr(String requestStr)
{ {
@ -138,8 +138,8 @@ public class ExpTopgpLog extends BaseEntity
.append("sid", getSid()) .append("sid", getSid())
.append("requestId", getRequestId()) .append("requestId", getRequestId())
.append("requestType", getRequestType()) .append("requestType", getRequestType())
.append("expressNumber", getExpressNumber()) .append("expressNum", getExpressNum())
.append("deliveryNumber", getDeliveryNumber()) .append("deliveryNum", getDeliveryNum())
.append("requestStr", getRequestStr()) .append("requestStr", getRequestStr())
.append("requestTime", getRequestTime()) .append("requestTime", getRequestTime())
.append("responseCode", getResponseCode()) .append("responseCode", getResponseCode())

View File

@ -172,15 +172,15 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
return "貌似没有接受到任何参数!"; return "貌似没有接受到任何参数!";
} }
String requestId=contentJson.getString("requestId"); //TOPGP请求ID年月日时分稍毫秒 String requestId=contentJson.getString("requestId"); //TOPGP请求ID年月日时分稍毫秒
String deliveryNo= contentJson.getString("deliveryNo"); //TOPGP出货单号 String deliveryNum= contentJson.getString("deliveryNum"); //TOPGP出货单号
String expressNo = contentJson.getString("expressNo"); //TOPGP快递单号 String expressNum = contentJson.getString("expressNum"); //TOPGP快递单号
String company = contentJson.getString("company"); //TOPGP物流公司编号 String company = contentJson.getString("company"); //TOPGP物流公司编号
String phone = contentJson.getString("phone"); //TOPGP出货单号 String phone = contentJson.getString("phone"); //TOPGP出货单号
//Long timeStamp = System.currentTimeMillis(); //获取时间戳 //Long timeStamp = System.currentTimeMillis(); //获取时间戳
String subscribeTime= DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"); //获取订阅时间 String subscribeTime= DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"); //获取订阅时间
SubscribeResp subscribeResp=new SubscribeResp(); SubscribeResp subscribeResp=new SubscribeResp();
//如果请求ID出货单号或者快递单号为空,则不向快递100请求订阅自己组合返回信息 //如果请求ID出货单号或者快递单号为空,则不向快递100请求订阅自己组合返回信息
if(StringUtils.isEmpty(deliveryNo) || StringUtils.isEmpty(expressNo) || StringUtils.isEmpty(requestId)){ if(StringUtils.isEmpty(deliveryNum) || StringUtils.isEmpty(expressNum) || StringUtils.isEmpty(requestId)){
subscribeResp.setMessage("请求ID、快递单号或出货单号不可为空"); subscribeResp.setMessage("请求ID、快递单号或出货单号不可为空");
subscribeResp.setResult(false); subscribeResp.setResult(false);
subscribeResp.setReturnCode("700"); subscribeResp.setReturnCode("700");
@ -188,7 +188,7 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
//组合向快递100推送订阅请求的参数 //组合向快递100推送订阅请求的参数
ExpSubscribe expSubscribe=new ExpSubscribe(); ExpSubscribe expSubscribe=new ExpSubscribe();
expSubscribe.setSid(Long.getLong(requestId)); //时间戳 expSubscribe.setSid(Long.getLong(requestId)); //时间戳
expSubscribe.setNumber(expressNo); expSubscribe.setNumber(expressNum);
expSubscribe.setCompany(company); expSubscribe.setCompany(company);
expSubscribe.setPhone(phone); expSubscribe.setPhone(phone);
expSubscribe.setSubscribeTime(subscribeTime); //订阅时间 expSubscribe.setSubscribeTime(subscribeTime); //订阅时间
@ -201,8 +201,8 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
//根据快递100的订阅返回结果组合返回Topgp的JSON字符串 //根据快递100的订阅返回结果组合返回Topgp的JSON字符串
Map<String,Object> map= new HashMap<>(); Map<String,Object> map= new HashMap<>();
map.put("requestId",requestId); //从TOPGP传过来的requestId 时间戳 map.put("requestId",requestId); //从TOPGP传过来的requestId 时间戳
map.put("deliveryNo",deliveryNo); //出货单号 map.put("deliveryNum",deliveryNum); //出货单号
map.put("expressNo",expressNo); //快递单号 map.put("expressNum",expressNum); //快递单号
map.put("responseStr",subscribeResp.getMessage()); //返回消息 map.put("responseStr",subscribeResp.getMessage()); //返回消息
map.put("responseCode",subscribeResp.getReturnCode()); //返回码 map.put("responseCode",subscribeResp.getReturnCode()); //返回码
map.put("result",subscribeResp.isResult()); //订阅结果 map.put("result",subscribeResp.isResult()); //订阅结果
@ -214,8 +214,8 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
ExpTopgpLog expTopgpLog=new ExpTopgpLog(); ExpTopgpLog expTopgpLog=new ExpTopgpLog();
expTopgpLog.setRequestId(requestId); expTopgpLog.setRequestId(requestId);
expTopgpLog.setRequestType("fromTopgp"); expTopgpLog.setRequestType("fromTopgp");
expTopgpLog.setExpressNumber(expressNo); expTopgpLog.setExpressNum(expressNum);
expTopgpLog.setDeliveryNumber(deliveryNo); expTopgpLog.setDeliveryNum(deliveryNum);
expTopgpLog.setRequestStr(contentJson.toString()); expTopgpLog.setRequestStr(contentJson.toString());
expTopgpLog.setRequestTime(subscribeTime); expTopgpLog.setRequestTime(subscribeTime);
expTopgpLog.setResponseCode(subscribeResp.getReturnCode()); expTopgpLog.setResponseCode(subscribeResp.getReturnCode());
@ -257,9 +257,9 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
ExpTopgpLog expTopgpLog=new ExpTopgpLog(); ExpTopgpLog expTopgpLog=new ExpTopgpLog();
expTopgpLog.setRequestId(contentJson.getString("requestId")); expTopgpLog.setRequestId(contentJson.getString("requestId"));
expTopgpLog.setRequestType("topgpSigned"); expTopgpLog.setRequestType("topgpSigned");
expTopgpLog.setExpressNumber(contentJson.getString("expressNum")); expTopgpLog.setExpressNum(contentJson.getString("expressNum"));
expTopgpLog.setRequestStr(contentJson.toString()); expTopgpLog.setRequestStr(contentJson.toString());
expTopgpLog.setDeliveryNumber(deliveryNum); expTopgpLog.setDeliveryNum(deliveryNum);
expTopgpLog.setRequestTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss")); expTopgpLog.setRequestTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
expTopgpLog.setResponseCode("200"); expTopgpLog.setResponseCode("200");
expTopgpLog.setResponseStr(returnStr); expTopgpLog.setResponseStr(returnStr);
@ -357,7 +357,7 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
ExpTopgpLog expTopgpLog=new ExpTopgpLog(); ExpTopgpLog expTopgpLog=new ExpTopgpLog();
expTopgpLog.setRequestId(requestMap.get("requestId").toString()); expTopgpLog.setRequestId(requestMap.get("requestId").toString());
expTopgpLog.setRequestType("toTopgp"); expTopgpLog.setRequestType("toTopgp");
expTopgpLog.setExpressNumber(requestMap.get("expressNum").toString()); expTopgpLog.setExpressNum(requestMap.get("expressNum").toString());
expTopgpLog.setRequestStr(JSONObject.toJSONString(requestMap)); expTopgpLog.setRequestStr(JSONObject.toJSONString(requestMap));
expTopgpLog.setRequestTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss")); expTopgpLog.setRequestTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
JSONObject object = jsonObject.getJSONObject("execution"); JSONObject object = jsonObject.getJSONObject("execution");

View File

@ -8,8 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="sid" column="sid" /> <result property="sid" column="sid" />
<result property="requestId" column="requestId" /> <result property="requestId" column="requestId" />
<result property="requestType" column="requestType" /> <result property="requestType" column="requestType" />
<result property="expressNumber" column="expressNumber" /> <result property="expressNum" column="expressNum" />
<result property="deliveryNumber" column="deliveryNumber" /> <result property="deliveryNum" column="deliveryNum" />
<result property="requestStr" column="requestStr" /> <result property="requestStr" column="requestStr" />
<result property="requestTime" column="requestTime" /> <result property="requestTime" column="requestTime" />
<result property="responseCode" column="responseCode" /> <result property="responseCode" column="responseCode" />
@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectExpTopgpLogVo"> <sql id="selectExpTopgpLogVo">
select sid, requestId, requestType, expressNumber, deliveryNumber, requestStr, requestTime, responseCode, responseStr from exp_topgp_log select sid, requestId, requestType, expressNum, deliveryNum, requestStr, requestTime, responseCode, responseStr from exp_topgp_log
</sql> </sql>
<select id="selectExpTopgpLogList" parameterType="ExpTopgpLog" resultMap="ExpTopgpLogResult"> <select id="selectExpTopgpLogList" parameterType="ExpTopgpLog" resultMap="ExpTopgpLogResult">
@ -25,8 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="requestId != null and requestId != ''"> and requestId = #{requestId}</if> <if test="requestId != null and requestId != ''"> and requestId = #{requestId}</if>
<if test="requestType != null and requestType != ''"> and requestType = #{requestType}</if> <if test="requestType != null and requestType != ''"> and requestType = #{requestType}</if>
<if test="expressNumber != null and expressNumber != ''"> and expressNumber = #{expressNumber}</if> <if test="expressNum != null and expressNum != ''"> and expressNum = #{expressNum}</if>
<if test="deliveryNumber != null and deliveryNumber != ''"> and deliveryNumber = #{deliveryNumber}</if> <if test="deliveryNum != null and deliveryNum != ''"> and deliveryNum = #{deliveryNum}</if>
<if test="requestStr != null and requestStr != ''"> and requestStr = #{requestStr}</if> <if test="requestStr != null and requestStr != ''"> and requestStr = #{requestStr}</if>
<if test="requestTime != null and requestTime != ''"> and requestTime = #{requestTime}</if> <if test="requestTime != null and requestTime != ''"> and requestTime = #{requestTime}</if>
<if test="responseCode != null and responseCode != ''"> and responseCode = #{responseCode}</if> <if test="responseCode != null and responseCode != ''"> and responseCode = #{responseCode}</if>
@ -44,8 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="requestId != null">requestId,</if> <if test="requestId != null">requestId,</if>
<if test="requestType != null">requestType,</if> <if test="requestType != null">requestType,</if>
<if test="expressNumber != null">expressNumber,</if> <if test="expressNum != null">expressNum,</if>
<if test="deliveryNumber != null">deliveryNumber,</if> <if test="deliveryNum != null">deliveryNum,</if>
<if test="requestStr != null">requestStr,</if> <if test="requestStr != null">requestStr,</if>
<if test="requestTime != null">requestTime,</if> <if test="requestTime != null">requestTime,</if>
<if test="responseCode != null">responseCode,</if> <if test="responseCode != null">responseCode,</if>
@ -54,8 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="requestId != null">#{requestId},</if> <if test="requestId != null">#{requestId},</if>
<if test="requestType != null">#{requestType},</if> <if test="requestType != null">#{requestType},</if>
<if test="expressNumber != null">#{expressNumber},</if> <if test="expressNum != null">#{expressNum},</if>
<if test="deliveryNumber != null">#{deliveryNumber},</if> <if test="deliveryNum != null">#{deliveryNum},</if>
<if test="requestStr != null">#{requestStr},</if> <if test="requestStr != null">#{requestStr},</if>
<if test="requestTime != null">#{requestTime},</if> <if test="requestTime != null">#{requestTime},</if>
<if test="responseCode != null">#{responseCode},</if> <if test="responseCode != null">#{responseCode},</if>
@ -68,8 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="requestId != null">requestId = #{requestId},</if> <if test="requestId != null">requestId = #{requestId},</if>
<if test="requestType != null">requestType = #{requestType},</if> <if test="requestType != null">requestType = #{requestType},</if>
<if test="expressNumber != null">expressNumber = #{expressNumber},</if> <if test="expressNum != null">expressNum = #{expressNum},</if>
<if test="deliveryNumber != null">deliveryNumber = #{deliveryNumber},</if> <if test="deliveryNum != null">deliveryNum = #{deliveryNum},</if>
<if test="requestStr != null">requestStr = #{requestStr},</if> <if test="requestStr != null">requestStr = #{requestStr},</if>
<if test="requestTime != null">requestTime = #{requestTime},</if> <if test="requestTime != null">requestTime = #{requestTime},</if>
<if test="responseCode != null">responseCode = #{responseCode},</if> <if test="responseCode != null">responseCode = #{responseCode},</if>

View File

@ -21,13 +21,13 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">快递单:</label> <label class="col-sm-3 control-label">快递单:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="expressNumber" class="form-control" type="text"> <input name="expressNum" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">出货单号:</label> <label class="col-sm-3 control-label">出货单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="deliveryNumber" class="form-control" type="text"> <input name="deliveryNum" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -22,13 +22,13 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">快递单:</label> <label class="col-sm-3 control-label">快递单:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="expressNumber" th:field="*{expressNumber}" class="form-control" type="text"> <input name="expressNum" th:field="*{expressNum}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">出货单号:</label> <label class="col-sm-3 control-label">出货单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="deliveryNumber" th:field="*{deliveryNumber}" class="form-control" type="text"> <input name="deliveryNum" th:field="*{deliveryNum}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -20,11 +20,11 @@
</li> </li>
<li> <li>
<label>快递单:</label> <label>快递单:</label>
<input type="text" name="expressNumber"/> <input type="text" name="expressNum"/>
</li> </li>
<li> <li>
<label>出货单号:</label> <label>出货单号:</label>
<input type="text" name="deliveryNumber"/> <input type="text" name="deliveryNum"/>
</li> </li>
<li> <li>
<label>请求时间:</label> <label>请求时间:</label>
@ -96,11 +96,11 @@
title: '请求类型' title: '请求类型'
}, },
{ {
field: 'expressNumber', field: 'expressNum',
title: '快递单' title: '快递单'
}, },
{ {
field: 'deliveryNumber', field: 'deliveryNum',
title: '出货单号' title: '出货单号'
}, },
{ {