From cf887fc4588611e6c3508908a673b7173548f4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 22 Mar 2022 18:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=94=A8=E6=B9=96,=E9=BB=98=E8=AE=A4=E4=B8=8B?= =?UTF-8?q?=E5=90=95=E5=BA=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/auth2/auth2.go | 2 +- business/jxutils/smsmsg/smsmsg_test.go | 27 +++++++++++++++++++------ business/partner/delivery/mtps/store.go | 3 +-- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index 705fa3332..efb7bb5c0 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -286,7 +286,7 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string appID := strings.Split(authSecret, ",")[0] if appID == "wx08a5c2a8581414ff" || appID == "wx2d6949f724b2541d" || appID == "wx18111a41fd17f24f" || appID == "wx4b5930c13f8b1170" { //菜市或者果园 if authInfo.AuthBindInfo.UserID != "" { - binds, err := dao.GetUserBindAuthInfo(dao.GetDB(), authInfo.AuthBindInfo.UserID, 0, nil, "", "", []string{"wx2bb99eb5d2c9b82c", "wx4b5930c13f8b1170"}) + binds, err := dao.GetUserBindAuthInfo(dao.GetDB(), authInfo.AuthBindInfo.UserID, 0, nil, "", "", []string{appID}) if err != nil { return authInfo, err } diff --git a/business/jxutils/smsmsg/smsmsg_test.go b/business/jxutils/smsmsg/smsmsg_test.go index 98382eade..49583a31b 100644 --- a/business/jxutils/smsmsg/smsmsg_test.go +++ b/business/jxutils/smsmsg/smsmsg_test.go @@ -1,10 +1,13 @@ package smsmsg import ( + "fmt" + "git.rosy.net.cn/baseapi/utils" + dyvmsapiclient "github.com/alibabacloud-go/dyvmsapi-20170525-2.0.2/client" + "github.com/alibabacloud-go/tea/tea" "testing" - "git.rosy.net.cn/jx-callback/business/jxutils" - + "git.rosy.net.cn/jx-callback/globals/api" "git.rosy.net.cn/jx-callback/globals/testinit" ) @@ -14,11 +17,23 @@ func init() { } func TestSendSMSMsg(t *testing.T) { - err := SendSMSMsg([]string{"18180948107"}, "京西菜市", "SMS_175583150", map[string]interface{}{ - "daySeq": 9, - "consigneeName": "购买者", - "payMoney": jxutils.IntPrice2StandardString(1230), + err := SendVoiceMsg([]string{"18981810340"}, "tts_222871733", map[string]interface{}{ + "tel": "18981810340", }) + aa := map[string]interface{}{"tel": "13957767601"} + request := &dyvmsapiclient.SingleCallByTtsRequest{ + CalledNumber: tea.String("13957767601"), + TtsCode: tea.String("tts_222871733"), + TtsParam: tea.String(string(utils.MustMarshal(aa))), + } + cli, err := api.CreateClientVoice(tea.String("LTAI4FwZN7pp4dACQHoapkZQ"), tea.String("NTegceUFX0FdfMovqCDzqcIKmhcoOu"), "dyvmsapi.aliyuncs.com") + fmt.Println("err1==", err) + res, _err := cli.SingleCallByTts(request) + fmt.Println(_err) + if *res.Body.Code != "OK" { + fmt.Println("errr", err) + } + if err != nil { t.Fatal(err) } diff --git a/business/partner/delivery/mtps/store.go b/business/partner/delivery/mtps/store.go index bf77f0eb6..4badcc97c 100644 --- a/business/partner/delivery/mtps/store.go +++ b/business/partner/delivery/mtps/store.go @@ -10,7 +10,6 @@ import ( "git.rosy.net.cn/jx-callback/business/partner" "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" - "time" ) const ( @@ -121,7 +120,7 @@ func (c *DeliveryHandler) GetStore(ctx *jxcontext.Context, storeID int, vendorSt //}) //shopInfo.ShopLng = 121345878 //shopInfo.ShopLat = 3115628 - _, err = api.MtpsAPI.CheckOrder(shopInfo.ShopID, shopInfo.ShopAddress, int64(shopInfo.ShopLng), int64(shopInfo.ShopLat), time.Now().Unix()) + //_, err = api.MtpsAPI.CheckOrder(shopInfo.ShopID, shopInfo.ShopAddress, int64(shopInfo.ShopLng), int64(shopInfo.ShopLat), time.Now().Unix()) //result, err := api.MtpsAPI.GetStoreStatus(shopInfo.ShopName) //if err == nil { // storeDetail.AuditStatus = mtpsOpenTypeToJx(result.DataList[0].OpenType)