正在显示
3 个修改的文件
包含
5 行增加
和
4 行删除
@@ -204,7 +204,7 @@ func (svr *PgLoginService) GetCompanyList(funcGetCompanyIds func() []int64) []*d | @@ -204,7 +204,7 @@ func (svr *PgLoginService) GetCompanyList(funcGetCompanyIds func() []int64) []*d | ||
204 | if len(companies) == 0 { | 204 | if len(companies) == 0 { |
205 | return companyList | 205 | return companyList |
206 | } | 206 | } |
207 | - if _, v, e := CompanyRepository.Find(map[string]interface{}{"inCompanyIds": companies, "status": 1, "sortByCreateTime": domain.DESC}); e != nil { | 207 | + if _, v, e := CompanyRepository.Find(map[string]interface{}{"inCompanyIds": companies, "enable": 1, "sortByCreateTime": domain.DESC}); e != nil { |
208 | log.Error(e) | 208 | log.Error(e) |
209 | return companyList | 209 | return companyList |
210 | } else { | 210 | } else { |
@@ -69,7 +69,8 @@ func (repository *CompanyRepository) Find(queryOptions map[string]interface{}) ( | @@ -69,7 +69,8 @@ func (repository *CompanyRepository) Find(queryOptions map[string]interface{}) ( | ||
69 | companyIds, _ := companies.([]int64) | 69 | companyIds, _ := companies.([]int64) |
70 | query.Where("id in (?)", pg.In(companyIds)) | 70 | query.Where("id in (?)", pg.In(companyIds)) |
71 | } | 71 | } |
72 | - query.SetWhere("status = ?", "status") | 72 | + //query.SetWhere("status = ?", "status") |
73 | + query.SetWhere(`enable = ?`, "enable") | ||
73 | query.SetOrder(`create_at`, "sortByCreateTime") | 74 | query.SetOrder(`create_at`, "sortByCreateTime") |
74 | var err error | 75 | var err error |
75 | if query.AffectRow, err = query.SelectAndCount(); err != nil { | 76 | if query.AffectRow, err = query.SelectAndCount(); err != nil { |
@@ -8,8 +8,8 @@ const ( | @@ -8,8 +8,8 @@ const ( | ||
8 | 8 | ||
9 | const AuthCodeExpire = 60 * 15 //15分钟过期 | 9 | const AuthCodeExpire = 60 * 15 //15分钟过期 |
10 | 10 | ||
11 | -const TokenExpire = 60 * 60 * 2 //两个小时过期 | ||
12 | -const RefreshTokenExipre = 3600 * 24 * 30 * 1 //刷新token 一个月过期 | 11 | +const TokenExpire = 60 //60 * 60 * 2 //两个小时过期 |
12 | +const RefreshTokenExipre = 60 // 3600 * 24 * 30 * 1 //刷新token 一个月过期 | ||
13 | 13 | ||
14 | //const TokenExpire = 30 | 14 | //const TokenExpire = 30 |
15 | //const RefreshTokenExipre = 60 //刷新token | 15 | //const RefreshTokenExipre = 60 //刷新token |
-
请 注册 或 登录 后发表评论