1
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
|||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
|
push "git.rosy.net.cn/jx-callback/business/jxutils/unipush"
|
||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"github.com/astaxie/beego/server/web"
|
"github.com/astaxie/beego/server/web"
|
||||||
)
|
)
|
||||||
@@ -250,3 +251,19 @@ func (c *EventController) GetImMessageRecord() {
|
|||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title 测试uniApp推送
|
||||||
|
// @Description 测试uniApp推送
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param vendorOrderID query string true "订单号"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /TestUniAppPush [get]
|
||||||
|
func (c *EventController) TestUniAppPush() {
|
||||||
|
c.callTestUniAppPush(func(params *tEventTestUniAppPushParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
order, err := dao.GetSimpleOrder(dao.GetDB(), params.VendorOrderID)
|
||||||
|
push.NotifyNewOrder(order)
|
||||||
|
|
||||||
|
return retVal, errCode, err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -599,6 +599,15 @@ func init() {
|
|||||||
MethodParams: param.Make(),
|
MethodParams: param.Make(),
|
||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
// 测试uniApp推送
|
||||||
|
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:EventController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:EventController"],
|
||||||
|
web.ControllerComments{
|
||||||
|
Method: "TestUniAppPush",
|
||||||
|
Router: `/TestUniAppPush`,
|
||||||
|
AllowHTTPMethods: []string{"get"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:EventController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:EventController"],
|
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:EventController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:EventController"],
|
||||||
web.ControllerComments{
|
web.ControllerComments{
|
||||||
|
|||||||
Reference in New Issue
Block a user