|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- package csjplatform
-
- import (
- zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
- "fmt"
- "strings"
- )
-
- func LiveRoom(args map[string]string) (string, error) {
- params := map[string]interface{}{
- "page": zhios_third_party_utils.StrToInt(args["page"]),
- "page_size": zhios_third_party_utils.StrToInt(args["page_size"]),
- "sort_type": zhios_third_party_utils.StrToInt(args["sort_type"]),
- "sort_by": zhios_third_party_utils.StrToInt(args["sort_by"]),
- "status": zhios_third_party_utils.StrToInt(args["status"]),
- }
- if args["author_info"] != "" {
- params["author_info"] = args["author_info"]
- }
- send, err := Send(args["app_id"], args["app_secret"], "live/search", params)
- fmt.Println(send)
- fmt.Println(err)
- return send, err
- }
- func LiveRoomLink(args map[string]string) (string, error) {
- params := map[string]interface{}{
- "author_buyin_id": args["author_buyin_id"],
- "external_info": args["external_info"],
- "live_ext": args["live_ext"],
- "sort_by": zhios_third_party_utils.StrToInt(args["sort_by"]),
- "status": zhios_third_party_utils.StrToInt(args["status"]),
- }
- if args["share_type"] != "" {
- ex := strings.Split(args["share_type"], ",")
- ids := make([]int, 0)
- for _, v := range ex {
- ids = append(ids, zhios_third_party_utils.StrToInt(v))
- }
- params["share_type"] = ids
- }
- if args["product_id"] != "" {
- params["product_id"] = zhios_third_party_utils.StrToInt(args["product_id"])
- }
- send, err := Send(args["app_id"], args["app_secret"], "live/link", params)
- fmt.Println(send)
- fmt.Println(err)
- return send, err
- }
|