|
@@ -291,6 +291,35 @@ func (f *Front) UserState() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+func (f *Front) UserAll() {
|
|
|
+ defer qu.Catch()
|
|
|
+ if f.Method() == "POST" {
|
|
|
+ start, _ := f.GetInteger("start")
|
|
|
+ limit, _ := f.GetInteger("length")
|
|
|
+ draw, _ := f.GetInteger("draw")
|
|
|
+ searchStr := f.GetString("search[value]")
|
|
|
+ search := strings.TrimSpace(searchStr)
|
|
|
+ query := map[string]interface{}{
|
|
|
+ "b_delete": false,
|
|
|
+ }
|
|
|
+ if search != "" {
|
|
|
+ query["$or"] = []interface{}{
|
|
|
+ bson.M{"s_login": bson.M{"$regex": search}},
|
|
|
+ }
|
|
|
+ }
|
|
|
+ data, _ := Mgo.Find("s_user", query, `{"i_createtime":-1}`, nil, false, start, limit)
|
|
|
+ count := Mgo.Count("s_user", query)
|
|
|
+ f.ServeJson(map[string]interface{}{
|
|
|
+ "draw": draw,
|
|
|
+ "data": data,
|
|
|
+ "recordsFiltered": count,
|
|
|
+ "recordsTotal": count,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _ = f.Render("user/user_list.html")
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
func (f *Front) UserDel() {
|
|
|
defer qu.Catch()
|
|
|
if f.Method() == "POST" {
|