Kaynağa Gözat

ureport 统一入口

huangrf 5 yıl önce
ebeveyn
işleme
ffd0a8731a

+ 12 - 0
controllers/gen/SysPublicController_gen.go

@@ -97,3 +97,15 @@ func (c *SysPublicController) AlipayCallback(ctx *gin.Context) {
 	partial.SysPublic_AlipayCallback(&entitys.CtrlContext{c.apiengine, ctx, db, c.apiengine.PlatformOrmEngine})
 }
 
+// Ureport
+// @Title Ureport
+// @Description 报表统一接口         
+// @Success 200 {object} sysReturn
+// @Failure 403 :id is empty
+// @router /ureport  [get]
+func (c *SysPublicController) Ureport(ctx *gin.Context) {
+	//
+	db:=c.apiengine.BusinessOrmEngine[ctx.GetString("domain")]
+	partial.SysPublic_Ureport(&entitys.CtrlContext{c.apiengine, ctx, db, c.apiengine.PlatformOrmEngine})
+}
+

+ 11 - 0
controllers/partial/SysPublicController.go

@@ -7,6 +7,7 @@ import (
 	"git.qianqiusoft.com/qianqiusoft/light-apiengine/entitys"
 	"git.qianqiusoft.com/qianqiusoft/light-apiengine/models"
 	"git.qianqiusoft.com/qianqiusoft/light-apiengine/third/alipay"
+	"git.qianqiusoft.com/qianqiusoft/light-apiengine/third/ureport"
 	"git.qianqiusoft.com/qianqiusoft/light-apiengine/third/wx"
 	"github.com/silenceper/wechat/pay"
 	"io/ioutil"
@@ -160,6 +161,16 @@ func SysPublic_AlipayCallback(c *entitys.CtrlContext) {
 }
 
 
+// _Ureport
+// @Title _Ureport
+// @Description 报表统一接口
+// @Success 200 {object} Account
+// @Failure 403 :id is empty
+func SysPublic_Ureport(c *entitys.CtrlContext) {
+	ureport.CallUreportHanlder(c)
+}
+
+
 func __none_func_sys_public__(params ... interface{}) bool{
 	return true
 }

+ 3 - 0
routers/sys_public_gen.go

@@ -40,5 +40,8 @@ func registerSysPublicRouter(e *engine.ApiEngine){
 	//v1.GET("/alipay_callback",ctrler.AlipayCallback)
 	v1.POST("/alipay_callback",ctrler.AlipayCallback)
 
+	v1.GET("/ureport",ctrler.Ureport)
+	//v1.POST("/ureport",ctrler.Ureport)
+
 }
 

+ 19 - 0
third/ureport/ureport.go

@@ -0,0 +1,19 @@
+package ureport
+
+import "git.qianqiusoft.com/qianqiusoft/light-apiengine/entitys"
+
+var _ureportHandler func(ctx *entitys.CtrlContext) = nil
+
+func RegisterUreportHandler(handler func(ctx *entitys.CtrlContext)){
+	if handler == nil{
+		return
+	}
+	_ureportHandler = handler
+ }
+
+func CallUreportHanlder(ctx *entitys.CtrlContext){
+	if _ureportHandler == nil{
+		return
+	}
+	_ureportHandler(ctx)
+}