From dc1f8df8f6d01c00d2b518e16f9289395a4f5903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 9 Apr 2021 11:44:57 +0800 Subject: [PATCH] aa --- business/jxstore/act/act.go | 8 ++++---- controllers/auth2.go | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index 75f061fc4..8b8972c93 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -459,10 +459,10 @@ func checkActValidation(act *model.Act, vendorIDs []int) (err error) { } else if act.EndAt.Sub(act.BeginAt) < 0 { errList.AddErr(fmt.Errorf("活动开始时间必须小于活动结束时间")) } - vendorIDMap := make(map[int]int) - for _, vendorID := range vendorIDs { - vendorIDMap[vendorID] = 1 - } + // vendorIDMap := make(map[int]int) + // for _, vendorID := range vendorIDs { + // vendorIDMap[vendorID] = 1 + // } if act.Type == model.ActSkuDirectDown || act.Type == model.ActSkuSecKill { if act.PricePercentage == 0 { diff --git a/controllers/auth2.go b/controllers/auth2.go index c14aa0cea..ee210d23c 100644 --- a/controllers/auth2.go +++ b/controllers/auth2.go @@ -6,6 +6,8 @@ import ( "net/http" "strings" + "git.rosy.net.cn/jx-callback/globals/api" + "git.rosy.net.cn/baseapi/platformapi/weixinapi" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/auth2" @@ -360,9 +362,8 @@ type UserInfoWithWeixin struct { func (c *Auth2Controller) GetUserByMiniInfo() { c.callGetUserByMiniInfo(func(params *tAuth2GetUserByMiniInfoParams) (retVal interface{}, errCode string, err error) { authInfo := &auth2.AuthInfo{} - // result := api.Cacher.Get(params.Token) - // utils.Map2StructByJson(result.(map[string]interface{}), &authInfo, false) - // authInfo, err := api.Cacher.Get(params.Token) + result := api.Cacher.Get(params.Token) + utils.Map2StructByJson(result.(map[string]interface{}), &authInfo, false) jsCode := "" if params.AuthType == weixin.AuthTypeMini { jsCode = GetComposedCode(&c.Controller, params.JsCode)