|
|
@@ -1,33 +1,29 @@
|
|
|
package com.ktg.web.controller.system;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
-import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
import com.ktg.common.annotation.Log;
|
|
|
import com.ktg.common.core.controller.BaseController;
|
|
|
import com.ktg.common.core.domain.AjaxResult;
|
|
|
import com.ktg.common.core.domain.entity.SysDictData;
|
|
|
import com.ktg.common.core.page.TableDataInfo;
|
|
|
import com.ktg.common.enums.BusinessType;
|
|
|
+import com.ktg.common.utils.MessageUtils;
|
|
|
import com.ktg.common.utils.StringUtils;
|
|
|
import com.ktg.common.utils.poi.ExcelUtil;
|
|
|
import com.ktg.system.service.ISysDictDataService;
|
|
|
import com.ktg.system.service.ISysDictTypeService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.context.i18n.LocaleContextHolder;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 数据字典信息
|
|
|
- *
|
|
|
+ *
|
|
|
* @author ruoyi
|
|
|
*/
|
|
|
@RestController
|
|
|
@@ -79,6 +75,15 @@ public class SysDictDataController extends BaseController
|
|
|
if (StringUtils.isNull(data))
|
|
|
{
|
|
|
data = new ArrayList<SysDictData>();
|
|
|
+ } else {
|
|
|
+ // 国际化
|
|
|
+ if ("en_US".equals(LocaleContextHolder.getLocale().toString())) {
|
|
|
+ for (SysDictData datum : data) {
|
|
|
+ try {
|
|
|
+ datum.setDictLabel(MessageUtils.message(datum.getDictLabel()));
|
|
|
+ }catch(Exception e) {}
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return AjaxResult.success(data);
|
|
|
}
|