sync: 同步 v1.0.4 并脱敏配置与镜像
This commit is contained in:
@@ -1,5 +1,29 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
)
|
||||
|
||||
const SimCardAllocateMaxInputRows = 20000
|
||||
|
||||
func (in *TSimCardAllocatePrepareParam) ValidateInput() error {
|
||||
count := 0
|
||||
for _, line := range strings.Split(in.Input, "\n") {
|
||||
if strings.TrimSpace(line) != "" {
|
||||
count++
|
||||
if count > SimCardAllocateMaxInputRows {
|
||||
return gerror.Newf("单次批量输入最多 %d 条,超出请使用 Excel 导入或分批提交", SimCardAllocateMaxInputRows)
|
||||
}
|
||||
}
|
||||
}
|
||||
if count == 0 {
|
||||
return gerror.New("批量输入内容不能为空")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type TSimCardAllocateTargetListParam struct {
|
||||
Keyword string `json:"keyword" dc:"目标客户名称、编码或ID"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user