UserIntegral

package
v5.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCount

func AddCount(args *ArgsAddCount) (err error)

AddCount 变动积分

func ClearOrg

func ClearOrg(args *ArgsClearOrg) (err error)

ClearOrg 清空某组织的积分

func ClearUser

func ClearUser(args *ArgsClearUser) (err error)

ClearUser 清空某用户的积分 彻底清理用户的相关记录 注意,日志数据会保留,以确保可追溯性

func GetUserCount

func GetUserCount(orgID int64, userID int64) (count int64)

GetUserCount 查看某个用户的积分,只要积分部分

Types

type ArgsAddCount

type ArgsAddCount struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"`
	//变动
	AddCount int64 `db:"add_count" json:"addCount"`
	//备注
	Des string `db:"des" json:"des" check:"des" min:"1" max:"300" empty:"true"`
}

ArgsAddCount 变动积分参数

type ArgsClearOrg

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

ArgsClearOrg 清空某组织的积分参数

type ArgsClearUser

type ArgsClearUser struct {
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id"`
}

ArgsClearUser 清空某用户的积分参数

type ArgsGetList

type ArgsGetList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	OrgID int64 `json:"orgID" check:"id" empty:"true"`
	//用户ID
	UserID int64 `json:"userID" check:"id" empty:"true"`
	//积分范围
	Min int64 `json:"min" check:"int64Than0" empty:"true"`
	Max int64 `json:"max" check:"int64Than0" empty:"true"`
}

ArgsGetList 获取积分列表参数

type ArgsGetLogList

type ArgsGetLogList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	OrgID int64 `json:"orgID" check:"id" empty:"true"`
	//用户ID
	UserID int64 `json:"userID" check:"id" empty:"true"`
	//请求变动范围
	// -999999~999999
	Min int64 `json:"min"`
	Max int64 `json:"max"`
	//搜索
	// 备注
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetLogList 查看积分变动记录参数

type ArgsGetUser

type ArgsGetUser struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"`
}

ArgsGetUser 查看某个用户的积分参数

type FieldsIntegral

type FieldsIntegral struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//所属组织
	// 如果为0,则代表平台方
	OrgID int64 `db:"org_id" json:"orgID"`
	//所属用户
	UserID int64 `db:"user_id" json:"userID"`
	//积分
	Count int64 `db:"count" json:"count"`
}

FieldsIntegral 积分主表

func GetList

func GetList(args *ArgsGetList) (dataList []FieldsIntegral, dataCount int64, err error)

GetList 获取积分列表

func GetUser

func GetUser(args *ArgsGetUser) (data FieldsIntegral, err error)

GetUser 查看某个用户的积分

type FieldsLog

type FieldsLog struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//所属组织
	// 如果为0,则代表平台方
	OrgID int64 `db:"org_id" json:"orgID"`
	//所属用户
	UserID int64 `db:"user_id" json:"userID"`
	//变动分数
	AddCount int64 `db:"add_count" json:"addCount"`
	//备注
	Des string `db:"des" json:"des"`
}

FieldsLog 积分变动表

func GetLogList

func GetLogList(args *ArgsGetLogList) (dataList []FieldsLog, dataCount int64, err error)

GetLogList 查看积分变动记录

Jump to

Keyboard shortcuts

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