浏览代码

更新

master
huangjiajun 1 个月前
父节点
当前提交
e4ba0bc33d
共有 3 个文件被更改,包括 19 次插入11 次删除
  1. +5
    -1
      app/hdl/hdl_role.go
  2. +13
    -9
      app/md/md_role.go
  3. +1
    -1
      go.mod

+ 5
- 1
app/hdl/hdl_role.go 查看文件

@@ -188,6 +188,8 @@ func AddRole(c *gin.Context) {
Memo: req.Memo,
Logo: req.Logo,
Label: req.Label,
SeoLogo: req.SeoLogo,
SeoTitle: req.SeoTitle,
CreateAt: now.Format("2006-01-02 15:04:05"),
UpdateAt: now.Format("2006-01-02 15:04:05"),
})
@@ -235,7 +237,9 @@ func UpdateRole(c *gin.Context) {
role.Memo = req.Memo
role.Logo = req.Logo
role.Label = req.Label
_, err = roleDb.UpdateRole(role, "name", "memo")
role.SeoLogo = req.SeoLogo
role.SeoTitle = req.SeoTitle
_, err = roleDb.UpdateRole(role, "name", "memo", "logo", "label", "seo_logo", "seo_title")
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return


+ 13
- 9
app/md/md_role.go 查看文件

@@ -17,18 +17,22 @@ type UpdateRoleStateReq struct {
}

type AddRoleReq struct {
Name string `json:"name" binding:"required" label:"名称"`
Memo string `json:"memo" binding:"required" label:"备注"`
Logo string `json:"logo" label:"左边图标"`
Label string `json:"label" label:"身份标签"`
Name string `json:"name" binding:"required" label:"名称"`
Memo string `json:"memo" binding:"required" label:"备注"`
Logo string `json:"logo" label:"左边图标"`
Label string `json:"label" label:"身份标签"`
SeoLogo string `json:"seo_logo" label:"seo"`
SeoTitle string `json:"seo_title" label:"seo"`
}

type UpdateRoleReq struct {
RoleId int `json:"role_id" binding:"required" label:"id"`
Name string `json:"name" binding:"required" label:"名称"`
Memo string `json:"memo" binding:"required" label:"备注"`
Logo string `json:"logo" label:"左边图标"`
Label string `json:"label" label:"身份标签"`
RoleId int `json:"role_id" binding:"required" label:"id"`
Name string `json:"name" binding:"required" label:"名称"`
Memo string `json:"memo" binding:"required" label:"备注"`
Logo string `json:"logo" label:"左边图标"`
Label string `json:"label" label:"身份标签"`
SeoLogo string `json:"seo_logo" label:"seo"`
SeoTitle string `json:"seo_title" label:"seo"`
}

type RoleBindPermissionGroupReq struct {


+ 1
- 1
go.mod 查看文件

@@ -5,7 +5,7 @@ go 1.18
//replace code.fnuoos.com/zhimeng/model.git => E:/company/ad/models

require (
code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240930062518-b791878f3a7f
code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240930063210-6bb519cca13b
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/boombuler/barcode v1.0.1
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5


正在加载...
取消
保存