dao

package
v0.0.0-...-62362e1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	X *xorm.Engine
)

Functions

func CreateListParams

func CreateListParams(inputList []string, prefix string) (specSql string, paramList []interface{})

func GetJsonToXormMap

func GetJsonToXormMap(input interface{}) (resultMap map[string]string, idKeyName string)

func InitDatabase

func InitDatabase() (engine *xorm.Engine, err error)

func QueryCount

func QueryCount(sql string, params ...interface{}) int

func TransFiltersToSQL

func TransFiltersToSQL(queryParam *models.QueryRequestParam, transParam *models.TransFiltersParam) (filterSql, queryColumn string, param []interface{})

func TransPageInfoToSQL

func TransPageInfoToSQL(pageInfo models.PageInfo) (pageSql string, param []interface{})

func Transaction

func Transaction(actions []*ExecAction) error

func TransactionWithoutForeignCheck

func TransactionWithoutForeignCheck(actions []*ExecAction) error

Types

type AttachFileDao

type AttachFileDao struct {
	DB *xorm.Engine
}

type CollectTemplateDao

type CollectTemplateDao struct {
	DB *xorm.Engine
}

type ExecAction

type ExecAction struct {
	Sql   string
	Param []interface{}
}

type FormDao

type FormDao struct {
	DB *xorm.Engine
}

func (*FormDao) Delete

func (d *FormDao) Delete(formId string) (err error)

func (*FormDao) DeleteByFormItemTemplate

func (d *FormDao) DeleteByFormItemTemplate(session *xorm.Session, formItemTemplate string) (err error)

type FormItemDao

type FormItemDao struct {
	DB *xorm.Engine
}

type FormItemTemplateDao

type FormItemTemplateDao struct {
	DB *xorm.Engine
}

func (*FormItemTemplateDao) Add

func (d *FormItemTemplateDao) Add(session *xorm.Session, formItemTemplate *models.FormItemTemplateTable) (affected int64, err error)

func (*FormItemTemplateDao) Delete

func (d *FormItemTemplateDao) Delete(session *xorm.Session, id string) (err error)

func (*FormItemTemplateDao) DeleteByFormTemplate

func (d *FormItemTemplateDao) DeleteByFormTemplate(session *xorm.Session, formTemplate string) (err error)

func (*FormItemTemplateDao) DeleteByIdOrRefId

func (d *FormItemTemplateDao) DeleteByIdOrRefId(session *xorm.Session, id string) (err error)

func (*FormItemTemplateDao) Get

func (d *FormItemTemplateDao) Get(formItemTemplateId string) (*models.FormItemTemplateTable, error)

func (*FormItemTemplateDao) QueryByFormTemplate

func (d *FormItemTemplateDao) QueryByFormTemplate(formTemplate string) (formItemTemplate []*models.FormItemTemplateTable, err error)

func (*FormItemTemplateDao) QueryByRefId

func (d *FormItemTemplateDao) QueryByRefId(refId string) (formItemTemplateList []*models.FormItemTemplateTable, err error)

func (*FormItemTemplateDao) QueryDtoByFormTemplate

func (d *FormItemTemplateDao) QueryDtoByFormTemplate(formTemplate string) (formItemTemplateDtoList []*models.FormItemTemplateDto, err error)

func (*FormItemTemplateDao) Update

func (d *FormItemTemplateDao) Update(session *xorm.Session, formItemTemplate *models.FormItemTemplateTable) (err error)

func (*FormItemTemplateDao) UpdateByRefId

func (d *FormItemTemplateDao) UpdateByRefId(session *xorm.Session, formItemTemplate *models.FormItemTemplateTable, refId string) (err error)

type FormItemTemplateLibraryDao

type FormItemTemplateLibraryDao struct {
	DB *xorm.Engine
}

func (*FormItemTemplateLibraryDao) Add

func (d *FormItemTemplateLibraryDao) Add(session *xorm.Session, formItemTemplateLibrary *models.FormItemTemplateLibraryTable) (affected int64, err error)

func (*FormItemTemplateLibraryDao) Delete

func (d *FormItemTemplateLibraryDao) Delete(session *xorm.Session, id string) (err error)

func (*FormItemTemplateLibraryDao) QueryByFormTemplateLibrary

func (d *FormItemTemplateLibraryDao) QueryByFormTemplateLibrary(formTemplateLibrary string) (formItemTemplateLibraryList []*models.FormItemTemplateLibraryTable, err error)

type FormTemplateDao

type FormTemplateDao struct {
	DB *xorm.Engine
}

func (*FormTemplateDao) Add

func (d *FormTemplateDao) Add(session *xorm.Session, formTemplate *models.FormTemplateTable) (affected int64, err error)

func (*FormTemplateDao) Delete

func (d *FormTemplateDao) Delete(session *xorm.Session, id string) (err error)

func (*FormTemplateDao) Get

func (d *FormTemplateDao) Get(formTemplateId string) (*models.FormTemplateTable, error)

func (*FormTemplateDao) QueryListByIdOrRefId

func (d *FormTemplateDao) QueryListByIdOrRefId(id string) (list []*models.FormTemplateTable, err error)

