Commit 0ba50bbc by 谢海旭

修复由于SopInstNode的dailyCount默认值为0导致的查询实例详情接口没返回节点问题

1 parent 9d1e670f
...@@ -33,6 +33,8 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -33,6 +33,8 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.util.Sqls;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -160,14 +162,12 @@ public class SopInstService { ...@@ -160,14 +162,12 @@ public class SopInstService {
SopInstDTO sopInstDTO = SopInstConverter.INSTANCE.do2dto(sopInst); SopInstDTO sopInstDTO = SopInstConverter.INSTANCE.do2dto(sopInst);
String instId = sopInstDTO.getInstId(); String instId = sopInstDTO.getInstId();
SopInstNode nodeQuery = new SopInstNode(); List<SopInstNode> nodes = sopInstNodeMapper
nodeQuery.setInstId(instId); .selectByExample(Example.builder(SopInstNode.class).where(Sqls.custom().andEqualTo("instId", instId)).build());
List<SopInstNode> nodes = sopInstNodeMapper.select(nodeQuery);
sopInstDTO.setNodes(nodes); sopInstDTO.setNodes(nodes);
SopInstLink linkQuery = new SopInstLink(); List<SopInstLink> links = sopInstLinkMapper
linkQuery.setInstId(instId); .selectByExample(Example.builder(SopInstLink.class).where(Sqls.custom().andEqualTo("instId", instId)).build());
List<SopInstLink> links = sopInstLinkMapper.select(linkQuery);
sopInstDTO.setLinks(links); sopInstDTO.setLinks(links);
return sopInstDTO; return sopInstDTO;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!