|
@@ -1,7 +1,21 @@
|
|
|
package entity
|
|
|
|
|
|
import (
|
|
|
+ "encoding/json"
|
|
|
+ "errors"
|
|
|
+ "fmt"
|
|
|
+ "jy/src/jfw/modules/publicapply/src/config"
|
|
|
+ "jy/src/jfw/modules/publicapply/src/db"
|
|
|
+ "jy/src/jfw/modules/publicapply/src/jyutil"
|
|
|
+ "jy/src/jfw/modules/publicapply/src/oneclick/initjson"
|
|
|
+ "log"
|
|
|
+ "net/http"
|
|
|
+ "strings"
|
|
|
+ "sync"
|
|
|
+ "time"
|
|
|
+
|
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
|
+ qutil "app.yhyue.com/moapp/jybase/common"
|
|
|
"app.yhyue.com/moapp/jybase/date"
|
|
|
"app.yhyue.com/moapp/jybase/encrypt"
|
|
|
"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
|
|
@@ -11,22 +25,10 @@ import (
|
|
|
"app.yhyue.com/moapp/jybase/usercenter"
|
|
|
"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
|
|
|
"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
|
|
|
- "encoding/json"
|
|
|
- "errors"
|
|
|
- "fmt"
|
|
|
openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
|
|
|
dypnsapi20170525 "github.com/alibabacloud-go/dypnsapi-20170525/v2/client"
|
|
|
util "github.com/alibabacloud-go/tea-utils/v2/service"
|
|
|
"github.com/alibabacloud-go/tea/tea"
|
|
|
- "jy/src/jfw/modules/publicapply/src/config"
|
|
|
- "jy/src/jfw/modules/publicapply/src/db"
|
|
|
- "jy/src/jfw/modules/publicapply/src/jyutil"
|
|
|
- "jy/src/jfw/modules/publicapply/src/oneclick/initjson"
|
|
|
- "log"
|
|
|
- "net/http"
|
|
|
- "strings"
|
|
|
- "sync"
|
|
|
- "time"
|
|
|
)
|
|
|
|
|
|
type OneClickInfo struct {
|
|
@@ -413,6 +415,19 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
|
|
|
}
|
|
|
return 0
|
|
|
}()
|
|
|
+ if status == 1 {
|
|
|
+ mgoUserId := qutil.ObjToString(o.Session.Get("mgoUserId"))
|
|
|
+ err := jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.NsqTopic, "task", mgoUserId, "", map[string]interface{}{
|
|
|
+ "code": 1014, //下载app任务
|
|
|
+ "types": "downloadApp",
|
|
|
+ "num": 50,
|
|
|
+ "baseUserId": o.Session.Get("base_user_id"),
|
|
|
+ "positionId": o.Session.Get("positionId"),
|
|
|
+ })
|
|
|
+ if err != nil {
|
|
|
+ log.Println(mgoUserId, "下载app任务,发送nsq消息错误-->", err)
|
|
|
+ }
|
|
|
+ }
|
|
|
result := map[string]interface{}{
|
|
|
"status": status,
|
|
|
"userId": o.Session.Get("mgoUserId"),
|