func (*FormTemplateDao) QueryListByRequestTemplateAndItemGroupType

func (d *FormTemplateDao) QueryListByRequestTemplateAndItemGroupType(requestTemplateId, itemGroupType string) (list []*models.FormTemplateTable, err error)

func (*FormTemplateDao) QueryListByRequestTemplateAndTaskTemplate

func (d *FormTemplateDao) QueryListByRequestTemplateAndTaskTemplate(requestTemplateId, taskTemplateId, requestFormType string) (list []*models.FormTemplateTable, err error)

func (*FormTemplateDao) QueryListByTaskTemplate

func (d *FormTemplateDao) QueryListByTaskTemplate(taskTemplateId string) (list []*models.FormTemplateTable, err error)

func (*FormTemplateDao) QueryRequestFormByRequestTemplateIdAndType

func (d *FormTemplateDao) QueryRequestFormByRequestTemplateIdAndType(requestTemplateId, requestFormType string) (result *models.FormTemplateTable, err error)

QueryRequestFormByRequestTemplateIdAndType 查询请求表单

func (*FormTemplateDao) Update

func (d *FormTemplateDao) Update(session *xorm.Session, formTemplate *models.FormTemplateTable) (err error)

type FormTemplateLibraryDao

type FormTemplateLibraryDao struct {
	DB *xorm.Engine
}

func (*FormTemplateLibraryDao) Add

func (d *FormTemplateLibraryDao) Add(session *xorm.Session, formTemplateLibrary *models.FormTemplateLibraryTable) (affected int64, err error)

func (*FormTemplateLibraryDao) Delete

func (d *FormTemplateLibraryDao) Delete(session *xorm.Session, id string) (err error)

func (*FormTemplateLibraryDao) Disable

func (d *FormTemplateLibraryDao) Disable(session *xorm.Session, id string) (err error)

func (*FormTemplateLibraryDao) Get

func (d *FormTemplateLibraryDao) Get(formTemplateLibraryId string) (*models.FormTemplateLibraryTable, error)

func (*FormTemplateLibraryDao) QueryAll

func (d *FormTemplateLibraryDao) QueryAll() (list []*models.FormTemplateLibraryTable, err error)

func (*FormTemplateLibraryDao) QueryByName

func (d *FormTemplateLibraryDao) QueryByName(name string) (list []*models.FormTemplateLibraryTable, err error)

func (*FormTemplateLibraryDao) QueryListByCondition

func (d *FormTemplateLibraryDao) QueryListByCondition(condition models.QueryFormTemplateLibraryParam) (pageInfo models.PageInfo, list []*models.FormTemplateLibraryTable, err error)

type OperationLogDao

type OperationLogDao struct {
	DB *xorm.Engine
}

func (*OperationLogDao) AddOperationLog

func (d *OperationLogDao) AddOperationLog(record *models.OperationLogTable) (affected int64, err error)

type RequestDao

type RequestDao struct {
	DB *xorm.Engine
}

type RequestTemplateDao

type RequestTemplateDao struct {
	DB *xorm.Engine
}

func (*RequestTemplateDao) Add

func (d *RequestTemplateDao) Add(session *xorm.Session, requestTemplate *models.RequestTemplateTable) (affected int64, err error)

Add 添加模板

func (*RequestTemplateDao) AddBasicInfo

func (d *RequestTemplateDao) AddBasicInfo(session *xorm.Session, template *models.RequestTemplateTable) (affected int64, err error)

AddBasicInfo 添加模板基础信息(此处用SQL形式添加,由于RequestTemplateTable中包含外键字段,外键form_template传递"",新增数据会报错)

func (*RequestTemplateDao) Get

func (d *RequestTemplateDao) Get(requestTemplateId string) (*models.RequestTemplateTable, error)

func (*RequestTemplateDao) QueryListByName

func (d *RequestTemplateDao) QueryListByName(name string) (list []*models.RequestTemplateTable, err error)

func (*RequestTemplateDao) Update

func (d *RequestTemplateDao) Update(session *xorm.Session, requestTemplate *models.RequestTemplateTable) (err error)

func (*RequestTemplateDao) UpdateRecordId

func (d *RequestTemplateDao) UpdateRecordId(session *xorm.Session, requestTemplate *models.RequestTemplateTable) (err error)

type RequestTemplateGroupDao

type RequestTemplateGroupDao struct {
	DB *xorm.Engine
}

type RequestTemplateRoleDao

type RequestTemplateRoleDao struct {
	DB *xorm.Engine
}

func (*RequestTemplateRoleDao) Add

func (d *RequestTemplateRoleDao) Add(session *xorm.Session, requestTemplateRole *models.RequestTemplateRoleTable) (affected int64, err error)

func (*RequestTemplateRoleDao) CheckRequestTemplateRoles

func (d *RequestTemplateRoleDao) CheckRequestTemplateRoles(requestTemplateId string, userRoles []string) (bool, error)

func (*RequestTemplateRoleDao) QueryByRequestTemplateAndType

func (d *RequestTemplateRoleDao) QueryByRequestTemplateAndType(requestTemplateId, roleType string) (requestTemplateRoleList []*models.RequestTemplateRoleTable, err error)

