Files
shz-backend/ruoyi-bussiness/src/main/resources/mapper/app/CompanyJobLiveMapper.xml

51 lines
2.3 KiB
XML
Raw Normal View History

2026-06-17 15:34:24 +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="com.ruoyi.cms.mapper.CompanyJobLiveMapper">
<resultMap type="CompanyJobLive" id="CompanyJobLiveResult">
<result property="id" column="id" />
<result property="title" column="title" />
<result property="liveUrl" column="live_url" />
<result property="description" column="description" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="companyId" column="company_id" />
<result property="companyName" column="company_name" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectCompanyJobLiveVo">
select l.id, l.title, l.live_url, l.description, l.start_time, l.end_time, l.company_id, c.name company_name, l.create_by, l.create_time, l.update_by, l.update_time
from company_job_live l
2026-06-18 00:55:53 +08:00
inner join company c on l.company_id = c.company_id and c.del_flag='0'
2026-06-17 15:34:24 +08:00
</sql>
<select id="selectAll" parameterType="companyJobLive" resultMap="CompanyJobLiveResult">
<include refid="selectCompanyJobLiveVo"/>
where 1=1
<if test="title != null and title != ''">
2026-06-17 16:57:05 +08:00
and l.title like '%' || #{title} || '%'
2026-06-17 15:34:24 +08:00
</if>
<if test="companyName != null and companyName != ''">
2026-06-17 16:57:05 +08:00
and c.name like '%' || #{companyName} || '%'
2026-06-17 15:34:24 +08:00
</if>
2026-06-17 16:57:05 +08:00
and TO_TIMESTAMP(l.end_time, 'YYYY-MM-DD HH24:MI:SS') >= sysdate()
2026-06-17 15:34:24 +08:00
order by l.create_time desc
</select>
2026-06-18 00:55:53 +08:00
<select id="selectByCompanyId" resultMap="CompanyJobLiveResult" parameterType="companyJobLive">
2026-06-17 15:34:24 +08:00
<include refid="selectCompanyJobLiveVo"/>
2026-06-18 00:55:53 +08:00
where l.company_id = #{companyId} and l.del_flag='0'
<if test="title != null and title != ''">
and l.title like '%' || #{title} || '%'
</if>
2026-06-17 15:34:24 +08:00
order by l.create_time desc
</select>
</mapper>