初步版本修正
This commit is contained in:
@@ -3,6 +3,7 @@ package provider
|
||||
import (
|
||||
. "code.hoteas.com/golang/hotime"
|
||||
. "code.hoteas.com/golang/hotime/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
var UserCtr = Ctr{
|
||||
@@ -124,12 +125,16 @@ var UserCtr = Ctr{
|
||||
|
||||
if tp == 2 {
|
||||
data["certification_flag"] = 1
|
||||
data["expiration_time[<]"] = "now()"
|
||||
data["OR"] = Map{"expiration_time": nil, "expiration_time[#]": "now()"}
|
||||
}
|
||||
|
||||
if tp == 3 {
|
||||
data["certification_flag"] = 1
|
||||
data["expiration_time[>]"] = "now()"
|
||||
data["expiration_time[>]"] = time.Now().Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
if len(data) > 1 {
|
||||
data = Map{"AND": data, "ORDER": "modify_time DESC"}
|
||||
}
|
||||
|
||||
count := that.Db.Count("user", data)
|
||||
|
||||
Reference in New Issue
Block a user