|
@@ -355,6 +355,14 @@ type List struct {
|
|
func (this *List) List() (*[]map[string]interface{}, int64) {
|
|
func (this *List) List() (*[]map[string]interface{}, int64) {
|
|
selectSql, countSql := this.GetSql()
|
|
selectSql, countSql := this.GetSql()
|
|
r := this.Mysql.SelectBySql(selectSql)
|
|
r := this.Mysql.SelectBySql(selectSql)
|
|
|
|
+ if r != nil {
|
|
|
|
+ for k, v := range *r {
|
|
|
|
+ authStatus := common.Int64All(v["authStatus"])
|
|
|
|
+ if authStatus == -2 {
|
|
|
|
+ (*r)[k]["authStatus"] = 0
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
count := this.Mysql.CountBySql(countSql)
|
|
count := this.Mysql.CountBySql(countSql)
|
|
return r, count
|
|
return r, count
|
|
}
|
|
}
|
|
@@ -368,9 +376,12 @@ func (this *List) GetSql() (selectSql, selectCountSql string) {
|
|
sql += " name like " + "'%" + this.Name + "%' and"
|
|
sql += " name like " + "'%" + this.Name + "%' and"
|
|
}
|
|
}
|
|
if this.AuthStatus != "" { //z1 已认证
|
|
if this.AuthStatus != "" { //z1 已认证
|
|
|
|
+ if this.AuthStatus == "0" { //前端传0 则是已到期 库中为-2
|
|
|
|
+ this.AuthStatus = "-2"
|
|
|
|
+ }
|
|
sql += " auth_status =" + this.AuthStatus + " and"
|
|
sql += " auth_status =" + this.AuthStatus + " and"
|
|
} else {
|
|
} else {
|
|
- sql += " auth_status is not null and auth_status !=0 and auth_status !=-1 and"
|
|
|
|
|
|
+ sql += " (auth_status =1 or auth_status=-2 ) and"
|
|
}
|
|
}
|
|
if this.CreditCode != "" {
|
|
if this.CreditCode != "" {
|
|
sql += " code like " + "'%" + this.CreditCode + "%' and"
|
|
sql += " code like " + "'%" + this.CreditCode + "%' and"
|
|
@@ -394,7 +405,11 @@ func (this *List) GetSql() (selectSql, selectCountSql string) {
|
|
sql += ` auth_endTime < '` + e_endtime + `' and`
|
|
sql += ` auth_endTime < '` + e_endtime + `' and`
|
|
}
|
|
}
|
|
if this.FrozenStatus != "" {
|
|
if this.FrozenStatus != "" {
|
|
- sql += " frozen_status =" + this.FrozenStatus + " and"
|
|
|
|
|
|
+ if this.FrozenStatus == "0" {
|
|
|
|
+ sql += " (frozen_status =" + this.FrozenStatus + " or frozen_status is null) and"
|
|
|
|
+ } else {
|
|
|
|
+ sql += " frozen_status =" + this.FrozenStatus + " and"
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if this.RegPhone != "" {
|
|
if this.RegPhone != "" {
|
|
sql += " phone like " + "'%" + this.RegPhone + "%' and"
|
|
sql += " phone like " + "'%" + this.RegPhone + "%' and"
|