作者 tangxuhui

代码调整

1 package command 1 package command
2 2
3 -import (  
4 - "fmt"  
5 - "reflect"  
6 - "strings"  
7 - "time" 3 +// type CreateCompanyCommand struct {
  4 +// // 企业名称
  5 +// CompanyName string `cname:"企业名称" json:"companyName" valid:"Required"`
  6 +// // 规模
  7 +// Scale string `cname:"规模" json:"scale" valid:"Required"`
  8 +// // 公司Logo地址
  9 +// Logo string `cname:"公司Logo地址" json:"logo" valid:"Required"`
  10 +// // 公司地址
  11 +// Address string `cname:"公司地址" json:"address" valid:"Required"`
  12 +// // 所属行业
  13 +// IndustryCategory string `cname:"所属行业" json:"industryCategory" valid:"Required"`
  14 +// // 联系人
  15 +// Contacts string `cname:"联系人" json:"contacts" valid:"Required"`
  16 +// // 注册时间
  17 +// RegisteredTime time.Time `cname:"注册时间" json:"registeredTime,omitempty"`
  18 +// // 注册状态 1:已注册 2:待认证 3:已认证
  19 +// Status int `cname:"注册状态 1:已注册 2:待认证 3:已认证" json:"status,omitempty"`
  20 +// }
8 21
9 - "github.com/beego/beego/v2/core/validation"  
10 -) 22 +// func (createCompanyCommand *CreateCompanyCommand) Valid(validation *validation.Validation) {
11 23
12 -type CreateCompanyCommand struct {  
13 - // 企业名称  
14 - CompanyName string `cname:"企业名称" json:"companyName" valid:"Required"`  
15 - // 规模  
16 - Scale string `cname:"规模" json:"scale" valid:"Required"`  
17 - // 公司Logo地址  
18 - Logo string `cname:"公司Logo地址" json:"logo" valid:"Required"`  
19 - // 公司地址  
20 - Address string `cname:"公司地址" json:"address" valid:"Required"`  
21 - // 所属行业  
22 - IndustryCategory string `cname:"所属行业" json:"industryCategory" valid:"Required"`  
23 - // 联系人  
24 - Contacts string `cname:"联系人" json:"contacts" valid:"Required"`  
25 - // 注册时间  
26 - RegisteredTime time.Time `cname:"注册时间" json:"registeredTime,omitempty"`  
27 - // 注册状态 1:已注册 2:待认证 3:已认证  
28 - Status int `cname:"注册状态 1:已注册 2:待认证 3:已认证" json:"status,omitempty"`  
29 -} 24 +// }
30 25
31 -func (createCompanyCommand *CreateCompanyCommand) Valid(validation *validation.Validation) {  
32 -  
33 -}  
34 -  
35 -func (createCompanyCommand *CreateCompanyCommand) ValidateCommand() error {  
36 - valid := validation.Validation{}  
37 - b, err := valid.Valid(createCompanyCommand)  
38 - if err != nil {  
39 - return err  
40 - }  
41 - if !b {  
42 - elem := reflect.TypeOf(createCompanyCommand).Elem()  
43 - for _, validErr := range valid.Errors {  
44 - field, isExist := elem.FieldByName(validErr.Field)  
45 - if isExist {  
46 - return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))  
47 - } else {  
48 - return fmt.Errorf(validErr.Message)  
49 - }  
50 - }  
51 - }  
52 - return nil  
53 -} 26 +// func (createCompanyCommand *CreateCompanyCommand) ValidateCommand() error {
  27 +// valid := validation.Validation{}
  28 +// b, err := valid.Valid(createCompanyCommand)
  29 +// if err != nil {
  30 +// return err
  31 +// }
  32 +// if !b {
  33 +// elem := reflect.TypeOf(createCompanyCommand).Elem()
  34 +// for _, validErr := range valid.Errors {
  35 +// field, isExist := elem.FieldByName(validErr.Field)
  36 +// if isExist {
  37 +// return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))
  38 +// } else {
  39 +// return fmt.Errorf(validErr.Message)
  40 +// }
  41 +// }
  42 +// }
  43 +// return nil
  44 +// }
