...
|
...
|
@@ -14,7 +14,7 @@ type DictionaryController struct { |
|
|
func (controller *DictionaryController) CreateDictionary() {
|
|
|
dictionaryService := service.NewDictionaryService(nil)
|
|
|
createDictionaryCommand := &command.CreateDictionaryCommand{}
|
|
|
controller.Unmarshal(createDictionaryCommand)
|
|
|
_ = controller.Unmarshal(createDictionaryCommand)
|
|
|
data, err := dictionaryService.CreateDictionary(createDictionaryCommand)
|
|
|
controller.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -22,7 +22,7 @@ func (controller *DictionaryController) CreateDictionary() { |
|
|
func (controller *DictionaryController) UpdateDictionary() {
|
|
|
dictionaryService := service.NewDictionaryService(nil)
|
|
|
updateDictionaryCommand := &command.UpdateDictionaryCommand{}
|
|
|
controller.Unmarshal(updateDictionaryCommand)
|
|
|
_ = controller.Unmarshal(updateDictionaryCommand)
|
|
|
dictionaryId, _ := controller.GetInt64(":dictionaryId")
|
|
|
updateDictionaryCommand.DictionaryId = dictionaryId
|
|
|
data, err := dictionaryService.UpdateDictionary(updateDictionaryCommand)
|
...
|
...
|
@@ -41,10 +41,7 @@ func (controller *DictionaryController) GetDictionary() { |
|
|
func (controller *DictionaryController) ListDictionary() {
|
|
|
dictionaryService := service.NewDictionaryService(nil)
|
|
|
listDictionaryQuery := &query.ListDictionaryQuery{}
|
|
|
offset, _ := controller.GetInt("offset")
|
|
|
listDictionaryQuery.Offset = offset
|
|
|
limit, _ := controller.GetInt("limit")
|
|
|
listDictionaryQuery.Limit = limit
|
|
|
_ = controller.Unmarshal(listDictionaryQuery)
|
|
|
data, err := dictionaryService.ListDictionary(listDictionaryQuery)
|
|
|
controller.Response(data, err)
|
|
|
} |
...
|
...
|
|