@@ -471,6 +471,10 @@ func ExchangeEnergy(c *gin.Context) { | |||||
e.OutErr(c, e.ERR_BALANCE_NOT_ENOUGH, nil) | e.OutErr(c, e.ERR_BALANCE_NOT_ENOUGH, nil) | ||||
return | return | ||||
} | } | ||||
if utils.StrToFloat64(req.EnergyAmount) <= 0 { | |||||
e.OutErr(c, 400, e.NewErr(400, "请输入能量值")) | |||||
return | |||||
} | |||||
// 5. 调用降价公式 | // 5. 调用降价公式 | ||||
err, calcPriceReductionFormula := egg_energy.CalcPriceReductionFormula(req.EnergyAmount, eggEnergyCoreData, utils.IntToStr(user.Level), *setting) | err, calcPriceReductionFormula := egg_energy.CalcPriceReductionFormula(req.EnergyAmount, eggEnergyCoreData, utils.IntToStr(user.Level), *setting) | ||||
@@ -167,6 +167,10 @@ func WithdrawApply(c *gin.Context) { | |||||
e.OutErr(c, err1.Code, err1.Error()) | e.OutErr(c, err1.Code, err1.Error()) | ||||
return | return | ||||
} | } | ||||
if utils.StrToFloat64(req.Amount) <= 0 { | |||||
e.OutErr(c, 400, e.NewErr(400, "请输入金额")) | |||||
return | |||||
} | |||||
user := svc.GetUser(c) | user := svc.GetUser(c) | ||||
var userId, openId string | var userId, openId string | ||||
var kind int | var kind int | ||||
@@ -5692,7 +5692,11 @@ const docTemplate = `{ | |||||
"type": "string" | "type": "string" | ||||
}, | }, | ||||
"total_egg_energy": { | "total_egg_energy": { | ||||
"description": "总蛋蛋能量", | |||||
"description": "总蛋蛋能量 (个人+团队+预估)", | |||||
"type": "string" | |||||
}, | |||||
"total_egg_energy_value": { | |||||
"description": "总蛋蛋能量价值", | |||||
"type": "string" | "type": "string" | ||||
} | } | ||||
} | } | ||||
@@ -5686,7 +5686,11 @@ | |||||
"type": "string" | "type": "string" | ||||
}, | }, | ||||
"total_egg_energy": { | "total_egg_energy": { | ||||
"description": "总蛋蛋能量", | |||||
"description": "总蛋蛋能量 (个人+团队+预估)", | |||||
"type": "string" | |||||
}, | |||||
"total_egg_energy_value": { | |||||
"description": "总蛋蛋能量价值", | |||||
"type": "string" | "type": "string" | ||||
} | } | ||||
} | } | ||||
@@ -892,7 +892,10 @@ definitions: | |||||
description: 总蛋蛋积分 | description: 总蛋蛋积分 | ||||
type: string | type: string | ||||
total_egg_energy: | total_egg_energy: | ||||
description: 总蛋蛋能量 | |||||
description: 总蛋蛋能量 (个人+团队+预估) | |||||
type: string | |||||
total_egg_energy_value: | |||||
description: 总蛋蛋能量价值 | |||||
type: string | type: string | ||||
type: object | type: object | ||||
md.HomePageWatchAdRuleResp: | md.HomePageWatchAdRuleResp: | ||||