<?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.casic.missiles.mapper.quality.BizQualityRepRelMapper"> <!-- 通用查询映射结果 --> <resultMap id="BaseResultMap" type="com.casic.missiles.model.quality.BizQualityRepRel"> <result column="id" property="id"/> <result column="sup_record_id" property="supRecordId"/> <result column="rep_id" property="repId"/> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> id , sup_record_id as supRecordId , rep_id as repId </sql> <select id="selectBizQualityRepRelPage" resultType="com.casic.missiles.model.quality.BizQualityRepRel"> select a.id , a.sup_record_id as supRecordId , a.rep_id as repId from biz_quality_rep_rel a <where> <if test="ew != null"> ${ew.sqlSegment} </if> </where> </select> <select id="listByRecordId" resultType="com.casic.missiles.model.quality.BizQualitySupervisionRep"> select a.id , a.create_time as createTime , a.update_time as updateTime , a.biz_lab_code as bizLabCode , a.sup_dep_id as supDepId , a.sys_code as sysCode , a.file_code as fileCode , a.file_name as fileName , a.creator , a.approval_status as approvalStatus , a.process_id as processId , a.process_info as processInfo , a.better_process_desc as betterProcessDesc , a.problem_process_desc as problemProcessDesc from biz_quality_rep_rel b inner join biz_quality_supervision_rep a on b.rep_id =a.id <where> <if test="ew != null"> ${ew.sqlSegment} </if> </where> </select> <select id="listByRepId" resultType="com.casic.missiles.model.quality.BizQualitySupervisionRecord"> select a.id , a.create_time as createTime , a.update_time as updateTime , a.biz_lab_code as bizLabCode , a.dept_id as deptId , a.sys_code as sysCode , a.file_code as fileCode , a.file_name as fileName , a.creator , a.is_non_conformance as isNonConformance , a.description , a.standard , a.status , a.supervision_time as supervisionTime , a.create_name as createName from biz_quality_rep_rel b inner join biz_quality_supervision_record a on a.id = b.sup_record_id <where> <if test="ew != null"> ${ew.sqlSegment} </if> </where> </select> </mapper>