From eccc482dbf2ccf8adb0aaa9a96f3522577619a9b Mon Sep 17 00:00:00 2001 From: lijikun Date: Sat, 28 Dec 2024 17:57:15 +0800 Subject: [PATCH] =?UTF-8?q?12.28=E6=97=A5=E4=B8=8B=E5=8D=88=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=AF=B7=E6=B1=82=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/v1/couponusers/couponUsers.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/api/v1/couponusers/couponUsers.go b/api/v1/couponusers/couponUsers.go index 2f700ff..cb92860 100644 --- a/api/v1/couponusers/couponUsers.go +++ b/api/v1/couponusers/couponUsers.go @@ -1,11 +1,11 @@ package couponusers type GetCouponUsersReq struct { - CouponId int `json:"couponId" dc:"卡券id"` - Jwcode int `json:"jwcode" dc:"查询条件中的精网号"` + CouponId int `json:"couponId" v:"required#卡券id不能为空" dc:"卡券id"` + Jwcode int `json:"jwcode" dc:"查询条件中的精网号"` Name string `json:"name" dc:"查询条件中的名字"` - PageNo int `json:"pageNo" dc:"页码"` - PageSize int `json:"pageSize" dc:"每页数量"` + PageNo int `json:"pageNo" v:"required#分页信息不能为空" dc:"页码"` + PageSize int `json:"pageSize" v:"required#分页信息不能为空" dc:"每页数量"` } type GetCouponUsersRes struct { @@ -16,19 +16,19 @@ type GetCouponUsersRes struct { } type DelCouponUserByJwcodeReq struct { - CouponId int `json:"couponId" dc:"卡券id"` - Jwcode int `json:"jwcode" dc:"精网号"` + CouponId int `json:"couponId" v:"required#卡券id不能为空" dc:"卡券id"` + Jwcode int `json:"jwcode" v:"required#精网号不能为空" dc:"精网号"` } type InsertCouponUserReq struct { - CouponId int `json:"couponId" dc:"卡券id"` - Jwcodes []int `json:"jwcodes" dc:"精网号"` + CouponId int `json:"couponId" v:"required#卡券id不能为空" dc:"卡券id"` + Jwcodes []int `json:"jwcodes" v:"required#精网号不能为空" dc:"精网号"` } type IssueCouponUserReq struct { - CouponId int `json:"couponId" dc:"卡券id"` + CouponId int `json:"couponId" v:"required#卡券id不能为空" dc:"卡券id"` } type IsEligibleUserReq struct { - CouponIds []int `json:"couponIds" dc:"能抽出的卡券id"` + CouponIds []int `json:"couponIds" v:"required#用于检测是否已抽取,不能为空" dc:"能抽出的卡券id"` }