Documentation ¶
Index ¶
- func ChangeNotice(userID string) error
- func CompleteTask(userID string, taskID string) error
- func CreateRechargeGoods(params CreateRechargeGoodsRequest) error
- func CreateTask(params CreateTaskRequest) error
- func DeleteRechargeGoods(id string) error
- func DeleteTask(id string) error
- func Destroy()
- func GetRewardTypes() ([]string, error)
- func GetUserBonusPoints(userID string) (int64, error)
- func Init(baseUrl string, timeoutSec time.Duration)
- func NotifyOrder(outTradeNo string, resultCode string, errCodeDes string) error
- func ReceiveAllTaskReward(userID string) error
- func SignIn(userID string) (int64, error)
- func UpdateRechargeGoods(params UpdateRechargeGoodsRequest) error
- func UpdateTask(params UpdateTaskRequest) error
- func UploadRechargeGoodsPic(f *multipart.FileHeader) (string, string, error)
- func UploadTaskPic(f *multipart.FileHeader) (string, string, error)
- type BonusPointsRankingInfo
- type ChangeNoticeRequest
- type CompleteUserTaskRequest
- type ConfigDayBonusPointsRequest
- type ConsecutiveDaysRankingInfo
- type CreateOrderRequest
- type CreateOrderResponse
- type CreateRechargeGoodsRequest
- type CreateTaskRequest
- type GetBonusPointsDetailResponse
- type GetBonusPointsRankingQuery
- type GetBonusPointsRankingResponse
- type GetConsecutiveDaysRankingQuery
- type GetConsecutiveDaysRankingResponse
- type GetOrdersResponse
- type GetRechargeGoodsQuery
- type GetRechargeGoodsResponse
- type GetRewardTypesResponse
- type GetSignConfigQuery
- type GetSignConfigResponse
- type GetSignInfoQuery
- type GetSignInfoResponse
- type GetTaskConfigResponse
- type GetUserBonusPointsResponse
- type GetUserTasksResponse
- type NotifyOrderRequest
- type OrderInfo
- type PicInfo
- type ReceiveAllTaskRewardRequest
- type RechargeGoodsInfo
- type RechargeOrderInfo
- type SignConfigInfo
- type SignInRequest
- type SignInResponse
- type StartUserTaskRequest
- type TaskConfigInfo
- type UpdateRechargeGoodsRequest
- type UpdateTaskRequest
- type UploadGoodsPicResponse
- type UploadTaskPicResponse
- type UserBonusPointsDetailInfo
- type UserSignInfo
- type UserTaskInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeNotice ¶
func CompleteTask ¶
func CreateRechargeGoods ¶
func CreateRechargeGoods(params CreateRechargeGoodsRequest) error
func CreateTask ¶
func CreateTask(params CreateTaskRequest) error
func DeleteRechargeGoods ¶
func DeleteTask ¶
func GetRewardTypes ¶
func GetUserBonusPoints ¶
func ReceiveAllTaskReward ¶
func UpdateRechargeGoods ¶
func UpdateRechargeGoods(params UpdateRechargeGoodsRequest) error
func UpdateTask ¶
func UpdateTask(params UpdateTaskRequest) error
func UploadRechargeGoodsPic ¶
func UploadRechargeGoodsPic(f *multipart.FileHeader) (string, string, error)
func UploadTaskPic ¶
func UploadTaskPic(f *multipart.FileHeader) (string, string, error)
Types ¶
type BonusPointsRankingInfo ¶
type BonusPointsRankingInfo struct { ID int `json:"id"` UserID string `json:"userId"` BonusPoints int64 `json:"bonusPoints"` }
func BonusPointsRanking ¶
func BonusPointsRanking(num int) ([]BonusPointsRankingInfo, error)
type ChangeNoticeRequest ¶
type ChangeNoticeRequest struct {
UserID string `json:"userId" binding:"required"`
}
type CompleteUserTaskRequest ¶
type ConsecutiveDaysRankingInfo ¶
type ConsecutiveDaysRankingInfo struct { ID int `json:"id"` UserID string `json:"userId"` ConsecutiveDays int `json:"consecutiveDays"` }
func GetConsecutiveDaysRanking ¶
func GetConsecutiveDaysRanking(num int) ([]ConsecutiveDaysRankingInfo, error)
type CreateOrderRequest ¶
type CreateOrderResponse ¶
type CreateOrderResponse struct { Info *RechargeOrderInfo `json:"info"` // contains filtered or unexported fields }
type CreateTaskRequest ¶
type CreateTaskRequest struct { TaskName string `json:"taskName"` TaskDetail string `json:"taskDetail"` CompleteTimes uint8 `json:"completeTimes"` JumpType uint8 `json:"jumpType"` JumpAddr string `json:"jumpAddr"` EndTime string `json:"endTime"` RewardType uint8 `json:"rewardType"` TaskType uint8 `json:"taskType"` RewardNum int64 `json:"rewardNum"` Url string `json:"url"` }
type GetBonusPointsDetailResponse ¶
type GetBonusPointsDetailResponse struct { Infos []UserBonusPointsDetailInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` // contains filtered or unexported fields }
type GetBonusPointsRankingQuery ¶
type GetBonusPointsRankingQuery struct {
Num int `form:"num"`
}
type GetBonusPointsRankingResponse ¶
type GetBonusPointsRankingResponse struct { Infos []BonusPointsRankingInfo `json:"infos"` // contains filtered or unexported fields }
type GetConsecutiveDaysRankingQuery ¶
type GetConsecutiveDaysRankingQuery struct {
Num int `form:"num"`
}
type GetConsecutiveDaysRankingResponse ¶
type GetConsecutiveDaysRankingResponse struct { Infos []ConsecutiveDaysRankingInfo `json:"infos"` // contains filtered or unexported fields }
type GetOrdersResponse ¶
type GetRechargeGoodsQuery ¶
type GetRechargeGoodsResponse ¶
type GetRechargeGoodsResponse struct { Infos []RechargeGoodsInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` // contains filtered or unexported fields }
type GetRewardTypesResponse ¶
type GetRewardTypesResponse struct { Types []string `json:"types"` // contains filtered or unexported fields }
type GetSignConfigQuery ¶
type GetSignConfigQuery struct {
Day int `form:"day"`
}
type GetSignConfigResponse ¶
type GetSignConfigResponse struct { Infos []SignConfigInfo `json:"infos"` // contains filtered or unexported fields }
type GetSignInfoQuery ¶
type GetSignInfoResponse ¶
type GetSignInfoResponse struct { Infos []UserSignInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` // contains filtered or unexported fields }
type GetTaskConfigResponse ¶
type GetTaskConfigResponse struct { Infos []TaskConfigInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` // contains filtered or unexported fields }
type GetUserBonusPointsResponse ¶
type GetUserBonusPointsResponse struct { BonusPoints int64 `json:"bonusPoints"` // contains filtered or unexported fields }
type GetUserTasksResponse ¶
type GetUserTasksResponse struct { Infos []UserTaskInfo `json:"infos"` // contains filtered or unexported fields }
type NotifyOrderRequest ¶
type OrderInfo ¶
type OrderInfo struct { ID string `json:"id"` UserID string `json:"userId"` UserName string `json:"userName"` UserPhone string `json:"userPhone"` GoodsID string `json:"goodsId"` GoodsName string `json:"goodsName"` GoodsPrice float64 `json:"goodsPrice"` BonusPoints int64 `json:"bonusPoints"` OpenID string `json:"openId"` FailReason string `json:"failReason"` State uint8 `json:"state"` CreateTime string `json:"createTime"` }
type ReceiveAllTaskRewardRequest ¶
type ReceiveAllTaskRewardRequest struct {
UserID string `json:"userId"`
}
type RechargeGoodsInfo ¶
type RechargeGoodsInfo struct { ID string `json:"id"` Title string `json:"title"` SubTitle string `json:"subTitle"` Discount string `json:"discount"` Price float64 `json:"price"` BonusPoints int64 `json:"bonusPoints"` Sort int `json:"sort"` Url string `json:"url"` }
func GetRechargeGoods ¶
func GetRechargeGoods(pageNo int, pageSize int) ([]RechargeGoodsInfo, int64, error)
type RechargeOrderInfo ¶
type SignConfigInfo ¶
type SignConfigInfo struct { Day int `json:"day,omitempty"` BonusPoints int `json:"bonusPoints,omitempty"` }
func GetSignConfig ¶
func GetSignConfig(day int) ([]SignConfigInfo, error)
type SignInRequest ¶
type SignInRequest struct {
UserID string `json:"userId" binding:"required"`
}
type SignInResponse ¶
type SignInResponse struct { BonusPoints int64 `json:"bonusPoints"` // contains filtered or unexported fields }
type StartUserTaskRequest ¶
type TaskConfigInfo ¶
type TaskConfigInfo struct { ID string `json:"id"` TaskName string `json:"taskName"` TaskDetail string `json:"taskDetail"` CompleteTimes uint8 `json:"completeTimes"` JumpType uint8 `json:"jumpType"` JumpAddr string `json:"jumpAddr"` EndTime string `json:"endTime"` RewardType uint8 `json:"rewardType"` TaskType uint8 `json:"taskType"` Url string `json:"url"` RewardNum int64 `json:"rewardNum"` }
type UpdateTaskRequest ¶
type UpdateTaskRequest struct { ID string `json:"id"` TaskName string `json:"taskName"` TaskDetail string `json:"taskDetail"` CompleteTimes int `json:"completeTimes"` JumpType uint8 `json:"jumpType"` JumpAddr string `json:"jumpAddr"` EndTime string `json:"endTime"` TaskType uint8 `json:"taskType"` RewardType uint8 `json:"rewardType"` RewardNum int64 `json:"rewardNum"` Url string `json:"url"` }
type UploadGoodsPicResponse ¶
type UploadTaskPicResponse ¶
type UploadTaskPicResponse struct { Info *PicInfo `json:"info"` // contains filtered or unexported fields }
type UserBonusPointsDetailInfo ¶
type UserBonusPointsDetailInfo struct { ID string `json:"id"` UserID string `json:"userId"` BonusPointsOffset int64 `json:"bonusPointsOffset"` ChangeType string `json:"changeType"` ChangeTime string `json:"changeTime"` }
func GetBonusPointsDetails ¶
type UserSignInfo ¶
type UserSignInfo struct { UserID string `json:"userId"` ConsecutiveDays int `json:"consecutiveDays"` SevenDays int `json:"sevenDays"` Notice bool `json:"notice"` Signed bool `json:"signed"` }
func GetSignInfo ¶
func GetSignInfo(userID string, pageNo int, pageSize int) ([]UserSignInfo, error)
type UserTaskInfo ¶
type UserTaskInfo struct { ID string `json:"id"` TaskName string `json:"taskName"` TaskDetail string `json:"taskDetail"` JumpType uint8 `json:"jumpType"` JumpAddr string `json:"jumpAddr"` Complete bool `json:"complete"` Url string `json:"url"` }
func GetUserTasks ¶
func GetUserTasks(userID string, taskType uint8) ([]UserTaskInfo, error)
Click to show internal directories.
Click to hide internal directories.