|
@@ -37,8 +37,7 @@ var (
|
|
|
func (this *Client) AdminIndex() {
|
|
|
defer qu.Catch()
|
|
|
entId := qu.IntAll(this.GetSession("entId"))
|
|
|
- entUserArr := JyMysql.Find("entniche_user", map[string]interface{}{"ent_id": entId}, "", "id desc", -1, -1)
|
|
|
- var result []map[string]interface{}
|
|
|
+ entUserArr := JyMysql.Find("entniche_user", map[string]interface{}{"ent_id": entId, "export_power": 1}, "", "id desc", -1, -1)
|
|
|
if entUserArr != nil && *entUserArr != nil && len(*entUserArr) > 0 {
|
|
|
for _, v := range *entUserArr {
|
|
|
userId := qu.IntAll(v["id"])
|
|
@@ -53,11 +52,8 @@ func (this *Client) AdminIndex() {
|
|
|
}
|
|
|
}
|
|
|
v["id"] = encrypt.SE.EncodeString(strconv.Itoa(userId))
|
|
|
- if Mgo.Count("entniche_rule", map[string]interface{}{"entUserId": userId}) > 0 {
|
|
|
- result = append(result, v)
|
|
|
- }
|
|
|
}
|
|
|
- this.T["entUserArr"] = result
|
|
|
+ this.T["entUserArr"] = *entUserArr
|
|
|
}
|
|
|
this.Render("/client/adminIndex.html")
|
|
|
}
|
|
@@ -164,7 +160,8 @@ func (c *Client) CuserRuleCreate() {
|
|
|
data["i_updatetime"] = i_createtime
|
|
|
data["s_updateuser"] = sessVal["entUserName"]
|
|
|
query := bson.M{
|
|
|
- "entid": sessVal["entId"],
|
|
|
+ "phone": sessVal["phone"],
|
|
|
+ "username": sessVal["name"],
|
|
|
}
|
|
|
entMgoInfo, _ := MgoCus.FindOne("user", query)
|
|
|
appid := qu.ObjToString((*entMgoInfo)["appid"])
|