Update redemption.go
This commit is contained in:
parent
569f9721f5
commit
ab94a57fa1
@ -85,21 +85,21 @@ func AddRedemption(c *gin.Context) {
|
|||||||
if len(redemption.Name) == 0 || len(redemption.Name) > 20 {
|
if len(redemption.Name) == 0 || len(redemption.Name) > 20 {
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
"success": false,
|
"success": false,
|
||||||
"message": "兑换码名称长度必须在1-20之间",
|
"message": "Redemption code name length must be between 1-20",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if redemption.Count <= 0 {
|
if redemption.Count <= 0 {
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
"success": false,
|
"success": false,
|
||||||
"message": "兑换码个数必须大于0",
|
"message": "The number of redemption codes must be greater than 0",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if redemption.Count > 100 {
|
if redemption.Count > 100 {
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
"success": false,
|
"success": false,
|
||||||
"message": "一次兑换码批量生成的个数不能大于 100",
|
"message": "The number of redemption codes generated in batches cannot be greater than 100",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user