From 809c046994063d28f31b3cd5fe4a24d6d18e2846 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, 16 Apr 2021 14:42:54 +0800 Subject: [PATCH] aa --- .gitignore | 1 + business/jxcallback/orderman/orderman_ext.go | 1 + controllers/auth2.go | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 14f76dcee..70c2ca08c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ param_parser.go *.exe *.exe~ .vscode +.idea \ No newline at end of file diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 9b2a37b06..280c1deef 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -1268,6 +1268,7 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in if order.VendorStoreID == "2391979" { return retVal, err } + isDuplicated, err2 := c.SaveOrder(order, false, dao.GetDB()) if err2 == nil && !isDuplicated { retVal = []int{1} diff --git a/controllers/auth2.go b/controllers/auth2.go index f183ae649..f48b43119 100644 --- a/controllers/auth2.go +++ b/controllers/auth2.go @@ -184,6 +184,7 @@ func (c *Auth2Controller) WeixinOAuth2() { // @Param code query string true "客户同意后得到的code" // @Param block query string true "回调地址" // @Param state query string false "微信回调的登录状态" +// @Param mobile query string false "手机号" // @Success 200 {object} controllers.CallResult // @Failure 200 {object} controllers.CallResult // @router /WeixinMPOAuth2 [get] @@ -206,6 +207,15 @@ func (c *Auth2Controller) WeixinMPOAuth2() { Desc: err.Error(), } } + if params.Mobile != "" { + if user, err := dao.GetUserByID(dao.GetDB(), "mobile", params.Mobile); err == nil { + if user != nil { + + } else { + return retVal, errCode, fmt.Errorf("未查询到用户!mobile :%v", params.Mobile) + } + } + } redirectURL = fmt.Sprintf("%s?info=%s", params.Block, base64.StdEncoding.EncodeToString(utils.MustMarshal(callResult))) return retVal, model.ErrorCodeIgnore, err })