From dfcd84c2bca30aa1891bda95d8a4dbc4aecd53c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Fri, 2 Apr 2021 15:44:02 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90?= =?UTF-8?q?=E8=AF=AD=E5=8F=A5null=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm b/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm index bf6d5e2a..3b6f6400 100644 --- a/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm +++ b/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm @@ -53,7 +53,8 @@ public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${C #end lqw.$mpMethod($condition, ${ClassName}::get$AttrName, bo.get$AttrName()); #else - lqw.apply(bo.getParams().get("dataScope") != null,bo.getParams().get("dataScope").toString()); + Object dataScope = bo.getParams().get("dataScope"); + lqw.apply(dataScope != null, dataScope != null ? dataScope.toString() : null); Map params = bo.getParams(); if (params.get("begin$AttrName") != null && params.get("end$AttrName") != null) { lqw.between(${ClassName}::get$AttrName ,params.get("begin$AttrName"), params.get("end$AttrName"));