This commit is contained in:
邹宗楠
2022-12-20 18:01:11 +08:00
parent fd61639e7f
commit 72981c504e
2 changed files with 8 additions and 12 deletions

View File

@@ -149,18 +149,20 @@ func (c *LogisticsController) LogisticsQuery() {
Message: "运单账号不存在",
}
c.ServeJSON()
return
}
// 查询订单的运单是否存在
data, err := dao.GetWayBillsByWayBillId(dao.GetDB(), param.TrackNo)
if err != nil || len(data) == 0 {
globals.SugarLogger.Debugf("根据单号查询运单数据错误:%s", err)
globals.SugarLogger.Debugf("根据单号查询运单数据错误:%s,运单号 :%s", err.Error(), param.TrackNo)
c.Data["json"] = LogisticsQueryRest{
Result: false,
ReturnCode: "1002",
Message: "运单账号不存在",
}
c.ServeJSON()
return
}
returnParam := &LogisticsQueryRest{