作者 tangxvhui

bug 修复

@@ -123,7 +123,7 @@ func (repository OrderGoodRepository) Remove(orderId int64, goodids ...int64) er @@ -123,7 +123,7 @@ func (repository OrderGoodRepository) Remove(orderId int64, goodids ...int64) er
123 err error 123 err error
124 tx = repository.transactionContext.PgTx 124 tx = repository.transactionContext.PgTx
125 ) 125 )
126 - m := &models.OrderBase{} 126 + m := &models.OrderGood{}
127 query := tx.Model(m).Where("order_id=?", orderId) 127 query := tx.Model(m).Where("order_id=?", orderId)
128 if len(goodids) > 0 { 128 if len(goodids) > 0 {
129 query = query.WhereIn("id in(?)", goodids) 129 query = query.WhereIn("id in(?)", goodids)
@@ -17,8 +17,8 @@ type OrderInfoController struct { @@ -17,8 +17,8 @@ type OrderInfoController struct {
17 17
18 ////Prepare 重写 BaseController 的Prepare方法 18 ////Prepare 重写 BaseController 的Prepare方法
19 func (c *OrderInfoController) Prepare() { 19 func (c *OrderInfoController) Prepare() {
20 - return  
21 c.BaseController.Prepare() 20 c.BaseController.Prepare()
  21 + return
22 if ok := c.ValidJWTToken(); !ok { 22 if ok := c.ValidJWTToken(); !ok {
23 return 23 return
24 } 24 }
@@ -52,15 +52,6 @@ func init() { @@ -52,15 +52,6 @@ func init() {
52 beego.NSRouter("/partner", &controllers.CommonController{}, "POST:GetPartnerList"), 52 beego.NSRouter("/partner", &controllers.CommonController{}, "POST:GetPartnerList"),
53 ), 53 ),
54 ) 54 )
55 - // adminRouterV2 := beego.NewNamespace("/v2",  
56 - // beego.NSNamespace("/order",  
57 - // beego.NSRouter("/purpose/list", &controllers.OrderInfoController{}, "POST:PageListOrderPurpose"),  
58 - // beego.NSRouter("/purpose/update", &controllers.OrderInfoController{}, "POST:UpdateOrderPurpose"),  
59 - // beego.NSRouter("/purpose/detail", &controllers.OrderInfoController{}, "POST:GetOrderPurpose"),  
60 - // beego.NSRouter("/purpose/del", &controllers.OrderInfoController{}, "POST:RemoveOrderPurpose"),  
61 - // ),  
62 - // )  
63 55
64 beego.AddNamespace(adminRouter) 56 beego.AddNamespace(adminRouter)
65 - // beego.AddNamespace(adminRouterV2)  
66 } 57 }