45 lines
1.4 KiB
XML
45 lines
1.4 KiB
XML
<?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="com.ruoyi.cms.mapper.WebsiteManagementMapper">
|
|
|
|
<select id="getList" parameterType="com.ruoyi.cms.domain.WebsiteManagement" resultType="com.ruoyi.cms.domain.WebsiteManagement">
|
|
SELECT
|
|
c.*
|
|
FROM
|
|
(
|
|
SELECT
|
|
wm.*,
|
|
COALESCE(jj.num, 0) AS num
|
|
FROM
|
|
WEBSITE_MANAGEMENT wm
|
|
LEFT JOIN (
|
|
SELECT
|
|
data_source,
|
|
COALESCE(count(job_id), 0) AS num
|
|
FROM
|
|
job j
|
|
GROUP BY
|
|
j.DATA_SOURCE
|
|
) jj ON jj.DATA_SOURCE = wm.WEBSITE_NAME
|
|
) c
|
|
where
|
|
c.del_flag='0'
|
|
<if test="websiteName != null and websiteName != ''">
|
|
and c.website_name like CONCAT('%',#{websiteName},'%')
|
|
</if>
|
|
<if test="websiteUrl != null and websiteUrl != ''">
|
|
and c.website_url like CONCAT('%',#{websiteUrl},'%')
|
|
</if>
|
|
<if test="websiteOwnerCompany != null and websiteOwnerCompany != ''">
|
|
and c.website_owner_company like CONCAT('%',#{websiteOwnerCompany},'%')
|
|
</if>
|
|
<if test="isActive != null and isActive != ''">
|
|
and c.is_active = #{isActive}
|
|
</if>
|
|
ORDER BY c.num DESC
|
|
</select>
|
|
|
|
</mapper>
|