ServiceDistribution

package
v5.1.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuyUserSub

func BuyUserSub(args *ArgsBuyUserSub) (data ServiceOrderWaitFields.FieldsWait, errCode string, err error)

BuyUserSub 购买操作

func CreateUserSub

func CreateUserSub(args *ArgsCreateUserSub) (err error)

CreateUserSub 创建用户订阅关联

func DeleteDistribution

func DeleteDistribution(args *ArgsDeleteDistribution) (err error)

DeleteDistribution 删除分销商

func DeleteUserSub

func DeleteUserSub(args *ArgsDeleteUserSub) (err error)

DeleteUserSub 删除用户订阅关联

func GetUserSubQrcode

func GetUserSubQrcode(args *ArgsGetUserSubQrcode) (qrcodeData string, err error)

GetUserSubQrcode 获取二维码

func UpdateDistribution

func UpdateDistribution(args *ArgsUpdateDistribution) (err error)

UpdateDistribution 修改分销商

func UpdateUserSub

func UpdateUserSub(args *ArgsUpdateUserSub) (err error)

UpdateUserSub 修改用户订阅关联

Types

type ArgsBuyUserSub

type ArgsBuyUserSub struct {
	//组织ID
	// 留空则表明为平台的用户留下的内容
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id"`
	//创建来源
	// 0 商户平台下单、1 用户APP下单、2 微信小程序下单、3 支付宝小程序下单、4 电话系统下单、5 线下柜台下单、6 辅助设备下单、7 其他渠道
	CreateFrom int `db:"create_from" json:"createFrom"`
	//收取货物地址
	AddressFrom CoreSQLAddress.FieldsAddress `db:"address_from" json:"addressFrom"`
	//送货地址
	AddressTo CoreSQLAddress.FieldsAddress `db:"address_to" json:"addressTo"`
	//备注信息
	Des string `db:"des" json:"des" check:"des" min:"1" max:"600" empty:"true"`
	//订阅配置ID
	SubConfigID int64 `db:"sub_config_id" json:"subConfigID" check:"id"`
	//购买的单位
	Unit int64 `db:"unit" json:"unit" check:"int64Than0"`
	//推荐人手机号
	ReferrerNationCode string `db:"referrer_nation_code" json:"referrerNationCode" check:"nationCode" empty:"true"`
	ReferrerPhone      string `json:"referrerPhone" check:"phone" empty:"true"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
	//对应分销商
	DistributionUserSubID int64 `db:"distribution_user_sub_id" json:"distributionUserSubID" check:"id"`
}

ArgsBuyUserSub 购买操作参数

type ArgsCreateDistribution

type ArgsCreateDistribution struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//分销商姓名
	Name string `db:"name" json:"name" check:"name"`
	//绑定用户
	UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"`
}

ArgsCreateDistribution 添加新的分销商参数

type ArgsCreateUserSub

type ArgsCreateUserSub struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//对应分销商
	DistributionID int64 `db:"distribution_id" json:"distributionID" check:"id"`
	//会员配置
	SubConfigID int64 `db:"sub_config_id" json:"subConfigID" check:"id"`
	//强制约定价格
	UnitPrice int64 `db:"unit_price" json:"unitPrice" check:"price"`
	//指定奖励
	MarketGivingSubID int64 `db:"market_giving_sub_id" json:"marketGivingSubID" check:"id" empty:"true"`
	//宣传海报
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"`
	//描述
	Des string `db:"des" json:"des" check:"des" min:"1" max:"1000" empty:"true"`
}

ArgsCreateUserSub 创建用户订阅关联参数

type ArgsDeleteDistribution

type ArgsDeleteDistribution struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
}

ArgsDeleteDistribution 删除分销商参数

type ArgsDeleteUserSub

type ArgsDeleteUserSub struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
}

ArgsDeleteUserSub 删除用户订阅关联参数

type ArgsGetDistributionList

