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