1
This commit is contained in:
@@ -280,7 +280,9 @@ func AddVendorOrgCode(ctx *jxcontext.Context, vendorOrgCode *model.VendorOrgCode
|
||||
return err
|
||||
}
|
||||
if len(list) > 0 {
|
||||
return fmt.Errorf("库里有这个账号了,[%v]", vendorOrgCode.VendorOrgCode)
|
||||
vendorOrgCode.ID = list[0].ID
|
||||
_, err = dao.UpdateEntity(db, vendorOrgCode, "token", "updated_at", "app_key", "app_secret")
|
||||
return err
|
||||
}
|
||||
|
||||
var userName string
|
||||
|
||||
@@ -16,7 +16,6 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type TiktokShopController struct {
|
||||
@@ -123,7 +122,6 @@ func (c *TiktokShopController) TokenMsg() {
|
||||
|
||||
globals.SugarLogger.Debugf("result=====%s", utils.Format4Output(result, false))
|
||||
|
||||
result.ExpiresIn += time.Now().Unix()
|
||||
data, err := json.Marshal(result)
|
||||
if err != nil {
|
||||
c.Data["json"] = tiktok_api.CallbackResponse{Code: tiktok_api.CallbackFailCode, Msg: tiktok_api.CallbackFail}
|
||||
@@ -145,6 +143,7 @@ func (c *TiktokShopController) TokenMsg() {
|
||||
AppSecret: "heihei", // web.AppConfig.DefaultString("tiktokShopAppSecret", "c397aa9f-3927-47c4-8cfe-4d84e02602e0")
|
||||
}
|
||||
if err := common.AddVendorOrgCode(nil, param); err != nil {
|
||||
globals.SugarLogger.Debugf("AddVendorOrgCode=====err%s", err)
|
||||
c.Data["json"] = tiktok_api.CallbackResponse{Code: tiktok_api.CallbackFailCode, Msg: tiktok_api.CallbackFail}
|
||||
c.ServeJSON()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user