|
@@ -129,17 +129,19 @@ func (l *DeskAnalysisReport) DeskReport() {
|
|
|
if len(areas) == 0 {
|
|
|
userData := jy.GetBigVipUserBaseMsg(l.Session(), *config.Middleground)
|
|
|
oArea := &map[string]interface{}{}
|
|
|
- if userData.Data.Member.Status > 0 {
|
|
|
+ if userData.Status > 0 {
|
|
|
types = "m"
|
|
|
- } else if userData.Data.Vip.Status > 0 {
|
|
|
+ } else if userData.VipStatus > 0 {
|
|
|
types = "v"
|
|
|
} else if userData.EntnicheStatus == 1 {
|
|
|
types = "s"
|
|
|
}
|
|
|
vipJy := jy.GetSubScribeInfo(l.Session(), mongodb, types, "10000")
|
|
|
- oArea = qutil.ObjToMap((*vipJy)["o_area"])
|
|
|
- for key := range *oArea {
|
|
|
- areas = append(areas, key)
|
|
|
+ if vipJy != nil {
|
|
|
+ oArea = qutil.ObjToMap((*vipJy)["o_area"])
|
|
|
+ for key := range *oArea {
|
|
|
+ areas = append(areas, key)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -155,7 +157,7 @@ func (l *DeskAnalysisReport) DeskReport() {
|
|
|
}
|
|
|
log.Printf("用户userId:%s,mgoid:%s,types:%s,sql:%s\n", userId, mgoUserId, types, strSql)
|
|
|
var dataArrMap []map[string]interface{}
|
|
|
- reportRes, _ := g.DB().Query(gctx.New(), fmt.Sprintf(`SELECT * FROM analysis_report %s ORDER BY show_time DESC,classify desc LIMIT 10
|
|
|
+ reportRes, _ := g.DB().Query(gctx.New(), fmt.Sprintf(`SELECT * FROM analysis_report %s ORDER BY show_time DESC,classify desc,id desc LIMIT 10
|
|
|
`, strSql))
|
|
|
if !reportRes.IsEmpty() {
|
|
|
for _, row := range reportRes.List() {
|