package talentapi

import (
	"github.com/gogf/gf/net/ghttp"
	"youngmini_server/app/service/talent_service"
)

var TalentAuthPostApi = talentAuthPostApi{}
type talentAuthPostApi struct {}

// TalentDetailInfo 提交达人详细信息
func (*talentAuthPostApi)TalentDetailInfo(r *ghttp.Request) {
	res := talent_service.OnPostTalentDetailInfo(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

// PlatformDetail 提交平台信息
func (*talentAuthPostApi)PlatformDetail(r *ghttp.Request) {
	res := talent_service.OnPostPlatformDetailInfo(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

// AddDeliveryAddr 添加收货地址
func (*talentAuthPostApi)AddDeliveryAddr(r *ghttp.Request) {
	res := talent_service.OnAddDeliveryAddr(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

// DelDeliveryAddr 删除收货地址
func (*talentAuthPostApi)DelDeliveryAddr(r *ghttp.Request) {
	res := talent_service.OnDeleteDeliveryAddress(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

// ModifyDeliveryAddr 修改收货地址信息
func (*talentAuthPostApi)ModifyDeliveryAddr(r *ghttp.Request) {
	res := talent_service.ModifyDeliveryAddr(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

// ChangeDefaultDeliveryAddr 修改默认收货地址
func (*talentAuthPostApi)ChangeDefaultDeliveryAddr(r *ghttp.Request) {
	res := talent_service.SetDefaultDeliveryAddr(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

// WithdrawalAccountInfo 绑定提现账户信息
func (*talentAuthPostApi)WithdrawalAccountInfo(r *ghttp.Request) {
	res := talent_service.BindWithdrawalAccount(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

// BoBoCoinWithdrawalReq 提现申请
func (*talentAuthPostApi)BoBoCoinWithdrawalReq(r *ghttp.Request) {
	res := talent_service.BoBoCoinWithdrawalReq(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

func (*talentAuthPostApi)SignupTask(r *ghttp.Request) {
	res := talent_service.SignupTask(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

func (*talentAuthPostApi)ConfirmExpress(r *ghttp.Request) {
	res := talent_service.OnConfirmReceiveExpress(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

func (*talentAuthPostApi)UploadDraft(r *ghttp.Request) {
	res := talent_service.OnUploadDraft(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

func (*talentAuthPostApi)UploadArticle(r *ghttp.Request) {
	res := talent_service.OnUploadArticle(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

func (*talentAuthPostApi)UploadLinkInfo(r *ghttp.Request) {
	res := talent_service.OnUploadLink(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

func (*talentAuthPostApi)UploadDataInfo(r *ghttp.Request) {
	res := talent_service.OnUploadData(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

func (*talentAuthPostApi)CancelOrder(r *ghttp.Request) {
	res := talent_service.CancelOrder(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

func (*talentAuthPostApi)WxPrepay(r *ghttp.Request) {
	res := talent_service.WxPayOnTalentRequestPay(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

func (*talentAuthPostApi)QueryWxPayResultById(r *ghttp.Request) {
	res := talent_service.WxPayQueryOrderById(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}

func (*talentAuthPostApi)QueryWxPayResultByTradeNo(r *ghttp.Request) {
	res := talent_service.QueryOrderByOutTradeNo(r)
	err := r.Response.WriteJson(res)
	if err != nil {
		panic("write response error")
	}
}