1 package command 1 package command
2 2
3 -import (  
4 - "fmt"  
5 - "reflect"  
6 - "strings" 3 +// type ListCompanyCustomizeMenusCommand struct {
  4 +// // 企业id
  5 +// CompanyId int64 `cname:"企业id" json:"companyId,string" valid:"Required"`
  6 +// // 菜单类别 web app
  7 +// MenuCategory string `cname:"菜单类别" json:"menuCategory,omitempty" valid:"Required"`
  8 +// }
7 9
8 - "github.com/beego/beego/v2/core/validation"  
9 -) 10 +// func (listCompanyCustomizeMenusCommand *ListCompanyCustomizeMenusCommand) Valid(validation *validation.Validation) {
10 11
11 -type ListCompanyCustomizeMenusCommand struct {  
12 - // 企业id  
13 - CompanyId int64 `cname:"企业id" json:"companyId,string" valid:"Required"`  
14 - // 菜单类别 web app  
15 - MenuCategory string `cname:"菜单类别" json:"menuCategory,omitempty" valid:"Required"`  
16 -} 12 +// }
17 13
18 -func (listCompanyCustomizeMenusCommand *ListCompanyCustomizeMenusCommand) Valid(validation *validation.Validation) {  
19 -  
20 -}  
21 -  
22 -func (listCompanyCustomizeMenusCommand *ListCompanyCustomizeMenusCommand) ValidateCommand() error {  
23 - valid := validation.Validation{}  
24 - b, err := valid.Valid(listCompanyCustomizeMenusCommand)  
25 - if err != nil {  
26 - return err  
27 - }  
28 - if !b {  
29 - elem := reflect.TypeOf(listCompanyCustomizeMenusCommand).Elem()  
30 - for _, validErr := range valid.Errors {  
31 - field, isExist := elem.FieldByName(validErr.Field)  
32 - if isExist {  
33 - return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))  
34 - } else {  
35 - return fmt.Errorf(validErr.Message)  
36 - }  
37 - }  
38 - }  
39 - return nil  
40 -} 14 +// func (listCompanyCustomizeMenusCommand *ListCompanyCustomizeMenusCommand) ValidateCommand() error {
  15 +// valid := validation.Validation{}
  16 +// b, err := valid.Valid(listCompanyCustomizeMenusCommand)
  17 +// if err != nil {
  18 +// return err
  19 +// }
  20 +// if !b {
  21 +// elem := reflect.TypeOf(listCompanyCustomizeMenusCommand).Elem()
  22 +// for _, validErr := range valid.Errors {
  23 +// field, isExist := elem.FieldByName(validErr.Field)
  24 +// if isExist {
  25 +// return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))
  26 +// } else {
  27 +// return fmt.Errorf(validErr.Message)
  28 +// }
  29 +// }
  30 +// }
  31 +// return nil
  32 +// }
1 package command 1 package command
2 2
3 -import (  
4 - "fmt"  
5 - "reflect"  
6 - "strings" 3 +// type RemoveCompanyCommand struct {
  4 +// // 企业id
  5 +// CompanyId int64 `cname:"企业id" json:"companyId,string" valid:"Required"`
  6 +// }
7 7
8 - "github.com/beego/beego/v2/core/validation"  
9 -) 8 +// func (removeCompanyCommand *RemoveCompanyCommand) Valid(validation *validation.Validation) {
  9 +// validation.SetError("CustomValid", "未实现的自定义认证")
  10 +// }
10 11
11 -type RemoveCompanyCommand struct {  
12 - // 企业id  
13 - CompanyId int64 `cname:"企业id" json:"companyId,string" valid:"Required"`  
14 -}  
15 -  
16 -func (removeCompanyCommand *RemoveCompanyCommand) Valid(validation *validation.Validation) {  
17 - validation.SetError("CustomValid", "未实现的自定义认证")  
18 -}  
19 -  
20 -func (removeCompanyCommand *RemoveCompanyCommand) ValidateCommand() error {  
21 - valid := validation.Validation{}  
22 - b, err := valid.Valid(removeCompanyCommand)  
23 - if err != nil {  
24 - return err  
25 - }  
26 - if !b {  
27 - elem := reflect.TypeOf(removeCompanyCommand).Elem()  
28 - for _, validErr := range valid.Errors {  
29 - field, isExist := elem.FieldByName(validErr.Field)  
30 - if isExist {  
31 - return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))  
32 - } else {  
33 - return fmt.Errorf(validErr.Message)  
34 - }  
35 - }  
36 - }  
37 - return nil  
38 -} 12 +// func (removeCompanyCommand *RemoveCompanyCommand) ValidateCommand() error {
  13 +// valid := validation.Validation{}
  14 +// b, err := valid.Valid(removeCompanyCommand)
  15 +// if err != nil {
  16 +// return err
  17 +// }
  18 +// if !b {
  19 +// elem := reflect.TypeOf(removeCompanyCommand).Elem()
  20 +// for _, validErr := range valid.Errors {
  21 +// field, isExist := elem.FieldByName(validErr.Field)
  22 +// if isExist {
  23 +// return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))
  24 +// } else {
  25 +// return fmt.Errorf(validErr.Message)
  26 +// }
  27 +// }
  28 +// }
  29 +// return nil
  30 +// }
