huangjiajun pirms 10 mēnešiem
vecāks
revīzija
58ffa224b6
4 mainītis faili ar 66 papildinājumiem un 16 dzēšanām
  1. +34
    -0
      md/meituan_fenxiao.go
  2. +12
    -0
      meituan_fenxiao/meituan_fenxiao.go
  3. +6
    -2
      recharge/api.go
  4. +14
    -14
      recharge/recharge.go

+ 34
- 0
md/meituan_fenxiao.go Parādīt failu

@@ -5,3 +5,37 @@ type MeituanFenXiaoGeoInfo struct {
Lng float64 `json:"lng"`
Lat float64 `json:"lat"`
}
type MeituanFenXiaoOrderResult struct {
RecordCount int `json:"recordCount"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
Records []struct {
UtmSource int `json:"utmSource"`
UtmMedium string `json:"utmMedium"`
DisplayOrderId string `json:"displayOrderId"`
OrderItemId string `json:"orderItemId"`
DealName string `json:"dealName"`
DealPicUrl string `json:"dealPicUrl"`
ActualItemAmount int `json:"actualItemAmount"`
DealOriginPrice int `json:"dealOriginPrice"`
DealMerchantAllowance int `json:"dealMerchantAllowance"`
DealPlatformAllowance int `json:"dealPlatformAllowance"`
PoiUuid string `json:"poiUuid"`
ShopName string `json:"shopName"`
PoiBrandName string `json:"poiBrandName"`
ShopCityName string `json:"shopCityName"`
PoiCate0 string `json:"poiCate0"`
PoiCate1 string `json:"poiCate1"`
TransactionTime string `json:"transactionTime"`
TransactionType int `json:"transactionType"`
TransactionAmount int `json:"transactionAmount"`
MediaName string `json:"mediaName"`
PromotionName string `json:"promotionName"`
OrderMtUserId string `json:"orderMtUserId"`
EstimatedCommission int `json:"estimatedCommission"`
CommissionRatio float64 `json:"commissionRatio"`
SettleStatus int `json:"settleStatus"`
ExtraInfo string `json:"extraInfo"`
} `json:"records"`
PositionIndex string `json:"positionIndex"`
}

+ 12
- 0
meituan_fenxiao/meituan_fenxiao.go Parādīt failu

@@ -1,6 +1,18 @@
package meituan_fenxiao

import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/md"
"encoding/json"
)

func MeituanFenXiaoGoods(param map[string]interface{}) (string, error) {
send, err := MeituanFenXiaoSend("api/search/open/odp/products", param)
return send, err
}

func MeituanFenXiaoOrder(param map[string]interface{}) (md.MeituanFenXiaoOrderResult, error) {
send, err := MeituanFenXiaoSend("ajax/odp/order/flow/fetch", param)
var data md.MeituanFenXiaoOrderResult
json.Unmarshal([]byte(send), &data)
return data, err
}

+ 6
- 2
recharge/api.go Parādīt failu

@@ -7,8 +7,12 @@ import (
"strings"
)

func send(method string, apiKey string, param map[string]string) (string, error) {
url := "http://8.130.97.197/yrapi.php/" + method
func send(url, method string, apiKey string, param map[string]string) (string, error) {
if url == "" {
url = "http://szcz.jjffb.com/yrapi.php/"
}
url = url + method
//url := "http://szcz.jjffb.com/yrapi.php/" + method
param["sign"] = GetRechargeSign(apiKey, param)
post, err := zhios_third_party_utils.CurlPost(url, param, map[string]string{})
return string(post), err


+ 14
- 14
recharge/recharge.go Parādīt failu

@@ -5,8 +5,8 @@ import "fmt"
/***
查询用户信息
*/
func GetUser(apiKey string, param map[string]string) (string, error) {
s, err := send("index/user", apiKey, param)
func GetUser(url, apiKey string, param map[string]string) (string, error) {
s, err := send(url, "index/user", apiKey, param)
fmt.Println(s)
fmt.Println(err)
return s, err
@@ -17,8 +17,8 @@ func GetUser(apiKey string, param map[string]string) (string, error) {
type int 1 false 产品类型ID,非必须
cate_id int 10 false 分类ID,非必须
*/
func GetProduct(apiKey string, param map[string]string) (string, error) {
s, err := send("index/product", apiKey, param)
func GetProduct(url, apiKey string, param map[string]string) (string, error) {
s, err := send(url, "index/product", apiKey, param)
fmt.Println(s)
fmt.Println(err)
return s, err
@@ -28,8 +28,8 @@ func GetProduct(apiKey string, param map[string]string) (string, error) {
产品ID查询【新增】
id int 1 true 产品ID
*/
func GetPrice(apiKey string, param map[string]string) (string, error) {
s, err := send("index/price", apiKey, param)
func GetPrice(url, apiKey string, param map[string]string) (string, error) {
s, err := send(url, "index/price", apiKey, param)
fmt.Println(s)
fmt.Println(err)
return s, err
@@ -38,8 +38,8 @@ func GetPrice(apiKey string, param map[string]string) (string, error) {
/***
获取产品类型和产品分类
*/
func GetProductCate(apiKey string, param map[string]string) (string, error) {
s, err := send("index/typecate", apiKey, param)
func GetProductCate(url, apiKey string, param map[string]string) (string, error) {
s, err := send(url, "index/typecate", apiKey, param)
fmt.Println(s)
fmt.Println(err)
return s, err
@@ -49,8 +49,8 @@ func GetProductCate(apiKey string, param map[string]string) (string, error) {
自发查询订单状态
out_trade_nums string CZH668877,CZH9988666 true 商户订单号;多个用英文,分割
*/
func GetOrder(apiKey string, param map[string]string) (string, error) {
s, err := send("index/check", apiKey, param)
func GetOrder(url, apiKey string, param map[string]string) (string, error) {
s, err := send(url, "index/check", apiKey, param)
fmt.Println(s)
fmt.Println(err)
return s, err
@@ -59,8 +59,8 @@ func GetOrder(apiKey string, param map[string]string) (string, error) {
/***
电费支持地区查询
*/
func GetArea(apiKey string, param map[string]string) (string, error) {
s, err := send("index/elecity", apiKey, param)
func GetArea(url, apiKey string, param map[string]string) (string, error) {
s, err := send(url, "index/elecity", apiKey, param)
fmt.Println(s)
fmt.Println(err)
return s, err
@@ -83,8 +83,8 @@ param1 string * false 扩展参数,后台查看提交的产品类目是否需
param2 string * false 扩展参数,后台查看提交的产品类目是否需要提交此参数
param3 string * false 扩展参数,后台查看提交的产品类目是否需要提交此参数
*/
func Pay(apiKey string, param map[string]string) (string, error) {
s, err := send("index/recharge", apiKey, param)
func Pay(url, apiKey string, param map[string]string) (string, error) {
s, err := send(url, "index/recharge", apiKey, param)
fmt.Println(s)
fmt.Println(err)
return s, err


Notiek ielāde…
Atcelt
Saglabāt