This commit is contained in:
小蚂蚁云
2026-10-26 08:46:20 +08:00
parent 276740924a
commit 69f5c1767d
26 changed files with 259 additions and 121 deletions
+11
View File
@@ -42,6 +42,8 @@
package v1
import (
"fmt"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/gmeta"
@@ -255,6 +257,15 @@ type UserImportRes struct {
Reasons []string `json:"reasons"` // 失败原因列表
}
// ResMsg 导入结果提示语(response.MsgProvider,前端成功通道直接弹出):
// 无失败行时"成功导入 X 条数据",有失败行时"成功导入 X 条,失败 Y 条"
func (r *UserImportRes) ResMsg() string {
if r.Failed > 0 {
return fmt.Sprintf("成功导入 %d 条,失败 %d 条", r.Success, r.Failed)
}
return fmt.Sprintf("成功导入 %d 条数据", r.Success)
}
// UserExportReq 导出用户请求
// 按查询条件导出符合条件的记录
type UserExportReq struct {