Explorar el Código

Merge remote-tracking branch 'origin/dev/KLBstand' into dev/KLBstand

gaodm hace 6 años
padre
commit
3f5cf11944

+ 1 - 1
icssman-service/src/main/java/com/diagbot/facade/LisMappingFacade.java

@@ -107,7 +107,7 @@ public class LisMappingFacade extends LisMappingServiceImpl {
         lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("meal_name", lisMappingVO.getMealName());
         if (StringUtil.isBlank(lisMappingVO.getItemName())) {
-            lisMappingQueryWrapper.isNull("item_name").or(i -> i.eq("item_name", ""));
+            lisMappingQueryWrapper.and(i -> i.isNull("item_name").or(j -> j.eq("item_name", "")));
         } else {
             lisMappingQueryWrapper.eq("item_name", lisMappingVO.getItemName());
         }

+ 5 - 5
knowledgeman-service/src/main/java/com/diagbot/facade/RelationFacade.java

@@ -38,6 +38,8 @@ import com.diagbot.exception.CommonException;
 import com.diagbot.service.RelationService;
 import com.diagbot.service.impl.RelationServiceImpl;
 import com.diagbot.util.DateUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.RespDTOUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.UserUtils;
 import com.diagbot.vo.AddRelationInfoVO;
@@ -72,12 +74,10 @@ public class RelationFacade extends RelationServiceImpl {
      */
     public IPage<GetRelationInfoListDTO> getRelationInfoList(GetRelationInfoListVO getRelationInfoListVO) {
     	IPage<GetRelationInfoListDTO> ipage = this.baseMapper.getRelationInfoList(getRelationInfoListVO);
-    	List<String> ids = ipage.getRecords().stream().map(i->i.getOperName()).distinct().collect(Collectors.toList());
-    	if(ids.size()>0){
+    	if(ListUtil.isNotEmpty(ipage.getRecords())){
+    		List<String> ids = ipage.getRecords().stream().map(i->i.getOperName()).distinct().collect(Collectors.toList());
     		RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
-        	if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
-                throw new CommonException(CommonErrorCode.RPC_ERROR,"获取用户信息失败");
-            }
+        	RespDTOUtil.respNGDealCover(respDTO, "获取用户信息失败");
         	ipage.getRecords().forEach(i->{
         		i.setOperName(respDTO.data.get(i.getOperName()));
         	});

+ 3 - 1
knowledgeman-service/src/main/resources/mapper/RelationMapper.xml

@@ -33,7 +33,9 @@
 		FROM kl_relation a 
 		JOIN kl_concept b on a.start_id=b.id
 		JOIN kl_concept c on a.end_id=c.id
-		WHERE a.relation_id NOT IN(17,18)) t
+		WHERE a.relation_id NOT IN(17,18)
+		and b.is_deleted='N'
+		and c.is_deleted='N') t
 		where 1=1 
 		<if test="isDeleted!=null and isDeleted!=''">
 			and isDeleted=#{isDeleted}