更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -7,10 +7,6 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 本文件包含组织架构模块的请求参数解析工具。
|
||||
// 前端存在 JSON、form-urlencoded 与 multipart/form-data 三种提交方式,
|
||||
// 因此每个取值函数都先读 JSON body,再回退到表单参数。
|
||||
|
||||
func (c *BackendOrganizationController) parseJSONBody() map[string]interface{} {
|
||||
body := map[string]interface{}{}
|
||||
contentType := strings.ToLower(c.Ctx.Input.Header("Content-Type"))
|
||||
@@ -24,7 +20,6 @@ func (c *BackendOrganizationController) parseJSONBody() map[string]interface{} {
|
||||
return body
|
||||
}
|
||||
|
||||
// ensureFormParsed 在读取表单参数前确保请求体已被解析。
|
||||
func (c *BackendOrganizationController) ensureFormParsed() {
|
||||
if c.Ctx.Request.Form == nil && c.Ctx.Request.PostForm == nil && c.Ctx.Request.MultipartForm == nil {
|
||||
_ = c.Ctx.Request.ParseMultipartForm(32 << 20)
|
||||
@@ -154,7 +149,6 @@ func (c *BackendOrganizationController) getBoolValue(body map[string]interface{}
|
||||
return false, false
|
||||
}
|
||||
|
||||
// getUint64Slice 解析 ID 数组,兼容 JSON 数组与逗号分隔字符串。
|
||||
func (c *BackendOrganizationController) getUint64Slice(body map[string]interface{}, keys ...string) []uint64 {
|
||||
result := make([]uint64, 0)
|
||||
seen := map[uint64]bool{}
|
||||
@@ -232,10 +226,6 @@ func (c *BackendOrganizationController) nowString() string {
|
||||
return time.Now().Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 与 ORM 交互的通用小工具
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
func strPtrIfNotEmpty(v string) *string {
|
||||
v = strings.TrimSpace(v)
|
||||
if v == "" {
|
||||
@@ -244,7 +234,6 @@ func strPtrIfNotEmpty(v string) *string {
|
||||
return &v
|
||||
}
|
||||
|
||||
// nullableString 空字符串写入 NULL,便于统一区分“未填写”与“空值”。
|
||||
func nullableString(v string) interface{} {
|
||||
v = strings.TrimSpace(v)
|
||||
if v == "" {
|
||||
|
||||
Reference in new issue
Block a user