作者 yangfu

列表权限修改

... ... @@ -9,7 +9,7 @@ type RoleItem struct {
OrgName string `json:"orgName"`
RoleType int `json:"roleType"`
Ext Ext `json:"ext"`
AuthFlag int `json:"authFlag"` // 1:可操作(编辑,修改等)
AuthFlag bool `json:"authFlag"` // 1:可操作(编辑,修改等)
}
type Ext struct {
... ...
... ... @@ -109,7 +109,7 @@ func (rolesService *RolesService) RoleList(roleListQuery *query.RoleListQuery) (
Ext: v.Ext,
}
if int64(v.OrgID) == roleListQuery.Operator.OrgId {
item.AuthFlag = 1
item.AuthFlag = true
}
result = append(result, item)
}
... ...
... ... @@ -9,7 +9,7 @@ type CompanyUserItem struct {
UserId string `json:"userId"`
UserName string `json:"userName"`
UserType int `json:"userType"`
AuthFlag int `json:"authFlag"` // 1:可操作(编辑,修改等)
AuthFlag bool `json:"authFlag"` // 1:可操作(编辑,修改等)
}
//CompanyUserInfo 用户数据详情
... ... @@ -85,5 +85,5 @@ type CooperationUserItem struct {
UserName string `json:"userName"`
OrgName string `json:"orgName"`
OrgId string `json:"orgId"`
AuthFlag int `json:"authFlag"` // 1:可操作(编辑,修改等)
AuthFlag bool `json:"authFlag"` // 1:可操作(编辑,修改等)
}
... ...
... ... @@ -211,7 +211,7 @@ func (usersService *UsersService) CompanyUserList(companyUserListQuery *query.Co
UserType: v.UserType,
}
if v.Org.OrgId == int(companyUserListQuery.Operator.OrgId) {
item.AuthFlag = 1
item.AuthFlag = true
}
listData = append(listData, item)
}
... ... @@ -402,7 +402,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery *
OrgId: strconv.Itoa(v.Org.OrgId),
}
if v.Org.OrgId == int(cooperationUserListQuery.Operator.OrgId) {
item.AuthFlag = 1
item.AuthFlag = true
}
if !v.CooperationInfo.CooperationDeadline.IsZero() && v.CooperationInfo.CooperationDeadline.After(time.Unix(1136044800, 0)) {
item.CooperationDeadline = v.CooperationInfo.CooperationDeadline.Format("2006-01-02")
... ...