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
36 lines
917 B
package common
|
|
|
|
import (
|
|
"hudongzhuanjia/controllers"
|
|
im_service "hudongzhuanjia/services/im"
|
|
"time"
|
|
)
|
|
|
|
type ImTestCtl struct {
|
|
controllers.BaseCtl
|
|
}
|
|
|
|
func (t *ImTestCtl) SendNotice() {
|
|
activityId := t.MustGetInt64("activity_id")
|
|
status := t.MustGetInt("status")
|
|
|
|
im_service.SendGroupCustomMessage(1, activityId, im_service.NoticeStatus(status), map[string]interface{}{
|
|
"customer_id": 16,
|
|
"shake_red_envelope_rule_id": 5,
|
|
"timestamp": time.Now().Unix(),
|
|
})
|
|
t.SUCCESS("发送成功")
|
|
}
|
|
|
|
func (t *ImTestCtl) SendRedPack() {
|
|
activityId := t.MustGetInt64("activity_id")
|
|
prompt := t.MustGet("prompt")
|
|
|
|
im_service.SendGroupCustomMessage(1, activityId, im_service.NoticeLiveRedPackStart,
|
|
map[string]interface{}{
|
|
"live_red_envelope_rule_id": 1,
|
|
"prompt": prompt,
|
|
"timestamp": time.Now().Unix(),
|
|
})
|
|
t.SUCCESS("发送成功")
|
|
}
|