|
@@ -358,6 +358,10 @@ func GroupBuyCancel(c *gin.Context) {
|
|
|
fmt.Println("projectInfo.CancelNum = ", projectInfo.CancelNum)
|
|
|
fmt.Println("v.CancelNum = ", v.CancelNum)
|
|
|
|
|
|
+ if v.CancelNum <= 0 {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+
|
|
|
if projectInfo.CancelNum >= cancelNum+v.CancelNum && v.CancelNum > 0 {
|
|
|
isCancel = true
|
|
|
for i := 0; i < v.CancelNum; i++ {
|
|
@@ -371,6 +375,9 @@ func GroupBuyCancel(c *gin.Context) {
|
|
|
|
|
|
activeCancelLogList = append(activeCancelLogList, activeCancelLogInfo)
|
|
|
}
|
|
|
+ } else {
|
|
|
+ app.Error(c, 500, errors.New("核销次数不够"), "核销次数不够")
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
}
|