fix 数据权限语句null bug

This commit is contained in:
疯狂的狮子li 2021-04-02 15:44:02 +08:00 committed by Gitee
parent 3012bf0a31
commit dfcd84c2bc
1 changed files with 2 additions and 1 deletions

View File

@ -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<String, Object> 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"));