|
@@ -109,13 +109,29 @@ func (this *SubseribeService) Update() (int64, error) {
|
|
}
|
|
}
|
|
newKeyLen := GetKeyWordLen(this.Items)
|
|
newKeyLen := GetKeyWordLen(this.Items)
|
|
if newKeyLen > keyLen {
|
|
if newKeyLen > keyLen {
|
|
- jy.Publish(this.MgoLog, IC.C.Nsq, IC.C.NsqTopic, "task", this.UserId, jy.Jyweb_node2, map[string]interface{}{
|
|
|
|
|
|
+ err := jy.Publish(this.MgoLog, IC.C.Nsq, IC.C.NsqTopic, "task", this.UserId, jy.Jyweb_node2, map[string]interface{}{
|
|
"code": 1015, //首次订阅
|
|
"code": 1015, //首次订阅
|
|
"types": "subscribeKeyWords",
|
|
"types": "subscribeKeyWords",
|
|
"num": 50,
|
|
"num": 50,
|
|
"baseUserId": this.BaseUserId,
|
|
"baseUserId": this.BaseUserId,
|
|
"positionId": this.PositionId,
|
|
"positionId": this.PositionId,
|
|
})
|
|
})
|
|
|
|
+ if err != nil {
|
|
|
|
+ log.Println("nsq队列写入失败-->", err, "task", this.UserId)
|
|
|
|
+ }
|
|
|
|
+ //首次设置关键词 赠送一次抽奖机会
|
|
|
|
+ err = jy.Publish(this.MgoLog, IC.C.Nsq, IC.C.NsqTopic, "lottery_draw_task", this.UserId, jy.Jyweb_node2, map[string]interface{}{
|
|
|
|
+ "phone": this.UserId,
|
|
|
|
+ "userId": this.UserId,
|
|
|
|
+ "mgoUserId": this.MgoUserId,
|
|
|
|
+ "positionId": this.PositionId,
|
|
|
|
+ "activeId": 16,
|
|
|
|
+ "taskInfoId": 2,
|
|
|
|
+ "nickName": this.UserId,
|
|
|
|
+ })
|
|
|
|
+ if err != nil {
|
|
|
|
+ log.Println("nsq队列写入失败-->", err, "lottery_draw_task", this.UserId)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//大会员
|
|
//大会员
|