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.

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