This commit is contained in:
laodaming
2023-07-11 17:08:19 +08:00
parent 406d62a894
commit 98c5727c7e
60 changed files with 407 additions and 161 deletions

View File

@@ -43,12 +43,12 @@ func (l *GetOrderInvoiceLogic) GetOrderInvoice(req *types.GetOrderInvoiceReq, us
userModel := gmodel.NewFsUserModel(l.svcCtx.MysqlConn)
user, err := userModel.FindUserById(l.ctx, userinfo.UserId)
if err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "user not found")
}
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to get user info")
}
if user.Id == 0 {
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "user not found")
}
if req.Sn == "" {
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "param sn is required")
}