mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-07 17:53:42 +08:00
fix: fixed bug for gorm insert record failed and Error is not nil
This commit is contained in:
@@ -232,7 +232,7 @@ func (h *PaymentHandler) PayQrcode(c *gin.Context) {
|
||||
Remark: utils.JsonEncode(remark),
|
||||
}
|
||||
res = h.db.Create(&order)
|
||||
if res.Error != nil {
|
||||
if res.Error != nil || res.RowsAffected == 0 {
|
||||
resp.ERROR(c, "error with create order: "+res.Error.Error())
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user