2022-04-14 13:58:19 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
|
|
<mapper namespace="io.renren.modules.resource.dao.ResourceDao">
|
|
|
|
|
|
|
|
<resultMap type="io.renren.modules.resource.entity.ResourceEntity" id="resourceMap">
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
<result property="type" column="type"/>
|
|
|
|
<result property="name" column="name"/>
|
|
|
|
<result property="description" column="description"/>
|
|
|
|
<result property="link" column="link"/>
|
2022-04-26 11:51:08 +08:00
|
|
|
<result property="apiMethodType" column="api_method_type"/>
|
2022-04-25 17:53:08 +08:00
|
|
|
<result property="apiUrl" column="api_url"/>
|
|
|
|
<result property="groupId" column="group_id"/>
|
2022-04-20 17:31:48 +08:00
|
|
|
<result property="deptId" column="dept_id"/>
|
2022-04-25 14:08:34 +08:00
|
|
|
<result property="deptContacts" column="dept_contacts"/>
|
|
|
|
<result property="deptPhone" column="dept_phone"/>
|
2022-04-25 17:53:08 +08:00
|
|
|
<result property="shareType" column="share_type"/>
|
|
|
|
<result property="shareMode" column="share_mode"/>
|
|
|
|
<result property="shareCondition" column="share_condition"/>
|
2022-04-20 17:31:48 +08:00
|
|
|
<result property="districtId" column="district_id"/>
|
2022-04-14 13:58:19 +08:00
|
|
|
<result property="visits" column="visits"/>
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
<result property="creator" column="creator"/>
|
|
|
|
<result property="createDate" column="create_date"/>
|
|
|
|
<result property="updater" column="updater"/>
|
|
|
|
<result property="updateDate" column="update_date"/>
|
|
|
|
<result property="note1" column="note1"/>
|
|
|
|
<result property="note2" column="note2"/>
|
|
|
|
<result property="note3" column="note3"/>
|
|
|
|
<result property="note4" column="note4"/>
|
|
|
|
<result property="note5" column="note5"/>
|
|
|
|
</resultMap>
|
|
|
|
|
2022-04-14 23:51:01 +08:00
|
|
|
<resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO">
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
<result property="type" column="type"/>
|
|
|
|
<result property="name" column="name"/>
|
|
|
|
<result property="description" column="description"/>
|
|
|
|
<result property="link" column="link"/>
|
2022-04-26 11:51:08 +08:00
|
|
|
<result property="apiMethodType" column="api_method_type"/>
|
2022-04-25 17:53:08 +08:00
|
|
|
<result property="apiUrl" column="api_url"/>
|
|
|
|
<result property="groupId" column="group_id"/>
|
2022-04-20 17:31:48 +08:00
|
|
|
<result property="deptId" column="dept_id"/>
|
2022-04-25 14:08:34 +08:00
|
|
|
<result property="deptContacts" column="dept_contacts"/>
|
|
|
|
<result property="deptPhone" column="dept_phone"/>
|
2022-04-25 17:53:08 +08:00
|
|
|
<result property="shareType" column="share_type"/>
|
|
|
|
<result property="shareMode" column="share_mode"/>
|
|
|
|
<result property="shareCondition" column="share_condition"/>
|
2022-04-20 17:31:48 +08:00
|
|
|
<result property="districtId" column="district_id"/>
|
2022-04-14 23:51:01 +08:00
|
|
|
<result property="visits" column="visits"/>
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
<result property="creator" column="creator"/>
|
|
|
|
<result property="createDate" column="create_date"/>
|
|
|
|
<result property="updater" column="updater"/>
|
|
|
|
<result property="updateDate" column="update_date"/>
|
|
|
|
<result property="note1" column="note1"/>
|
|
|
|
<result property="note2" column="note2"/>
|
|
|
|
<result property="note3" column="note3"/>
|
|
|
|
<result property="note4" column="note4"/>
|
|
|
|
<result property="note5" column="note5"/>
|
2022-04-25 17:53:08 +08:00
|
|
|
<!-- 自定义字段 -->
|
2022-04-27 16:50:16 +08:00
|
|
|
<result property="deptName" column="deptName"/>
|
|
|
|
<result property="isCollect" column="isCollect"/>
|
|
|
|
<result property="collectCount" column="collectCount"/>
|
2022-04-25 17:53:08 +08:00
|
|
|
<result property="score" column="score"/>
|
2022-04-27 16:50:16 +08:00
|
|
|
<result property="applyState" column="applyState"/>
|
|
|
|
<result property="applyCount" column="applyCount"/>
|
2022-04-14 23:51:01 +08:00
|
|
|
<collection property="infoList" javaType="List" ofType="attrEntity">
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
<result property="dataResourceId" column="data_resource_id"/>
|
|
|
|
<result property="attrType" column="attr_type"/>
|
|
|
|
<result property="attrValue" column="attr_value"/>
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
<result property="creator" column="creator"/>
|
|
|
|
<result property="createDate" column="create_date"/>
|
|
|
|
<result property="updater" column="updater"/>
|
|
|
|
<result property="updateDate" column="update_date"/>
|
|
|
|
<result property="note1" column="note1"/>
|
|
|
|
<result property="note2" column="note2"/>
|
|
|
|
<result property="note3" column="note3"/>
|
|
|
|
<result property="note4" column="note4"/>
|
|
|
|
<result property="note5" column="note5"/>
|
|
|
|
</collection>
|
|
|
|
</resultMap>
|
|
|
|
|
2022-04-14 13:58:19 +08:00
|
|
|
<update id="deleteByIds">
|
2022-04-27 16:50:16 +08:00
|
|
|
UPDATE tb_data_resource
|
|
|
|
SET del_flag = 1,
|
|
|
|
update_date = NOW()
|
|
|
|
WHERE 1 = 1
|
2022-05-11 15:31:48 +08:00
|
|
|
AND id IN
|
2022-04-14 13:58:19 +08:00
|
|
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</update>
|
|
|
|
|
2022-04-14 23:51:01 +08:00
|
|
|
<select id="selectWithAttrs" resultMap="resourceDTO">
|
|
|
|
SELECT
|
2022-04-27 16:50:16 +08:00
|
|
|
tdr.*,
|
|
|
|
tda.*,
|
|
|
|
IFNULL(trs.score, 0 ) AS "score",
|
|
|
|
IFNULL(taa.applyCount, 0 ) AS "applyCount",
|
|
|
|
IFNULL(trc.collectCount, 0) AS "collectCount",
|
|
|
|
IFNULL(sd.name, '暂无部门信息') AS "deptName",
|
|
|
|
IFNULL(trc2.isCollect, 'false') AS "isCollect",
|
2022-05-11 15:31:48 +08:00
|
|
|
(IFNULL(tdr.visits / 100, 0) + IFNULL(trs.score, 0) + IFNULL(taa.applyCount, 0)+ IFNULL(trc.collectCount, 0)) AS
|
|
|
|
total
|
2022-04-14 23:51:01 +08:00
|
|
|
FROM
|
2022-04-27 16:50:16 +08:00
|
|
|
tb_data_resource tdr
|
|
|
|
LEFT JOIN tb_data_attr tda ON tdr.id = tda.data_resource_id
|
2022-05-11 15:31:48 +08:00
|
|
|
LEFT JOIN ( SELECT resource_id, AVG(score) AS "score" FROM tb_resource_score WHERE 1 = 1 AND del_flag = 0 GROUP
|
|
|
|
BY resource_id ) trs ON tdr.id = trs.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, COUNT(id) AS "applyCount" FROM t_ability_application WHERE 1 = 1 AND del_flag =
|
|
|
|
0 GROUP BY resource_id ) taa ON tdr.id = taa.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, COUNT(id) AS "collectCount" FROM tb_resource_collection WHERE 1 = 1 AND del_flag
|
|
|
|
= 0 GROUP BY resource_id ) trc ON tdr.id = trc.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, user_id, ( CASE COUNT( id ) WHEN 1 THEN 'true' ELSE 'false' END ) AS "isCollect"
|
|
|
|
FROM tb_resource_collection WHERE
|
2022-04-27 16:50:16 +08:00
|
|
|
1 = 1
|
|
|
|
AND del_flag = 0
|
|
|
|
AND user_id = #{dto.creator}
|
|
|
|
GROUP BY resource_id
|
|
|
|
) trc2 ON tdr.id = trc2.resource_id
|
|
|
|
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
2022-04-14 23:51:01 +08:00
|
|
|
WHERE 1 = 1
|
2022-04-27 16:50:16 +08:00
|
|
|
AND tdr.type = #{dto.type}
|
|
|
|
AND tdr.del_flag = 0
|
2022-05-11 15:31:48 +08:00
|
|
|
<if test="dto.name != null and dto.name != ''">
|
2022-04-27 16:50:16 +08:00
|
|
|
AND tdr.name like CONCAT('%',#{dto.name},'%')
|
2022-04-20 17:31:48 +08:00
|
|
|
</if>
|
2022-05-11 15:31:48 +08:00
|
|
|
<if test="dto.districtId != null and dto.districtId != ''">
|
|
|
|
AND tdr.district_id = #{dto.districtId}
|
2022-04-20 17:31:48 +08:00
|
|
|
</if>
|
2022-05-11 15:31:48 +08:00
|
|
|
<if test="dto.deptId != null and dto.deptId != ''">
|
|
|
|
AND tdr.dept_id = #{dto.deptId}
|
2022-04-20 17:31:48 +08:00
|
|
|
</if>
|
2022-04-15 11:49:50 +08:00
|
|
|
<if test="dto.infoList.size > 0">
|
2022-04-14 23:51:01 +08:00
|
|
|
AND
|
2022-05-11 15:31:48 +08:00
|
|
|
tda.data_resource_id IN (
|
2022-04-20 17:31:48 +08:00
|
|
|
SELECT data_resource_id
|
|
|
|
FROM (
|
2022-04-27 16:50:16 +08:00
|
|
|
SELECT tb.data_resource_id
|
|
|
|
FROM (
|
|
|
|
<foreach collection="dto.infoList" item="item" separator="union all">
|
|
|
|
SELECT data_resource_id FROM tb_data_attr
|
|
|
|
WHERE attr_type = #{item.attrType}
|
|
|
|
AND attr_value = #{item.attrValue}
|
|
|
|
AND del_flag = 0
|
|
|
|
</foreach>) tb
|
|
|
|
GROUP BY tb.data_resource_id
|
|
|
|
HAVING COUNT( tb.data_resource_id ) = ${dto.infoList.size}
|
|
|
|
) tmp
|
2022-04-20 17:31:48 +08:00
|
|
|
)
|
2022-04-14 23:51:01 +08:00
|
|
|
</if>
|
2022-04-27 16:50:16 +08:00
|
|
|
ORDER BY ${orderField} ${orderType}
|
2022-04-20 17:31:48 +08:00
|
|
|
</select>
|
2022-04-14 23:51:01 +08:00
|
|
|
|
2022-04-20 17:31:48 +08:00
|
|
|
<select id="selectTypeCount" resultType="java.util.Map">
|
2022-04-27 16:50:16 +08:00
|
|
|
SELECT
|
2022-05-11 15:31:48 +08:00
|
|
|
type,
|
|
|
|
count(id) AS "count"
|
2022-04-27 16:50:16 +08:00
|
|
|
FROM tb_data_resource
|
|
|
|
WHERE 1 = 1
|
2022-05-11 15:31:48 +08:00
|
|
|
AND del_flag = 0
|
|
|
|
<if test="deptId != null and deptId != ''">
|
2022-04-27 16:50:16 +08:00
|
|
|
AND dept_id = #{deptId}
|
2022-05-11 15:31:48 +08:00
|
|
|
</if>
|
2022-04-27 16:50:16 +08:00
|
|
|
GROUP BY type
|
|
|
|
ORDER BY type
|
2022-04-14 23:51:01 +08:00
|
|
|
</select>
|
2022-04-23 18:51:52 +08:00
|
|
|
|
|
|
|
<select id="selectMostPopular" resultType="io.renren.modules.resource.dto.ResourceDTO">
|
|
|
|
SELECT
|
2022-05-11 15:31:48 +08:00
|
|
|
tdr.*,
|
|
|
|
IFNULL(trs.score, 0 ) AS "score",
|
|
|
|
IFNULL(taa.applyCount, 0 ) AS "applyCount",
|
|
|
|
IFNULL(trc.collectCount, 0) AS "collectCount",
|
|
|
|
(IFNULL(visits / 100, 0) + IFNULL(trs.score, 0) + IFNULL(applyCount,0)+ IFNULL(collectCount,0)) AS total
|
2022-04-23 18:51:52 +08:00
|
|
|
FROM
|
2022-05-11 15:31:48 +08:00
|
|
|
tb_data_resource tdr
|
|
|
|
LEFT JOIN ( SELECT resource_id, SUM(score) AS "score" FROM tb_resource_score WHERE 1 = 1 AND del_flag = 0 GROUP
|
|
|
|
BY resource_id ) trs ON tdr.id = trs.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, COUNT(id) AS "applyCount" FROM t_ability_application WHERE 1 = 1 AND del_flag =
|
|
|
|
0 GROUP BY resource_id ) taa ON tdr.id = taa.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, COUNT(id) AS "collectCount" FROM tb_resource_collection WHERE 1 = 1 AND del_flag
|
|
|
|
= 0 GROUP BY resource_id ) trc ON tdr.id = trc.resource_id
|
2022-04-23 18:51:52 +08:00
|
|
|
WHERE
|
2022-05-11 15:31:48 +08:00
|
|
|
1 = 1
|
|
|
|
AND tdr.del_flag = 0
|
|
|
|
<if test="type != null and type != ''">
|
|
|
|
AND tdr.type = #{type}
|
|
|
|
</if>
|
|
|
|
<if test="name != null and name != ''">
|
|
|
|
AND tdr.name LIKE CONCAT('%',#{name},'%')
|
|
|
|
</if>
|
2022-04-25 14:08:34 +08:00
|
|
|
ORDER BY ${orderFiled} ${orderType}
|
|
|
|
LIMIT ${pageNum}, ${pageSize}
|
2022-04-23 18:51:52 +08:00
|
|
|
</select>
|
2022-04-27 16:50:16 +08:00
|
|
|
|
2022-04-27 18:05:47 +08:00
|
|
|
<select id="selectDTOById" resultMap="resourceDTO">
|
2022-04-27 16:50:16 +08:00
|
|
|
SELECT
|
2022-05-11 15:31:48 +08:00
|
|
|
tdr.*,
|
|
|
|
tda.*,
|
|
|
|
IFNULL(trs.score, 0 ) AS "score",
|
|
|
|
IFNULL(taa.applyCount, 0 ) AS "applyCount",
|
|
|
|
IFNULL(trc.collectCount, 0) AS "collectCount",
|
|
|
|
sd.name as "deptName",
|
|
|
|
IFNULL(trc2.isCollect, 'false') AS "isCollect",
|
|
|
|
IFNULL(taa2.applyState, 'false') AS "applyState"
|
2022-04-27 16:50:16 +08:00
|
|
|
FROM
|
2022-05-11 15:31:48 +08:00
|
|
|
tb_data_resource tdr
|
|
|
|
LEFT JOIN tb_data_attr tda ON tdr.id = tda.data_resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, AVG(score) AS "score" FROM tb_resource_score WHERE 1 = 1 AND del_flag = 0 GROUP
|
|
|
|
BY resource_id ) trs ON tdr.id = trs.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, COUNT(id) AS "applyCount" FROM t_ability_application WHERE 1 = 1 AND del_flag =
|
|
|
|
0 GROUP BY resource_id ) taa ON tdr.id = taa.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, COUNT(id) AS "collectCount" FROM tb_resource_collection WHERE 1 = 1 AND del_flag
|
|
|
|
= 0 GROUP BY resource_id ) trc ON tdr.id = trc.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, user_id, ( CASE COUNT( id ) WHEN 1 THEN 'true' ELSE 'false' END ) AS "isCollect"
|
|
|
|
FROM tb_resource_collection WHERE
|
|
|
|
1 = 1 AND del_flag = 0 AND user_id = #{userId}
|
|
|
|
GROUP BY resource_id) trc2 ON tdr.id = trc2.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, user_id, ( CASE approve_status WHEN '通过' THEN 'true' ELSE 'false' END ) AS
|
|
|
|
"applyState" FROM t_ability_application WHERE
|
|
|
|
1 = 1 AND del_flag = 0 AND user_id = #{userId}
|
|
|
|
GROUP BY id) taa2 ON tdr.id = taa2.resource_id
|
|
|
|
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
2022-04-27 16:50:16 +08:00
|
|
|
WHERE 1 = 1
|
2022-05-11 15:31:48 +08:00
|
|
|
<!-- AND tdr.del_flag = 0-->
|
|
|
|
AND tdr.id = #{id}
|
2022-04-27 16:50:16 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectDTOPage" resultType="io.renren.modules.resource.dto.ResourceDTO">
|
|
|
|
SELECT
|
2022-05-11 15:31:48 +08:00
|
|
|
tdr.*,
|
|
|
|
IFNULL(trs.score, 0 ) AS "score",
|
|
|
|
IFNULL(taa.applyCount, 0 ) AS "applyCount",
|
|
|
|
IFNULL(trc.collectCount, 0) AS "collectCount",
|
|
|
|
sd.name AS "deptName",
|
|
|
|
IFNULL(trc2.isCollect, 'false') AS "isCollect",
|
|
|
|
IFNULL(taa2.applyState, 'false') AS "applyState",
|
2022-04-27 16:50:16 +08:00
|
|
|
(IFNULL(visits / 100, 0) + IFNULL(trs.score, 0) + IFNULL(applyCount,0)+ IFNULL(collectCount,0)) AS total
|
|
|
|
FROM
|
2022-05-11 15:31:48 +08:00
|
|
|
tb_data_resource tdr
|
|
|
|
LEFT JOIN ( SELECT resource_id, AVG(score) AS "score" FROM tb_resource_score WHERE 1 = 1 AND del_flag = 0 GROUP
|
|
|
|
BY resource_id ) trs ON tdr.id = trs.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, COUNT(id) AS "applyCount" FROM t_ability_application WHERE 1 = 1 AND del_flag =
|
|
|
|
0 GROUP BY resource_id ) taa ON tdr.id = taa.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, COUNT(id) AS "collectCount" FROM tb_resource_collection WHERE 1 = 1 AND del_flag
|
|
|
|
= 0 GROUP BY resource_id ) trc ON tdr.id = trc.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, user_id, ( CASE COUNT( id ) WHEN 1 THEN 'true' ELSE 'false' END ) AS "isCollect"
|
|
|
|
FROM tb_resource_collection WHERE
|
|
|
|
1 = 1 AND del_flag = 0 AND user_id = #{dto.creator}
|
|
|
|
GROUP BY resource_id) trc2 ON tdr.id = trc2.resource_id
|
|
|
|
LEFT JOIN ( SELECT resource_id, user_id, ( CASE approve_status WHEN '通过' THEN 'true' ELSE 'false' END ) AS
|
|
|
|
"applyState" FROM t_ability_application WHERE
|
|
|
|
1 = 1 AND del_flag = 0 AND user_id = #{dto.creator}
|
|
|
|
GROUP BY id) taa2 ON tdr.id = taa2.resource_id
|
|
|
|
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
2022-04-27 16:50:16 +08:00
|
|
|
WHERE 1 = 1
|
2022-05-11 15:31:48 +08:00
|
|
|
AND tdr.del_flag = 0
|
|
|
|
<if test="dto.name != null and dto.name != ''">
|
2022-04-27 16:50:16 +08:00
|
|
|
AND tdr.name LIKE CONCAT('%',#{dto.name},'%')
|
|
|
|
</if>
|
2022-05-11 15:31:48 +08:00
|
|
|
<if test="dto.type != null and dto.type != ''">
|
2022-04-27 16:50:16 +08:00
|
|
|
AND tdr.type = #{dto.type}
|
|
|
|
</if>
|
2022-05-11 15:31:48 +08:00
|
|
|
<if test="dto.districtId != null and dto.districtId != ''">
|
2022-04-27 16:50:16 +08:00
|
|
|
AND tdr.district_id = #{dto.districtId}
|
|
|
|
</if>
|
|
|
|
ORDER BY ${orderField} ${orderType}
|
|
|
|
LIMIT ${pageNum}, ${pageSize}
|
|
|
|
</select>
|
2022-04-28 20:19:09 +08:00
|
|
|
|
|
|
|
<select id="selectApplyArea" resultType="java.util.Map">
|
|
|
|
SELECT
|
2022-05-11 15:31:48 +08:00
|
|
|
*
|
2022-04-28 20:19:09 +08:00
|
|
|
FROM
|
2022-05-11 15:31:48 +08:00
|
|
|
(
|
|
|
|
SELECT
|
|
|
|
attr_value,
|
|
|
|
IFNULL( COUNT( trc.id ), 0 ) AS "colCount",
|
|
|
|
IFNULL( COUNT( taa.id ), 0 ) AS "aplCount",
|
|
|
|
(
|
|
|
|
IFNULL( COUNT( trc.id ), 0 ) + IFNULL( COUNT( taa.id ), 0 )) AS total
|
|
|
|
FROM
|
|
|
|
tb_data_attr tda
|
|
|
|
LEFT JOIN tb_resource_collection trc ON tda.data_resource_id = trc.resource_id
|
|
|
|
AND trc.del_flag = 0
|
|
|
|
AND trc.user_id = #{userId}
|
|
|
|
LEFT JOIN t_ability_application taa ON tda.data_resource_id = taa.resource_id
|
|
|
|
AND taa.del_flag = 0
|
|
|
|
AND taa.user_id = #{userId}
|
2022-04-28 20:19:09 +08:00
|
|
|
|
|
|
|
WHERE
|
2022-05-11 15:31:48 +08:00
|
|
|
1 = 1
|
|
|
|
AND tda.attr_type = '应用领域'
|
|
|
|
AND tda.del_flag = 0
|
|
|
|
AND ( attr_value != '' AND attr_value IS NOT NULL )
|
|
|
|
GROUP BY
|
|
|
|
attr_value
|
|
|
|
ORDER BY
|
|
|
|
total DESC
|
|
|
|
) temp
|
|
|
|
WHERE
|
|
|
|
temp.total != 0
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getAmountGroupByType" resultType="java.util.Map">
|
|
|
|
SELECT
|
|
|
|
COUNT( id ) AS amount,
|
|
|
|
type AS type
|
|
|
|
FROM
|
|
|
|
tb_data_resource
|
|
|
|
WHERE
|
|
|
|
del_flag = 0
|
|
|
|
GROUP BY
|
|
|
|
type
|
2022-04-28 20:19:09 +08:00
|
|
|
</select>
|
2022-05-11 17:25:21 +08:00
|
|
|
<select id="countAllDept" resultType="java.lang.Long">
|
|
|
|
SELECT
|
|
|
|
COUNT( DISTINCT dept_id )
|
|
|
|
FROM
|
|
|
|
tb_data_resource
|
|
|
|
WHERE
|
|
|
|
del_flag = 0
|
|
|
|
</select>
|
2022-04-14 13:58:19 +08:00
|
|
|
</mapper>
|