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.

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