classMGT.go 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. // Package service
  2. /**
  3. * @ File:
  4. * @ Date: 2021/4/26 11:15
  5. * @ Author: JYQ
  6. * @ Description: 课程管理,包含课程表模板,课程表实例
  7. */
  8. package service
  9. import (
  10. "sportfitness/base/assembly/base/repository/postgre"
  11. "sportfitness/base/errors"
  12. )
  13. type Class struct {
  14. base
  15. }
  16. func (c Class) ClassQuery(token string, objectShopId int64, jsonStr string, sign string) string {
  17. optId := c.checkPermission(token, objectShopId)
  18. rst, err := postgre.PGClass{}.ClassQuery(optId, objectShopId, jsonStr, sign)
  19. if err != nil {
  20. panic(errors.PGError)
  21. }
  22. return rst
  23. }
  24. func (c Class) ClassAdd(token string, objectShopId int64, jsonStr string, sign string) string {
  25. optId := c.checkPermission(token, objectShopId)
  26. rst, err := postgre.PGClass{}.ClassAdd(optId, objectShopId, jsonStr, sign)
  27. if err != nil {
  28. panic(errors.PGError)
  29. }
  30. return rst
  31. }
  32. func (c Class) ClassEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  33. optId := c.checkPermission(token, objectShopId)
  34. rst, err := postgre.PGClass{}.ClassEdit(optId, objectShopId, jsonStr, sign)
  35. if err != nil {
  36. panic(errors.PGError)
  37. }
  38. return rst
  39. }
  40. func (c Class) ClassStatusEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  41. optId := c.checkPermission(token, objectShopId)
  42. rst, err := postgre.PGClass{}.ClassStatusEdit(optId, objectShopId, jsonStr, sign)
  43. if err != nil {
  44. panic(errors.PGError)
  45. }
  46. return rst
  47. }
  48. func (c Class) ClassColorEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  49. optId := c.checkPermission(token, objectShopId)
  50. rst, err := postgre.PGClass{}.ClassColorEdit(optId, objectShopId, jsonStr, sign)
  51. if err != nil {
  52. panic(errors.PGError)
  53. }
  54. return rst
  55. }
  56. func (c Class) ClassWxVisibleEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  57. optId := c.checkPermission(token, objectShopId)
  58. rst, err := postgre.PGClass{}.ClassVisibleStatusEdit(optId, objectShopId, jsonStr, sign)
  59. if err != nil {
  60. panic(errors.PGError)
  61. }
  62. return rst
  63. }
  64. func (c Class) ClassVipEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  65. optId := c.checkPermission(token, objectShopId)
  66. rst, err := postgre.PGClass{}.ClassVipUserEdit(optId, objectShopId, jsonStr, sign)
  67. if err != nil {
  68. panic(errors.PGError)
  69. }
  70. return rst
  71. }
  72. func (c Class) SttPlanBasicQuery(token string, objectShopId int64, jsonStr string, sign string) string {
  73. optId := c.checkPermission(token, objectShopId)
  74. rst, err := postgre.PGClass{}.SttPlanBasicListQuery(optId, objectShopId, jsonStr, sign)
  75. if err != nil {
  76. panic(errors.PGError)
  77. }
  78. return rst
  79. }
  80. func (c Class) SttPlanBasicAdd(token string, objectShopId int64, jsonStr string, sign string) string {
  81. optId := c.checkPermission(token, objectShopId)
  82. rst, err := postgre.PGClass{}.SttPlanBasicAdd(optId, objectShopId, jsonStr, sign)
  83. if err != nil {
  84. panic(errors.PGError)
  85. }
  86. return rst
  87. }
  88. func (c Class) SttPlanBasicEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  89. optId := c.checkPermission(token, objectShopId)
  90. rst, err := postgre.PGClass{}.SttPlanBasicEdit(optId, objectShopId, jsonStr, sign)
  91. if err != nil {
  92. panic(errors.PGError)
  93. }
  94. return rst
  95. }
  96. func (c Class) SttPlanBasicShopEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  97. optId := c.checkPermission(token, objectShopId)
  98. rst, err := postgre.PGClass{}.SttPlanBasicShopEdit(optId, objectShopId, jsonStr, sign)
  99. if err != nil {
  100. panic(errors.PGError)
  101. }
  102. return rst
  103. }
  104. func (c Class) SttPlanBasicStatusEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  105. optId := c.checkPermission(token, objectShopId)
  106. rst, err := postgre.PGClass{}.SttPlanBasicStatusEdit(optId, objectShopId, jsonStr, sign)
  107. if err != nil {
  108. panic(errors.PGError)
  109. }
  110. return rst
  111. }
  112. func (c Class) SttPlanBasicPublish(token string, objectShopId int64, jsonStr string, sign string) string {
  113. optId := c.checkPermission(token, objectShopId)
  114. rst, err := postgre.PGClass{}.SttPlanPublish(optId, objectShopId, jsonStr, sign)
  115. if err != nil {
  116. panic(errors.PGError)
  117. }
  118. return rst
  119. }
  120. func (c Class) SttPlanPreview(token string, objectShopId int64, jsonStr string, sign string) string {
  121. optId := c.checkPermission(token, objectShopId)
  122. rst, err := postgre.PGClass{}.SttPlanPreview(optId, objectShopId, jsonStr, sign)
  123. if err != nil {
  124. panic(errors.PGError)
  125. }
  126. return rst
  127. }
  128. func (c Class) SttPlanCopy(token string, objectShopId int64, jsonStr string, sign string) string {
  129. optId := c.checkPermission(token, objectShopId)
  130. rst, err := postgre.PGClass{}.SttPlanCopy(optId, objectShopId, jsonStr, sign)
  131. if err != nil {
  132. panic(errors.PGError)
  133. }
  134. return rst
  135. }
  136. func (c Class) SttPlanDetailQuery(token string, objectShopId int64, jsonStr string, sign string) string {
  137. optId := c.checkPermission(token, objectShopId)
  138. rst, err := postgre.PGClass{}.SttPlanDetailListQuery(optId, objectShopId, jsonStr, sign)
  139. if err != nil {
  140. panic(errors.PGError)
  141. }
  142. return rst
  143. }
  144. func (c Class) SttPlanDetailBatchSave(token string, objectShopId int64, jsonStr string, sign string) string {
  145. optId := c.checkPermission(token, objectShopId)
  146. rst, err := postgre.PGClass{}.SttPlanDetailBatchSave(optId, objectShopId, jsonStr, sign)
  147. if err != nil {
  148. panic(errors.PGError)
  149. }
  150. return rst
  151. }
  152. func (c Class) STTBasicQuery(token string, objectShopId int64, jsonStr string, sign string) string {
  153. optId := c.checkPermission(token, objectShopId)
  154. rst, err := postgre.PGClass{}.STTBasicListQuery(optId, objectShopId, jsonStr, sign)
  155. if err != nil {
  156. panic(errors.PGError)
  157. }
  158. return rst
  159. }
  160. func (c Class) STTBasicAdd(token string, objectShopId int64, jsonStr string, sign string) string {
  161. optId := c.checkPermission(token, objectShopId)
  162. rst, err := postgre.PGClass{}.STTBasicAdd(optId, objectShopId, jsonStr, sign)
  163. if err != nil {
  164. panic(errors.PGError)
  165. }
  166. return rst
  167. }
  168. func (c Class) STTBasicEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  169. optId := c.checkPermission(token, objectShopId)
  170. rst, err := postgre.PGClass{}.STTBasicEdit(optId, objectShopId, jsonStr, sign)
  171. if err != nil {
  172. panic(errors.PGError)
  173. }
  174. return rst
  175. }
  176. func (c Class) STTBasicStatusEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  177. optId := c.checkPermission(token, objectShopId)
  178. rst, err := postgre.PGClass{}.STTBasicStatusEdit(optId, objectShopId, jsonStr, sign)
  179. if err != nil {
  180. panic(errors.PGError)
  181. }
  182. return rst
  183. }
  184. func (c Class) STTBasicPreview(token string, objectShopId int64, jsonStr string, sign string) string {
  185. optId := c.checkPermission(token, objectShopId)
  186. rst, err := postgre.PGClass{}.SchoolTimetablePreview(optId, objectShopId, jsonStr, sign)
  187. if err != nil {
  188. panic(errors.PGError)
  189. }
  190. return rst
  191. }
  192. func (c Class) STTBasicCopy(token string, objectShopId int64, jsonStr string, sign string) string {
  193. optId := c.checkPermission(token, objectShopId)
  194. rst, err := postgre.PGClass{}.SchoolTimeTableCopy(optId, objectShopId, jsonStr, sign)
  195. if err != nil {
  196. panic(errors.PGError)
  197. }
  198. return rst
  199. }
  200. func (c Class) STTBasicOfflineEdit(token string, objectShopId int64, jsonStr string, sign string) string {
  201. optId := c.checkPermission(token, objectShopId)
  202. rst, err := postgre.PGClass{}.STTBasicOfflineEdit(optId, objectShopId, jsonStr, sign)
  203. if err != nil {
  204. panic(errors.PGError)
  205. }
  206. return rst
  207. }
  208. func (c Class) STTDetailListQuery(token string, objectShopId int64, jsonStr string, sign string) string {
  209. optId := c.checkPermission(token, objectShopId)
  210. rst, err := postgre.PGClass{}.STTDetailListQuery(optId, objectShopId, jsonStr, sign)
  211. if err != nil {
  212. panic(errors.PGError)
  213. }
  214. return rst
  215. }
  216. func (c Class) STTBasicDetailBatchSave(token string, objectShopId int64, jsonStr string, sign string) string {
  217. optId := c.checkPermission(token, objectShopId)
  218. rst, err := postgre.PGClass{}.STTDetailBatchSave(optId, objectShopId, jsonStr, sign)
  219. if err != nil {
  220. panic(errors.PGError)
  221. }
  222. return rst
  223. }
  224. func (c Class) STTDetailAllowDelCheck(token string, objectShopId int64, jsonStr string, sign string) string {
  225. optId := c.checkPermission(token, objectShopId)
  226. rst, err := postgre.PGClass{}.STTDetailAllowDelCheck(optId, objectShopId, jsonStr, sign)
  227. if err != nil {
  228. panic(errors.PGError)
  229. }
  230. return rst
  231. }
  232. func (c Class) ClassSimpleQuery(token string, objectShopId int64, jsonStr string, sign string) string {
  233. optId := c.checkPermission(token, objectShopId)
  234. rst, err := postgre.PGClass{}.ClassSimpleQuery(optId, objectShopId, jsonStr, sign)
  235. if err != nil {
  236. panic(errors.PGError)
  237. }
  238. return rst
  239. }