蛋蛋星球 后台端
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

md_notice.go 14 KiB

2 semanas atrás
1 mês atrás
1 mês atrás
1 mês atrás
1 mês atrás
3 semanas atrás
3 semanas atrás
1 mês atrás
1 mês atrás
3 semanas atrás
2 semanas atrás
3 semanas atrás
2 semanas atrás
3 semanas atrás
3 semanas atrás
2 semanas atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. package md
  2. import (
  3. md "applet/app/md/member_center"
  4. "code.fnuoos.com/EggPlanet/egg_models.git/src/model"
  5. )
  6. type NoticeListReq struct {
  7. Page string `json:"page,required"` // 页数
  8. Limit string `json:"limit,required"` // 每页大小
  9. }
  10. type NoticeListResp struct {
  11. Total int64 `json:"total"`
  12. SelectData []map[string]string `json:"select_data"`
  13. ChangeData []map[string]string `json:"change_data"`
  14. List []NoticeList `json:"list"`
  15. }
  16. type NoticeList struct {
  17. Id string `json:"id"`
  18. Title string `json:"title"`
  19. Content string `json:"content"`
  20. Type string `json:"type"`
  21. JpushOpen string `json:"jpush_open" example:"app推送开启 0关 1开"`
  22. SmsOpen string `json:"sms_open" example:"短信推送开启 0关 1开"`
  23. SmsCode string `json:"sms_code" example:"短信模板id"`
  24. Day string `json:"day" example:" xxx小时(未签到/未登录) 隔 xx小时通知一次 (这里是 X小时,type=sign/login 的时候要显示前面的话填写 sign是未签到 login是未登录)"`
  25. NoticeDay string `json:"notice_day" example:" xxx小时(未签到/未登录) 隔 xx小时通知一次 (这里是 隔 xx小时,type=sign/login 的时候要显示前面的话填写 sign是未签到 login是未登录)"`
  26. }
  27. type NoticeSaveReq struct {
  28. Id string `json:"id"`
  29. Title string `json:"title"`
  30. Content string `json:"content"`
  31. Type string `json:"type"`
  32. JpushOpen string `json:"jpush_open" example:"app推送开启 0关 1开"`
  33. SmsOpen string `json:"sms_open" example:"短信推送开启 0关 1开"`
  34. SmsCode string `json:"sms_code" example:"短信模板id"`
  35. Day string `json:"day" example:" xxx小时(未签到/未登录) 隔 xx小时通知一次 (这里是 X小时,type=sign/login 的时候要显示前面的话填写 sign是未签到 login是未登录)"`
  36. NoticeDay string `json:"notice_day" example:" xxx小时(未签到/未登录) 隔 xx小时通知一次 (这里是 隔 xx小时,type=sign/login 的时候要显示前面的话填写 sign是未签到 login是未登录)"`
  37. }
  38. type NoticeDelReq struct {
  39. Id []string `json:"id"`
  40. }
  41. type NoticePushListResp struct {
  42. Total int64 `json:"total"`
  43. PlatformData []map[string]string `json:"platform_data"`
  44. TargetData []map[string]string `json:"target_data"`
  45. List []NoticePushList `json:"list"`
  46. }
  47. type NoticePushList struct {
  48. Id string `json:"id"`
  49. Title string `json:"title"`
  50. Content string `json:"content"`
  51. Platform string `json:"platform"`
  52. Target string `json:"target"`
  53. SendType string `json:"send_type" example:"0立即推送 1定时推送"`
  54. SendStartTime string `json:"send_start_time" example:"如 2024-11-25 11:56:00"`
  55. SendEndTime string `json:"send_end_time" example:"如 2024-11-25 11:56:00"`
  56. State string `json:"state" example:"0待发送 1发送成功"`
  57. }
  58. type NoticePushSaveReq struct {
  59. Id string `json:"id"`
  60. Title string `json:"title"`
  61. Content string `json:"content"`
  62. Platform string `json:"platform"`
  63. Target string `json:"target"`
  64. SendType string `json:"send_type"`
  65. SendStartTime string `json:"send_start_time"`
  66. SendEndTime string `json:"send_end_time"`
  67. UserList []string `json:"user_list"`
  68. TagList []string `json:"tag_list"`
  69. Level []string `json:"level"`
  70. }
  71. type NoticeAliyunSmsListReq struct {
  72. Page string `json:"page,required"` // 页数
  73. Limit string `json:"limit,required"` // 每页大小
  74. }
  75. type NoticeAliyunSmsListResp struct {
  76. Total int64 `json:"total"`
  77. SelectData []map[string]string `json:"select_data"`
  78. List []NoticeAliyunSmsList `json:"list"`
  79. }
  80. type NoticeAliyunSmsList struct {
  81. Id string `json:"id"`
  82. Title string `json:"title"`
  83. Content string `json:"content" example:"这是 填短信模板id"`
  84. Type string `json:"type"`
  85. IsShow string `json:"is_show"`
  86. Day string `json:"day" example:" xxx小时(未签到/未登录) 隔 xx小时通知一次 (这里是 X小时,type=sign/login 的时候要显示前面的话填写 sign是未签到 login是未登录)"`
  87. NoticeDay string `json:"notice_day" example:" xxx小时(未签到/未登录) 隔 xx小时通知一次 (这里是 隔 xx小时,type=sign/login 的时候要显示前面的话填写 sign是未签到 login是未登录)"`
  88. }
  89. type NoticeAliyunSmsSaveReq struct {
  90. Id string `json:"id"`
  91. Title string `json:"title"`
  92. Content string `json:"content"`
  93. IsShow string `json:"is_show"`
  94. Type string `json:"type"`
  95. Day string `json:"day" example:" xxx小时(未签到/未登录) 隔 xx小时通知一次 (这里是 X小时,type=sign/login 的时候要显示前面的话填写 sign是未签到 login是未登录)"`
  96. NoticeDay string `json:"notice_day" example:" xxx小时(未签到/未登录) 隔 xx小时通知一次 (这里是 隔 xx小时,type=sign/login 的时候要显示前面的话填写 sign是未签到 login是未登录)"`
  97. }
  98. type NoticeAliyunSmsDelReq struct {
  99. Id []string `json:"id"`
  100. }
  101. type NoticeAliyunSmsPushListResp struct {
  102. Total int64 `json:"total"`
  103. TargetData []map[string]string `json:"target_data"`
  104. List []NoticeAliyunSmsPushList `json:"list"`
  105. }
  106. type NoticeAliyunSmsPushList struct {
  107. Id string `json:"id"`
  108. Title string `json:"title"`
  109. Content string `json:"content"`
  110. Target string `json:"target"`
  111. CreateAt string `json:"create_at"`
  112. SmsCode string `json:"sms_code"`
  113. State string `json:"state" example:"0待发送 1发送成功"`
  114. }
  115. type NoticeAliyunSmsPushSaveReq struct {
  116. Id string `json:"id"`
  117. Title string `json:"title"`
  118. Content string `json:"content"`
  119. Target string `json:"target"`
  120. SmsCode string `json:"sms_code"`
  121. PhoneList []string `json:"phone_list"`
  122. TagList []string `json:"tag_list"`
  123. Level []string `json:"level"`
  124. }
  125. type Paginate struct {
  126. Limit int `json:"limit"` // 每页大小
  127. Page int `json:"page"` // 页数
  128. Total int64 `json:"total"` // 总数据量
  129. }
  130. type JPushGetUserListResp struct {
  131. LevelsList []map[string]interface{} `json:"levels_list"` // 等级列表
  132. TagsList []map[string]interface{} `json:"tags_list"` // 标签列表
  133. StateList []map[string]interface{} `json:"state_list"` // 状态列表
  134. List []GetUserListNode `json:"list"`
  135. Paginate Paginate `json:"paginate"` // 分页信息
  136. }
  137. type TagNode struct {
  138. TagID int `json:"tag_id"` // 标签 ID
  139. TagName string `json:"tag_name"` // 标签名称
  140. }
  141. type LevelCount struct {
  142. Level int `xorm:"level"`
  143. Count int `xorm:"count"`
  144. }
  145. type GetUserListNode struct {
  146. ID int64 `json:"id"` // 会员 ID
  147. Tag []TagNode `json:"tag"` // 会员标签
  148. Sex int `json:"sex"` // 性别(0:未知 1:男 2:女)
  149. Avatar string `json:"avatar"` // 头像
  150. Nickname string `json:"nickname"` // 昵称
  151. Phone string `json:"phone"` // 手机号
  152. IsRealName int `json:"is_real_name"` // 是否实名 0.未实名,1.已实名
  153. LevelName string `json:"level_name"` // 会员等级
  154. InviteCode string `json:"invite_code" example:"会员邀请码"`
  155. ParentID int64 `json:"parent_id"` // 推荐人 ID
  156. ParentInviteCode string `json:"parent_invite_code" example:"推荐人邀请码"`
  157. ParentPhone string `json:"parent_phone" example:"推荐人手机号"`
  158. RegisterTime string `json:"register_time"` // 注册时间
  159. Memo string `json:"memo"` // 备注
  160. Wechat string `json:"wechat"` // 微信号
  161. RegisterType int `json:"register_type"` // 注册类型
  162. State int `json:"state"` // 状态
  163. LastLoginAt string `json:"last_login_at"` // 最后登录时间
  164. }
  165. type JPushGetUserListReq struct {
  166. ID int64 `json:"id"` // 会员 ID
  167. Nickname string `json:"nickname" example:"会员昵称"`
  168. RecommendID int64 `json:"recommend_id"` // 推荐人 ID
  169. Tag int `json:"tag"` // 标签 id
  170. Phone string `json:"phone" example:"会员手机号"`
  171. InviteCode string `json:"invite_code" example:"会员邀请码"`
  172. ParentInviteCode string `json:"parent_invite_code" example:"上级邀请码"`
  173. ParentPhone string `json:"parent_phone" example:"上级手机号"`
  174. Sex int `json:"sex"` // 性别(0:未知 1:男 2:女)
  175. UnionId string `json:"union_id" example:"微信号"`
  176. Level int `json:"level"` // 会员等级
  177. RegisterType int `json:"register_type"` // 注册类型(1:APP注册、2:H5注册)
  178. State int `json:"state"` // 状态
  179. Effective int `json:"effective"` // 有效会员
  180. IsRealName int `json:"is_real_name"` // 是否实名 0.未实名,1.已实名
  181. Memo string `json:"memo"` // 备注
  182. RegisterBefore string `json:"register_before"` // 注册时间起点
  183. RegisterAfter string `json:"register_after"` // 注册时间终点
  184. LoginBefore string `json:"login_before"` // 最近登录开始时间
  185. LoginAfter string `json:"login_after"` // 最近登录结束时间
  186. Page int `json:"page,required"`
  187. Limit int `json:"limit,required"`
  188. }
  189. type UserInfo struct {
  190. model.User `xorm:"extends"`
  191. TagID int `xorm:"tag_id"`
  192. ParentPhone string `xorm:"parent_phone"`
  193. ParentSystemInviteCode string `xorm:"parent_system_invite_code"`
  194. ParentCustomInviteCode string `xorm:"parent_custom_invite_code"`
  195. }
  196. type JPushGetTagListResp struct {
  197. List []md.TagListNode `json:"list"`
  198. Paginate Paginate `json:"paginate"`
  199. }
  200. type JPushGetLevelListResp struct {
  201. List []md.LevelListNode `json:"list"`
  202. Paginate Paginate `json:"paginate"`
  203. }
  204. type AliyunSmsGetUserListResp struct {
  205. LevelsList []map[string]interface{} `json:"levels_list"` // 等级列表
  206. TagsList []map[string]interface{} `json:"tags_list"` // 标签列表
  207. StateList []map[string]interface{} `json:"state_list"` // 状态列表
  208. List []GetUserListNode `json:"list"`
  209. Paginate Paginate `json:"paginate"` // 分页信息
  210. }
  211. type AliyunSmsUserListReq struct {
  212. ID int64 `json:"id"` // 会员 ID
  213. Nickname string `json:"nickname" example:"会员昵称"`
  214. RecommendID int64 `json:"recommend_id"` // 推荐人 ID
  215. Tag int `json:"tag"` // 标签 id
  216. Phone string `json:"phone" example:"会员手机号"`
  217. InviteCode string `json:"invite_code" example:"会员邀请码"`
  218. ParentInviteCode string `json:"parent_invite_code" example:"上级邀请码"`
  219. ParentPhone string `json:"parent_phone" example:"上级手机号"`
  220. Sex int `json:"sex"` // 性别(0:未知 1:男 2:女)
  221. UnionId string `json:"union_id" example:"微信号"`
  222. Level int `json:"level"` // 会员等级
  223. RegisterType int `json:"register_type"` // 注册类型(1:APP注册、2:H5注册)
  224. State int `json:"state"` // 状态
  225. Effective int `json:"effective"` // 有效会员
  226. IsRealName int `json:"is_real_name"` // 是否实名 0.未实名,1.已实名
  227. Memo string `json:"memo"` // 备注
  228. RegisterBefore string `json:"register_before"` // 注册时间起点
  229. RegisterAfter string `json:"register_after"` // 注册时间终点
  230. LoginBefore string `json:"login_before"` // 最近登录开始时间
  231. LoginAfter string `json:"login_after"` // 最近登录结束时间
  232. Page int `json:"page,required"`
  233. Limit int `json:"limit,required"`
  234. }
  235. type AliyunSmsGetTagListResp struct {
  236. List []md.TagListNode `json:"list"`
  237. Paginate Paginate `json:"paginate"`
  238. }
  239. type AliyunSmsGetLevelListResp struct {
  240. List []md.LevelListNode `json:"list"`
  241. Paginate Paginate `json:"paginate"`
  242. }
  243. func (req JPushGetUserListReq) ToUserMemberRequest() *md.UserManagementGetUserListReq {
  244. return &md.UserManagementGetUserListReq{
  245. ID: req.ID,
  246. Nickname: req.Nickname,
  247. RecommendID: req.RecommendID,
  248. Tag: req.Tag,
  249. Phone: req.Phone,
  250. InviteCode: req.InviteCode,
  251. ParentInviteCode: req.ParentInviteCode,
  252. ParentPhone: req.ParentPhone,
  253. Sex: req.Sex,
  254. UnionId: req.UnionId,
  255. Level: req.Level,
  256. RegisterType: req.RegisterType,
  257. State: req.State,
  258. Effective: req.Effective,
  259. IsRealName: req.IsRealName,
  260. Memo: req.Memo,
  261. RegisterBefore: req.RegisterBefore,
  262. RegisterAfter: req.RegisterAfter,
  263. LoginBefore: req.LoginBefore,
  264. LoginAfter: req.LoginAfter,
  265. Page: req.Page,
  266. Limit: req.Limit,
  267. }
  268. }
  269. func (req AliyunSmsUserListReq) ToUserMemberRequest() *md.UserManagementGetUserListReq {
  270. return &md.UserManagementGetUserListReq{
  271. ID: req.ID,
  272. Nickname: req.Nickname,
  273. RecommendID: req.RecommendID,
  274. Tag: req.Tag,
  275. Phone: req.Phone,
  276. InviteCode: req.InviteCode,
  277. ParentInviteCode: req.ParentInviteCode,
  278. ParentPhone: req.ParentPhone,
  279. Sex: req.Sex,
  280. UnionId: req.UnionId,
  281. Level: req.Level,
  282. RegisterType: req.RegisterType,
  283. State: req.State,
  284. Effective: req.Effective,
  285. IsRealName: req.IsRealName,
  286. Memo: req.Memo,
  287. RegisterBefore: req.RegisterBefore,
  288. RegisterAfter: req.RegisterAfter,
  289. LoginBefore: req.LoginBefore,
  290. LoginAfter: req.LoginAfter,
  291. Page: req.Page,
  292. Limit: req.Limit,
  293. }
  294. }