|
@@ -1,8 +1,6 @@
|
|
package logic
|
|
package logic
|
|
|
|
|
|
import (
|
|
import (
|
|
- MC "app.yhyue.com/moapp/jybase/common"
|
|
|
|
- "app.yhyue.com/moapp/jybase/redis"
|
|
|
|
"context"
|
|
"context"
|
|
"encoding/json"
|
|
"encoding/json"
|
|
"fmt"
|
|
"fmt"
|
|
@@ -13,6 +11,9 @@ import (
|
|
"strings"
|
|
"strings"
|
|
"time"
|
|
"time"
|
|
|
|
|
|
|
|
+ MC "app.yhyue.com/moapp/jybase/common"
|
|
|
|
+ "app.yhyue.com/moapp/jybase/redis"
|
|
|
|
+
|
|
"jyBXBase/rpc/internal/svc"
|
|
"jyBXBase/rpc/internal/svc"
|
|
"jyBXBase/rpc/type/bxbase"
|
|
"jyBXBase/rpc/type/bxbase"
|
|
|
|
|
|
@@ -73,7 +74,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
|
|
o_msgset := MC.ObjToMap((*userMap)["o_member_jy"])
|
|
o_msgset := MC.ObjToMap((*userMap)["o_member_jy"])
|
|
big_items, ok := (*o_msgset)["a_items"].([]interface{})
|
|
big_items, ok := (*o_msgset)["a_items"].([]interface{})
|
|
//大会员推送历史
|
|
//大会员推送历史
|
|
- result := model.GetNewestInfo(rks, "m",in.NewUserId).GetPushHistory()
|
|
|
|
|
|
+ result := model.GetNewestInfo(rks, "m", in.NewUserId).GetPushHistory()
|
|
res.Data.Count = int64(len(result))
|
|
res.Data.Count = int64(len(result))
|
|
if res.Data.Count > 0 {
|
|
if res.Data.Count > 0 {
|
|
res.Data.HasSubKeys = ok && len(big_items) > 0
|
|
res.Data.HasSubKeys = ok && len(big_items) > 0
|
|
@@ -85,7 +86,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
|
|
if count := IC.MainMysql.CountBySql(`SELECT count(1) FROM entniche_user u LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone=? and u.power=1 and i.status=1`, phone); count > 0 {
|
|
if count := IC.MainMysql.CountBySql(`SELECT count(1) FROM entniche_user u LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone=? and u.power=1 and i.status=1`, phone); count > 0 {
|
|
//商机管理推送历史
|
|
//商机管理推送历史
|
|
isPayUser = true
|
|
isPayUser = true
|
|
- result := model.GetNewestInfo(in.EntUserId, "e",in.NewUserId).GetPushHistory()
|
|
|
|
|
|
+ result := model.GetNewestInfo(in.EntUserId, "e", MC.Int64All(in.EntUserId)).GetPushHistory()
|
|
res.Data.Count = int64(len(result))
|
|
res.Data.Count = int64(len(result))
|
|
if res.Data.Count > 0 {
|
|
if res.Data.Count > 0 {
|
|
res.Data.List = result
|
|
res.Data.List = result
|
|
@@ -97,7 +98,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
|
|
o_msgset := MC.ObjToMap((*userMap)["o_vipjy"])
|
|
o_msgset := MC.ObjToMap((*userMap)["o_vipjy"])
|
|
vip_items, ok := (*o_msgset)["a_items"].([]interface{})
|
|
vip_items, ok := (*o_msgset)["a_items"].([]interface{})
|
|
//vip查询推送历史
|
|
//vip查询推送历史
|
|
- result := model.GetNewestInfo(rks, "v",in.NewUserId).GetPushHistory()
|
|
|
|
|
|
+ result := model.GetNewestInfo(rks, "v", in.NewUserId).GetPushHistory()
|
|
res.Data.IsVip = true
|
|
res.Data.IsVip = true
|
|
res.Data.HasSubKeys = ok && len(vip_items) > 0
|
|
res.Data.HasSubKeys = ok && len(vip_items) > 0
|
|
res.Data.Count = int64(len(result))
|
|
res.Data.Count = int64(len(result))
|
|
@@ -113,7 +114,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
|
|
items, ok := (*o_msgset)["a_key"].([]interface{})
|
|
items, ok := (*o_msgset)["a_key"].([]interface{})
|
|
if ok && len(items) > 0 {
|
|
if ok && len(items) > 0 {
|
|
//普通用户查询推送历史
|
|
//普通用户查询推送历史
|
|
- result := model.GetNewestInfo(rks, "f",in.NewUserId).GetPushHistory()
|
|
|
|
|
|
+ result := model.GetNewestInfo(rks, "f", in.NewUserId).GetPushHistory()
|
|
res.Data.IsVip = false
|
|
res.Data.IsVip = false
|
|
res.Data.HasSubKeys = ok && len(items) > 0
|
|
res.Data.HasSubKeys = ok && len(items) > 0
|
|
res.Data.Count = int64(len(result))
|
|
res.Data.Count = int64(len(result))
|