| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?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="platform.modules.build.dao.MaintenanceDao">
- <select id="findLatestMaintenance" resultType="platform.modules.build.entity.Maintenance"
- parameterType="platform.modules.build.DTO.MaintenanceDto">
- SELECT * FROM y_maintenance t
- left join z_user zUser on zUser.id = t.create_by
- WHERE
- t.del_flag=0 and t.status=0
- <if test="company_id!=null">
- and zUser.company_id=#{company_id}
- </if>
- <if test="build_id!=null">
- and t.build_id = #{build_id}
- </if>
- and t.is_processed=0
- order by t.create_time desc limit #{count}
- </select>
- <select id="findExportMaintenance" resultType="platform.modules.sys.report.MaintenanceExport">
- SELECT t.company_name,t.location,t.report_user_name,t.contact,t.question_name,t.create_time,
- CASE WHEN t.is_processed=1 THEN '已处理'
- ELSE '未处理' end as status_name
- FROM y_maintenance t WHERE t.build_id = #{build_id}
- and t.del_flag=0 and t.status=#{request.is_archive}
- <if test="request.keyword!=null and request.keyword!=''">
- and (t.company_name like CONCAT('%',#{request.keyword},'%')
- or t.report_user_name like CONCAT('%',#{request.keyword},'%')
- )
- </if>
- order by t.create_time desc
- </select>
- </mapper>
|