互动
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.

36 lines
917 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. package common
  2. import (
  3. "hudongzhuanjia/controllers"
  4. im_service "hudongzhuanjia/services/im"
  5. "time"
  6. )
  7. type ImTestCtl struct {
  8. controllers.BaseCtl
  9. }
  10. func (t *ImTestCtl) SendNotice() {
  11. activityId := t.MustGetInt64("activity_id")
  12. status := t.MustGetInt("status")
  13. im_service.SendGroupCustomMessage(1, activityId, im_service.NoticeStatus(status), map[string]interface{}{
  14. "customer_id": 16,
  15. "shake_red_envelope_rule_id": 5,
  16. "timestamp": time.Now().Unix(),
  17. })
  18. t.SUCCESS("发送成功")
  19. }
  20. func (t *ImTestCtl) SendRedPack() {
  21. activityId := t.MustGetInt64("activity_id")
  22. prompt := t.MustGet("prompt")
  23. im_service.SendGroupCustomMessage(1, activityId, im_service.NoticeLiveRedPackStart,
  24. map[string]interface{}{
  25. "live_red_envelope_rule_id": 1,
  26. "prompt": prompt,
  27. "timestamp": time.Now().Unix(),
  28. })
  29. t.SUCCESS("发送成功")
  30. }