ソースを参照

优化手机端查询详情代码

Wang-Xiao-Ran 1 年間 前
コミット
fd3e792219

+ 1 - 2
src/main/java/com/sooka/sponest/mobile/data/digitalenvironmentcontroller/LeaveFieldController.java

@@ -56,8 +56,7 @@ public class LeaveFieldController {
         AjaxResult ajaxResult = leaveFieldService.edit(leaveField.getId());
         if("200".equals(ajaxResult.get("code").toString())){
             Map<String, Object> info = (Map<String, Object>) ajaxResult.get("data");
-            Map<String, Object> dictCacheToMap = DictUtils.getDictCacheToMap("farm_fukuda_type");
-            info.put("leaveTypeLabel", dictCacheToMap.get(info.get("leaveType")));
+            info.put("leaveTypeLabel", DictUtils.getDictDataByValue("farm_fukuda_type",info.get("leaveType").toString()));
             return appCameraService.selectCameraByIds(info);
         }else{
             return ajaxResult;

+ 1 - 2
src/main/java/com/sooka/sponest/mobile/data/digitalforestController/AnimalController.java

@@ -60,8 +60,7 @@ public class AnimalController {
         AjaxResult ajaxResult = animalService.edit(animal.getId());
         if("200".equals(ajaxResult.get("code").toString())){
             Map<String, Object> info = (Map<String, Object>) ajaxResult.get("data");
-            Map<String, Object> dictCacheToMap = DictUtils.getDictCacheToMap("forest_animal");
-            info.put("typeLabel",dictCacheToMap.get(info.get("type")));
+            info.put("typeLabel", DictUtils.getDictDataByValue("forest_animal",info.get("type").toString()));
             return appCameraService.selectCameraByIds(info);
         }else{
             return ajaxResult;