Commit 0ba50bbc by 谢海旭

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

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