// 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 : EtcdDAO
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : Etcd的数据访问对象接口
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
type EtcdDAO interface {
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : InsertOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 插入一条Etcd
|
|
*
|
|
* @Function Parameters : 需要插入的Etcd
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
InsertOne(*model.Etcd) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : DeleteOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 删除指定键的Etcd
|
|
*
|
|
* @Function Parameters : 主键
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
DeleteOne(int) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : SelectOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 查找指定键的Etcd
|
|
*
|
|
* @Function Parameters : 主键
|
|
*
|
|
* @Return Value : 查找到的Etcd
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
SelectOne(int) (*model.Etcd, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : UpdateOne
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 修改Etcd
|
|
*
|
|
* @Function Parameters : 需要修改的Etcd
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
UpdateOne(*model.Etcd) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Insert
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 插入多条Etcd
|
|
*
|
|
* @Function Parameters : 需要插入的Etcd列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
Insert(*[]model.Etcd) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Delete
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 删除多条Etcd
|
|
*
|
|
* @Function Parameters : 需要删除的Etcd列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
Delete(*[]model.Etcd) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : DeleteWhere
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件删除Etcd
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
DeleteWhere([]grmi.Predicate) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Select
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件查询Etcd
|
|
*
|
|
* @Function Parameters : 查询条件
|
|
*
|
|
* @Function Parameters : 排序字段
|
|
*
|
|
* @Return Value : 查询结果
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
Select([]grmi.Predicate, []grmi.Field) ([]model.Etcd, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : SelectAndPaging
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件查询Etcd并分页
|
|
*
|
|
* @Function Parameters : 分页信息
|
|
*
|
|
* @Function Parameters : 查询条件
|
|
*
|
|
* @Function Parameters : 排序字段
|
|
*
|
|
* @Return Value : 查询结果
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
SelectAndPaging(*grmi.Paging, []grmi.Predicate, []grmi.Field) (grmi.PagingResult, error)
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : Update
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 修改多条Etcd
|
|
*
|
|
* @Function Parameters : 需要修改的Etcd列表
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
Update(*[]model.Etcd) error
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : UpdateWhere
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 按条件修改Etcd
|
|
*
|
|
* @Return Value : 执行时发生的错误
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
UpdateWhere([]grmi.Predicate, *model.Etcd, ...string) error
|
|
}
|
|
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : NewEtcdDAO
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 创建一个EtcdDAO实例
|
|
*
|
|
* @Function Parameters : xorm会话
|
|
*
|
|
|
|
* @Return Value : EtcdDAO实例
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-04-13 15:04:54
|
|
*
|
|
******************************************************************************/
|
|
func NewEtcdDAO(session *xorm.Session, userid string) EtcdDAO {
|
|
return implments.NewEtcdDAOImplement(session, userid)
|
|
}
|