diff --git a/tik_tok/md_tik_tok_goods.go b/tik_tok/md_tik_tok_goods.go index 741ad33..aa6b427 100644 --- a/tik_tok/md_tik_tok_goods.go +++ b/tik_tok/md_tik_tok_goods.go @@ -92,3 +92,56 @@ type TikTokTeamOrder struct { OrderID string `json:"order_id"` SettleTime string `json:"settle_time"` } +type TikTokTeamOrderNew struct { + AdsPromotionRate string `json:"ads_promotion_rate"` + App string `json:"app"` + AuthorAccount string `json:"author_account"` + AuthorBuyinId interface{} `json:"author_buyin_id"` + AuthorOpenid string `json:"author_openid"` + AuthorShortId string `json:"author_short_id"` + BuyerAppId string `json:"buyer_app_id"` + ColonelOrderInfo struct { + ActivityId interface{} `json:"activity_id"` + ColonelBuyinId int64 `json:"colonel_buyin_id"` + CommissionRate interface{} `json:"commission_rate"` + EstimatedCommission interface{} `json:"estimated_commission"` + InstitutionId int64 `json:"institution_id"` + InstitutionName string `json:"institution_name"` + RealCommission interface{} `json:"real_commission"` + SettledTechServiceFee interface{} `json:"settled_tech_service_fee"` + TechServiceFee interface{} `json:"tech_service_fee"` + TechServiceFeeRate interface{} `json:"tech_service_fee_rate"` + } `json:"colonel_order_info"` + ColonelOrderInfoSecond struct { + ActivityId int `json:"activity_id"` + ColonelBuyinId int64 `json:"colonel_buyin_id"` + CommissionRate int `json:"commission_rate"` + EstimatedCommission int `json:"estimated_commission"` + InstitutionId int64 `json:"institution_id"` + InstitutionName string `json:"institution_name"` + RealCommission int `json:"real_commission"` + } `json:"colonel_order_info_second"` + ColonelType string `json:"colonel_type"` + CommissionRate int `json:"commission_rate"` + DistributorBuyinId string `json:"distributor_buyin_id"` + DistributorName string `json:"distributor_name"` + FlowPoint string `json:"flow_point"` + GoodShareType string `json:"good_share_type"` + IsTrusteeship bool `json:"is_trusteeship"` + ItemNum int `json:"item_num"` + MediaId interface{} `json:"media_id"` + MediaType interface{} `json:"media_type"` + OrderId string `json:"order_id"` + PayGoodsAmount int `json:"pay_goods_amount"` + PaySuccessTime string `json:"pay_success_time"` + ProductId string `json:"product_id"` + ProductImg string `json:"product_img"` + ProductName string `json:"product_name"` + RefundTime interface{} `json:"refund_time"` + SettleTime interface{} `json:"settle_time"` + SettledGoodsAmount int `json:"settled_goods_amount"` + ShopId int `json:"shop_id"` + ShopName string `json:"shop_name"` + TotalPayAmount int `json:"total_pay_amount"` + UpdateTime string `json:"update_time"` +} diff --git a/tik_tok/svc_tik_tok_team.go b/tik_tok/svc_tik_tok_team.go index cd9bc6f..d250b9d 100644 --- a/tik_tok/svc_tik_tok_team.go +++ b/tik_tok/svc_tik_tok_team.go @@ -185,3 +185,29 @@ func TeamOrder(args map[string]string) *[]TikTokTeamOrder { goodsList = &lmData.Data.Orders return goodsList } +func TeamOrderNew(args map[string]string) *[]TikTokTeamOrderNew { + params := map[string]interface{}{ + "size": args["size"], + "cursor": args["cursor"], + "order_ids": args["order_ids"], + } + send, err := Send(args["appkey"], args["appSecret"], "buyin.instituteOrderColonel", params, args["acctoken"]) + fmt.Println(send) + fmt.Println(err) + var goodsList *[]TikTokTeamOrderNew + product := gjson.Get(send, "data").String() + if err != nil || product == "" { + return goodsList + } + var lmData struct { + Data struct { + Orders []TikTokTeamOrderNew `json:"orders"` + } `json:"data"` + } + err = json.Unmarshal([]byte(send), &lmData) + if err != nil { + return goodsList + } + goodsList = &lmData.Data.Orders + return goodsList +}