作者 tangxvhui

bug 修复

... ... @@ -123,7 +123,7 @@ func (repository OrderGoodRepository) Remove(orderId int64, goodids ...int64) er
err error
tx = repository.transactionContext.PgTx
)
m := &models.OrderBase{}
m := &models.OrderGood{}
query := tx.Model(m).Where("order_id=?", orderId)
if len(goodids) > 0 {
query = query.WhereIn("id in(?)", goodids)
... ...
... ... @@ -17,8 +17,8 @@ type OrderInfoController struct {
////Prepare 重写 BaseController 的Prepare方法
func (c *OrderInfoController) Prepare() {
return
c.BaseController.Prepare()
return
if ok := c.ValidJWTToken(); !ok {
return
}
... ...
... ... @@ -52,15 +52,6 @@ func init() {
beego.NSRouter("/partner", &controllers.CommonController{}, "POST:GetPartnerList"),
),
)
// adminRouterV2 := beego.NewNamespace("/v2",
// beego.NSNamespace("/order",
// beego.NSRouter("/purpose/list", &controllers.OrderInfoController{}, "POST:PageListOrderPurpose"),
// beego.NSRouter("/purpose/update", &controllers.OrderInfoController{}, "POST:UpdateOrderPurpose"),
// beego.NSRouter("/purpose/detail", &controllers.OrderInfoController{}, "POST:GetOrderPurpose"),
// beego.NSRouter("/purpose/del", &controllers.OrderInfoController{}, "POST:RemoveOrderPurpose"),
// ),
// )
beego.AddNamespace(adminRouter)
// beego.AddNamespace(adminRouterV2)
}
... ...