gao.qiang 3 mesiacov pred
rodič
commit
28121725e0

+ 2 - 5
hazard-admin/src/main/java/com/ozs/web/controller/system/SysDictDataController.java

@@ -7,6 +7,7 @@ import javax.servlet.http.HttpServletResponse;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ozs.common.core.domain.entity.SysDictType;
 import com.ozs.common.core.domain.vo.SysDictDataVo;
 import com.ozs.common.core.redis.RedisCache;
 import com.ozs.common.utils.DictUtils;
@@ -122,11 +123,7 @@ public class SysDictDataController extends BaseController {
         @GetMapping(value = "/type/{dictType}")
     public AjaxResult dictType(@PathVariable String dictType)
     {
-        List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
-        if (StringUtils.isNull(data))
-        {
-            data = new ArrayList<SysDictData>();
-        }
+        List<SysDictData> data = dictDataService.list(new LambdaQueryWrapper<SysDictData>().eq(SysDictData::getDictType,dictType));
         return success(data);
     }