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.

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