作者 yangfu

fix:默认用户类型 ,用户搜索限制长度修改

... ... @@ -80,6 +80,9 @@ func (dto *UserDto) LoadDto(user *domain.User, company *domain.Company) error {
dto.UserInfo.IcCardNumber = user.Ext.IcCardNumber
dto.UserInfo.EmployeeType = user.Ext.EmployeeType
}
if dto.UserInfo.EmployeeType == 0 {
dto.UserInfo.EmployeeType = 1
}
if len(dto.UserRole) == 0 {
dto.UserRole = make([]*domain.Role, 0)
}
... ...
... ... @@ -231,7 +231,7 @@ func (repository *UserRepository) Find(queryOptions map[string]interface{}) (int
if v, ok := queryOptions["cooperationCompany"]; ok && len(v.(string)) > 0 {
query.Where(fmt.Sprintf(`cooperation_info->>'cooperationCompany' like '%%%v%%'`, v))
}
query.SetOffsetAndLimit(20)
query.SetOffsetAndLimit(domain.MaxQueryRow)
query.SetOrderDirect("user_id", "DESC")
if count, err := query.SelectAndCount(); err != nil {
return 0, users, err
... ...