fix: 查询SQLmap属性值转换空字符
This commit is contained in:
@@ -181,11 +181,7 @@ func (r *RepoSysConfig) SelectConfigValueByKey(configKey string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
@@ -230,11 +226,7 @@ func (r *RepoSysConfig) CheckUniqueConfig(sysConfig model.SysConfig) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,11 +215,7 @@ func (r *RepoSysDictData) CheckUniqueDictData(sysDictData model.SysDictData) str
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,11 +227,7 @@ func (r *RepoSysDictType) CheckUniqueDictType(sysDictType model.SysDictType) str
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -469,11 +469,7 @@ func (r *RepoSysMenu) CheckUniqueMenu(sysMenu model.SysMenu) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -356,11 +356,7 @@ func (r *RepoSysRole) CheckUniqueRole(sysRole model.SysRole) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -572,11 +572,7 @@ func (r *RepoSysUser) CheckUniqueUser(sysUser sysUserModel.SysUser) string {
|
|||||||
log.Errorf("query err %v", err)
|
log.Errorf("query err %v", err)
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -209,11 +210,7 @@ func (r *SysJobImpl) CheckUniqueJob(sysJob model.SysJob) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -231,11 +232,7 @@ func (r *NeHostImpl) CheckUniqueNeHost(neHost model.NeHost) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -199,11 +200,7 @@ func (r *NeHostCmd) CheckUniqueGroupTitle(neHostCmd model.NeHostCmd) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -185,11 +186,7 @@ func (r *SysConfigImpl) SelectConfigValueByKey(configKey string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
@@ -234,11 +231,7 @@ func (r *SysConfigImpl) CheckUniqueConfig(sysConfig model.SysConfig) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,11 +226,7 @@ func (r *SysDeptImpl) CheckUniqueDept(sysDept model.SysDept) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -219,11 +220,7 @@ func (r *SysDictDataImpl) CheckUniqueDictData(sysDictData model.SysDictData) str
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -231,11 +232,7 @@ func (r *SysDictTypeImpl) CheckUniqueDictType(sysDictType model.SysDictType) str
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -468,11 +468,7 @@ func (r *SysMenuImpl) CheckUniqueMenu(sysMenu model.SysMenu) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -314,11 +315,7 @@ func (r *SysPostImpl) CheckUniquePost(sysPost model.SysPost) string {
|
|||||||
logger.Errorf("query err %v", err)
|
logger.Errorf("query err %v", err)
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -371,11 +372,7 @@ func (r *SysRoleImpl) CheckUniqueRole(sysRole model.SysRole) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -557,11 +558,7 @@ func (r *SysUserImpl) CheckUniqueUser(sysUser model.SysUser) string {
|
|||||||
logger.Errorf("query err %v", err)
|
logger.Errorf("query err %v", err)
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user