|
@@ -5,19 +5,20 @@ import (
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
"log"
|
|
|
+ "strconv"
|
|
|
"time"
|
|
|
|
|
|
- "app.yhyue.com/moapp/message/config"
|
|
|
- "app.yhyue.com/moapp/message/db"
|
|
|
- "app.yhyue.com/moapp/message/model"
|
|
|
-
|
|
|
+ "app.yhyue.com/moapp/MessageCenter/rpc/type/message"
|
|
|
. "app.yhyue.com/moapp/jybase/api"
|
|
|
- "app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
-
|
|
|
qu "app.yhyue.com/moapp/jybase/common"
|
|
|
"app.yhyue.com/moapp/jybase/date"
|
|
|
+ "app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
+ "app.yhyue.com/moapp/message/config"
|
|
|
+ "app.yhyue.com/moapp/message/db"
|
|
|
+ "app.yhyue.com/moapp/message/model"
|
|
|
+ . "app.yhyue.com/moapp/message/rpc"
|
|
|
+ . "bp.jydev.jianyu360.cn/BaseService/pushpkg/p"
|
|
|
|
|
|
- // "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
|
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
|
)
|
|
|
|
|
@@ -240,8 +241,6 @@ func (this *Task) ConfirmChallenge() {
|
|
|
sessVal := this.Session().GetMultiple()
|
|
|
positionId := gconv.Int64(sessVal["positionId"])
|
|
|
baseUserId := gconv.Int64(sessVal["base_user_id"])
|
|
|
- // userId := gconv.String(sessVal["mgoUserId"])
|
|
|
-
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
infoMap := map[string]interface{}{}
|
|
|
if string(this.Body()) == "" {
|
|
@@ -262,8 +261,24 @@ func (this *Task) ConfirmChallenge() {
|
|
|
}, map[string]interface{}{
|
|
|
"end_time": endTime,
|
|
|
}) {
|
|
|
- //用户点击“确认挑战”给用户发消息
|
|
|
- // go SendNewUserMsg(userId)
|
|
|
+ go func() {
|
|
|
+ //用户点击“确认挑战”给用户发消息
|
|
|
+ userId := gconv.String(sessVal["mgoUserId"])
|
|
|
+ wxUrl := "/front/sess/" + Se.EncodeString(userId+",_id,identityKeep,") + "__" + Se.EncodeString(config.PushConfig.Messages.ConfirmChallenge.MobileUrl)
|
|
|
+ appUrl := "/jyapp/free/sess/" + Se.EncodeString(userId+",id,"+strconv.Itoa(int(time.Now().Unix()))+",") + "__" + Se.EncodeString(config.PushConfig.Messages.ConfirmChallenge.MobileUrl)
|
|
|
+ req := &message.MultipleSaveMsgReq{
|
|
|
+ UserIds: userId,
|
|
|
+ Title: config.PushConfig.Messages.ConfirmChallenge.Title,
|
|
|
+ Content: config.PushConfig.Messages.ConfirmChallenge.Content,
|
|
|
+ MsgType: config.PushConfig.Messages.ConfirmChallenge.MsgType,
|
|
|
+ Link: config.PushConfig.Messages.ConfirmChallenge.PcUrl + "," + config.PushConfig.Messages.ConfirmChallenge.MobileUrl + "," + config.PushConfig.Messages.ConfirmChallenge.MobileUrl,
|
|
|
+ Appid: config.PushConfig.Messages.ConfirmChallenge.Appid,
|
|
|
+ AppPushUrl: appUrl,
|
|
|
+ WxPushUrl: config.PushConfig.Webdomain + wxUrl,
|
|
|
+ IosPushUrl: appUrl,
|
|
|
+ }
|
|
|
+ SendMsg("确认挑战", req)
|
|
|
+ }()
|
|
|
return map[string]interface{}{"status": 1}, nil
|
|
|
}
|
|
|
}
|