|
|
@ -29,7 +29,6 @@ func (t *ShakeRedEnvelopeCtl) Status() { |
|
|
|
} |
|
|
|
|
|
|
|
func (t *ShakeRedEnvelopeCtl) Shake() { |
|
|
|
//customerId := t.MustGetInt64("customer_id")
|
|
|
|
ruleId := t.MustGetInt64("shake_red_envelope_rule_id") |
|
|
|
userId := t.MustGetUID() |
|
|
|
areaId := t.MustGetAreaId() |
|
|
@ -53,6 +52,11 @@ func (t *ShakeRedEnvelopeCtl) Shake() { |
|
|
|
t.Assert(exist, code.MSG_ACTIVITY_NOT_EXIST, "互动不存在") |
|
|
|
t.CheckRunning(activity.Status) |
|
|
|
|
|
|
|
area := models.AreaStore{} |
|
|
|
exist, err = models.Get(&area, areaId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_AREASTORE_NOT_EXIST, "地区不存在") |
|
|
|
|
|
|
|
moduleService, exist, err := activity_service.GetModuleService(define.MODULE_SHAKRB, activity.Id) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_MODULE_NOT_EXIST, "活动模块不存在") |
|
|
@ -104,7 +108,7 @@ func (t *ShakeRedEnvelopeCtl) Shake() { |
|
|
|
|
|
|
|
go ws_send_service.SendShakeRedEnvelope(fmt.Sprintf("%d", activity.Id), |
|
|
|
define.TYPE_H5USER, userId, map[string]interface{}{ |
|
|
|
"customer_id": activity.CustomerId, |
|
|
|
"customer_id": area.CustomerId, |
|
|
|
"user_id": user.Id, |
|
|
|
"type": "shake_rb", |
|
|
|
"data": map[string]interface{}{ |
|
|
@ -117,8 +121,8 @@ func (t *ShakeRedEnvelopeCtl) Shake() { |
|
|
|
}) |
|
|
|
|
|
|
|
go ws_send_service.SendShakeRedEnvelope(fmt.Sprintf("%d", activity.Id), |
|
|
|
define.TYPE_CUSTOMER, activity.CustomerId, map[string]interface{}{ |
|
|
|
"customer_id": activity.CustomerId, |
|
|
|
define.TYPE_CUSTOMER, area.CustomerId, map[string]interface{}{ |
|
|
|
"customer_id": area.CustomerId, |
|
|
|
"user_id": user.Id, |
|
|
|
"type": "shake_rb", |
|
|
|
"data": map[string]interface{}{ |
|
|
|