统计接口区分删除数据
This commit is contained in:
parent
64063390bd
commit
516a6aa641
|
@ -7,6 +7,7 @@
|
|||
select count(d.dept_id)
|
||||
from sys_dept d left join sys_dept p on p.dept_id = d.parent_id
|
||||
where p.parent_id = 0
|
||||
and d.del_flag = 0
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
and d.tenant_id = #{tenantId}
|
||||
</if>
|
||||
|
@ -18,6 +19,7 @@
|
|||
left join sys_dept p on d.parent_id = p.dept_id
|
||||
left join sys_dept pp on pp.dept_id = p.parent_id
|
||||
where pp.parent_id = 0
|
||||
and d.del_flag = 0
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
and d.tenant_id = #{tenantId}
|
||||
</if>
|
||||
|
@ -26,31 +28,28 @@
|
|||
<select id="selectTeacherNum" resultType="int">
|
||||
select count(*)
|
||||
from sys_teacher
|
||||
<where>
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
and tenant_id = #{tenantId}
|
||||
</if>
|
||||
</where>
|
||||
where del_flag = 0
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
and tenant_id = #{tenantId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectTextbookNum" resultType="int">
|
||||
select count(*)
|
||||
from sys_oss_textbook
|
||||
<where>
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
and tenant_id = #{tenantId}
|
||||
</if>
|
||||
</where>
|
||||
where status = 1
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
and tenant_id = #{tenantId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectResourceNum" resultType="int">
|
||||
select count(*) as rNum
|
||||
from sys_oss_resource
|
||||
<where>
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
and tenant_id = #{tenantId}
|
||||
</if>
|
||||
</where>
|
||||
where status = 1
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
and tenant_id = #{tenantId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectOssUse" resultType="org.dromara.system.domain.vo.StatisticNumVo">
|
||||
|
@ -86,11 +85,10 @@
|
|||
when 4 then '试卷'
|
||||
end as `name`
|
||||
from sys_oss_textbook
|
||||
<where>
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
and tenant_id = #{tenantId}
|
||||
</if>
|
||||
</where>
|
||||
where status = 1
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
and tenant_id = #{tenantId}
|
||||
</if>
|
||||
group by type
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue