|
@@ -39,7 +39,7 @@ var equityStockLock = sync.Mutex{} // 赠送视频权益码库存锁
|
|
|
type EquityActive struct {
|
|
|
UserId string // id 这边取到的id可能是职位id也可能是mongo库id
|
|
|
mgoId string // mongo库id
|
|
|
- positionId string // 职位id
|
|
|
+ positionId int // 职位id
|
|
|
Phone string // 手机号 用于发短信
|
|
|
OrderCode string // 订单号
|
|
|
OrderType int // 1购买 2升级 3续费
|
|
@@ -203,7 +203,7 @@ func (e *EquityActive) setUserID() {
|
|
|
if info != nil && len(*info) > 0 {
|
|
|
log.Println("equityActive 获取到redis保存的用户身份信息:", orderKey, info)
|
|
|
e.mgoId = common.ObjToString((*info)["mgoId"])
|
|
|
- e.positionId = fmt.Sprintf("%v", common.IntAll((*info)["positionId"]))
|
|
|
+ e.positionId = common.IntAll((*info)["positionId"])
|
|
|
phone = common.ObjToString((*info)["phone"])
|
|
|
}
|
|
|
if phone != "" {
|
|
@@ -229,7 +229,7 @@ func (e *EquityActive) setUserIDPayRaffle() {
|
|
|
if info != nil && len(*info) > 0 {
|
|
|
log.Println("PayRaffle 获取到redis保存的用户身份信息:", orderKey, info)
|
|
|
e.mgoId = common.ObjToString((*info)["mgoId"])
|
|
|
- e.positionId = fmt.Sprintf("%v", common.IntAll((*info)["positionId"]))
|
|
|
+ e.positionId = common.IntAll((*info)["positionId"])
|
|
|
phone = common.ObjToString((*info)["phone"])
|
|
|
}
|
|
|
if phone != "" {
|
|
@@ -272,7 +272,7 @@ func (e *EquityActive) sendVipMsg(eName, code, ex_end_time string) {
|
|
|
// 发送站内信
|
|
|
p := util.MessageParam{
|
|
|
UserIds: e.mgoId,
|
|
|
- PositionIds: e.positionId,
|
|
|
+ PositionIds: fmt.Sprintf("%v", e.positionId),
|
|
|
Title: fmt.Sprintf(siteMsg.Title, eName),
|
|
|
Content: fmt.Sprintf(siteMsg.Content, e.ProductType, eName, code, ex_end_time, e.ProductType, eName, code),
|
|
|
MsgType: siteMsg.MsgType,
|
|
@@ -309,7 +309,7 @@ func (e *EquityActive) isYearVip() bool {
|
|
|
// SendPayRaffleMsg 支付成后发送抽奖消息
|
|
|
func (e *EquityActive) SendPayRaffleMsg() {
|
|
|
// 获取用户id
|
|
|
- e.setUserIDPayRaffle()
|
|
|
+ e.setUserID()
|
|
|
if e.mgoId == "" {
|
|
|
log.Println("SendPayRaffleMsg 未获取到有效的mgoId", e.OrderCode)
|
|
|
return
|
|
@@ -352,7 +352,7 @@ func (e *EquityActive) SendPayRaffleMsg() {
|
|
|
// 发送站内信
|
|
|
p := util.MessageParam{
|
|
|
UserIds: e.mgoId,
|
|
|
- PositionIds: e.positionId,
|
|
|
+ PositionIds: fmt.Sprintf("%v", e.positionId),
|
|
|
Title: siteMsg.Title,
|
|
|
Content: fmt.Sprintf(siteMsg.Content, activityInfo.Name),
|
|
|
MsgType: siteMsg.MsgType,
|