修复了Code码重复的问题

This commit is contained in:
eson
2023-06-20 19:44:31 +08:00
parent e6971575f1
commit 37f2326b21
2 changed files with 13 additions and 8 deletions

View File

@@ -72,8 +72,6 @@ func (l *UserOderDeleteLogic) UserOderDelete(req *types.RequestOrderId, userinfo
return resp.SetStatus(basic.CodeOrderNotCancelledErr)
}
//这里是将给定的PHP代码翻译成Golang代码:
uOrder := &gmodel.FsOrder{
Id: orderId,
}
@@ -136,6 +134,11 @@ func (l *UserOderDeleteLogic) UserOderDelete(req *types.RequestOrderId, userinfo
PaymentIntent: pay.TradeNo,
})
}
if err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
return resp.SetStatus(basic.CodeApiErr)
}
}
// if err == nil && err == nil {
// return ResponseSuccess(200, "Cancel successfully", order)