This commit is contained in:
邹宗楠
2022-10-17 14:06:23 +08:00
parent 0695aa132c
commit 53fe97cbc1
49 changed files with 78 additions and 225 deletions

View File

@@ -4,7 +4,6 @@ import (
"encoding/json"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxstore/secretNumber"
"git.rosy.net.cn/jx-callback/globals"
"github.com/astaxie/beego/server/web"
"io/ioutil"
)
@@ -26,7 +25,6 @@ func (c *AliApiController) SecretNumberMsg() {
var res *secretNumber.SecretNumberMsgRes
for k, _ := range mapData {
if err := json.Unmarshal([]byte(k), &res); err == nil {
globals.SugarLogger.Debugf("SecretNumberMsg msg: %v", utils.Format4Output(res, true))
secretNumber.CallbackBrandBill(res)
}
}

View File

@@ -116,7 +116,6 @@ func (c *Auth2Controller) TiktokDecrypt() {
// @router /Login [post]
func (c *Auth2Controller) Login() {
c.callLogin(func(params *tAuth2LoginParams) (retVal interface{}, errCode string, err error) {
globals.SugarLogger.Debug("params.AuthType==============", params.AuthType)
if params.AuthType == auth2.AuthTypeMobile {
params.AuthIDType = auth2.UserIDMobile
} else if params.AuthType == auth2.AuthTypeEmail {
@@ -136,7 +135,6 @@ func (c *Auth2Controller) Login() {
ctx := auth2.NewContext(c.Ctx.ResponseWriter, c.Ctx.Request)
globals.SugarLogger.Debug("params.AuthType, params.AuthID, params.AuthIDType, params.AuthSecret==============", params.AuthType, params.AuthID, params.AuthIDType, params.AuthSecret)
authInfo, err := auth2.Login(ctx, params.AuthType, params.AuthID, params.AuthIDType, params.AuthSecret)
globals.SugarLogger.Debug("authInfo==============", authInfo)
// TODO 兼容没有取到authid2的错误
if err == nil && authInfo.AuthBindInfo != nil {
if authInfo.AuthBindInfo.AuthID2 == "" {
@@ -348,7 +346,6 @@ func (c *Auth2Controller) AddAuthBindWithMobile() {
if err != nil {
return retVal, "", err
}
globals.SugarLogger.Debug("打印newAuthInfo==============", newAuthInfo)
err = auth2.AddAuthBindWithMobile(newAuthInfo, params.Mobile)
return retVal, "", err
})

View File

@@ -9,8 +9,6 @@ import (
"git.rosy.net.cn/jx-callback/business/model/dao"
"time"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
"github.com/astaxie/beego/server/web"
)
@@ -54,7 +52,6 @@ func (c *DDAPIController) Sign() {
str := "jsapi_ticket=" + ddapi.Ticket +
"&noncestr=" + params.NonceStr + "&timestamp=" + params.TimeStamp + "&url=" + params.Url
retVal = fmt.Sprintf("%x", sha1.Sum([]byte(str)))
globals.SugarLogger.Debugf("dingapi str:%s sign:%v", str, retVal)
}
return retVal, "", err
})

View File

@@ -20,7 +20,6 @@ type EnterpriseController struct {
// 消息结构体将使用创建应用时的EncodingAESKey进行加密特别注意, 在第三方回调事件中使用加解密算法receiveid的内容为suiteid
// ,请参考接收消息解析数据包。
func (e *EnterpriseController) EnterpriseCallback() {
globals.SugarLogger.Debug("==============企业微信通知回调")
r := e.Ctx.Request
switch e.Ctx.Request.Method {
case http.MethodPost:

View File

@@ -7,8 +7,6 @@ import (
"git.rosy.net.cn/jx-callback/business/partner/purchase/jdshop"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
"github.com/astaxie/beego/server/web"
)
@@ -25,7 +23,6 @@ func (c *JdsController) Msg() {
if err == nil {
jdshop.OnCallbackMsg(call)
}
globals.SugarLogger.Debugf("jds callback callbackResponse:%s", utils.Format4Output(call, true))
c.Data["json"] = call
c.ServeJSON()
} else {

View File

@@ -2,9 +2,7 @@ package controllers
import (
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
"github.com/astaxie/beego/server/web"
)
@@ -16,7 +14,6 @@ type MtwmController struct {
func (c *MtwmController) onCallbackMsg(msgType string) {
c.Data["json"] = mtwmapi.Err2CallbackResponse(nil, "")
msg, callbackResponse := api.MtwmAPI.GetCallbackMsg(c.Ctx.Request)
globals.SugarLogger.Debug(utils.Format4Output(msg, true))
if callbackResponse == nil {
callbackResponse = mtwm.OnCallbackMsg(msg)
if callbackResponse == nil {

View File

@@ -7,10 +7,7 @@ import (
"git.rosy.net.cn/jx-callback/globals/api"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
"git.rosy.net.cn/jx-callback/globals"
"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
)
@@ -22,7 +19,6 @@ type TongLianController struct {
func (c *TongLianController) Msg() {
if c.Ctx.Input.Method() == http.MethodPost {
call, err := api.TLpayAPI.GetCallbackMsg(getUsefulRequest2(c.Ctx))
globals.SugarLogger.Debugf("tonglianapi callback callbackResponse:%s", utils.Format4Output(call, true))
if err == nil {
err = localjx.OnTLPayCallback(call)
}

View File

@@ -31,7 +31,6 @@ func (c *WeimobController) onCallbackMsg() {
}
func (c *WeimobController) Code() {
globals.SugarLogger.Debugf("WeimobController code, code:%s, state:%s", c.GetString("code"), c.GetString("state"))
state := c.GetString("state")
if state == globals.WeimobStateSecret { // 防止有人故意搞坏添加一个secret
code := c.GetString("code")