1 package command 1 package command
2 2
3 -import (  
4 - "fmt"  
5 - "reflect"  
6 - "strings" 3 +// type UpdateCompanyCustomizeMenusCommand struct {
  4 +// // 企业id
  5 +// CompanyId int64 `cname:"企业id" json:"companyId" valid:"Required"`
  6 +// // 菜单编号
  7 +// MenuId int64 `cname:"菜单编号" json:"menuId" valid:"Required"`
  8 +// // 菜单名称
  9 +// //MenuName string `cname:"菜单名称" json:"menuName" valid:"Required"`
  10 +// // 菜单别名
  11 +// MenuAlias string `cname:"菜单别名" json:"menuAlias" valid:"Required"`
  12 +// // 排序
  13 +// Sort int `cname:"排序" json:"sort" valid:"Required"`
  14 +// }
7 15
8 - "github.com/beego/beego/v2/core/validation"  
9 -) 16 +// func (updateCompanyCustomizeMenusCommand *UpdateCompanyCustomizeMenusCommand) Valid(validation *validation.Validation) {
  17 +// //validation.SetError("CustomValid", "未实现的自定义认证")
  18 +// }
10 19
11 -type UpdateCompanyCustomizeMenusCommand struct {  
12 - // 企业id  
13 - CompanyId int64 `cname:"企业id" json:"companyId" valid:"Required"`  
14 - // 菜单编号  
15 - MenuId int64 `cname:"菜单编号" json:"menuId" valid:"Required"`  
16 - // 菜单名称  
17 - //MenuName string `cname:"菜单名称" json:"menuName" valid:"Required"`  
18 - // 菜单别名  
19 - MenuAlias string `cname:"菜单别名" json:"menuAlias" valid:"Required"`  
20 - // 排序  
21 - Sort int `cname:"排序" json:"sort" valid:"Required"`  
22 -}  
23 -  
24 -func (updateCompanyCustomizeMenusCommand *UpdateCompanyCustomizeMenusCommand) Valid(validation *validation.Validation) {  
25 - //validation.SetError("CustomValid", "未实现的自定义认证")  
26 -}  
27 -  
28 -func (updateCompanyCustomizeMenusCommand *UpdateCompanyCustomizeMenusCommand) ValidateCommand() error {  
29 - valid := validation.Validation{}  
30 - b, err := valid.Valid(updateCompanyCustomizeMenusCommand)  
31 - if err != nil {  
32 - return err  
33 - }  
34 - if !b {  
35 - elem := reflect.TypeOf(updateCompanyCustomizeMenusCommand).Elem()  
36 - for _, validErr := range valid.Errors {  
37 - field, isExist := elem.FieldByName(validErr.Field)  
38 - if isExist {  
39 - return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))  
40 - } else {  
41 - return fmt.Errorf(validErr.Message)  
42 - }  
43 - }  
44 - }  
45 - return nil  
46 -} 20 +// func (updateCompanyCustomizeMenusCommand *UpdateCompanyCustomizeMenusCommand) ValidateCommand() error {
  21 +// valid := validation.Validation{}
  22 +// b, err := valid.Valid(updateCompanyCustomizeMenusCommand)
  23 +// if err != nil {
  24 +// return err
  25 +// }
  26 +// if !b {
  27 +// elem := reflect.TypeOf(updateCompanyCustomizeMenusCommand).Elem()
  28 +// for _, validErr := range valid.Errors {
  29 +// field, isExist := elem.FieldByName(validErr.Field)
  30 +// if isExist {
  31 +// return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))
  32 +// } else {
  33 +// return fmt.Errorf(validErr.Message)
  34 +// }
  35 +// }
  36 +// }
  37 +// return nil
  38 +// }
