Browse Source

提交:图层管理列表sql

pull/7/head
袁强 2 weeks ago
parent
commit
7a7372ade5
  1. 3
      dk-modules/business/src/main/java/org/dromara/business/domain/bo/BusinessLayerBo.java
  2. 47
      dk-modules/business/src/main/resources/mapper/business/BusinessLayerMapper.xml

3
dk-modules/business/src/main/java/org/dromara/business/domain/bo/BusinessLayerBo.java

@ -54,4 +54,7 @@ public class BusinessLayerBo {
//父部门id
private Integer parentId;
private String startTime;
private String endTime;
}

47
dk-modules/business/src/main/resources/mapper/business/BusinessLayerMapper.xml

@ -6,6 +6,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="queryPageList" resultType="org.dromara.business.domain.vo.BusinessLayerVo">
SELECT
t.id,
t.layer_name as layerName,
t.enable,
t.remark,
t.layer_type as layerType,
t.dept_id as deptId,
t.dept_name AS deptName,
t.tenant_id as tenantId,
t.create_time AS createTime,
t.sort,
t.parent_id AS parentId
FROM
business_layer t
<where>
<if test="bo.parentId != null and bo.parentId != ''">
and t.parent_id = #{bo.parentId}
</if>
<if test="bo.layerType != null and bo.layerType != ''">
and t.layer_type = #{bo.layerType}
</if>
<if test="bo.deptId != null and bo.deptId != ''">
and t.dept_id = #{bo.deptId}
</if>
<if test="bo.enable != null and bo.enable != ''">
and t.enable = #{bo.enable}
</if>
<if test="bo.layerName != null and bo.layerName != ''">
and t.layer_name like CONCAT(#{bo.layerName}, '%')
</if>
<if test="bo.deptName != null and bo.deptName != ''">
and t.dept_name like CONCAT(#{bo.deptName}, '%')
</if>
<choose>
<when test="bo.startTime != null and bo.endTime != null">
and t.create_time between #{bo.startTime} and #{bo.endTime}
</when>
<when test="bo.startTime != null">
and t.create_time &gt;= #{bo.startTime}
</when>
<when test="bo.endTime != null">
and t.create_time &lt;= #{bo.endTime}
</when>
</choose>
</where>
order by t.parentId , t.sort
</select>
</mapper>

Loading…
Cancel
Save