|
@@ -1,11 +1,10 @@
|
|
package com.diagbot.facade;
|
|
package com.diagbot.facade;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
-import com.diagbot.entity.DictionaryInfo;
|
|
|
|
-import com.diagbot.enums.IsDeleteEnum;
|
|
|
|
-import com.diagbot.service.impl.DictionaryInfoServiceImpl;
|
|
|
|
-import com.diagbot.util.EntityUtil;
|
|
|
|
-import com.diagbot.util.ListUtil;
|
|
|
|
|
|
+import com.diagbot.client.AiptServiceClient;
|
|
|
|
+import com.diagbot.dto.DictionaryInfoDTO;
|
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
|
+import com.diagbot.util.RespDTOUtil;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -17,18 +16,19 @@ import java.util.Map;
|
|
* @time: 2018/11/23 11:37
|
|
* @time: 2018/11/23 11:37
|
|
*/
|
|
*/
|
|
@Component
|
|
@Component
|
|
-public class DictionaryFacade extends DictionaryInfoServiceImpl {
|
|
|
|
|
|
+public class DictionaryFacade {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private AiptServiceClient aiptServiceClient;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 返回字典信息
|
|
* 返回字典信息
|
|
*
|
|
*
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public Map<Long, List<DictionaryInfo>> getList() {
|
|
|
|
- List<DictionaryInfo> list = this.list(new QueryWrapper<DictionaryInfo>()
|
|
|
|
- .in("return_type", ListUtil.arrayToList(new Long[] { 0L, 2L }))
|
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
- .orderByAsc("group_type", "order_no"));
|
|
|
|
- return EntityUtil.makeEntityListMap(list, "groupType");
|
|
|
|
|
|
+ public Map<Long, List<DictionaryInfoDTO>> getList() {
|
|
|
|
+ RespDTO<Map<Long, List<DictionaryInfoDTO>>> res = aiptServiceClient.getList();
|
|
|
|
+ RespDTOUtil.respNGDealCover(res, "获取字典信息失败");
|
|
|
|
+ return res.data;
|
|
}
|
|
}
|
|
}
|
|
}
|