voucher
This commit is contained in:
parent
363254102a
commit
f206764800
|
|
@ -81,12 +81,12 @@ func marketingFJxw() *marketing2.Marketing {
|
|||
|
||||
func MarketingSend() {
|
||||
|
||||
//openId := "oSNb4ftgnWC22Z0cWTjsQebdr2Yk"
|
||||
//appId := "wx619991cc795028f5"
|
||||
openId := "oSNb4ftgnWC22Z0cWTjsQebdr2Yk"
|
||||
appId := "wx619991cc795028f5"
|
||||
|
||||
//195516196845312409613
|
||||
openId := "ocuH-0Nymo4sJLRNabIBbg9H2XCo"
|
||||
appId := "wx5d3e839568f24b2b"
|
||||
//openId := "ocuH-0Nymo4sJLRNabIBbg9H2XCo"
|
||||
//appId := "wx5d3e839568f24b2b"
|
||||
//respBody={"coupon_id":"116076813524"}
|
||||
|
||||
//openId := "ocZ-njugTd_fgCJMHTG8PukPAVm4"
|
||||
|
|
@ -99,9 +99,9 @@ func MarketingSend() {
|
|||
//19581007753265602565
|
||||
//19581007753265602564
|
||||
request := &marketing2.SendReq{
|
||||
ActivityId: utils.String("11941580000000005"),
|
||||
StockId: utils.String("20847510"),
|
||||
OutRequestNo: utils.String("195516196845312409613"),
|
||||
ActivityId: utils.String("11941580000000012"),
|
||||
StockId: utils.String("20964154"),
|
||||
OutRequestNo: utils.String("196605139814767820814"),
|
||||
Appid: utils.String(appId),
|
||||
StockCreatorMchId: utils.String("1652465541"),
|
||||
}
|
||||
|
|
@ -128,11 +128,7 @@ func MarketingSend() {
|
|||
fmt.Printf("请求成功: %s\n", *response.CouponId)
|
||||
}
|
||||
|
||||
func MarketingQuery() {
|
||||
|
||||
appId := "wx619991cc795028f5"
|
||||
openId := "oSNb4ftgnWC22Z0cWTjsQebdr2Yk"
|
||||
couponId := "113831004454"
|
||||
func MarketingQuery(appId, openId, couponId string) {
|
||||
|
||||
response, err := marketing().Query(appId, openId, couponId)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package test
|
|||
|
||||
import "testing"
|
||||
|
||||
func TestMarketingSend(t *testing.T) {
|
||||
func Test_MarketingSend(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
}{
|
||||
|
|
@ -16,3 +16,22 @@ func TestMarketingSend(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_MarketingQuery(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
appId, openId, couponId string
|
||||
}{
|
||||
{
|
||||
name: "查询绑定多笔立减活动的代金券详情", // 查询的商户非创建方商户 查询商户要为创建方商户
|
||||
appId: "wx619991cc795028f5",
|
||||
openId: "oSNb4ftgnWC22Z0cWTjsQebdr2Yk",
|
||||
couponId: "122529292094",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
MarketingQuery(tt.appId, tt.openId, tt.couponId)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,35 +93,9 @@ func QueryCoupon() {
|
|||
return
|
||||
}
|
||||
|
||||
//req := cashcoupons.QueryCouponRequest{
|
||||
// //CouponId: core.String("101270193400"),
|
||||
// CouponId: core.String("101270193400"),
|
||||
// Appid: core.String("wx619991cc795028f5"),
|
||||
// Openid: core.String("oSNb4fmScVLmXILaolXVdBpJmYbQ"),
|
||||
//}
|
||||
|
||||
//req := cashcoupons.QueryCouponRequest{
|
||||
// CouponId: core.String("101274529925"),
|
||||
// Appid: core.String("wx619991cc795028f5"),
|
||||
// Openid: core.String("oSNb4fpnLNdkFPk-O43o6f2hxxRo"),
|
||||
//}
|
||||
|
||||
//appId := "wx619991cc795028f5"
|
||||
//openId := "oSNb4ftgnWC22Z0cWTjsQebdr2Yk"
|
||||
//couponId := "113831004454"
|
||||
//req := cashcoupons.QueryCouponRequest{
|
||||
// CouponId: core.String(couponId),
|
||||
// Appid: core.String(appId),
|
||||
// Openid: core.String(openId),
|
||||
//}
|
||||
|
||||
//appId := "wx5d3e839568f24b2b"
|
||||
//openId := "ocuH-0Nymo4sJLRNabIBbg9H2XCo"
|
||||
//couponId := "116076813524"
|
||||
|
||||
appId := "wxd27e255810842ba8"
|
||||
openId := "o3dEt5cA8jt3Kz5wNzAO6-3YQHsE"
|
||||
couponId := "129623470711"
|
||||
appId := "wx619991cc795028f5"
|
||||
openId := "oSNb4ftgnWC22Z0cWTjsQebdr2Yk"
|
||||
couponId := "122529292094"
|
||||
|
||||
req := cashcoupons.QueryCouponRequest{
|
||||
CouponId: core.String(couponId),
|
||||
|
|
@ -174,8 +148,8 @@ func QueryProduct() {
|
|||
}
|
||||
|
||||
req := cashcoupons.QueryStockRequest{
|
||||
StockId: core.String("21104160"),
|
||||
StockCreatorMchid: core.String("1715349578"),
|
||||
StockId: core.String("20965520"),
|
||||
StockCreatorMchid: core.String("1652465541"),
|
||||
}
|
||||
|
||||
svc := cashcoupons.StockApiService{Client: client}
|
||||
|
|
|
|||
Loading…
Reference in New Issue