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.

257 lines
8.8 KiB

3 years ago
  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 : SnrDAO
  12. *-----------------------------------------------------------------------------
  13. *
  14. * @Description : Snr的数据访问对象接口
  15. *
  16. * @Author : 代码生成器创建
  17. *
  18. * @Date : 2021-04-13 13:08:46
  19. *
  20. ******************************************************************************/
  21. type SnrDAO interface {
  22. /******************************************************************************
  23. *
  24. * @Function Name : InsertOne
  25. *-----------------------------------------------------------------------------
  26. *
  27. * @Description : 插入一条Snr
  28. *
  29. * @Function Parameters : 需要插入的Snr
  30. *
  31. * @Return Value : 执行时发生的错误
  32. *
  33. * @Author : 代码生成器创建
  34. *
  35. * @Date : 2021-04-13 13:08:46
  36. *
  37. ******************************************************************************/
  38. InsertOne(*model.Snr) error
  39. /******************************************************************************
  40. *
  41. * @Function Name : DeleteOne
  42. *-----------------------------------------------------------------------------
  43. *
  44. * @Description : 删除指定键的Snr
  45. *
  46. * @Function Parameters : 主键
  47. *
  48. * @Return Value : 执行时发生的错误
  49. *
  50. * @Author : 代码生成器创建
  51. *
  52. * @Date : 2021-04-13 13:08:46
  53. *
  54. ******************************************************************************/
  55. DeleteOne(string) error
  56. /******************************************************************************
  57. *
  58. * @Function Name : SelectOne
  59. *-----------------------------------------------------------------------------
  60. *
  61. * @Description : 查找指定键的Snr
  62. *
  63. * @Function Parameters : 主键
  64. *
  65. * @Return Value : 查找到的Snr
  66. *
  67. * @Return Value : 执行时发生的错误
  68. *
  69. * @Author : 代码生成器创建
  70. *
  71. * @Date : 2021-04-13 13:08:46
  72. *
  73. ******************************************************************************/
  74. SelectOne(string) (*model.Snr, error)
  75. /******************************************************************************
  76. *
  77. * @Function Name : UpdateOne
  78. *-----------------------------------------------------------------------------
  79. *
  80. * @Description : 修改Snr
  81. *
  82. * @Function Parameters : 需要修改的Snr
  83. *
  84. * @Return Value : 执行时发生的错误
  85. *
  86. * @Author : 代码生成器创建
  87. *
  88. * @Date : 2021-04-13 13:08:46
  89. *
  90. ******************************************************************************/
  91. UpdateOne(*model.Snr) error
  92. /******************************************************************************
  93. *
  94. * @Function Name : Insert
  95. *-----------------------------------------------------------------------------
  96. *
  97. * @Description : 插入多条Snr
  98. *
  99. * @Function Parameters : 需要插入的Snr列表
  100. *
  101. * @Return Value : 执行时发生的错误
  102. *
  103. * @Author : 代码生成器创建
  104. *
  105. * @Date : 2021-04-13 13:08:46
  106. *
  107. ******************************************************************************/
  108. Insert(*[]model.Snr) error
  109. /******************************************************************************
  110. *
  111. * @Function Name : Delete
  112. *-----------------------------------------------------------------------------
  113. *
  114. * @Description : 删除多条Snr
  115. *
  116. * @Function Parameters : 需要删除的Snr列表
  117. *
  118. * @Return Value : 执行时发生的错误
  119. *
  120. * @Author : 代码生成器创建
  121. *
  122. * @Date : 2021-04-13 13:08:46
  123. *
  124. ******************************************************************************/
  125. Delete(*[]model.Snr) error
  126. /******************************************************************************
  127. *
  128. * @Function Name : DeleteWhere
  129. *-----------------------------------------------------------------------------
  130. *
  131. * @Description : 按条件删除Snr
  132. *
  133. * @Return Value : 执行时发生的错误
  134. *
  135. * @Author : 代码生成器创建
  136. *
  137. * @Date : 2021-04-13 13:08:46
  138. *
  139. ******************************************************************************/
  140. DeleteWhere([]grmi.Predicate) error
  141. /******************************************************************************
  142. *
  143. * @Function Name : Select
  144. *-----------------------------------------------------------------------------
  145. *
  146. * @Description : 按条件查询Snr
  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 13:08:46
  159. *
  160. ******************************************************************************/
  161. Select([]grmi.Predicate, []grmi.Field) ([]model.Snr, error)
  162. /******************************************************************************
  163. *
  164. * @Function Name : SelectAndPaging
  165. *-----------------------------------------------------------------------------
  166. *
  167. * @Description : 按条件查询Snr并分页
  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 13:08:46
  182. *
  183. ******************************************************************************/
  184. SelectAndPaging(*grmi.Paging, []grmi.Predicate, []grmi.Field) (grmi.PagingResult, error)
  185. /******************************************************************************
  186. *
  187. * @Function Name : Update
  188. *-----------------------------------------------------------------------------
  189. *
  190. * @Description : 修改多条Snr
  191. *
  192. * @Function Parameters : 需要修改的Snr列表
  193. *
  194. * @Return Value : 执行时发生的错误
  195. *
  196. * @Author : 代码生成器创建
  197. *
  198. * @Date : 2021-04-13 13:08:46
  199. *
  200. ******************************************************************************/
  201. Update(*[]model.Snr) error
  202. /******************************************************************************
  203. *
  204. * @Function Name : UpdateWhere
  205. *-----------------------------------------------------------------------------
  206. *
  207. * @Description : 按条件修改Snr
  208. *
  209. * @Return Value : 执行时发生的错误
  210. *
  211. * @Author : 代码生成器创建
  212. *
  213. * @Date : 2021-04-13 13:08:46
  214. *
  215. ******************************************************************************/
  216. UpdateWhere([]grmi.Predicate, *model.Snr, ...string) error
  217. /******************************************************************************
  218. *
  219. * @Function Name : GetNextSnr
  220. *-----------------------------------------------------------------------------
  221. *
  222. * @Description : 按条件修改Snr
  223. *
  224. * @Return Value : 执行时发生的错误
  225. *
  226. * @Author : 代码生成器创建
  227. *
  228. * @Date : 2021-04-13 13:08:46
  229. *
  230. ******************************************************************************/
  231. GetNextSnr(string) (string, error)
  232. }
  233. /******************************************************************************
  234. *
  235. * @Function Name : NewSnrDAO
  236. *-----------------------------------------------------------------------------
  237. *
  238. * @Description : 创建一个SnrDAO实例
  239. *
  240. * @Function Parameters : xorm会话
  241. *
  242. * @Function Parameters : 基本主键
  243. *
  244. * @Return Value : SnrDAO实例
  245. *
  246. * @Author : 代码生成器创建
  247. *
  248. * @Date : 2021-04-13 13:08:46
  249. *
  250. ******************************************************************************/
  251. func NewSnrDAO(session *xorm.Session, plantNr int, userid string) SnrDAO {
  252. return implments.NewSnrDAOImplement(session, plantNr, userid)
  253. }