msg.go 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. package archive
  2. import (
  3. "fmt"
  4. )
  5. // const .
  6. const (
  7. MSG_1 = int(1)
  8. MSG_2 = int(2)
  9. MSG_3 = int(3)
  10. MSG_4 = int(4)
  11. MSG_5 = int(5)
  12. MSG_6 = int(6)
  13. MSG_7 = int(7)
  14. MSG_8 = int(8)
  15. MSG_9 = int(9)
  16. MSG_10 = int(10)
  17. MSG_11 = int(11)
  18. MSG_12 = int(12)
  19. MSG_13 = int(13)
  20. )
  21. // MSG .
  22. type MSG struct {
  23. To string
  24. MSGID int
  25. Code string
  26. Title string
  27. Content string
  28. }
  29. // ArgMsg .
  30. type ArgMsg struct {
  31. MSGID int
  32. Apply *ApplyParam
  33. }
  34. // MsgInfo .
  35. func (arg *ArgMsg) MsgInfo(msg *MSG) (mids []int64, title, content, code string) {
  36. switch arg.MSGID {
  37. /*
  38. 1up主xxxx邀请您作为xxxx参与稿件《xxxx》(avxxxxx)的多人合作,在网页端创作中心查看吧点击查看
  39. 2参与者xxxx已接受您的邀请作为xxxx参与稿件《xxxx》(avxxxxx)的多人合作,在网页端创作中心查看吧点击查看
  40. 3参与者xxxx已拒绝您的邀请作为xxxx参与稿件《xxxx》(avxxxxx)的多人合作,在网页端创作中心查看吧点击查看
  41. 4up主xxxx申请您参与稿件《xxxx》(avxxxx)的参与类型由xxxx变更为xxxx,在网页端创作中心查看吧点击查看
  42. 5参与者已同意您申请其参与稿件《xxxx》(avxxxx)的参与类型由xxxx变更为xxxx,在网页端创作中心查看吧点击查看
  43. 6参与者已拒绝您申请其参与稿件《xxxx》(avxxxx)的参与类型由xxxx变更为xxxx,在网页端创作中心查看吧点击查看
  44. 7合作者xxxx申请终止其作为稿件《xxxx》(avxxxxx)的xxxx的多人合作,在网页端创作中心查看吧点击查看
  45. 8up主xxxx已终止参与者xxxx作为稿件《xxxx》(avxxxx)的xxxx的多人合作,在网页端创作中心查看吧点击查看
  46. 9up主xxxx申请终止您作为稿件xxxxxx(aid:xxxxx)的xxx的多人合作,在网页端创作中心查看吧点击查看
  47. 10 up主xxxx已终止参与者xxxx作为稿件《xxxx》(avxxxx)的xxxx的多人合作,在网页端创作中心查看吧点击查看
  48. 11 up主xxxx未能终止参与者xxxx作为稿件《xxxx》(avxxxx)的xxxx的多人合作,在网页端创作中心查看吧点击查看
  49. 12 管理员解除了您与参与者xxx在稿件《xxxx》《avxxxx》中合作关系,在网页端创作中心查看吧点击查看
  50. 13 管理员解除了您与up主xxxx在稿件《xxxx》《avxxxx》中合作关系,在网页端创作中心查看吧点击查看
  51. */
  52. case MSG_1:
  53. //content = 'up主%s邀请您作为%s参与稿件《%s》(av%d)的多人合作,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article/cooperation"}”'
  54. return []int64{arg.Apply.ApplyStaffMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.UpName, arg.Apply.ApplyTitle, arg.Apply.Archive.Title, arg.Apply.Archive.Aid), msg.Code
  55. case MSG_2:
  56. //content = '参与者%s已接受您的邀请作为%s参与稿件《%s》(av%d)的多人合作,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article"}”'
  57. return []int64{arg.Apply.ApplyUpMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.StaffName, arg.Apply.ApplyTitle, arg.Apply.Archive.Title, arg.Apply.Archive.Aid), msg.Code
  58. case MSG_3:
  59. //content = '参与者%s已拒绝您的邀请作为%s参与稿件《%s》(av%d)的多人合作,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article"}”'
  60. return []int64{arg.Apply.ApplyUpMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.StaffName, arg.Apply.ApplyTitle, arg.Apply.Archive.Title, arg.Apply.Archive.Aid), msg.Code
  61. case MSG_4:
  62. //content = 'up主%s申请您参与稿件《%s》(av%d)的参与类型由%s变更为%s,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article/cooperation"}”'
  63. return []int64{arg.Apply.ApplyStaffMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.UpName, arg.Apply.Archive.Title, arg.Apply.Archive.Aid, arg.Apply.StaffTitle, arg.Apply.ApplyTitle), msg.Code
  64. case MSG_5:
  65. //content = '参与者%s已同意您申请其参与稿件《%s》(av%d)的参与类型由%s变更为%s,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article"}”'
  66. return []int64{arg.Apply.ApplyUpMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.StaffName, arg.Apply.Archive.Title, arg.Apply.Archive.Aid, arg.Apply.StaffTitle, arg.Apply.ApplyTitle), msg.Code
  67. case MSG_6:
  68. //content = '参与者%s已拒绝您申请其参与稿件《%s》(av%d)的参与类型由%s变更为%s,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article"}”'
  69. return []int64{arg.Apply.ApplyUpMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.StaffName, arg.Apply.Archive.Title, arg.Apply.Archive.Aid, arg.Apply.StaffTitle, arg.Apply.OldTitle), msg.Code
  70. case MSG_7:
  71. // content = '合作者%s申请终止其作为稿件《%s》(av%d)的%s的多人合作,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article"}”'
  72. return []int64{arg.Apply.ApplyUpMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.StaffName, arg.Apply.Archive.Title, arg.Apply.Archive.Aid, arg.Apply.ApplyTitle), msg.Code
  73. case MSG_8:
  74. //content = 'up主%s已终止参与者%s作为稿件《%s》(av%d)的%s的多人合作,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article/cooperation"}”'
  75. return []int64{arg.Apply.ApplyStaffMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.UpName, arg.Apply.StaffName, arg.Apply.Archive.Title, arg.Apply.Archive.Aid, arg.Apply.StaffTitle), msg.Code
  76. case MSG_9:
  77. //content = 'up主%s申请终止您作为稿件%s(aid:%d)的%s的多人合作,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article/cooperation"}”'
  78. return []int64{arg.Apply.ApplyStaffMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.UpName, arg.Apply.Archive.Title, arg.Apply.Archive.Aid, arg.Apply.StaffTitle), msg.Code
  79. case MSG_10:
  80. //content = 'up主%s已终止参与者%s作为稿件《%s》(av%d)的%s的多人合作,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article"}”'
  81. return []int64{arg.Apply.ApplyUpMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.UpName, arg.Apply.StaffName, arg.Apply.Archive.Title, arg.Apply.Archive.Aid, arg.Apply.StaffTitle), msg.Code
  82. case MSG_11:
  83. // content = 'up主%s未能终止参与者%s作为稿件《%s》(av%d)的%s的多人合作,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article"}”'
  84. return []int64{arg.Apply.ApplyUpMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.UpName, arg.Apply.StaffName, arg.Apply.Archive.Title, arg.Apply.Archive.Aid, arg.Apply.StaffTitle), msg.Code
  85. case MSG_12:
  86. //content = '管理员解除了您与参与者%s在稿件《%s》《av%d》中合作关系,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article"}”'
  87. return []int64{arg.Apply.ApplyUpMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.StaffsName, arg.Apply.Archive.Title, arg.Apply.Archive.Aid), msg.Code
  88. case MSG_13:
  89. //content = '管理员解除了您与UP主%s在稿件《%s》《av%d》中合作关系,在网页端创作中心查看吧#{点击查看}{"https://member.bilibili.com/v2#/upload-manager/article"}”'
  90. return []int64{arg.Apply.ApplyStaffMID}, msg.Title, fmt.Sprintf(msg.Content, arg.Apply.UpName, arg.Apply.Archive.Title, arg.Apply.Archive.Aid), msg.Code
  91. }
  92. return nil, "", "", ""
  93. }