1
|
package service
|
1
|
package service
|
2
|
|
2
|
|
3
|
import (
|
3
|
import (
|
|
|
4
|
+ "strconv"
|
|
|
5
|
+
|
4
|
"github.com/linmadan/egglib-go/core/application"
|
6
|
"github.com/linmadan/egglib-go/core/application"
|
5
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/background/dictionary/command"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/background/dictionary/command"
|
6
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/background/dictionary/query"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/background/dictionary/query"
|
|
@@ -65,8 +67,13 @@ func (dictionaryService *DictionayService) GetDictionay(getQuery *query.GetDicti |
|
@@ -65,8 +67,13 @@ func (dictionaryService *DictionayService) GetDictionay(getQuery *query.GetDicti |
65
|
func (dictionaryService *DictionayService) RemoveDictionay(removeCommand *command.RemoveDictionaryCommand) (interface{}, error) {
|
67
|
func (dictionaryService *DictionayService) RemoveDictionay(removeCommand *command.RemoveDictionaryCommand) (interface{}, error) {
|
66
|
creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
|
68
|
creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
|
67
|
removeCommand.Operator)
|
69
|
removeCommand.Operator)
|
68
|
- result, err := creationBasicGateway.DictionaryGet(allied_creation_basic.ReqDictionaryGet{
|
|
|
69
|
- DictionaryId: removeCommand.DictionaryId,
|
70
|
+ var dictionaryIds []int
|
|
|
71
|
+ for _, v := range removeCommand.DictionaryIds {
|
|
|
72
|
+ id, _ := strconv.Atoi(v)
|
|
|
73
|
+ dictionaryIds = append(dictionaryIds, id)
|
|
|
74
|
+ }
|
|
|
75
|
+ result, err := creationBasicGateway.DictionaryRemove(allied_creation_basic.ReqDictionaryRemove{
|
|
|
76
|
+ DictionaryIds: dictionaryIds,
|
70
|
})
|
77
|
})
|
71
|
if err != nil {
|
78
|
if err != nil {
|
72
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
79
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|