From 672ce02fc21c14e803ef6f5a108f1df5ffc322b6 Mon Sep 17 00:00:00 2001 From: Parker Date: Wed, 27 Jan 2021 11:31:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=99=A8=20=E7=94=A8=E6=88=B7=E5=A4=9A=E6=9D=A1?= =?UTF-8?q?=E7=94=9F=E6=88=90=E8=AE=B0=E5=BD=95=E6=95=B0=E6=8D=AE=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CreateLogsServiceImpl.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/opsli-modulars/opsli-modulars-creater/src/main/java/org/opsli/modulars/creater/createrlogs/service/impl/CreateLogsServiceImpl.java b/opsli-modulars/opsli-modulars-creater/src/main/java/org/opsli/modulars/creater/createrlogs/service/impl/CreateLogsServiceImpl.java index 0f6caed..fe96234 100644 --- a/opsli-modulars/opsli-modulars-creater/src/main/java/org/opsli/modulars/creater/createrlogs/service/impl/CreateLogsServiceImpl.java +++ b/opsli-modulars/opsli-modulars-creater/src/main/java/org/opsli/modulars/creater/createrlogs/service/impl/CreateLogsServiceImpl.java @@ -15,12 +15,14 @@ */ package org.opsli.modulars.creater.createrlogs.service.impl; +import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.opsli.common.utils.WrapperUtil; import org.opsli.core.base.service.impl.CrudServiceImpl; import org.opsli.core.creater.exception.CreaterException; import org.opsli.core.creater.msg.CreaterMsg; import org.opsli.core.creater.strategy.create.CodeBuilder; +import org.opsli.core.persistence.Page; import org.opsli.core.persistence.querybuilder.GenQueryBuilder; import org.opsli.core.persistence.querybuilder.QueryBuilder; import org.opsli.modulars.creater.column.service.ITableColumnService; @@ -88,9 +90,16 @@ public class CreateLogsServiceImpl extends CrudServiceImpl(); QueryWrapper wrapper = queryBuilder.build(); wrapper.eq("table_id", tableId); - return super.transformT2M( - this.getOne(wrapper) - ); + + CreaterLogsModel model = null; + Page page = new Page<>(1,1); + page.setQueryWrapper(wrapper); + page = this.findPage(page); + if(page != null && CollUtil.isNotEmpty(page.getList())){ + model = page.getList().get(0); + } + + return model; } @Override