修复了Code码重复的问题
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user