统一快递单号,出货单号命名为(expressNum,deliveryNum)
This commit is contained in:
parent
7cd3135e54
commit
2d5f955aeb
|
|
@ -55,7 +55,7 @@ public class ExpSubsPushApiController extends BaseController {
|
|||
//接受topgp订阅,
|
||||
@Log(title = "快递订阅", businessType = BusinessType.OTHER)
|
||||
@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({
|
||||
@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)
|
||||
|
|
@ -69,8 +69,8 @@ public class ExpSubsPushApiController extends BaseController {
|
|||
@Log(title = "TOPGP出货已转签收", businessType = BusinessType.OTHER)
|
||||
@CrossOrigin
|
||||
@ApiOperation(value="接受TOPGP已转签收消息推送",notes = "request body格式: {\"requestId\":\"topgpSign1628584040740\"," +
|
||||
"\"signedInfoList\":[{\"deliveryNo\":\"S301-2108020001\",\"signNo\":\"S501-2108020001\"},{\"deliveryNo\":\"S301-2108020002\",\"signNo\":\"S501-2108020002\"}]," +
|
||||
"\"expressNo\":\"300444235610\",\"company\":\"annengwuliu\",\"phone\":\"13800138000\",\"status\":\"0\"}"
|
||||
"\"signedInfoList\":[{\"deliveryNum\":\"S301-2108020001\",\"signNo\":\"S501-2108020001\"},{\"deliveryNum\":\"S301-2108020002\",\"signNo\":\"S501-2108020002\"}]," +
|
||||
"\"expressNum\":\"300444235610\",\"company\":\"annengwuliu\",\"phone\":\"13800138000\",\"status\":\"0\"}"
|
||||
)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String", dataTypeClass = String.class),
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ public class ExpTopgpLog extends BaseEntity
|
|||
|
||||
/** 快递单 */
|
||||
@Excel(name = "快递单")
|
||||
private String expressNumber;
|
||||
private String expressNum;
|
||||
|
||||
/** 出货单号 */
|
||||
@Excel(name = "出货单号")
|
||||
private String deliveryNumber;
|
||||
private String deliveryNum;
|
||||
|
||||
/** 请求报文 */
|
||||
@Excel(name = "请求报文")
|
||||
|
|
@ -77,23 +77,23 @@ public class ExpTopgpLog extends BaseEntity
|
|||
{
|
||||
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)
|
||||
{
|
||||
|
|
@ -138,8 +138,8 @@ public class ExpTopgpLog extends BaseEntity
|
|||
.append("sid", getSid())
|
||||
.append("requestId", getRequestId())
|
||||
.append("requestType", getRequestType())
|
||||
.append("expressNumber", getExpressNumber())
|
||||
.append("deliveryNumber", getDeliveryNumber())
|
||||
.append("expressNum", getExpressNum())
|
||||
.append("deliveryNum", getDeliveryNum())
|
||||
.append("requestStr", getRequestStr())
|
||||
.append("requestTime", getRequestTime())
|
||||
.append("responseCode", getResponseCode())
|
||||
|
|
|
|||
|
|
@ -172,15 +172,15 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
|
|||
return "貌似没有接受到任何参数!";
|
||||
}
|
||||
String requestId=contentJson.getString("requestId"); //TOPGP请求ID,年月日时分稍毫秒
|
||||
String deliveryNo= contentJson.getString("deliveryNo"); //TOPGP出货单号
|
||||
String expressNo = contentJson.getString("expressNo"); //TOPGP快递单号
|
||||
String deliveryNum= contentJson.getString("deliveryNum"); //TOPGP出货单号
|
||||
String expressNum = contentJson.getString("expressNum"); //TOPGP快递单号
|
||||
String company = contentJson.getString("company"); //TOPGP物流公司编号
|
||||
String phone = contentJson.getString("phone"); //TOPGP出货单号
|
||||
//Long timeStamp = System.currentTimeMillis(); //获取时间戳
|
||||
String subscribeTime= DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"); //获取订阅时间
|
||||
SubscribeResp subscribeResp=new SubscribeResp();
|
||||
//如果请求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.setResult(false);
|
||||
subscribeResp.setReturnCode("700");
|
||||
|
|
@ -188,7 +188,7 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
|
|||
//组合向快递100推送订阅请求的参数
|
||||
ExpSubscribe expSubscribe=new ExpSubscribe();
|
||||
expSubscribe.setSid(Long.getLong(requestId)); //时间戳
|
||||
expSubscribe.setNumber(expressNo);
|
||||
expSubscribe.setNumber(expressNum);
|
||||
expSubscribe.setCompany(company);
|
||||
expSubscribe.setPhone(phone);
|
||||
expSubscribe.setSubscribeTime(subscribeTime); //订阅时间
|
||||
|
|
@ -201,8 +201,8 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
|
|||
//根据快递100的订阅返回结果,组合返回Topgp的JSON字符串
|
||||
Map<String,Object> map= new HashMap<>();
|
||||
map.put("requestId",requestId); //从TOPGP传过来的requestId, 时间戳
|
||||
map.put("deliveryNo",deliveryNo); //出货单号
|
||||
map.put("expressNo",expressNo); //快递单号
|
||||
map.put("deliveryNum",deliveryNum); //出货单号
|
||||
map.put("expressNum",expressNum); //快递单号
|
||||
map.put("responseStr",subscribeResp.getMessage()); //返回消息
|
||||
map.put("responseCode",subscribeResp.getReturnCode()); //返回码
|
||||
map.put("result",subscribeResp.isResult()); //订阅结果
|
||||
|
|
@ -214,8 +214,8 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
|
|||
ExpTopgpLog expTopgpLog=new ExpTopgpLog();
|
||||
expTopgpLog.setRequestId(requestId);
|
||||
expTopgpLog.setRequestType("fromTopgp");
|
||||
expTopgpLog.setExpressNumber(expressNo);
|
||||
expTopgpLog.setDeliveryNumber(deliveryNo);
|
||||
expTopgpLog.setExpressNum(expressNum);
|
||||
expTopgpLog.setDeliveryNum(deliveryNum);
|
||||
expTopgpLog.setRequestStr(contentJson.toString());
|
||||
expTopgpLog.setRequestTime(subscribeTime);
|
||||
expTopgpLog.setResponseCode(subscribeResp.getReturnCode());
|
||||
|
|
@ -257,9 +257,9 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
|
|||
ExpTopgpLog expTopgpLog=new ExpTopgpLog();
|
||||
expTopgpLog.setRequestId(contentJson.getString("requestId"));
|
||||
expTopgpLog.setRequestType("topgpSigned");
|
||||
expTopgpLog.setExpressNumber(contentJson.getString("expressNum"));
|
||||
expTopgpLog.setExpressNum(contentJson.getString("expressNum"));
|
||||
expTopgpLog.setRequestStr(contentJson.toString());
|
||||
expTopgpLog.setDeliveryNumber(deliveryNum);
|
||||
expTopgpLog.setDeliveryNum(deliveryNum);
|
||||
expTopgpLog.setRequestTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
|
||||
expTopgpLog.setResponseCode("200");
|
||||
expTopgpLog.setResponseStr(returnStr);
|
||||
|
|
@ -357,7 +357,7 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
|
|||
ExpTopgpLog expTopgpLog=new ExpTopgpLog();
|
||||
expTopgpLog.setRequestId(requestMap.get("requestId").toString());
|
||||
expTopgpLog.setRequestType("toTopgp");
|
||||
expTopgpLog.setExpressNumber(requestMap.get("expressNum").toString());
|
||||
expTopgpLog.setExpressNum(requestMap.get("expressNum").toString());
|
||||
expTopgpLog.setRequestStr(JSONObject.toJSONString(requestMap));
|
||||
expTopgpLog.setRequestTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
|
||||
JSONObject object = jsonObject.getJSONObject("execution");
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="sid" column="sid" />
|
||||
<result property="requestId" column="requestId" />
|
||||
<result property="requestType" column="requestType" />
|
||||
<result property="expressNumber" column="expressNumber" />
|
||||
<result property="deliveryNumber" column="deliveryNumber" />
|
||||
<result property="expressNum" column="expressNum" />
|
||||
<result property="deliveryNum" column="deliveryNum" />
|
||||
<result property="requestStr" column="requestStr" />
|
||||
<result property="requestTime" column="requestTime" />
|
||||
<result property="responseCode" column="responseCode" />
|
||||
|
|
@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<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>
|
||||
|
||||
<select id="selectExpTopgpLogList" parameterType="ExpTopgpLog" resultMap="ExpTopgpLogResult">
|
||||
|
|
@ -25,8 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<where>
|
||||
<if test="requestId != null and requestId != ''"> and requestId = #{requestId}</if>
|
||||
<if test="requestType != null and requestType != ''"> and requestType = #{requestType}</if>
|
||||
<if test="expressNumber != null and expressNumber != ''"> and expressNumber = #{expressNumber}</if>
|
||||
<if test="deliveryNumber != null and deliveryNumber != ''"> and deliveryNumber = #{deliveryNumber}</if>
|
||||
<if test="expressNum != null and expressNum != ''"> and expressNum = #{expressNum}</if>
|
||||
<if test="deliveryNum != null and deliveryNum != ''"> and deliveryNum = #{deliveryNum}</if>
|
||||
<if test="requestStr != null and requestStr != ''"> and requestStr = #{requestStr}</if>
|
||||
<if test="requestTime != null and requestTime != ''"> and requestTime = #{requestTime}</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=",">
|
||||
<if test="requestId != null">requestId,</if>
|
||||
<if test="requestType != null">requestType,</if>
|
||||
<if test="expressNumber != null">expressNumber,</if>
|
||||
<if test="deliveryNumber != null">deliveryNumber,</if>
|
||||
<if test="expressNum != null">expressNum,</if>
|
||||
<if test="deliveryNum != null">deliveryNum,</if>
|
||||
<if test="requestStr != null">requestStr,</if>
|
||||
<if test="requestTime != null">requestTime,</if>
|
||||
<if test="responseCode != null">responseCode,</if>
|
||||
|
|
@ -54,8 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="requestId != null">#{requestId},</if>
|
||||
<if test="requestType != null">#{requestType},</if>
|
||||
<if test="expressNumber != null">#{expressNumber},</if>
|
||||
<if test="deliveryNumber != null">#{deliveryNumber},</if>
|
||||
<if test="expressNum != null">#{expressNum},</if>
|
||||
<if test="deliveryNum != null">#{deliveryNum},</if>
|
||||
<if test="requestStr != null">#{requestStr},</if>
|
||||
<if test="requestTime != null">#{requestTime},</if>
|
||||
<if test="responseCode != null">#{responseCode},</if>
|
||||
|
|
@ -68,8 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="requestId != null">requestId = #{requestId},</if>
|
||||
<if test="requestType != null">requestType = #{requestType},</if>
|
||||
<if test="expressNumber != null">expressNumber = #{expressNumber},</if>
|
||||
<if test="deliveryNumber != null">deliveryNumber = #{deliveryNumber},</if>
|
||||
<if test="expressNum != null">expressNum = #{expressNum},</if>
|
||||
<if test="deliveryNum != null">deliveryNum = #{deliveryNum},</if>
|
||||
<if test="requestStr != null">requestStr = #{requestStr},</if>
|
||||
<if test="requestTime != null">requestTime = #{requestTime},</if>
|
||||
<if test="responseCode != null">responseCode = #{responseCode},</if>
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="expressNumber" class="form-control" type="text">
|
||||
<input name="expressNum" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">出货单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="deliveryNumber" class="form-control" type="text">
|
||||
<input name="deliveryNum" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单:</label>
|
||||
<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 class="form-group">
|
||||
<label class="col-sm-3 control-label">出货单号:</label>
|
||||
<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 class="form-group">
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@
|
|||
</li>
|
||||
<li>
|
||||
<label>快递单:</label>
|
||||
<input type="text" name="expressNumber"/>
|
||||
<input type="text" name="expressNum"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>出货单号:</label>
|
||||
<input type="text" name="deliveryNumber"/>
|
||||
<input type="text" name="deliveryNum"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>请求时间:</label>
|
||||
|
|
@ -96,11 +96,11 @@
|
|||
title: '请求类型'
|
||||
},
|
||||
{
|
||||
field: 'expressNumber',
|
||||
field: 'expressNum',
|
||||
title: '快递单'
|
||||
},
|
||||
{
|
||||
field: 'deliveryNumber',
|
||||
field: 'deliveryNum',
|
||||
title: '出货单号'
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue