Selaa lähdekoodia

推送时间修改

WH01243 2 vuotta sitten
vanhempi
commit
8d377398fb

+ 3 - 3
jyBXSubscribe/rpc/internal/logic/getsublistlogic.go

@@ -66,7 +66,7 @@ func (l *GetSubListLogic) GetSubList(in *bxsubscribe.SubscribeInfosReq) (*bxsubs
 	          }*/
 	hasNextPage, total, list := model.NewSubscribePush(in.UserType).Datas(spqp)
 	start1 := time.Now().Unix()
-	logx.Info("1查询数据用户", start1-start)
+	logx.Info("1查询数据用户", start1-start)
 	//hasNextPage, total, list = false, 0, []*bxsubscribe.SubscribeInfo{}
 	/*
 	 *无推送记录生成推送记录
@@ -77,11 +77,11 @@ func (l *GetSubListLogic) GetSubList(in *bxsubscribe.SubscribeInfosReq) (*bxsubs
 		hasNextPage, total, list = model.NewSubscribePush(in.UserType).DefaultDatas(spqp)
 	}
 	start2 := time.Now().Unix()
-	logx.Info("2查询数据用户", start2-start1)
+	logx.Info("2查询数据用户", start2-start1)
 	//查询是否收藏
 	model.NewSubscribePush(in.UserType).MakeCollection(in.UserId, list)
 	start3 := time.Now().Unix()
-	logx.Info("3查询数据用户", start3-start2)
+	logx.Info("3查询数据用户", start3-start2)
 	logx.Info("总共查询数据用户", start3-start)
 	return &bxsubscribe.SubscribeInfosResp{
 		Data: &bxsubscribe.SubscribeData{

+ 2 - 2
jyBXSubscribe/rpc/model/push.go

@@ -819,7 +819,7 @@ func (s *subscribePush) DefaultDatas(spqp *SubPushQueryParam) (hasNextPage bool,
 // 保存推送表
 func (s *subscribePush) listManager(spqp *SubPushQueryParam, list []map[string]interface{}, keyword []ViewKeyWord) (resultList []*bxsubscribe.SubscribeInfo) {
 	t2 := time.Now()
-	now := time.Now()
+	now := time.Now().Unix()
 	length := len(list)
 	resultList = make([]*bxsubscribe.SubscribeInfo, length)
 	pushInsert := []interface{}{}
@@ -900,7 +900,7 @@ func (s *subscribePush) getDefaultDatasSQL(bsp *ViewCondition) (str string) {
 	bools := []string{}
 	musts := []string{}
 	//发布时间最新7天(正式环境需要修改)
-	musts = append(musts, fmt.Sprintf(bidTime, time.Now().AddDate(0, 0, -365).Unix()))
+	musts = append(musts, fmt.Sprintf(bidTime, time.Now().AddDate(0, 0, -7).Unix()))
 	//省份
 	areaCity := []string{}
 	if len(bsp.Area) > 0 {