GAAS GFrame项目web后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

241 lines
8.2 KiB

  1. // Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
  2. package base
  3. import (
  4. "LAPP_GAAS_GFrame_BACKEND/dao/base/implments"
  5. "LAPP_GAAS_GFrame_BACKEND/grmi"
  6. model "LAPP_GAAS_GFrame_BACKEND/models/base"
  7. "github.com/go-xorm/xorm"
  8. )
  9. /******************************************************************************
  10. *
  11. * @Interface Name : EtcdDAO
  12. *-----------------------------------------------------------------------------
  13. *
  14. * @Description : Etcd的数据访问对象接口
  15. *
  16. * @Author : 代码生成器创建
  17. *
  18. * @Date : 2021-04-13 15:04:54
  19. *
  20. ******************************************************************************/
  21. type EtcdDAO interface {
  22. /******************************************************************************
  23. *
  24. * @Function Name : InsertOne
  25. *-----------------------------------------------------------------------------
  26. *
  27. * @Description : 插入一条Etcd
  28. *
  29. * @Function Parameters : 需要插入的Etcd
  30. *
  31. * @Return Value : 执行时发生的错误
  32. *
  33. * @Author : 代码生成器创建
  34. *
  35. * @Date : 2021-04-13 15:04:54
  36. *
  37. ******************************************************************************/
  38. InsertOne(*model.Etcd) error
  39. /******************************************************************************
  40. *
  41. * @Function Name : DeleteOne
  42. *-----------------------------------------------------------------------------
  43. *
  44. * @Description : 删除指定键的Etcd
  45. *
  46. * @Function Parameters : 主键
  47. *
  48. * @Return Value : 执行时发生的错误
  49. *
  50. * @Author : 代码生成器创建
  51. *
  52. * @Date : 2021-04-13 15:04:54
  53. *
  54. ******************************************************************************/
  55. DeleteOne(int) error
  56. /******************************************************************************
  57. *
  58. * @Function Name : SelectOne
  59. *-----------------------------------------------------------------------------
  60. *
  61. * @Description : 查找指定键的Etcd
  62. *
  63. * @Function Parameters : 主键
  64. *
  65. * @Return Value : 查找到的Etcd
  66. *
  67. * @Return Value : 执行时发生的错误
  68. *
  69. * @Author : 代码生成器创建
  70. *
  71. * @Date : 2021-04-13 15:04:54
  72. *
  73. ******************************************************************************/
  74. SelectOne(int) (*model.Etcd, error)
  75. /******************************************************************************
  76. *
  77. * @Function Name : UpdateOne
  78. *-----------------------------------------------------------------------------
  79. *
  80. * @Description : 修改Etcd
  81. *
  82. * @Function Parameters : 需要修改的Etcd
  83. *
  84. * @Return Value : 执行时发生的错误
  85. *
  86. * @Author : 代码生成器创建
  87. *
  88. * @Date : 2021-04-13 15:04:54
  89. *
  90. ******************************************************************************/
  91. UpdateOne(*model.Etcd) error
  92. /******************************************************************************
  93. *
  94. * @Function Name : Insert
  95. *-----------------------------------------------------------------------------
  96. *
  97. * @Description : 插入多条Etcd
  98. *
  99. * @Function Parameters : 需要插入的Etcd列表
  100. *
  101. * @Return Value : 执行时发生的错误
  102. *
  103. * @Author : 代码生成器创建
  104. *
  105. * @Date : 2021-04-13 15:04:54
  106. *
  107. ******************************************************************************/
  108. Insert(*[]model.Etcd) error
  109. /******************************************************************************
  110. *
  111. * @Function Name : Delete
  112. *-----------------------------------------------------------------------------
  113. *
  114. * @Description : 删除多条Etcd
  115. *
  116. * @Function Parameters : 需要删除的Etcd列表
  117. *
  118. * @Return Value : 执行时发生的错误
  119. *
  120. * @Author : 代码生成器创建
  121. *
  122. * @Date : 2021-04-13 15:04:54
  123. *
  124. ******************************************************************************/
  125. Delete(*[]model.Etcd) error
  126. /******************************************************************************
  127. *
  128. * @Function Name : DeleteWhere
  129. *-----------------------------------------------------------------------------
  130. *
  131. * @Description : 按条件删除Etcd
  132. *
  133. * @Return Value : 执行时发生的错误
  134. *
  135. * @Author : 代码生成器创建
  136. *
  137. * @Date : 2021-04-13 15:04:54
  138. *
  139. ******************************************************************************/
  140. DeleteWhere([]grmi.Predicate) error
  141. /******************************************************************************
  142. *
  143. * @Function Name : Select
  144. *-----------------------------------------------------------------------------
  145. *
  146. * @Description : 按条件查询Etcd
  147. *
  148. * @Function Parameters : 查询条件
  149. *
  150. * @Function Parameters : 排序字段
  151. *
  152. * @Return Value : 查询结果
  153. *
  154. * @Return Value : 执行时发生的错误
  155. *
  156. * @Author : 代码生成器创建
  157. *
  158. * @Date : 2021-04-13 15:04:54
  159. *
  160. ******************************************************************************/
  161. Select([]grmi.Predicate, []grmi.Field) ([]model.Etcd, error)
  162. /******************************************************************************
  163. *
  164. * @Function Name : SelectAndPaging
  165. *-----------------------------------------------------------------------------
  166. *
  167. * @Description : 按条件查询Etcd并分页
  168. *
  169. * @Function Parameters : 分页信息
  170. *
  171. * @Function Parameters : 查询条件
  172. *
  173. * @Function Parameters : 排序字段
  174. *
  175. * @Return Value : 查询结果
  176. *
  177. * @Return Value : 执行时发生的错误
  178. *
  179. * @Author : 代码生成器创建
  180. *
  181. * @Date : 2021-04-13 15:04:54
  182. *
  183. ******************************************************************************/
  184. SelectAndPaging(*grmi.Paging, []grmi.Predicate, []grmi.Field) (grmi.PagingResult, error)
  185. /******************************************************************************
  186. *
  187. * @Function Name : Update
  188. *-----------------------------------------------------------------------------
  189. *
  190. * @Description : 修改多条Etcd
  191. *
  192. * @Function Parameters : 需要修改的Etcd列表
  193. *
  194. * @Return Value : 执行时发生的错误
  195. *
  196. * @Author : 代码生成器创建
  197. *
  198. * @Date : 2021-04-13 15:04:54
  199. *
  200. ******************************************************************************/
  201. Update(*[]model.Etcd) error
  202. /******************************************************************************
  203. *
  204. * @Function Name : UpdateWhere
  205. *-----------------------------------------------------------------------------
  206. *
  207. * @Description : 按条件修改Etcd
  208. *
  209. * @Return Value : 执行时发生的错误
  210. *
  211. * @Author : 代码生成器创建
  212. *
  213. * @Date : 2021-04-13 15:04:54
  214. *
  215. ******************************************************************************/
  216. UpdateWhere([]grmi.Predicate, *model.Etcd, ...string) error
  217. }
  218. /******************************************************************************
  219. *
  220. * @Function Name : NewEtcdDAO
  221. *-----------------------------------------------------------------------------
  222. *
  223. * @Description : 创建一个EtcdDAO实例
  224. *
  225. * @Function Parameters : xorm会话
  226. *
  227. * @Return Value : EtcdDAO实例
  228. *
  229. * @Author : 代码生成器创建
  230. *
  231. * @Date : 2021-04-13 15:04:54
  232. *
  233. ******************************************************************************/
  234. func NewEtcdDAO(session *xorm.Session, userid string) EtcdDAO {
  235. return implments.NewEtcdDAOImplement(session, userid)
  236. }