فهرست منبع

周报月报查条件修改

wangchuanjin 2 سال پیش
والد
کامیت
7f4e334286
2فایلهای تغییر یافته به همراه3 افزوده شده و 25 حذف شده
  1. 1 12
      src/jfw/modules/bigmember/src/service/report/report.go
  2. 2 13
      src/jfw/modules/subscribepay/src/report/report.go

+ 1 - 12
src/jfw/modules/bigmember/src/service/report/report.go

@@ -573,18 +573,7 @@ func isFree(userId string) bool {
 //
 func getQuery(sess *httpsession.Session) (string, string, interface{}) {
 	sessMap := sess.GetMultiple()
-	userId := util.ObjToString(sessMap["userId"])
-	user, ok := Mgo.FindById("user", userId, `{"s_phone":1,"s_m_phone":1}`)
-	if !ok || user == nil {
-		return "", "", nil
-	}
-	phone := util.ObjToString((*user)["s_phone"])
-	if phone == "" {
-		phone = util.ObjToString((*user)["s_m_phone"])
-	}
-	if Mysql.CountBySql(`SELECT count(1) as count from entniche_user a
-		inner join entniche_power b on (a.phone=? and b.status=1 and a.id=b.ent_user_id)
-		inner join entniche_wait_empower c on (c.end_time>? and (c.product_type like '%VIP订阅%' or c.product_type like '%大会员%') and b.wait_empower_id=c.id)`, phone, NowFormat(Date_Full_Layout)) > 0 {
+	if util.IntAll(sessMap["positionType"]) == 1 {
 		return userId, "ent_userid", util.IntAll(sessMap["entUserId"])
 	} else {
 		return userId, "userid", userId

+ 2 - 13
src/jfw/modules/subscribepay/src/report/report.go

@@ -501,19 +501,8 @@ func getColl(referer, t string, flag bool) string {
 //
 func getQuery(sess *httpsession.Session) (string, string, interface{}) {
 	sessMap := sess.GetMultiple()
-	userId := qutil.ObjToString(sessMap["userId"])
-	user, ok := util.MQFW.FindById("user", userId, `{"s_phone":1,"s_m_phone":1}`)
-	if !ok || user == nil {
-		return "", "", nil
-	}
-	phone := qutil.ObjToString((*user)["s_phone"])
-	if phone == "" {
-		phone = qutil.ObjToString((*user)["s_m_phone"])
-	}
-	if util.Mysql.CountBySql(`SELECT count(1) as count from entniche_user a
-		inner join entniche_power b on (a.phone=? and b.status=1 and a.id=b.ent_user_id)
-		inner join entniche_wait_empower c on (c.end_time>? and (c.product_type like '%VIP订阅%' or c.product_type like '%大会员%') and b.wait_empower_id=c.id)`, phone, NowFormat(Date_Full_Layout)) > 0 {
-		return userId, "ent_userid", qutil.IntAll(sessMap["entUserId"])
+	if util.IntAll(sessMap["positionType"]) == 1 {
+		return userId, "ent_userid", util.IntAll(sessMap["entUserId"])
 	} else {
 		return userId, "userid", userId
 	}