caipin 4 years ago
parent
commit
0712d016ed
2 changed files with 13 additions and 1 deletions
  1. 1 1
      services/contract_section_tree_service.go
  2. 12 0
      web/routes/routes.go

+ 1 - 1
services/contract_section_tree_service.go

@@ -339,7 +339,7 @@ func (s *contractService) MoveDepth(sectionData *viewmodels.TreeSectionContract,
 		elderBrother = &elderBrotherList[0]
 		// 前一个兄弟节点 不能有合同
 		if elderBrother.ContractId != 0 {
-			return errors.New(elderBrother.Code + "已存在合同,不能降级")
+			return errors.New(elderBrother.Code + "已合同,不能降级")
 		}
 	} else if sectionData.Operation == "upDepth" { // 3.层级升级-只要有父亲都能升级
 		// 2-1 父节点深度为2不能升级

+ 12 - 0
web/routes/routes.go

@@ -78,6 +78,18 @@ func Configure(b *bootstrap.Bootstrapper) {
 	// bidsection.Router.Use(middleware.SessionsAuth)
 	// bidsection.Handle(new(controllers.BidsectionController))
 
+	// u := &websocket.Upgrader{
+	// 	CheckOrigin: func(r *http.Request) bool {
+	// 		return true
+	// 	},
+	// }
+	// ws := mvc.New(b.Party("/ws"))
+	// ws.Handle(lib.Handler(u))
+
+	// websocketServer := websocket.New(
+	// 	websocket.DefaultGorillaUpgrader, /* DefaultGobwasUpgrader can be used too. */
+	// 	serverEvents)
+	// b.Get("/swagger/{any:path}", )
 	// apiTree.Router.Use(middleware.JwtAuth().Serve)
 	// 接口相关
 	// 登陆接口