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.

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