42 lines
1.5 KiB
XML
42 lines
1.5 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.nflg.wms.repository.mapper.QmsQualityNotificationMapper">
|
|
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.QmsQualityNotificationVO">
|
|
SELECT q.id,
|
|
q.notification_type_id,
|
|
di.name as notification_type_name,
|
|
q.title,
|
|
q.target_type,
|
|
q.content,
|
|
q.enable,
|
|
q.create_by_id,
|
|
q.create_by,
|
|
q.create_time,
|
|
q.update_by_id,
|
|
q.update_by,
|
|
q.update_time
|
|
FROM qms_quality_notification q
|
|
LEFT JOIN dictionary_item di ON q.notification_type_id = di.id
|
|
<where>
|
|
<if test="request.title != null and request.title != ''">
|
|
AND q.title ilike concat('%', #{request.title}, '%')
|
|
</if>
|
|
<if test="request.notificationTypeId != null">
|
|
AND q.notification_type_id = #{request.notificationTypeId}
|
|
</if>
|
|
<if test="request.enable != null">
|
|
AND q.enable = #{request.enable}
|
|
</if>
|
|
<if test="request.startDate != null">
|
|
AND q.create_time >= #{request.startDate}
|
|
</if>
|
|
<if test="request.endDate != null">
|
|
AND q.create_time <= #{request.endDate}
|
|
</if>
|
|
</where>
|
|
ORDER BY q.id DESC
|
|
</select>
|
|
|
|
</mapper>
|