ServiceOrderAnalysis

package
v5.1.37 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAnalysis

func CreateAnalysis(args *ArgsCreateAnalysis) (err error)

func GetOrgExemptionCount

func GetOrgExemptionCount(args *ArgsGetOrgExemptionCount) (count int64, err error)

GetOrgExemptionCount 优惠总数统计

func GetOrgExemptionPrice

func GetOrgExemptionPrice(args *ArgsGetOrgExemptionCount) (count int64, err error)

GetOrgExemptionPrice 优惠总金额统计

func Run

func Run()

Run 维护服务

Types

type ArgsCreateAnalysis

type ArgsCreateAnalysis struct {
	//组织ID
	// 留空则表明为平台的用户留下的内容
	OrgID int64 `db:"org_id" json:"orgID"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id"`
	//来源系统
	// 该订单创建来源的系统
	// eg: user_sub / org_sub / mall
	SystemMark string `db:"system_mark" json:"systemMark"`
	//创建来源
	// 0 商户平台下单、1 用户APP下单、2 微信小程序下单、3 支付宝小程序下单、4 电话系统下单、5 线下柜台下单、6 辅助设备下单、7 其他渠道
	CreateFrom int `db:"create_from" json:"createFrom"`
	// 货币
	Currency int `db:"currency" json:"currency"`
	// 总费用金额
	Price int64 `db:"price" json:"price"`
	//商品列
	Goods []ArgsCreateAnalysisGood `json:"goods"`
	//抵扣
	Exemptions []ArgsCreateAnalysisExemption `json:"exemptions"`
}

ArgsCreateAnalysis 新增统计数据

type ArgsCreateAnalysisExemption

type ArgsCreateAnalysisExemption struct {
	//抵扣系统来源
	// integral 积分; ticket 票据; sub 订阅
	System string `db:"system" json:"system"`
	//抵扣配置ID
	// 可能不存在,如积分没有配置ID
	ConfigID int64 `db:"config_id" json:"configID"`
	//使用数量
	// 使用的张数、或使用积分的个数
	Count int64 `db:"count" json:"count"`
	//抵扣费用
	Price int64 `db:"price" json:"price"`
}

type ArgsCreateAnalysisGood

type ArgsCreateAnalysisGood struct {
	//获取来源
	// 如果商品mark带有virtual标记,且订单商品全部带有该标记,订单将在付款后直接完成
	From CoreSQLFrom.FieldsFrom `db:"from" json:"from"`
	//货物个数
	Count int64 `db:"count" json:"count"`
}

type ArgsGetAnalysisOrg

type ArgsGetAnalysisOrg struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//查询时间范围
	TimeBetween CoreSQLTime.DataCoreTime `json:"timeBetween"`
	//结构方式
	// year / month / day / hour
	TimeType string `json:"timeType"`
	//创建来源
	// 0 商户平台下单、1 用户APP下单、2 微信小程序下单、3 支付宝小程序下单、4 电话系统下单、5 线下柜台下单、6 辅助设备下单、7 其他渠道
	CreateFrom int `db:"create_from" json:"createFrom"`
	//数据限制
	Limit int64 `db:"limit" json:"limit"`
}

ArgsGetAnalysisOrg 获取订单费用分量统计

type ArgsGetOrgExemptionCount

type ArgsGetOrgExemptionCount struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//商品来源
	FromSystem string `db:"from_system" json:"fromSystem" check:"mark"`
	//时间范围
	// 部分统计支持
	TimeBetween CoreSQLTime.DataCoreTime `json:"timeBetween"`
}

ArgsGetOrgExemptionCount 优惠总数统计参数

type DataGetAnalysisOrg

type DataGetAnalysisOrg struct {
	//时间
	DayTime string `db:"d" json:"dayTime"`
	//订单个数
	Count int64 `db:"count" json:"count"`
	//价格合计
	Price int64 `db:"price_count" json:"price"`
}

DataGetAnalysisOrg 获取平台总统计数据结构

func GetAnalysisOrg

func GetAnalysisOrg(args *ArgsGetAnalysisOrg) (dataList []DataGetAnalysisOrg, err error)

GetAnalysisOrg 获取平台总统计数据

type FieldsFromCount

type FieldsFromCount struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//统计周期
	// 完全相同的一个来源体系,1小时仅构建一条数据
	DayTime time.Time `db:"day_time" json:"dayTime"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//商品来源
	FromSystem string `db:"from_system" json:"fromSystem"`
	//商品ID
	FromID int64 `db:"from_id" json:"fromID"`
	//商品数量
	BuyCount int64 `db:"buy_count" json:"buyCount"`
}

FieldsFromCount 商品数量统计

type FieldsOrg

type FieldsOrg struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//统计周期
	// 完全相同的一个来源体系,1小时仅构建一条数据
	DayTime time.Time `db:"day_time" json:"dayTime"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//创建来源
	// 0 商户平台下单、1 用户APP下单、2 微信小程序下单、3 支付宝小程序下单、4 电话系统下单、5 线下柜台下单、6 辅助设备下单、7 其他渠道
	CreateFrom int `db:"create_from" json:"createFrom"`
	//订单个数
	Count int64 `db:"count" json:"count"`
	//货物货币类型
	Currency int `db:"currency" json:"currency"`
	//金额合计
	Price int64 `db:"price" json:"price"`
}

FieldsOrg 订单组织标准统计

type FieldsOrgExemption

type FieldsOrgExemption struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//统计周期
	// 完全相同的一个来源体系,1小时仅构建一条数据
	DayTime time.Time `db:"day_time" json:"dayTime"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//商品来源
	FromSystem string `db:"from_system" json:"fromSystem"`
	//配置ID
	ConfigID int64 `db:"config_id" json:"configID"`
	//使用张数
	Count int64 `db:"count" json:"count"`
	//抵扣费用
	Price int64 `db:"price" json:"price"`
}

FieldsOrgExemption 优惠统计

type FieldsOrgRefund

type FieldsOrgRefund struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//统计周期
	// 完全相同的一个来源体系,1小时仅构建一条数据
	DayTime time.Time `db:"day_time" json:"dayTime"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//订单个数
	Count int64 `db:"count" json:"count"`
	//货物货币类型
	Currency int `db:"currency" json:"currency"`
	//金额合计
	Price int64 `db:"price" json:"price"`
}

FieldsOrgRefund 订单退单统计 TODO: 暂未支持,由订单核心模块提供相关数据支持

type FieldsUser

type FieldsUser struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//统计周期
	// 完全相同的一个来源体系,1小时仅构建一条数据
	DayTime time.Time `db:"day_time" json:"dayTime"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID"`
	//订单个数
	Count int64 `db:"count" json:"count"`
	//货物货币类型
	Currency int `db:"currency" json:"currency"`
	//金额合计
	Price int64 `db:"price" json:"price"`
}

FieldsUser 订单用户标准统计

Jump to

Keyboard shortcuts

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