436 lines
12 KiB
Go
436 lines
12 KiB
Go
package proto
|
||
|
||
import (
|
||
"service/api/base"
|
||
"service/dbstruct"
|
||
"service/library/payclients/wxpaycli"
|
||
|
||
"github.com/go-pay/gopay/alipay"
|
||
)
|
||
|
||
// 待添加微信列表
|
||
type GetAddWechatListReq struct {
|
||
base.BaseRequest
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
Tab int32 `json:"tab"` // AddWechatListTab*
|
||
}
|
||
|
||
const (
|
||
AddWechatListTabWait = 1 // 待添加
|
||
AddWechatListTabFinish = 2 // 已完成
|
||
)
|
||
|
||
type AddWechatSt struct {
|
||
Account *dbstruct.Account `json:"account"`
|
||
OrderId string `json:"order_id"`
|
||
OrderStatus int32 `json:"order_status"`
|
||
Ct int64 `json:"ct"`
|
||
ConsumerWechat string `json:"consumer_wechat"`
|
||
ConsumerNote string `json:"consumer_note"`
|
||
}
|
||
|
||
type GetAddWechatListData struct {
|
||
List []*AddWechatSt `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
// 完成添加微信
|
||
type ConfirmAddWechatReq struct {
|
||
base.BaseRequest
|
||
OrderId string `json:"order_id"`
|
||
}
|
||
|
||
// 已解锁微信列表
|
||
type GetUnlockWechatListReq struct {
|
||
base.BaseRequest
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type UnlockWechatSt struct {
|
||
Streamer *dbstruct.Streamer `json:"streamer"`
|
||
Account *dbstruct.Account `json:"account"`
|
||
LockType int32 `json:"lock_type"`
|
||
OrderId string `json:"order_id"`
|
||
OrderStatus int32 `json:"order_status"`
|
||
}
|
||
|
||
type GetUnlockWechatListData struct {
|
||
List []*UnlockWechatSt `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
// 明细
|
||
type GetCHListReq struct {
|
||
base.BaseRequest
|
||
Type int32 `json:"type"` // 见dbstruct.CHType
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type CHSt struct {
|
||
Ct int64 `json:"ct"`
|
||
Desc string `json:"desc"`
|
||
Change string `json:"change"`
|
||
}
|
||
|
||
type GetCHListData struct {
|
||
List []*CHSt `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
// 订单查询
|
||
type GetOrderByStatusReq struct {
|
||
base.BaseRequest
|
||
OrderStatuses []int32 `json:"order_statuses"`
|
||
CtStart *int64 `json:"ct_start"`
|
||
CtEnd *int64 `json:"ct_end"`
|
||
}
|
||
|
||
// 提现页面
|
||
type WithdrawPageReq struct {
|
||
base.BaseRequest
|
||
}
|
||
|
||
type WithdrawPageData struct {
|
||
Diamonds int64 `json:"diamonds"`
|
||
WithdrawDiamonds int64 `json:"withdraw_diamonds"` // 可提现的钻石
|
||
Day7TotalDiamonds int64 `json:"day7_total_diamonds"` // 7天前0~24点总收益
|
||
Day7TotalWithdrawDiamonds int64 `json:"day7_total_withdraw_diamonds"` // 7天前0~24点已结算总收益
|
||
}
|
||
|
||
// 提现发送验证码
|
||
type WithdrawSendVerifycodeReq struct {
|
||
base.BaseRequest
|
||
}
|
||
|
||
// 提现申请
|
||
type WithdrawApplyReq struct {
|
||
base.BaseRequest
|
||
Diamonds int64 `json:"diamonds"` // 本次提现的钻石
|
||
AuthAlipayId string `json:"auth_alipay_id"` // 加密的支付宝账号
|
||
AuthAlipayName string `json:"auth_alipay_name"` // 加密的真实姓名
|
||
VerifyCode string `json:"verify_code"` // 短信验证码
|
||
Ip string `json:"ip"`
|
||
}
|
||
|
||
type WithdrawApplyData struct {
|
||
TransferResp *alipay.FundTransUniTransferResponse `json:"transfer_resp"`
|
||
}
|
||
|
||
// 单侧提现申请
|
||
type UnilaterallyWithdrawApplyReq struct {
|
||
base.BaseRequest
|
||
Diamonds int64 `json:"diamonds"` // 本次提现的钻石
|
||
Ip string `json:"ip"`
|
||
}
|
||
|
||
// 任意额度提现
|
||
var WithdrawAnyDiasMap = map[int64]bool{
|
||
74: true,
|
||
}
|
||
|
||
func IsWithdrawAnyDiasEnable(mid int64) bool {
|
||
return WithdrawAnyDiasMap[mid]
|
||
}
|
||
|
||
// 空间收银台
|
||
type ZoneGetCashierReq struct {
|
||
base.BaseRequest
|
||
Zid int64 `json:"zid"` // 空间id
|
||
MomentId int64 `json:"moment_id"` // 动态id
|
||
ProductId string `json:"product_id"` // 商品id,ProductIdH5Zone*
|
||
}
|
||
|
||
type ZoneGetCashierData struct {
|
||
Name string `json:"name"` // 商品名
|
||
Price int64 `json:"price"` // 价格,单位: 分
|
||
Validity string `json:"validity"` // 有效期,直接展示就行,"30天"、"永久"
|
||
IsSuperfanshipGiveWechat int `json:"is_superfanship_give_wechat"` // 是否开启超粉空间赠送微信 0: 不赠送, 1: 赠送
|
||
HasBought int `json:"has_bought"` // 是否购买过, 0: 没购买过,1: 已经买了
|
||
}
|
||
|
||
type ZoneGetCashierResp struct {
|
||
base.BaseResponse
|
||
Data *ZoneGetCashierData `json:"data"`
|
||
}
|
||
|
||
// 空间创建订单
|
||
type ZoneCreateOrderReq struct {
|
||
base.BaseRequest
|
||
Zid int64 `json:"zid"` // 空间id
|
||
MomentId int64 `json:"moment_id"` // 动态id
|
||
ProductId string `json:"product_id"` // 商品id,ProductIdH5Zone*
|
||
PayType string `json:"pay_type"` // 支付方式
|
||
From string `json:"from"` // 来源
|
||
WechatAuthCode string `json:"wechat_auth_code"` // 微信auth_code
|
||
RedirectUrl string `json:"redirect_url"` // redirect_url
|
||
}
|
||
|
||
type ZoneCreateOrderData struct {
|
||
OrderId string `json:"order_id"` // 订单id
|
||
AlipayParamStr string `json:"alipay_param_str"` // 支付宝 app支付参数
|
||
AlipayH5ParamStr string `json:"alipay_h5_param_str"` // 支付宝 h5支付参数
|
||
WxpayNativeParamStr string `json:"wxpay_native_param_str"` // 微信支付 native支付参数
|
||
WxpayJsapiParamObj wxpaycli.JsapiPayResp `json:"wxpay_jsapi_param_obj"` // 微信支付 jsapi支付参数
|
||
WxpayH5ParamStr string `json:"wxpay_h5_param_str"` // 微信支付 h5支付参数
|
||
YeepayAlipayH5ParamStr string `json:"yeepay_alipay_h5_param_str"` // 易宝支付 支付宝-h5支付参数
|
||
YeepayWxpayH5ParamStr string `json:"yeepay_wxpay_h5_param_str"` // 易宝支付 微信支付-h5支付参数
|
||
}
|
||
|
||
type ZoneCreateOrderResp struct {
|
||
base.BaseResponse
|
||
Data *ZoneCreateOrderData `json:"data"`
|
||
}
|
||
|
||
// 空间退款页面
|
||
type ZoneRefundPageReq struct {
|
||
base.BaseRequest
|
||
Zid int64 `json:"zid"` // 空间id
|
||
}
|
||
|
||
type ZoneRefundPageData struct {
|
||
Price int64 `json:"price"` // 退款价格,单位:分
|
||
CoinPrice int64 `json:"coin_price"` // 推荐价格,单位:金币
|
||
Name string `json:"name"` // 退款商品名
|
||
}
|
||
|
||
type ZoneRefundPageResp struct {
|
||
base.BaseResponse
|
||
Data *ZoneRefundPageData `json:"data"`
|
||
}
|
||
|
||
// 空间退款
|
||
type ZoneRefundReq struct {
|
||
base.BaseRequest
|
||
Zid int64 `json:"zid"` // 空间id
|
||
ContactName string `json:"contact_name"` // 联系人
|
||
ContactPhone string `json:"contact_phone"` // 联系电话
|
||
Note string `json:"note"` // 备注
|
||
}
|
||
|
||
type ZoneRefundData struct{}
|
||
|
||
type ZoneRefundResp struct {
|
||
base.BaseResponse
|
||
Data *ZoneRefundData `json:"data"`
|
||
}
|
||
|
||
// 空间退款列表
|
||
type ZoneRefundListReq struct {
|
||
base.BaseRequest
|
||
Zid int64 `json:"zid"` // 空间id
|
||
AuditType int64 `json:"audit_type"` // 审核状态 1:待处理,2:已处理
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type ZoneRefundListData struct {
|
||
List []*ZoneRefundListVo `json:"list"`
|
||
Limit int `json:"limit"`
|
||
Offset int `json:"offset"`
|
||
More int32 `json:"more"`
|
||
}
|
||
|
||
type ZoneRefundListResp struct {
|
||
base.BaseResponse
|
||
Data *ZoneRefundListData `json:"data"`
|
||
}
|
||
|
||
type ZoneRefundListVo struct {
|
||
AuditId string `json:"audit_id"`
|
||
RefundT int64 `json:"refund_t"`
|
||
RefundsStatus int64 `json:"refunds_status"`
|
||
Account *dbstruct.Account `json:"account"`
|
||
}
|
||
|
||
// 空间退款详情
|
||
type ZoneRefundInfoReq struct {
|
||
base.BaseRequest
|
||
//Zid int64 `json:"zid"` // 空间 id
|
||
AuditId string `json:"audit_id"` // 审核 id(列表 id)
|
||
}
|
||
|
||
type ZoneRefundInfoData struct {
|
||
ZoneRefundInfoVo *ZoneRefundInfoVo
|
||
}
|
||
|
||
type ZoneRefundInfoResp struct {
|
||
base.BaseResponse
|
||
Data *ZoneRefundInfoData `json:"data"`
|
||
}
|
||
|
||
type ZoneRefundInfoVo struct {
|
||
RefundInfo *dbstruct.RefundInfo
|
||
}
|
||
|
||
type ZoneRefundAuditReq struct {
|
||
base.BaseRequest
|
||
Zid int64 `json:"zid"` // 空间 id
|
||
AuditId string `json:"audit_id"` // 审核 id(列表 id)
|
||
RefundsStatus string `json:"refunds_status"` // 退款状态
|
||
}
|
||
|
||
// 更新空间价格信息
|
||
type UpdateZoneVasReq struct {
|
||
*dbstruct.ZoneVas
|
||
}
|
||
|
||
type UpdateZoneVasResp struct {
|
||
base.BaseResponse
|
||
}
|
||
|
||
// 更新空间动态信息
|
||
type UpdateZoneMomentPriceReq struct {
|
||
*dbstruct.ZoneMomentPrice
|
||
}
|
||
|
||
type UpdateZoneMomentPriceResp struct {
|
||
base.BaseResponse
|
||
}
|
||
|
||
// 获取空间成员
|
||
type GetZoneMemberListReq struct {
|
||
base.BaseRequest
|
||
Zid int64 `json:"zid"`
|
||
MemberType int32 `json:"member_type"`
|
||
}
|
||
|
||
type ZoneMemberVo struct {
|
||
Account *dbstruct.Account `json:"account"`
|
||
JoinCt int64 `json:"join_ct"`
|
||
}
|
||
|
||
type GetZoneMemberListData struct {
|
||
List []*ZoneMemberVo `json:"list"`
|
||
}
|
||
|
||
type GetZoneMemberListResp struct {
|
||
base.BaseResponse
|
||
Data *GetZoneMemberListData `json:"data"`
|
||
}
|
||
|
||
// 获取空间成员
|
||
type GetZoneMemberListV2Req struct {
|
||
base.BaseRequest
|
||
Zid int64 `json:"zid"`
|
||
MemberType int32 `json:"member_type"`
|
||
Offset int64 `json:"offset"`
|
||
Limit int64 `json:"limit"`
|
||
}
|
||
|
||
type GetZoneMemberListV2Data struct {
|
||
List []*ZoneMemberVo `json:"list"`
|
||
Offset int64 `json:"offset"`
|
||
More int32 `json:"more"`
|
||
Total int64 `json:"total"`
|
||
}
|
||
|
||
type GetZoneMemberListV2Resp struct {
|
||
base.BaseResponse
|
||
Data *GetZoneMemberListV2Data `json:"data"`
|
||
}
|
||
|
||
// 加入免费空间
|
||
type ZoneFreeJoinReq struct {
|
||
base.BaseRequest
|
||
Zid int64 `json:"zid"` // 空间id
|
||
ProductId string `json:"product_id"` // 商品id,ProductIdH5Zone*
|
||
}
|
||
|
||
type ZoneFreeJoinData struct {
|
||
}
|
||
|
||
type ZoneFreeJoinResp struct {
|
||
base.BaseResponse
|
||
Data *ZoneFreeJoinData `json:"data"`
|
||
}
|
||
|
||
// 退出空间
|
||
type ZoneExitReq struct {
|
||
base.BaseRequest
|
||
Zid int64 `json:"zid"` // 空间id
|
||
}
|
||
|
||
type ZoneExitData struct {
|
||
}
|
||
|
||
type ZoneExitResp struct {
|
||
base.BaseResponse
|
||
Data *ZoneFreeJoinData `json:"data"`
|
||
}
|
||
|
||
// 动态购买列表
|
||
type ZoneMomentOrderListReq struct {
|
||
base.BaseRequest
|
||
MomentId int64 `json:"moment_id"`
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type ZoneMomentOrderVO struct {
|
||
Account *dbstruct.Account `json:"account"`
|
||
BuyTime int64 `json:"buy_time"` // 购买时间
|
||
OrderId string `json:"order_id"` // 订单id
|
||
}
|
||
|
||
type ZoneMomentOrderListData struct {
|
||
List []*ZoneMomentOrderVO `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
// 收入页面
|
||
type IncomePageReq struct {
|
||
base.BaseRequest
|
||
}
|
||
|
||
type IncomePageData struct {
|
||
Diamonds int64 `json:"diamonds"` // 当前钻石
|
||
WithdrawDiamonds int64 `json:"withdraw_diamonds"` // 待提现钻石
|
||
TodayIncome int64 `json:"today_income"` // 今日收益钻石
|
||
WaitDealIncome int64 `json:"wait_deal_income"` // 待结算钻石
|
||
WeekDashboard []dbstruct.WeekDashboardSt `json:"week_dashboard"` // 周收益看板
|
||
IncomeFromDashboard []dbstruct.IncomeFromDashboardSt `json:"income_from_dashboard"` // 收益来源看板
|
||
}
|
||
|
||
type IncomePageResp struct {
|
||
base.BaseResponse
|
||
Data *IncomePageData `json:"data"`
|
||
}
|
||
|
||
// 获取空间成员
|
||
type SearchMemberReq struct {
|
||
base.BaseRequest
|
||
MemberUserId int64 `json:"member_user_id"`
|
||
}
|
||
|
||
type SearchMemberVO struct {
|
||
Account *dbstruct.Account `json:"account"`
|
||
JoinCt int64 `json:"join_ct"`
|
||
IsIronfan int32 `json:"is_ironfan"`
|
||
IsSuperfan int32 `json:"is_superfan"`
|
||
}
|
||
|
||
type SearchMemberData struct {
|
||
List []*SearchMemberVO `json:"list"`
|
||
}
|
||
|
||
// 收入页面
|
||
type PayMeansReq struct {
|
||
base.BaseRequest
|
||
}
|
||
|
||
type PayMeanVO struct {
|
||
PayStyle string `json:"pay_style"` // 前端按钮样式,alipay, wxpay
|
||
PayType string `json:"pay_type"` // 调create_order时候的传参
|
||
}
|
||
|
||
type PayMeansData struct {
|
||
List []PayMeanVO `json:"list"`
|
||
}
|