fix:订单发票调整
This commit is contained in:
parent
ef06ecd774
commit
a3197b7d55
|
@ -378,12 +378,12 @@ func (d *defaultOrder) Invoice(ctx context.Context, in *InvoiceReq) (res *Invoic
|
|||
zipCode = ress.OrderDetail.DeliveryAddress.ZipCode
|
||||
} else {
|
||||
// 邮箱
|
||||
model1 := d.MysqlConn.Where("is_del = ?", 0).Model(&gmodel.FsUser{})
|
||||
modelUser := d.MysqlConn.Model(&gmodel.FsUser{})
|
||||
if in.UserId != 0 {
|
||||
model1 = model.Where("user_id = ?", in.UserId)
|
||||
modelUser = modelUser.Where("id = ?", in.UserId)
|
||||
}
|
||||
var userInfo = gmodel.FsUser{}
|
||||
result1 := model1.Take(&userInfo)
|
||||
var userInfo = &gmodel.FsUser{}
|
||||
result1 := modelUser.Debug().Take(&userInfo)
|
||||
if result1.Error != nil {
|
||||
if errors.Is(result1.Error, gorm.ErrRecordNotFound) {
|
||||
errorCode = *basic.CodeErrOrderCreatePrePaymentInfoNoFound
|
||||
|
@ -395,7 +395,9 @@ func (d *defaultOrder) Invoice(ctx context.Context, in *InvoiceReq) (res *Invoic
|
|||
ErrorCode: errorCode,
|
||||
}, result1.Error
|
||||
}
|
||||
name = *userInfo.Email
|
||||
if userInfo.Email != nil {
|
||||
name = *userInfo.Email
|
||||
}
|
||||
}
|
||||
|
||||
var products string
|
||||
|
|
Loading…
Reference in New Issue
Block a user