|
@@ -89,7 +89,6 @@ func (this *Client) PersonnelIndex() {
|
|
|
"data": nil,
|
|
|
"recordsFiltered": 0,
|
|
|
"recordsTotal": 0,
|
|
|
-
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
@@ -102,14 +101,13 @@ func (this *Client) PersonnelIndex() {
|
|
|
entUserId, _ = strconv.Atoi(qu.SE.DecodeString(id))
|
|
|
}
|
|
|
entId := qu.IntAll(user["ent_id"])
|
|
|
- leftNumData := JyMysql.FindOne("user_account", map[string]interface{}{"user_id":entUserId,"ent_id":entId},"left_num","")
|
|
|
- var left int
|
|
|
- if (*leftNumData)==nil{
|
|
|
- left=0
|
|
|
+ leftNumData := JyMysql.FindOne("user_account", map[string]interface{}{"user_id": entUserId, "ent_id": entId}, "left_num", "")
|
|
|
+ left := 0
|
|
|
+ if leftNumData != nil && *leftNumData != nil {
|
|
|
+ left = int((*leftNumData)["left_num"].(int64))
|
|
|
}
|
|
|
- left = int((*leftNumData)["left_num"].(int64))
|
|
|
this.T["left"] = left
|
|
|
- this.Render("/client/personnelIndex.html",&this.T)
|
|
|
+ this.Render("/client/personnelIndex.html", &this.T)
|
|
|
}
|
|
|
}
|
|
|
|