style: 错误信息英文返回-system 模块路由
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"ems.agt/src/modules/system/model"
|
||||
"ems.agt/src/modules/system/repository"
|
||||
@@ -77,7 +77,8 @@ func (r *SysDictDataImpl) DeleteDictDataByCodes(dictCodes []string) (int64, erro
|
||||
// 检查是否存在
|
||||
dictDatas := r.sysDictDataRepository.SelectDictDataByCodes(dictCodes)
|
||||
if len(dictDatas) <= 0 {
|
||||
return 0, errors.New("没有权限访问字典编码数据!")
|
||||
// 没有可访问字典编码数据!
|
||||
return 0, fmt.Errorf("there is no accessible dictionary-encoded data")
|
||||
}
|
||||
if len(dictDatas) == len(dictCodes) {
|
||||
for _, v := range dictDatas {
|
||||
@@ -88,7 +89,8 @@ func (r *SysDictDataImpl) DeleteDictDataByCodes(dictCodes []string) (int64, erro
|
||||
rows := r.sysDictDataRepository.DeleteDictDataByCodes(dictCodes)
|
||||
return rows, nil
|
||||
}
|
||||
return 0, errors.New("删除字典数据信息失败!")
|
||||
// 删除字典数据信息失败!
|
||||
return 0, fmt.Errorf("failed to delete dictionary data information")
|
||||
}
|
||||
|
||||
// InsertDictData 新增字典数据信息
|
||||
|
||||
Reference in New Issue
Block a user