黄梓健
5 years ago
12 changed files with 188 additions and 48 deletions
-
24controllers/common/im.go
-
8controllers/pc/shake_red_envelope.go
-
55libs/im/im.go
-
1main.go
-
36services/im/im.go
-
2services/pay/handle.go
-
0test/123.gif
-
0test/annex_test.go
-
7test/pay_test.go
-
17utils/utils.go
@ -0,0 +1,24 @@ |
|||||
|
package common |
||||
|
|
||||
|
import ( |
||||
|
"hudongzhuanjia/controllers" |
||||
|
"hudongzhuanjia/libs/im" |
||||
|
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(activityId, im.NoticeStatus(status), map[string]interface{}{ |
||||
|
"customer_id": 1, |
||||
|
"shake_red_envelope_rule_id": 2, |
||||
|
"timestamp": time.Now().Unix(), |
||||
|
}) |
||||
|
t.SUCCESS("发送成功") |
||||
|
} |
Before Width: 72 | Height: 72 | Size: 6.5 KiB After Width: 72 | Height: 72 | Size: 6.5 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue