aa
This commit is contained in:
@@ -3,7 +3,7 @@ package casbinauth
|
|||||||
import (
|
import (
|
||||||
jxmodel "git.rosy.net.cn/jx-callback/business/model"
|
jxmodel "git.rosy.net.cn/jx-callback/business/model"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/client/orm"
|
||||||
"github.com/casbin/casbin/model"
|
"github.com/casbin/casbin/model"
|
||||||
"github.com/casbin/casbin/persist"
|
"github.com/casbin/casbin/persist"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ import (
|
|||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
|
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/client/orm"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/adapter/orm"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package dao
|
package dao
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/client/orm"
|
||||||
"github.com/go-sql-driver/mysql"
|
"github.com/go-sql-driver/mysql"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package dao
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/client/orm"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/weixin"
|
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/weixin"
|
||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetComposedCode(c *beego.Controller, code string) (composedCode string) {
|
func GetComposedCode(c *beego.Controller, code string) (composedCode string) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package controllers
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/financial"
|
"git.rosy.net.cn/jx-callback/business/jxstore/financial"
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BillController struct {
|
type BillController struct {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/initdata"
|
"git.rosy.net.cn/jx-callback/business/jxstore/initdata"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/datares"
|
"git.rosy.net.cn/jx-callback/business/jxutils/datares"
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CmsController struct {
|
type CmsController struct {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TaskController struct {
|
type TaskController struct {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import (
|
|||||||
|
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 操作事件明细相关API
|
// 操作事件明细相关API
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
)
|
)
|
||||||
|
|
||||||
type JobController struct {
|
type JobController struct {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
)
|
)
|
||||||
|
|
||||||
type OrderController struct {
|
type OrderController struct {
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import (
|
|||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
|
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
"github.com/astaxie/beego/context"
|
"github.com/astaxie/beego/server/web/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TongLianController struct {
|
type TongLianController struct {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
)
|
)
|
||||||
|
|
||||||
type User2Controller struct {
|
type User2Controller struct {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
)
|
)
|
||||||
|
|
||||||
type WXPayController struct {
|
type WXPayController struct {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/jxutils/cache/redis"
|
"git.rosy.net.cn/jx-callback/business/jxutils/cache/redis"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
|
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
"github.com/qiniu/api.v7/auth/qbox"
|
"github.com/qiniu/api.v7/auth/qbox"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package beegodb
|
|||||||
import (
|
import (
|
||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
"git.rosy.net.cn/jx-callback/business/model/legacymodel"
|
"git.rosy.net.cn/jx-callback/business/model/legacymodel"
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/adapter/orm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Init() {
|
func Init() {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package globals
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"git.rosy.net.cn/baseapi"
|
"git.rosy.net.cn/baseapi"
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
"github.com/astaxie/beego/logs"
|
"github.com/astaxie/beego/core/logs"
|
||||||
_ "github.com/go-sql-driver/mysql" // import your used driver
|
_ "github.com/go-sql-driver/mysql" // import your used driver
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -14,7 +14,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/jxstore/misc"
|
"git.rosy.net.cn/jx-callback/business/jxstore/misc"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasks"
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasks"
|
||||||
|
|
||||||
"github.com/astaxie/beego"
|
beego "github.com/astaxie/beego/adapter"
|
||||||
|
|
||||||
// 导入缺省订单调度器
|
// 导入缺省订单调度器
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
|||||||
// @APIVersion 1.0.0
|
// @APIVersion 1.0.0
|
||||||
// @Title beego Test API
|
// @Title web Test API
|
||||||
// @Description beego has a very cool tools to autogenerate documents for your API
|
// @Description web has a very cool tools to autogenerate documents for your API
|
||||||
// @Contact astaxie@gmail.com
|
// @Contact astaxie@gmail.com
|
||||||
// @TermsOfServiceUrl http://beego.me/
|
// @TermsOfServiceUrl http://web.me/
|
||||||
// @License Apache 2.0
|
// @License Apache 2.0
|
||||||
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
|
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
package routers
|
package routers
|
||||||
@@ -10,65 +10,65 @@ package routers
|
|||||||
import (
|
import (
|
||||||
"git.rosy.net.cn/jx-callback/controllers"
|
"git.rosy.net.cn/jx-callback/controllers"
|
||||||
|
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego/server/web"
|
||||||
beecontext "github.com/astaxie/beego/context"
|
beecontext "github.com/astaxie/beego/server/web/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
ns := beego.NewNamespace("/v2",
|
ns := web.NewNamespace("/v2",
|
||||||
beego.NSNamespace("/task",
|
web.NSNamespace("/task",
|
||||||
beego.NSInclude(
|
web.NSInclude(
|
||||||
&controllers.TaskController{},
|
&controllers.TaskController{},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
beego.NSNamespace("/auth2",
|
web.NSNamespace("/auth2",
|
||||||
beego.NSInclude(
|
web.NSInclude(
|
||||||
&controllers.Auth2Controller{},
|
&controllers.Auth2Controller{},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
beego.NSNamespace("/user2",
|
web.NSNamespace("/user2",
|
||||||
beego.NSInclude(
|
web.NSInclude(
|
||||||
&controllers.User2Controller{},
|
&controllers.User2Controller{},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
beego.NSNamespace("/order",
|
web.NSNamespace("/order",
|
||||||
beego.NSInclude(
|
web.NSInclude(
|
||||||
&controllers.OrderController{},
|
&controllers.OrderController{},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
beego.NSNamespace("/job",
|
web.NSNamespace("/job",
|
||||||
beego.NSInclude(
|
web.NSInclude(
|
||||||
&controllers.JobController{},
|
&controllers.JobController{},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
beego.NSNamespace("/event",
|
web.NSNamespace("/event",
|
||||||
beego.NSInclude(
|
web.NSInclude(
|
||||||
&controllers.EventController{},
|
&controllers.EventController{},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
beego.NSNamespace("/bill",
|
web.NSNamespace("/bill",
|
||||||
beego.NSInclude(
|
web.NSInclude(
|
||||||
&controllers.BillController{},
|
&controllers.BillController{},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
beego.NSNamespace("/cms",
|
web.NSNamespace("/cms",
|
||||||
beego.NSInclude(
|
web.NSInclude(
|
||||||
&controllers.CmsController{},
|
&controllers.CmsController{},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
beego.AddNamespace(ns)
|
web.AddNamespace(ns)
|
||||||
beego.AutoRouter(&controllers.WXPayController{})
|
web.AutoRouter(&controllers.WXPayController{})
|
||||||
beego.AutoRouter(&controllers.TongLianController{})
|
web.AutoRouter(&controllers.TongLianController{})
|
||||||
|
|
||||||
// 如下都是用于检测存活的空接口
|
// 如下都是用于检测存活的空接口
|
||||||
beego.Any("/", func(ctx *beecontext.Context) {
|
web.Any("/", func(ctx *beecontext.Context) {
|
||||||
ctx.WriteString("pong\n")
|
ctx.WriteString("pong\n")
|
||||||
})
|
})
|
||||||
beego.Any("/res", func(ctx *beecontext.Context) {
|
web.Any("/res", func(ctx *beecontext.Context) {
|
||||||
ctx.WriteString("pong\n")
|
ctx.WriteString("pong\n")
|
||||||
})
|
})
|
||||||
beego.Any("/addstoremsg", func(ctx *beecontext.Context) {
|
web.Any("/addstoremsg", func(ctx *beecontext.Context) {
|
||||||
ctx.WriteString("pong\n")
|
ctx.WriteString("pong\n")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user