作者 yangfu

增加:公司状态修改

... ... @@ -204,7 +204,7 @@ func (svr *PgLoginService) GetCompanyList(funcGetCompanyIds func() []int64) []*d
if len(companies) == 0 {
return companyList
}
if _, v, e := CompanyRepository.Find(map[string]interface{}{"inCompanyIds": companies, "status": 1, "sortByCreateTime": domain.DESC}); e != nil {
if _, v, e := CompanyRepository.Find(map[string]interface{}{"inCompanyIds": companies, "enable": 1, "sortByCreateTime": domain.DESC}); e != nil {
log.Error(e)
return companyList
} else {
... ...
... ... @@ -69,7 +69,8 @@ func (repository *CompanyRepository) Find(queryOptions map[string]interface{}) (
companyIds, _ := companies.([]int64)
query.Where("id in (?)", pg.In(companyIds))
}
query.SetWhere("status = ?", "status")
//query.SetWhere("status = ?", "status")
query.SetWhere(`enable = ?`, "enable")
query.SetOrder(`create_at`, "sortByCreateTime")
var err error
if query.AffectRow, err = query.SelectAndCount(); err != nil {
... ...
... ... @@ -8,8 +8,8 @@ const (
const AuthCodeExpire = 60 * 15 //15分钟过期
const TokenExpire = 60 * 60 * 2 //两个小时过期
const RefreshTokenExipre = 3600 * 24 * 30 * 1 //刷新token 一个月过期
const TokenExpire = 60 //60 * 60 * 2 //两个小时过期
const RefreshTokenExipre = 60 // 3600 * 24 * 30 * 1 //刷新token 一个月过期
//const TokenExpire = 30
//const RefreshTokenExipre = 60 //刷新token
... ...