修复部门名称不显示问题

close #367
This commit is contained in:
linwenxiang
2021-03-10 15:33:51 +08:00
parent db7abdda33
commit 31b36bc413
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -11,11 +11,11 @@ type SysUser struct {
models.ModelTime
UserId int `gorm:"primaryKey;autoIncrement;comment:编码" json:"userId"`
Username string `json:"username" gorm:"type:varchar(64);comment:用户名"`
Password string `json:"password" gorm:"type:varchar(128);comment:密码"`
Password string `json:"-" gorm:"type:varchar(128);comment:密码"`
NickName string `json:"nickName" gorm:"type:varchar(128);comment:昵称"`
Phone string `json:"phone" gorm:"type:varchar(11);comment:手机号"`
RoleId int `json:"roleId" gorm:"type:bigint(20);comment:角色ID"`
Salt string `json:"salt" gorm:"type:varchar(255);comment:加盐"`
Salt string `json:"-" gorm:"type:varchar(255);comment:加盐"`
Avatar string `json:"avatar" gorm:"type:varchar(255);comment:头像"`
Sex string `json:"sex" gorm:"type:varchar(255);comment:性别"`
Email string `json:"email" gorm:"type:varchar(128);comment:邮箱"`
+1
View File
@@ -27,6 +27,7 @@ func (e *SysUser) GetSysUserPage(c cDto.Index, p *actions.DataPermission, list *
cDto.Paginate(c.GetPageSize(), c.GetPageIndex()),
actions.Permission(data.TableName(), p),
).
Preload("Dept").
Find(list).Limit(-1).Offset(-1).
Count(count).Error
if err != nil {