更新续杯相关

This commit is contained in:
2026-06-16 13:00:33 +08:00
parent c0f70823a9
commit ae00d633fb
5 changed files with 101 additions and 20 deletions
+4 -10
View File
@@ -463,7 +463,7 @@ func extractPoolRow(c *beego.Controller, module string) {
var payload struct {
ID uint64 `json:"id"`
Type string `json:"type"`
Platform string `json:"platform"` // local | xianyu | taobao | pinduoduo | jingdong | douyin | ziyoushangcheng
Platform string `json:"platform"` // local | xianyu | taobao | pinduoduo | jingdong | douyin | ziyoushangcheng | xubei
Remark string `json:"remark"`
Replenish bool `json:"replenish"` // true 时写入 is_extracted=2(补号),否则为 1(已提取)
}
@@ -471,13 +471,7 @@ func extractPoolRow(c *beego.Controller, module string) {
poolJSONErr(c, 400, 400, "参数错误")
return
}
if payload.Platform != "local" &&
payload.Platform != "xianyu" &&
payload.Platform != "taobao" &&
payload.Platform != "pinduoduo" &&
payload.Platform != "jingdong" &&
payload.Platform != "douyin" &&
payload.Platform != "ziyoushangcheng" {
if !validExtractPlatform(payload.Platform) {
poolJSONErr(c, 400, 400, "提取平台错误")
return
}
@@ -609,7 +603,7 @@ func replenishPoolRow(c *beego.Controller, module string) {
poolJSONErr(c, 400, 400, "账号类型不正确")
return
}
validPlatforms := map[string]bool{"local": true, "xianyu": true, "pinduoduo": true, "jingdong": true, "douyin": true}
validPlatforms := map[string]bool{"local": true, "xianyu": true, "pinduoduo": true, "jingdong": true, "douyin": true, "xubei": true}
if !validPlatforms[payload.Platform] {
poolJSONErr(c, 400, 400, "提取平台错误")
return
@@ -817,7 +811,7 @@ func updatePoolRemark(c *beego.Controller, module string) {
func validExtractPlatform(platform string) bool {
switch platform {
case "local", "xianyu", "taobao", "pinduoduo", "jingdong", "douyin", "ziyoushangcheng":
case "local", "xianyu", "taobao", "pinduoduo", "jingdong", "douyin", "ziyoushangcheng", "xubei":
return true
default:
return false