Documentation ¶
Overview ¶
* @Descripttion: 字段默认值填充函数 * @version: * @Author: lfzxs@qq.com * @Date: 2023-11-15 14:01:17 * @LastEditors: lfzxs@qq.com * @LastEditTime: 2023-12-01 17:11:34
* @Descripttion: * @version: * @Author: lfzxs@qq.com * @Date: 2023-11-09 15:44:29 * @LastEditors: lfzxs@qq.com * @LastEditTime: 2023-12-01 17:11:45
* @Descripttion: * @version: * @Author: lfzxs@qq.com * @Date: 2023-11-09 15:44:29 * @LastEditors: lfzxs@qq.com * @LastEditTime: 2023-12-01 15:38:48
Index ¶
- Variables
- func SnowflakeId() string
- func Uid() string
- func Uuid() string
- type AddWrapper
- type BaseDao
- func (obj *BaseDao[T]) Add(ctx context.Context, object any) (err error)
- func (obj *BaseDao[T]) Edit(ctx context.Context, condition any, object any) (err error)
- func (obj *BaseDao[T]) List(ctx context.Context, pageQuery *PageInp) (res *PageModel, err error)
- func (obj *BaseDao[T]) Search(ctx context.Context, querObject any) (res *PageModel, err error)
- type Condition
- type DataWrapper
- type EditWrapper
- type FildFillFunc
- type IDao
- type OrderItem
- type PageInp
- type PageModel
- type PageQuery
- type QueryItem
- type QueryWrapper
Constants ¶
This section is empty.
Variables ¶
View Source
var ConditionStrToEnum map[string]Condition = map[string]Condition{ "eq": Condition_EQ, "ne": Condition_NE, "gt": Condition_GT, "ge": Condition_GE, "lt": Condition_LT, "le": Condition_LE, "like": Condition_LIKE, "like_left": Condition_LIKE_LEFT, "like_right": Condition_LIKE_RIGHT, "in": Condition_IN, }
View Source
var FunMap = map[string]FildFillFunc{ "uuid": Uuid, "snowflakeId": SnowflakeId, "uid": Uid, }
View Source
var ServiceUtil = serviceUtil{DefPageSize: 20, DefCurrent: 0}
Functions ¶
func SnowflakeId ¶
func SnowflakeId() string
Types ¶
type AddWrapper ¶
type AddWrapper struct {
DataWrapper
}
type Condition ¶
type Condition int
const ( //等于 Condition_EQ Condition = 0 //不等于 Condition_NE Condition = 1 //大于 Condition_GT Condition = 2 //大于等于 Condition_GE Condition = 3 //小于 Condition_LT Condition = 4 //小于等于 Condition_LE Condition = 5 //like '%值%' Condition_LIKE Condition = 20 //like '%值' Condition_LIKE_LEFT Condition = 21 //like '值%' Condition_LIKE_RIGHT Condition = 22 //in Condition_IN Condition = 30 //分页页码字段名 Page_Filed_PgNum_NAME = "PageNum" //分页每页条数字段名 Page_Filed_SIZE_NAME = "PageSize" )
条件枚举
type DataWrapper ¶
type DataWrapper struct {
Model map[string]interface{}
}
type FildFillFunc ¶
type FildFillFunc func() string
Click to show internal directories.
Click to hide internal directories.