作者 yangfu

chore: code optimize

@@ -72,9 +72,9 @@ func (deviceCollectionService *DeviceCollectionService) CreateDeviceCollection(c @@ -72,9 +72,9 @@ func (deviceCollectionService *DeviceCollectionService) CreateDeviceCollection(c
72 72
73 // 创建 73 // 创建
74 func (deviceCollectionService *DeviceCollectionService) DeviceCollection(createDeviceCollectionCommand *command.CreateDeviceCollectionCommand) (interface{}, error) { 74 func (deviceCollectionService *DeviceCollectionService) DeviceCollection(createDeviceCollectionCommand *command.CreateDeviceCollectionCommand) (interface{}, error) {
75 - if err := createDeviceCollectionCommand.ValidateCommand(); err != nil {  
76 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
77 - } 75 + //if err := createDeviceCollectionCommand.ValidateCommand(); err != nil {
  76 + // return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  77 + //}
78 78
79 newDeviceCollection := &domain.DeviceCollection{ 79 newDeviceCollection := &domain.DeviceCollection{
80 //DeviceCollectionId: createDeviceCollectionCommand.DeviceCollectionId, 80 //DeviceCollectionId: createDeviceCollectionCommand.DeviceCollectionId,
@@ -10,9 +10,9 @@ import ( @@ -10,9 +10,9 @@ import (
10 ) 10 )
11 11
12 func (workshopService *WorkshopService) WorkshopConsume(cmd *command.WorkshopDataConsumeCommand) (interface{}, error) { 12 func (workshopService *WorkshopService) WorkshopConsume(cmd *command.WorkshopDataConsumeCommand) (interface{}, error) {
13 - if err := cmd.ValidateCommand(); err != nil {  
14 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
15 - } 13 + //if err := cmd.ValidateCommand(); err != nil {
  14 + // return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  15 + //}
16 transactionContext, err := factory.CreateTransactionContext(nil) 16 transactionContext, err := factory.CreateTransactionContext(nil)
17 if err != nil { 17 if err != nil {
18 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 18 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())