fix: 退款参数校验,非本人id 操作

This commit is contained in:
wangxinyu 2024-12-09 12:21:42 +08:00
parent 10af8eab2d
commit 468b1cbea9
1 changed files with 5 additions and 0 deletions

View File

@ -1133,6 +1133,11 @@ func (v *Vas) ZoneRefundAudit(ctx *gin.Context, req *vasproto.ZoneRefundAuditReq
return fmt.Errorf("审核订单不存在")
}
if info.BMid != req.Mid {
logger.Error("ZoneRefundAudit, Not personally audited the order, mid: %v, zid: %v, auditId: %v", req.Mid, req.Zid, req.AuditId)
return fmt.Errorf("非本人审核订单")
}
if info.RefundsStatus == dbstruct.RefundsApproved || info.RefundsStatus == dbstruct.RefundsRejected || info.RefundsStatus == dbstruct.RefundsOvertime {
logger.Error("ZoneRefundAudit, refund has been approved, mid: %v, zid: %v, auditId: %v", req.Mid, req.Zid, req.AuditId)
return fmt.Errorf("退款订单已审核")