type TaskDao

type TaskDao struct {
	DB *xorm.Engine
}

func (*TaskDao) Add

func (d *TaskDao) Add(session *xorm.Session, task *models.TaskTable) (affected int64, err error)

func (*TaskDao) Delete

func (d *TaskDao) Delete(session *xorm.Session, id string) (err error)

func (*TaskDao) Deletes

func (d *TaskDao) Deletes(session *xorm.Session, ids []string) (err error)

func (*TaskDao) QueryByRequest

func (d *TaskDao) QueryByRequest(requestId string) (list []*models.TaskTable, err error)

func (*TaskDao) QueryByRequestAndType

func (d *TaskDao) QueryByRequestAndType(requestId, typ string) (list []*models.TaskTable, err error)

func (*TaskDao) Update

func (d *TaskDao) Update(session *xorm.Session, task *models.TaskTable) (err error)

type TaskHandleDao

type TaskHandleDao struct {
	DB *xorm.Engine
}

func (*TaskHandleDao) Add

func (d *TaskHandleDao) Add(session *xorm.Session, taskHandle *models.TaskHandleTable) (affected int64, err error)

func (*TaskHandleDao) Delete

func (d *TaskHandleDao) Delete(session *xorm.Session, id string) (err error)

func (*TaskHandleDao) DeleteByTask

func (d *TaskHandleDao) DeleteByTask(session *xorm.Session, taskId string) (err error)

func (*TaskHandleDao) DeleteByTasks

func (d *TaskHandleDao) DeleteByTasks(session *xorm.Session, taskIds []string) (err error)

func (*TaskHandleDao) Deletes

func (d *TaskHandleDao) Deletes(session *xorm.Session, ids []string) (err error)

func (*TaskHandleDao) QueryByTask

func (d *TaskHandleDao) QueryByTask(taskId string) (list []*models.TaskHandleTable, err error)

func (*TaskHandleDao) QueryByTasks

func (d *TaskHandleDao) QueryByTasks(taskIds []string) (list []*models.TaskHandleTable, err error)

func (*TaskHandleDao) Update

func (d *TaskHandleDao) Update(session *xorm.Session, taskHandle *models.TaskHandleTable) (err error)

type TaskHandleTemplateDao

type TaskHandleTemplateDao struct {
	DB *xorm.Engine
}

func (*TaskHandleTemplateDao) Add

func (d *TaskHandleTemplateDao) Add(session *xorm.Session, taskHandleTemplate *models.TaskHandleTemplateTable) (affected int64, err error)

func (*TaskHandleTemplateDao) Delete

func (d *TaskHandleTemplateDao) Delete(session *xorm.Session, id string) (err error)

func (*TaskHandleTemplateDao) DeleteByTaskTemplate

func (d *TaskHandleTemplateDao) DeleteByTaskTemplate(session *xorm.Session, taskTemplateId string) (err error)

func (*TaskHandleTemplateDao) DeleteByTaskTemplates

func (d *TaskHandleTemplateDao) DeleteByTaskTemplates(session *xorm.Session, taskTemplateIds []string) (err error)

func (*TaskHandleTemplateDao) Deletes

func (d *TaskHandleTemplateDao) Deletes(session *xorm.Session, ids []string) (err error)

func (*TaskHandleTemplateDao) Get

func (*TaskHandleTemplateDao) QueryByTaskTemplate

func (d *TaskHandleTemplateDao) QueryByTaskTemplate(taskTemplateId string) (list []*models.TaskHandleTemplateTable, err error)

func (*TaskHandleTemplateDao) Update

func (d *TaskHandleTemplateDao) Update(session *xorm.Session, taskHandleTemplate *models.TaskHandleTemplateTable) (err error)

type TaskTemplateDao

type TaskTemplateDao struct {
	DB *xorm.Engine
}

func (*TaskTemplateDao) Add

func (d *TaskTemplateDao) Add(session *xorm.Session, taskTemplate *models.TaskTemplateTable) (affected int64, err error)

func (*TaskTemplateDao) Delete

func (d *TaskTemplateDao) Delete(session *xorm.Session, id string) (err error)

func (*TaskTemplateDao) Deletes

func (d *TaskTemplateDao) Deletes(session *xorm.Session, ids []string) (err error)

func (*TaskTemplateDao) Get

func (*TaskTemplateDao) GetProc

func (d *TaskTemplateDao) GetProc(requestTemplateId, nodeDefId string) (*models.TaskTemplateTable, error)

func (*TaskTemplateDao) QueryByRequestTemplate

func (d *TaskTemplateDao) QueryByRequestTemplate(requestTemplateId string) (list []*models.TaskTemplateTable, err error)

func (*TaskTemplateDao) QueryByRequestTemplateAndType

func (d *TaskTemplateDao) QueryByRequestTemplateAndType(requestTemplateId, typ string) (list []*models.TaskTemplateTable, err error)

func (*TaskTemplateDao) Update

func (d *TaskTemplateDao) Update(session *xorm.Session, taskTemplate *models.TaskTemplateTable) (err error)

Jump to

Keyboard shortcuts

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