Browse Source

🤖 mapper.xml兼容eclipse、没装插件情况的写法

test
smallchill 5 years ago
parent
commit
d9621b3983
  1. 8
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.xml
  2. 24
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.xml

8
blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.xml

@ -63,11 +63,11 @@
<if test="param2!=null"> <if test="param2!=null">
and dept.parent_id = #{param2} and dept.parent_id = #{param2}
</if> </if>
<if test="param.deptName!=null and param.deptName!=''"> <if test="param3.deptName!=null and param3.deptName!=''">
and dept.dept_name like concat('%', #{param.deptName},'%') and dept.dept_name like concat('%', #{param3.deptName},'%')
</if> </if>
<if test="param.fullName!=null and param.fullName!=''"> <if test="param3.fullName!=null and param3.fullName!=''">
and dept.full_name like concat('%', #{param.fullName},'%') and dept.full_name like concat('%', #{param3.fullName},'%')
</if> </if>
ORDER BY dept.sort ORDER BY dept.sort
</select> </select>

24
blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.xml

@ -61,14 +61,14 @@
<if test="param1!=null"> <if test="param1!=null">
and menu.parent_id = #{param1} and menu.parent_id = #{param1}
</if> </if>
<if test="param.name!=null and param.name!=''"> <if test="param2.name!=null and param2.name!=''">
and menu.name like concat('%', #{param.name},'%') and menu.name like concat('%', #{param2.name},'%')
</if> </if>
<if test="param.code!=null and param.code!=''"> <if test="param2.code!=null and param2.code!=''">
and menu.code like concat('%', #{param.code},'%') and menu.code like concat('%', #{param2.code},'%')
</if> </if>
<if test="param.alias!=null and param.alias!=''"> <if test="param2.alias!=null and param2.alias!=''">
and menu.alias like concat('%', #{param.alias},'%') and menu.alias like concat('%', #{param2.alias},'%')
</if> </if>
ORDER BY menu.sort ORDER BY menu.sort
</select> </select>
@ -90,14 +90,14 @@
<if test="param1!=null"> <if test="param1!=null">
and menu.parent_id = #{param1} and menu.parent_id = #{param1}
</if> </if>
<if test="param.name!=null and param.name!=''"> <if test="param2.name!=null and param2.name!=''">
and menu.name like concat('%', #{param.name},'%') and menu.name like concat('%', #{param2.name},'%')
</if> </if>
<if test="param.code!=null and param.code!=''"> <if test="param2.code!=null and param2.code!=''">
and menu.code like concat('%', #{param.code},'%') and menu.code like concat('%', #{param2.code},'%')
</if> </if>
<if test="param.alias!=null and param.alias!=''"> <if test="param2.alias!=null and param2.alias!=''">
and menu.alias like concat('%', #{param.alias},'%') and menu.alias like concat('%', #{param2.alias},'%')
</if> </if>
ORDER BY menu.sort ORDER BY menu.sort
</select> </select>

Loading…
Cancel
Save