This commit is contained in:
邹宗楠
2022-11-03 18:31:47 +08:00
parent e2e11949e9
commit 08a8a47db7
8 changed files with 156 additions and 14 deletions

View File

@@ -59,7 +59,8 @@ func (c *LogisticsController) LogisticsRegister() {
if err != nil {
globals.SugarLogger.Debugf("根据单号查询运单数据错误:%s", err)
}
if len(data) <= 0 {
if len(data) == 0 || err != nil {
c.Data["json"] = LogisticsRegisterResp{
Result: false,
ReturnCode: "1002",
@@ -154,15 +155,12 @@ func (c *LogisticsController) LogisticsQuery() {
data, err := dao.GetWayBillsByWayBillId(dao.GetDB(), param.TrackNo)
if err != nil {
globals.SugarLogger.Debugf("根据单号查询运单数据错误:%s", err)
}
if len(data) <= 0 {
c.Data["json"] = LogisticsRegisterResp{
c.Data["json"] = LogisticsQueryRest{
Result: false,
ReturnCode: "1002",
Message: "号不存在",
Message: "运单账号不存在",
}
c.ServeJSON()
return
}
returnParam := &LogisticsQueryRest{