|
|
@@ -1,6 +1,7 @@
|
|
1
|
1
|
package com.ruoyi.system.controller;
|
|
2
|
2
|
|
|
3
|
3
|
import java.io.IOException;
|
|
|
4
|
+import java.util.ArrayList;
|
|
4
|
5
|
import java.util.List;
|
|
5
|
6
|
import javax.servlet.http.HttpServletResponse;
|
|
6
|
7
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
14
|
15
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
15
|
16
|
import org.springframework.web.bind.annotation.RestController;
|
|
16
|
17
|
import com.ruoyi.common.core.utils.SecurityUtils;
|
|
|
18
|
+import com.ruoyi.common.core.utils.StringUtils;
|
|
17
|
19
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
|
18
|
20
|
import com.ruoyi.common.core.web.controller.BaseController;
|
|
19
|
21
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
@@ -75,7 +77,12 @@ public class SysDictDataController extends BaseController
|
|
75
|
77
|
@GetMapping(value = "/type/{dictType}")
|
|
76
|
78
|
public AjaxResult dictType(@PathVariable String dictType)
|
|
77
|
79
|
{
|
|
78
|
|
- return AjaxResult.success(dictTypeService.selectDictDataByType(dictType));
|
|
|
80
|
+ List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
|
|
81
|
+ if (StringUtils.isNull(data))
|
|
|
82
|
+ {
|
|
|
83
|
+ data = new ArrayList<SysDictData>();
|
|
|
84
|
+ }
|
|
|
85
|
+ return AjaxResult.success(data);
|
|
79
|
86
|
}
|
|
80
|
87
|
|
|
81
|
88
|
/**
|