// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
|
|
|
|
package base
|
|
|
|
import (
|
|
"LAPP_GAAS_GFrame_BACKEND/dao/base/implments"
|
|
"LAPP_GAAS_GFrame_BACKEND/grmi"
|
|
model "LAPP_GAAS_GFrame_BACKEND/models/base"
|
|
"github.com/go-xorm/xorm"
|
|
)
|
|
|
|
/******************************************************************************
|
|
*
|
|
* @Interface Name : ArticleDAO
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : Article的数据访问对象接口
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-05-06 15:41:10
|
|
*
|
|
******************************************************************************/
|
|
type ArticleDAO interface {
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : InsertOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 插入一条Article
|
|
*
|
|
* @Function Parameters : 需要插入的Article
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
InsertOne(*model.Article) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : DeleteOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 删除指定键的Article
|
|
*
|
|
* @Function Parameters : 主键
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
DeleteOne(string) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : SelectWhere
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 根据主建集合查询
|
|
*
|
|
* @Function Parameters : 主键
|
|
*
|
|
* @Return Value : 查找到的Article
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
SelectWhere([]string) ([]model.Article, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : SelectOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 查找指定键的Article
|
|
*
|
|
* @Function Parameters : 主键
|
|
*
|
|
* @Return Value : 查找到的Article
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
SelectOne(string) (*model.Article, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : UpdateOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 修改Article
|
|
*
|
|
* @Function Parameters : 需要修改的Article
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
UpdateOne(*model.Article) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Insert
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 插入多条Article
|
|
*
|
|
* @Function Parameters : 需要插入的Article列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
Insert(*[]model.Article) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Delete
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 删除多条Article
|
|
*
|
|
* @Function Parameters : 需要删除的Article列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
Delete(*[]model.Article) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : DeleteWhere
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件删除Article
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
DeleteWhere([]grmi.Predicate) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Select
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件查询Article
|
|
*
|
|
* @Function Parameters : 查询条件
|
|
*
|
|
* @Function Parameters : 排序字段
|
|
*
|
|
* @Return Value : 查询结果
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
Select([]grmi.Predicate, []grmi.Field) ([]model.Article, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : SelectAndPaging
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件查询Article并分页
|
|
*
|
|
* @Function Parameters : 分页信息
|
|
*
|
|
* @Function Parameters : 查询条件
|
|
*
|
|
* @Function Parameters : 排序字段
|
|
*
|
|
* @Return Value : 查询结果
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
SelectAndPaging(*grmi.Paging, []grmi.Predicate, []grmi.Field) (grmi.PagingResult, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Update
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 修改多条Article
|
|
*
|
|
* @Function Parameters : 需要修改的Article列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
Update(*[]model.Article) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : UpdateWhere
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件修改Article
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
UpdateWhere([]grmi.Predicate, *model.Article, ...string) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : SelectAllCarModel
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 搜索所有物料的车型
|
|
*
|
|
* @Return Value : 所有车型
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : zhangxin
|
|
*
|
|
* @Date : 2021-10-28
|
|
*
|
|
******************************************************************************/
|
|
SelectAllCarModel() (result []string, err error)
|
|
}
|
|
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : NewArticleDAO
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 创建一个ArticleDAO实例
|
|
*
|
|
* @Function Parameters : xorm会话
|
|
*
|
|
* @Function Parameters : 基本主键
|
|
*
|
|
* @Return Value : ArticleDAO实例
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-03-24 09:53:49
|
|
*
|
|
******************************************************************************/
|
|
func NewArticleDAO(session *xorm.Session, plantNr int, userid string) ArticleDAO {
|
|
return implments.NewArticleDAOImplement(session, plantNr, userid)
|
|
}
|