1 package query 1 package query
2 2
3 -import (  
4 - "fmt"  
5 - "reflect"  
6 - "strings" 3 +// type ListCompanyQuery struct {
  4 +// // 查询偏离量
  5 +// Offset int `cname:"查询偏离量" json:"offset" valid:"Required"`
  6 +// // 查询限制
  7 +// Limit int `cname:"查询限制" json:"limit" valid:"Required"`
  8 +// }
7 9
8 - "github.com/beego/beego/v2/core/validation"  
9 -) 10 +// func (listCompanyQuery *ListCompanyQuery) Valid(validation *validation.Validation) {
  11 +// validation.SetError("CustomValid", "未实现的自定义认证")
  12 +// }
10 13
11 -type ListCompanyQuery struct {  
12 - // 查询偏离量  
13 - Offset int `cname:"查询偏离量" json:"offset" valid:"Required"`  
14 - // 查询限制  
15 - Limit int `cname:"查询限制" json:"limit" valid:"Required"`  
16 -}  
17 -  
18 -func (listCompanyQuery *ListCompanyQuery) Valid(validation *validation.Validation) {  
19 - validation.SetError("CustomValid", "未实现的自定义认证")  
20 -}  
21 -  
22 -func (listCompanyQuery *ListCompanyQuery) ValidateQuery() error {  
23 - valid := validation.Validation{}  
24 - b, err := valid.Valid(listCompanyQuery)  
25 - if err != nil {  
26 - return err  
27 - }  
28 - if !b {  
29 - elem := reflect.TypeOf(listCompanyQuery).Elem()  
30 - for _, validErr := range valid.Errors {  
31 - field, isExist := elem.FieldByName(validErr.Field)  
32 - if isExist {  
33 - return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))  
34 - } else {  
35 - return fmt.Errorf(validErr.Message)  
36 - }  
37 - }  
38 - }  
39 - return nil  
40 -} 14 +// func (listCompanyQuery *ListCompanyQuery) ValidateQuery() error {
  15 +// valid := validation.Validation{}
  16 +// b, err := valid.Valid(listCompanyQuery)
  17 +// if err != nil {
  18 +// return err
  19 +// }
  20 +// if !b {
  21 +// elem := reflect.TypeOf(listCompanyQuery).Elem()
  22 +// for _, validErr := range valid.Errors {
  23 +// field, isExist := elem.FieldByName(validErr.Field)
  24 +// if isExist {
  25 +// return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))
  26 +// } else {
  27 +// return fmt.Errorf(validErr.Message)
  28 +// }
  29 +// }
  30 +// }
  31 +// return nil
  32 +// }
@@ -12,9 +12,9 @@ type CompanyService struct { @@ -12,9 +12,9 @@ type CompanyService struct {
12 } 12 }
13 13
14 // 创建企业 14 // 创建企业
15 -func (companyService *CompanyService) CreateCompany(createCompanyCommand *command.CreateCompanyCommand) (interface{}, error) {  
16 - return nil, nil  
17 -} 15 +// func (companyService *CompanyService) CreateCompany(createCompanyCommand *command.CreateCompanyCommand) (interface{}, error) {
  16 +// return nil, nil
  17 +// }
