feat(points): 增加积分兑换联系信息

This commit is contained in:
yml2213
2026-11-04 19:51:17 +08:00
parent 95aeee7eb3
commit f439e23eb8
9 changed files with 425 additions and 25 deletions
+10 -1
View File
@@ -56,7 +56,10 @@ type ProductRequest struct {
}
type RedeemRequest struct {
Quantity int `json:"quantity" binding:"required,min=1,max=10"`
Quantity int `json:"quantity" binding:"required,min=1,max=10"`
ContactName string `json:"contact_name" binding:"required,max=32"`
ContactPhone string `json:"contact_phone" binding:"required,len=11,numeric"`
CustomerRemark string `json:"customer_remark" binding:"max=500"`
}
type CompleteRedemptionRequest struct {
@@ -73,6 +76,9 @@ type RedemptionDTO struct {
ProductTitle string `json:"product_title"`
ProductCoverURL string `json:"product_cover_url"`
RedemptionInstructions string `json:"redemption_instructions"`
ContactName string `json:"contact_name"`
ContactPhone string `json:"contact_phone"`
CustomerRemark string `json:"customer_remark"`
PointsPrice int64 `json:"points_price"`
Quantity int `json:"quantity"`
TotalPoints int64 `json:"total_points"`
@@ -111,6 +117,9 @@ func toRedemptionDTO(item model.PointsMallRedemption) RedemptionDTO {
ProductTitle: item.ProductTitle,
ProductCoverURL: item.ProductCoverURL,
RedemptionInstructions: item.RedemptionInstructions,
ContactName: item.ContactName,
ContactPhone: item.ContactPhone,
CustomerRemark: item.CustomerRemark,
PointsPrice: item.PointsPrice,
Quantity: item.Quantity,
TotalPoints: item.TotalPoints,