// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
|
|
|
|
package pj
|
|
|
|
import (
|
|
"LEIT_PM/dao/pj/implments"
|
|
"LEIT_PM/grmi"
|
|
model "LEIT_PM/models/pj"
|
|
"github.com/go-xorm/xorm"
|
|
)
|
|
|
|
/******************************************************************************
|
|
*
|
|
* @Interface Name : ProjectDAO
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : Project的数据访问对象接口
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
type ProjectDAO interface {
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : InsertOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 插入一条Project
|
|
*
|
|
* @Function Parameters : 需要插入的Project
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
InsertOne(*model.Project) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : DeleteOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 删除指定键的Project
|
|
*
|
|
* @Function Parameters : 主键
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
DeleteOne(string) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : SelectOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 查找指定键的Project
|
|
*
|
|
* @Function Parameters : 主键
|
|
*
|
|
* @Return Value : 查找到的Project
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
SelectOne(string) (*model.Project, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : UpdateOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 修改Project
|
|
*
|
|
* @Function Parameters : 需要修改的Project
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
UpdateOne(*model.Project) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Insert
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 插入多条Project
|
|
*
|
|
* @Function Parameters : 需要插入的Project列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
Insert(*[]model.Project) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Delete
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 删除多条Project
|
|
*
|
|
* @Function Parameters : 需要删除的Project列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
Delete(*[]model.Project) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : DeleteWhere
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件删除Project
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
DeleteWhere([]grmi.Predicate) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Select
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件查询Project
|
|
*
|
|
* @Function Parameters : 查询条件
|
|
*
|
|
* @Function Parameters : 排序字段
|
|
*
|
|
* @Return Value : 查询结果
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
Select([]grmi.Predicate, []grmi.Field) ([]model.Project, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : SelectAndPaging
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件查询Project并分页
|
|
*
|
|
* @Function Parameters : 分页信息
|
|
*
|
|
* @Function Parameters : 查询条件
|
|
*
|
|
* @Function Parameters : 排序字段
|
|
*
|
|
* @Return Value : 查询结果
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
SelectAndPaging(*grmi.Paging, []grmi.Predicate, []grmi.Field) (grmi.PagingResult, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Update
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 修改多条Project
|
|
*
|
|
* @Function Parameters : 需要修改的Project列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
Update(*[]model.Project) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : UpdateWhere
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件修改Project
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
UpdateWhere([]grmi.Predicate, *model.Project, ...string) error
|
|
}
|
|
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : NewProjectDAO
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 创建一个ProjectDAO实例
|
|
*
|
|
* @Function Parameters : xorm会话
|
|
*
|
|
|
|
* @Return Value : ProjectDAO实例
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-09-06 13:59:55
|
|
*
|
|
******************************************************************************/
|
|
func NewProjectDAO(session *xorm.Session, userid string) ProjectDAO {
|
|
return implments.NewProjectDAOImplement(session, userid)
|
|
}
|