18 18
19 // 返回企业 19 // 返回企业
20 func (companyService *CompanyService) GetCompany(getCompanyQuery *query.GetCompanyQuery) (interface{}, error) { 20 func (companyService *CompanyService) GetCompany(getCompanyQuery *query.GetCompanyQuery) (interface{}, error) {
@@ -22,19 +22,19 @@ func (companyService *CompanyService) GetCompany(getCompanyQuery *query.GetCompa @@ -22,19 +22,19 @@ func (companyService *CompanyService) GetCompany(getCompanyQuery *query.GetCompa
22 } 22 }
23 23
24 // 返回企业列表 24 // 返回企业列表
25 -func (companyService *CompanyService) ListCompany(listCompanyQuery *query.ListCompanyQuery) (interface{}, error) {  
26 - return nil, nil  
27 -} 25 +// func (companyService *CompanyService) ListCompany(listCompanyQuery *query.ListCompanyQuery) (interface{}, error) {
  26 +// return nil, nil
  27 +// }
28 28
29 // 返回自定义菜单列表(匹配有设置的菜单) 29 // 返回自定义菜单列表(匹配有设置的菜单)
30 -func (companyService *CompanyService) ListCompanyCustomizeMenus(listCompanyCustomizeMenusCommand *command.ListCompanyCustomizeMenusCommand) (interface{}, error) {  
31 - return nil, nil  
32 -} 30 +// func (companyService *CompanyService) ListCompanyCustomizeMenus(listCompanyCustomizeMenusCommand *command.ListCompanyCustomizeMenusCommand) (interface{}, error) {
  31 +// return nil, nil
  32 +// }
33 33
34 // 移除企业 34 // 移除企业
35 -func (companyService *CompanyService) RemoveCompany(removeCompanyCommand *command.RemoveCompanyCommand) (interface{}, error) {  
36 - return nil, nil  
37 -} 35 +// func (companyService *CompanyService) RemoveCompany(removeCompanyCommand *command.RemoveCompanyCommand) (interface{}, error) {
  36 +// return nil, nil
  37 +// }
38 38
39 // 更新企业 39 // 更新企业
40 func (companyService *CompanyService) UpdateCompany(updateCompanyCommand *command.UpdateCompanyCommand) (interface{}, error) { 40 func (companyService *CompanyService) UpdateCompany(updateCompanyCommand *command.UpdateCompanyCommand) (interface{}, error) {
@@ -53,9 +53,9 @@ func (companyService *CompanyService) UpdateCompany(updateCompanyCommand *comman @@ -53,9 +53,9 @@ func (companyService *CompanyService) UpdateCompany(updateCompanyCommand *comman
53 } 53 }
54 54
55 // 更新自定义菜单 55 // 更新自定义菜单
56 -func (companyService *CompanyService) UpdateCompanyCustomizeMenus(updateCompanyCustomizeMenusCommand *command.UpdateCompanyCustomizeMenusCommand) (interface{}, error) {  
57 - return nil, nil  
58 -} 56 +// func (companyService *CompanyService) UpdateCompanyCustomizeMenus(updateCompanyCustomizeMenusCommand *command.UpdateCompanyCustomizeMenusCommand) (interface{}, error) {
  57 +// return nil, nil
  58 +// }
59 59
60 func NewCompanyService(options map[string]interface{}) *CompanyService { 60 func NewCompanyService(options map[string]interface{}) *CompanyService {
61 newCompanyService := &CompanyService{} 61 newCompanyService := &CompanyService{}
@@ -10,13 +10,13 @@ type CompanyController struct { @@ -10,13 +10,13 @@ type CompanyController struct {
10 baseController 10 baseController
11 } 11 }
12 12
13 -func (controller *CompanyController) CreateCompany() {  
14 - companyService := service.NewCompanyService(nil)  
15 - createCompanyCommand := &command.CreateCompanyCommand{}  
16 - controller.Unmarshal(createCompanyCommand)  
17 - data, err := companyService.CreateCompany(createCompanyCommand)  
18 - controller.Response(data, err)  
19 -} 13 +// func (controller *CompanyController) CreateCompany() {
  14 +// companyService := service.NewCompanyService(nil)
  15 +// createCompanyCommand := &command.CreateCompanyCommand{}
  16 +// controller.Unmarshal(createCompanyCommand)
  17 +// data, err := companyService.CreateCompany(createCompanyCommand)
  18 +// controller.Response(data, err)
  19 +// }
20 20
21 func (controller *CompanyController) UpdateCompany() { 21 func (controller *CompanyController) UpdateCompany() {
22 companyService := service.NewCompanyService(nil) 22 companyService := service.NewCompanyService(nil)
@@ -36,40 +36,40 @@ func (controller *CompanyController) GetCompany() { @@ -36,40 +36,40 @@ func (controller *CompanyController) GetCompany() {
36 controller.Response(data, err) 36 controller.Response(data, err)
37 } 37 }
38 38
39 -func (controller *CompanyController) RemoveCompany() {  
40 - companyService := service.NewCompanyService(nil)  
41 - removeCompanyCommand := &command.RemoveCompanyCommand{}  
42 - controller.Unmarshal(removeCompanyCommand)  
43 - companyId, _ := controller.GetInt64(":companyId")  
44 - removeCompanyCommand.CompanyId = companyId  
45 - data, err := companyService.RemoveCompany(removeCompanyCommand)  
46 - controller.Response(data, err)  
47 -} 39 +// func (controller *CompanyController) RemoveCompany() {
  40 +// companyService := service.NewCompanyService(nil)
  41 +// removeCompanyCommand := &command.RemoveCompanyCommand{}
  42 +// controller.Unmarshal(removeCompanyCommand)
  43 +// companyId, _ := controller.GetInt64(":companyId")
  44 +// removeCompanyCommand.CompanyId = companyId
  45 +// data, err := companyService.RemoveCompany(removeCompanyCommand)
  46 +// controller.Response(data, err)
  47 +// }
48 48
49 -func (controller *CompanyController) ListCompany() {  
50 - companyService := service.NewCompanyService(nil)  
51 - listCompanyQuery := &query.ListCompanyQuery{}  
52 - data, err := companyService.ListCompany(listCompanyQuery)  
53 - controller.Response(data, err)  
54 -} 49 +// func (controller *CompanyController) ListCompany() {
  50 +// companyService := service.NewCompanyService(nil)
  51 +// listCompanyQuery := &query.ListCompanyQuery{}
  52 +// data, err := companyService.ListCompany(listCompanyQuery)
  53 +// controller.Response(data, err)
  54 +// }
55 55
56 -func (controller *CompanyController) ListCompanyCustomizeMenus() {  
57 - companyService := service.NewCompanyService(nil)  
58 - listCompanyCustomizeMenusCommand := &command.ListCompanyCustomizeMenusCommand{}  
59 - controller.Unmarshal(listCompanyCustomizeMenusCommand)  
60 - companyId, _ := controller.GetInt64(":companyId")  
61 - listCompanyCustomizeMenusCommand.CompanyId = companyId  
62 - listCompanyCustomizeMenusCommand.MenuCategory = controller.GetString("menuCategory")  
63 - data, err := companyService.ListCompanyCustomizeMenus(listCompanyCustomizeMenusCommand)  
64 - controller.Response(data, err)  
65 -} 56 +// func (controller *CompanyController) ListCompanyCustomizeMenus() {
  57 +// companyService := service.NewCompanyService(nil)
  58 +// listCompanyCustomizeMenusCommand := &command.ListCompanyCustomizeMenusCommand{}
  59 +// controller.Unmarshal(listCompanyCustomizeMenusCommand)
  60 +// companyId, _ := controller.GetInt64(":companyId")
  61 +// listCompanyCustomizeMenusCommand.CompanyId = companyId
  62 +// listCompanyCustomizeMenusCommand.MenuCategory = controller.GetString("menuCategory")
  63 +// data, err := companyService.ListCompanyCustomizeMenus(listCompanyCustomizeMenusCommand)
  64 +// controller.Response(data, err)
  65 +// }
66 66
67 -func (controller *CompanyController) UpdateCompanyCustomizeMenus() {  
68 - companyService := service.NewCompanyService(nil)  
69 - updateCompanyCustomizeMenusCommand := &command.UpdateCompanyCustomizeMenusCommand{}  
70 - controller.Unmarshal(updateCompanyCustomizeMenusCommand)  
71 - companyId, _ := controller.GetInt64(":companyId")  
72 - updateCompanyCustomizeMenusCommand.CompanyId = companyId  
73 - data, err := companyService.UpdateCompanyCustomizeMenus(updateCompanyCustomizeMenusCommand)  
74 - controller.Response(data, err)  
75 -} 67 +// func (controller *CompanyController) UpdateCompanyCustomizeMenus() {
  68 +// companyService := service.NewCompanyService(nil)
  69 +// updateCompanyCustomizeMenusCommand := &command.UpdateCompanyCustomizeMenusCommand{}
  70 +// controller.Unmarshal(updateCompanyCustomizeMenusCommand)
  71 +// companyId, _ := controller.GetInt64(":companyId")
  72 +// updateCompanyCustomizeMenusCommand.CompanyId = companyId
  73 +// data, err := companyService.UpdateCompanyCustomizeMenus(updateCompanyCustomizeMenusCommand)
  74 +// controller.Response(data, err)
  75 +// }