lzqapplication

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBCondition

func DBCondition(inputDto PageParamsDto, dbSession *xorm.Session, tAlias string, structObj interface{}) error

func ResponseError

func ResponseError(c *gin.Context, err error)

Types

type BaseAppService

type BaseAppService struct {
	// contains filtered or unexported fields
}

func (*BaseAppService) Response

func (Base *BaseAppService) Response(c *gin.Context, code int, msg string, err error)

func (*BaseAppService) ResponseBusinessError

func (Base *BaseAppService) ResponseBusinessError(c *gin.Context, err error)

func (*BaseAppService) ResponseError

func (Base *BaseAppService) ResponseError(c *gin.Context, err error)

func (*BaseAppService) ResponseSingleDto

func (Base *BaseAppService) ResponseSingleDto(c *gin.Context, obj1 interface{}, obj2 interface{})

func (*BaseAppService) ResponseSuccess

func (Base *BaseAppService) ResponseSuccess(c *gin.Context, obj interface{})

type Filter

type Filter struct {
	Selector   string   `json:"selector"`
	Operator   string   `json:"operator"`
	Value      string   `json:"value"`
	OrSelector []Filter `json:"orSelector"`
}

type PageListDto

type PageListDto struct {
	TotalCount int64       `json:"totalCount"` //总条数
	Data       interface{} `json:"data"`       //数据
}

type PageParamsDto

type PageParamsDto struct {
	RequireTotalCount bool   `form:"requireTotalCount"` //是否返回总条数
	Skip              int    `form:"skip"`              //第几页,>=1开始
	Take              int    `form:"take"`              //每页多少条数据
	Sort              string `form:"sort"`              //排序字段 比如:[["name","contains"," 菜单管理"],["code","contains"," 菜单管理","or"]]
	Filter            string `form:"filter"`            //查询条件
}

type ResponseDto

type ResponseDto struct {
	Code int         `json:"code"`                    //0:请求成功, >1:请求业务错误
	Msg  string      `json:"msg"`                     //错误提示信息
	Data interface{} `json:"data" swaggered:"object"` //接口返回的业务数据
}

type Sort

type Sort struct {
	Selector string `json:"selector"`
	Desc     bool   `json:"desc"`
}

Jump to

Keyboard shortcuts

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