mcn.go 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. package http
  2. import (
  3. "context"
  4. "go-common/app/interface/main/mcn/model/mcnmodel"
  5. "go-common/library/net/http/blademaster"
  6. )
  7. func mcnState(c *blademaster.Context) {
  8. oarg := new(mcnmodel.GetStateReq)
  9. httpGetFunc(
  10. oarg,
  11. func(context context.Context, arg interface{}) (res interface{}, err error) {
  12. return srv.McnGetState(context, arg.(*mcnmodel.GetStateReq))
  13. },
  14. "mcnState",
  15. []preBindFuncType{getCookieMid(c, oarg)},
  16. []preHandleFuncType{cheatReq},
  17. )(c)
  18. }
  19. func mcnExist(c *blademaster.Context) {
  20. oarg := new(mcnmodel.GetStateReq)
  21. httpGetFunc(
  22. oarg,
  23. func(context context.Context, arg interface{}) (res interface{}, err error) {
  24. return srv.McnExist(context, arg.(*mcnmodel.GetStateReq))
  25. },
  26. "mcnExist",
  27. []preBindFuncType{getCookieMid(c, oarg)},
  28. []preHandleFuncType{cheatReq},
  29. )(c)
  30. }
  31. func mcnBaseInfo(c *blademaster.Context) {
  32. oarg := new(mcnmodel.GetStateReq)
  33. httpGetFunc(
  34. oarg,
  35. func(context context.Context, arg interface{}) (res interface{}, err error) {
  36. return srv.McnBaseInfo(context, arg.(*mcnmodel.GetStateReq))
  37. },
  38. "mcnBaseInfo",
  39. []preBindFuncType{getCookieMid(c, oarg)},
  40. []preHandleFuncType{cheatReq},
  41. )(c)
  42. }
  43. func mcnApply(c *blademaster.Context) {
  44. oarg := new(mcnmodel.McnApplyReq)
  45. httpGetFunc(
  46. oarg,
  47. func(context context.Context, arg interface{}) (res interface{}, err error) {
  48. return srv.McnApply(context, arg.(*mcnmodel.McnApplyReq))
  49. },
  50. "mcnApply",
  51. []preBindFuncType{getCookieMid(c, oarg)},
  52. []preHandleFuncType{cheatReq},
  53. )(c)
  54. }
  55. func mcnBindUpApply(c *blademaster.Context) {
  56. oarg := new(mcnmodel.McnBindUpApplyReq)
  57. httpGetFunc(
  58. oarg,
  59. func(context context.Context, arg interface{}) (res interface{}, err error) {
  60. return srv.McnBindUpApply(context, arg.(*mcnmodel.McnBindUpApplyReq))
  61. },
  62. "mcnBindUpApply",
  63. []preBindFuncType{getCookieMid(c, oarg)},
  64. []preHandleFuncType{cheatReq},
  65. )(c)
  66. }
  67. func mcnUpConfirm(c *blademaster.Context) {
  68. oarg := new(mcnmodel.McnUpConfirmReq)
  69. httpGetFunc(
  70. oarg,
  71. func(context context.Context, arg interface{}) (res interface{}, err error) {
  72. return srv.McnUpConfirm(context, arg.(*mcnmodel.McnUpConfirmReq))
  73. },
  74. "mcnBindUpApply",
  75. []preBindFuncType{getCookieMid(c, oarg)},
  76. []preHandleFuncType{cheatReq},
  77. )(c)
  78. }
  79. func mcnUpGetBind(c *blademaster.Context) {
  80. oarg := new(mcnmodel.McnUpGetBindReq)
  81. httpGetFunc(
  82. oarg,
  83. func(context context.Context, arg interface{}) (res interface{}, err error) {
  84. return srv.McnUpGetBind(context, arg.(*mcnmodel.McnUpGetBindReq))
  85. },
  86. "mcnUpGetBind",
  87. []preBindFuncType{getCookieMid(c, oarg)},
  88. []preHandleFuncType{cheatReq},
  89. )(c)
  90. }
  91. func mcnGetDataSummary(c *blademaster.Context) {
  92. oarg := new(mcnmodel.McnGetDataSummaryReq)
  93. httpGetFunc(
  94. oarg,
  95. func(context context.Context, arg interface{}) (res interface{}, err error) {
  96. return srv.McnDataSummary(context, arg.(*mcnmodel.McnGetDataSummaryReq))
  97. },
  98. "mcnGetDataSummary",
  99. []preBindFuncType{getCookieMid(c, oarg)},
  100. []preHandleFuncType{cheatReq},
  101. )(c)
  102. }
  103. func mcnGetDataUpList(c *blademaster.Context) {
  104. oarg := new(mcnmodel.McnGetUpListReq)
  105. httpGetFunc(
  106. oarg,
  107. func(context context.Context, arg interface{}) (res interface{}, err error) {
  108. return srv.McnDataUpList(context, arg.(*mcnmodel.McnGetUpListReq))
  109. },
  110. "mcnGetDataUpList",
  111. []preBindFuncType{getCookieMid(c, oarg)},
  112. []preHandleFuncType{cheatReq},
  113. )(c)
  114. }
  115. func mcnGetAccountInfo(c *blademaster.Context) {
  116. oarg := new(mcnmodel.McnGetAccountReq)
  117. httpGetFunc(
  118. oarg,
  119. func(context context.Context, arg interface{}) (res interface{}, err error) {
  120. return srv.GetUpAccountInfo(context, arg.(*mcnmodel.McnGetAccountReq))
  121. },
  122. "mcnGetAccountInfo",
  123. nil,
  124. nil,
  125. )(c)
  126. }
  127. func mcnGetOldInfo(c *blademaster.Context) {
  128. oarg := new(mcnmodel.McnGetMcnOldInfoReq)
  129. httpGetFunc(
  130. oarg,
  131. func(context context.Context, arg interface{}) (res interface{}, err error) {
  132. return srv.McnGetOldInfo(context, arg.(*mcnmodel.McnGetMcnOldInfoReq))
  133. },
  134. "McnGetOldInfo",
  135. []preBindFuncType{getCookieMid(c, oarg)},
  136. []preHandleFuncType{cheatReq},
  137. )(c)
  138. }
  139. func mcnGetRankUpFans(c *blademaster.Context) {
  140. oarg := new(mcnmodel.McnGetRankReq)
  141. httpGetFunc(
  142. oarg,
  143. func(context context.Context, arg interface{}) (res interface{}, err error) {
  144. return srv.McnGetRankUpFans(context, arg.(*mcnmodel.McnGetRankReq))
  145. },
  146. "McnGetRankUpFans",
  147. []preBindFuncType{getCookieMid(c, oarg)},
  148. []preHandleFuncType{cheatReq},
  149. )(c)
  150. }
  151. func mcnGetRankArchiveLikesOuter(c *blademaster.Context) {
  152. oarg := new(mcnmodel.McnGetRankReq)
  153. httpGetFunc(
  154. oarg,
  155. func(context context.Context, arg interface{}) (res interface{}, err error) {
  156. return srv.McnGetRankArchiveLikes(context, arg.(*mcnmodel.McnGetRankReq))
  157. },
  158. "mcnGetRankArchiveLikesOuter",
  159. []preBindFuncType{getCookieMid(c, oarg)},
  160. []preHandleFuncType{cheatReq},
  161. )(c)
  162. }
  163. func mcnGetRecommendPool(c *blademaster.Context) {
  164. oarg := new(mcnmodel.McnGetRecommendPoolReq)
  165. httpGetFunc(
  166. oarg,
  167. func(context context.Context, arg interface{}) (res interface{}, err error) {
  168. return srv.GetRecommendPool(context, arg.(*mcnmodel.McnGetRecommendPoolReq))
  169. },
  170. "GetRecommendPool",
  171. []preBindFuncType{getCookieMid(c, oarg)},
  172. []preHandleFuncType{cheatReq},
  173. )(c)
  174. }
  175. func mcnGetRecommendPoolTidList(c *blademaster.Context) {
  176. oarg := new(mcnmodel.McnGetRecommendPoolTidListReq)
  177. httpGetFunc(
  178. oarg,
  179. func(context context.Context, arg interface{}) (res interface{}, err error) {
  180. return srv.GetRecommendPoolTidList(context, arg.(*mcnmodel.McnGetRecommendPoolTidListReq))
  181. },
  182. "GetRecommendPoolTidList",
  183. []preBindFuncType{getCookieMid(c, oarg)},
  184. []preHandleFuncType{cheatReq},
  185. )(c)
  186. }
  187. func mcnGetChangePermit(c *blademaster.Context) {
  188. oarg := new(mcnmodel.McnChangePermitReq)
  189. httpGetFunc(
  190. oarg,
  191. func(context context.Context, arg interface{}) (res interface{}, err error) {
  192. return srv.McnChangePermit(context, arg.(*mcnmodel.McnChangePermitReq))
  193. },
  194. "McnChangePermit",
  195. []preBindFuncType{getCookieMid(c, oarg)},
  196. []preHandleFuncType{cheatReq},
  197. )(c)
  198. }
  199. func mcnPermitApplyGetBind(c *blademaster.Context) {
  200. oarg := new(mcnmodel.McnUpGetBindReq)
  201. httpGetFunc(
  202. oarg,
  203. func(context context.Context, arg interface{}) (res interface{}, err error) {
  204. return srv.McnPermitApplyGetBind(context, arg.(*mcnmodel.McnUpGetBindReq))
  205. },
  206. "McnPermitApplyGetBind",
  207. []preBindFuncType{getCookieMid(c, oarg)},
  208. []preHandleFuncType{cheatReq},
  209. )(c)
  210. }
  211. func mcnUpPermitApplyConfirm(c *blademaster.Context) {
  212. oarg := new(mcnmodel.McnUpConfirmReq)
  213. httpGetFunc(
  214. oarg,
  215. func(context context.Context, arg interface{}) (res interface{}, err error) {
  216. return srv.McnUpPermitApplyConfirm(context, arg.(*mcnmodel.McnUpConfirmReq))
  217. },
  218. "McnUpPermitApplyConfirm",
  219. []preBindFuncType{getCookieMid(c, oarg)},
  220. []preHandleFuncType{cheatReq},
  221. )(c)
  222. }
  223. func mcnPublicationPriceChange(c *blademaster.Context) {
  224. oarg := new(mcnmodel.McnPublicationPriceChangeReq)
  225. httpGetFunc(
  226. oarg,
  227. func(context context.Context, arg interface{}) (res interface{}, err error) {
  228. return srv.McnPublicationPriceChange(context, arg.(*mcnmodel.McnPublicationPriceChangeReq))
  229. },
  230. "McnPublicationPriceChange",
  231. []preBindFuncType{getCookieMid(c, oarg)},
  232. []preHandleFuncType{cheatReq},
  233. )(c)
  234. }
  235. // -------------- command ------------------
  236. func cmdReloadRank(c *blademaster.Context) {
  237. oarg := new(mcnmodel.CmdReloadRank)
  238. httpGetFunc(
  239. oarg,
  240. func(context context.Context, arg interface{}) (res interface{}, err error) {
  241. return srv.CmdReloadRankCache(context, arg.(*mcnmodel.CmdReloadRank))
  242. },
  243. "CmdReloadRank",
  244. nil,
  245. nil,
  246. )(c)
  247. }