type ArgsGetDistributionList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//是否被删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool" empty:"true"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetDistributionList 获取分销商列表参数

type ArgsGetUserSubList

type ArgsGetUserSubList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//对应分销商
	DistributionID int64 `db:"distribution_id" json:"distributionID" check:"id" empty:"true"`
	//是否被删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool" empty:"true"`
}

ArgsGetUserSubList 获取关联的用户订阅列表参数

type ArgsGetUserSubQrcode

type ArgsGetUserSubQrcode struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//二维码类型
	QrcodeType string `json:"qrcodeType"`
	//尺寸
	// eg: 430
	Size int `db:"size" json:"size" check:"intThan0"`
	//是否需要透明底色
	IsHyaline bool `json:"isHyaline"`
	//自动配置线条颜色
	// 为 false 时生效, 使用 rgb 设置颜色 十进制表示
	AutoColor bool `json:"autoColor"`
	//色调
	// 50
	R string `json:"r"`
	G string `json:"g"`
	B string `json:"b"`
}

ArgsGetUserSubQrcode 获取二维码参数

type ArgsInUserSub

type ArgsInUserSub struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
}

ArgsInUserSub 扫码进入操作参数

type ArgsUpdateDistribution

type ArgsUpdateDistribution struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//分销商姓名
	Name string `db:"name" json:"name" check:"name"`
	//绑定用户
	UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"`
}

ArgsUpdateDistribution 修改分销商参数

type ArgsUpdateUserSub

type ArgsUpdateUserSub struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//对应分销商
	DistributionID int64 `db:"distribution_id" json:"distributionID" check:"id"`
	//会员配置
	SubConfigID int64 `db:"sub_config_id" json:"subConfigID" check:"id"`
	//强制约定价格
	UnitPrice int64 `db:"unit_price" json:"unitPrice" check:"price"`
	//指定奖励
	MarketGivingSubID int64 `db:"market_giving_sub_id" json:"marketGivingSubID" check:"id" empty:"true"`
	//宣传海报
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"`
	//描述
	Des string `db:"des" json:"des" check:"des" min:"1" max:"1000" empty:"true"`
}

ArgsUpdateUserSub 修改用户订阅关联参数

type FieldsDistribution

type FieldsDistribution struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//分销商姓名
	Name string `db:"name" json:"name"`
	//绑定用户
	UserID int64 `db:"user_id" json:"userID"`
}

FieldsDistribution 分销商设置

func CreateDistribution

func CreateDistribution(args *ArgsCreateDistribution) (data FieldsDistribution, err error)

CreateDistribution 添加新的分销商

func GetDistributionList

func GetDistributionList(args *ArgsGetDistributionList) (dataList []FieldsDistribution, dataCount int64, err error)

GetDistributionList 获取分销商列表

type FieldsUserSub

type FieldsUserSub struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//对应分销商
	DistributionID int64 `db:"distribution_id" json:"distributionID"`
	//会员配置
	SubConfigID int64 `db:"sub_config_id" json:"subConfigID"`
	//强制约定价格
	UnitPrice int64 `db:"unit_price" json:"unitPrice"`
	//指定奖励
	MarketGivingSubID int64 `db:"market_giving_sub_id" json:"marketGivingSubID"`
	//宣传海报
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID"`
	//描述
	Des string `db:"des" json:"des"`
	//进入次数
	InCount int64 `db:"in_count" json:"inCount"`
	//交易次数
	OrderCount int64 `db:"order_count" json:"orderCount"`
	//交易金额
	OrderPrice int64 `db:"order_price" json:"orderPrice"`
}

FieldsUserSub 特定用户会员模式

func GetUserSubList

func GetUserSubList(args *ArgsGetUserSubList) (dataList []FieldsUserSub, dataCount int64, err error)

GetUserSubList 获取关联的用户订阅列表

func InUserSub

func InUserSub(args *ArgsInUserSub) (data FieldsUserSub, err error)

InUserSub 扫码进入操作

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL