Browse Source

update

master
shenjiachi 2 days ago
parent
commit
4eaf42ed22
3 changed files with 8 additions and 8 deletions
  1. +6
    -6
      app/hdl/institutional_management/module_setting/hdl_basic.go
  2. +1
    -1
      app/md/institutional_management/module_setting/md_basic.go
  3. +1
    -1
      go.mod

+ 6
- 6
app/hdl/institutional_management/module_setting/hdl_basic.go View File

@@ -44,7 +44,7 @@ func ModuleSettingGet(c *gin.Context) {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
var dataMap map[string]interface{}
var data interface{}
if moduleStyle == nil {
now := time.Now()
m := model.ModuleStyle{
@@ -53,7 +53,7 @@ func ModuleSettingGet(c *gin.Context) {
SkipIdentifier: "",
Title: "主标题",
Subtitle: "子标题",
Data: utils.SerializeStr(dataMap),
Data: utils.SerializeStr(data),
CreateAt: now.Format("2006-01-02 15:04:05"),
}
_, err = moduleStyleDb.ModuleStyleInsert(&m)
@@ -72,8 +72,8 @@ func ModuleSettingGet(c *gin.Context) {
}
redisConn := cache.GetPool().Get()
scheme, domain := svc.ImageBucket(db.Db, redisConn)
moduleStyle.Data = svc.ImageFormatWithBucketNew(scheme, domain, moduleStyle.Data)
utils.Unserialize([]byte(moduleStyle.Data), &dataMap)
moduleStyleStr := svc.ImageFormatWithBucketForDataInfo(scheme, domain, moduleStyle.Data)
utils.Unserialize([]byte(moduleStyleStr), &data)

resp := md.ModuleSettingGetResp{
ModNameList: modNameList,
@@ -82,7 +82,7 @@ func ModuleSettingGet(c *gin.Context) {
SkipIdentifier: moduleStyle.SkipIdentifier,
Title: moduleStyle.Title,
Subtitle: moduleStyle.Subtitle,
Data: dataMap,
Data: data,
}

e.OutSuc(c, resp, nil)
@@ -125,7 +125,7 @@ func ModuleSettingUpdate(c *gin.Context) {
// 替换所有 host
redisConn := cache.GetPool().Get()
scheme, domain := svc.ImageBucket(db.Db, redisConn)
moduleStyle.Data = strings.ReplaceAll(moduleStyle.Data, fmt.Sprintf("%s://%s/", scheme, domain), "{{host}}")
moduleStyle.Data = strings.ReplaceAll(moduleStyle.Data, fmt.Sprintf("%s://%s/", scheme, domain), "{{tempHost}}")
affected, err := moduleStyleDb.ModuleStyleUpdate(moduleStyle.ModId, moduleStyle, forceColumns...)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())


+ 1
- 1
app/md/institutional_management/module_setting/md_basic.go View File

@@ -7,7 +7,7 @@ type ModuleSettingGetResp struct {
SkipIdentifier string `json:"skip_identifier"` // 跳转标识
Title string `json:"title"` // 标题
Subtitle string `json:"subtitle"` // 副标题
Data map[string]interface{} `json:"data"` // 内容
Data interface{} `json:"data"` // 内容
}

type ModuleSettingUpdateReq struct {


+ 1
- 1
go.mod View File

@@ -33,7 +33,7 @@ require (

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241130022153-9f7ff6c9f078
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241129071929-add8a8e2196a
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241202080915-050246e21702
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5
github.com/360EntSecGroup-Skylar/excelize v1.4.1


Loading…
Cancel
Save