Files
nanguangszwlback/mhd-modules/mhd-system/src/main/resources/mapper/basic/batchDetail/BatchDetailMapper.xml
T
2025-11-20 10:45:16 +08:00

75 lines
3.6 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.mhd.basic.domain.batchDetail.repository.mapper.BatchDetailMapper">
<resultMap type="com.mhd.basic.domain.batchDetail.repository.po.BatchDetailPO" id="BatchDetailResult">
<result property="batchDetailId" column="batch_detail_id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="topOrganizationId" column="top_organization_id" />
<result property="batchId" column="batch_id" />
<result property="batchLabels" column="batch_labels" />
<result property="inputControl" column="input_control" />
<result property="attributeFormat" column="attribute_format" />
<result property="attributeOption" column="attribute_option" />
<result property="remark" column="remark" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="createByName" column="create_by_name" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="updateByName" column="update_by_name" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectBatchDetailPo">
select batch_detail_id, organization_id, organization_name, top_organization_id, batch_id, batch_labels, input_control, attribute_format, attribute_option, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from batch_detail
</sql>
<sql id="selectBatchDetailPo1">
<where>
<if test="organizationId != null ">
and organization_id = #{organizationId}
</if>
<if test="organizationName != null and organizationName != ''">
and organization_name like concat('%', #{organizationName}, '%')
</if>
<if test="topOrganizationId != null ">
and top_organization_id = #{topOrganizationId}
</if>
<if test="batchId != null ">
and batch_id = #{batchId}
</if>
<if test="batchLabels != null and batchLabels != ''">
and batch_labels = #{batchLabels}
</if>
<if test="inputControl != null ">
and input_control = #{inputControl}
</if>
<if test="attributeFormat != null and attributeFormat != ''">
and attribute_format = #{attributeFormat}
</if>
<if test="attributeOption != null and attributeOption != ''">
and attribute_option = #{attributeOption}
</if>
<if test="createByName != null and createByName != ''">
and create_by_name like concat('%', #{createByName}, '%')
</if>
<if test="updateByName != null and updateByName != ''">
and update_by_name like concat('%', #{updateByName}, '%')
</if>
<choose>
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
<otherwise> and del_flag = 1 </otherwise>
</choose>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.basic.domain.batchDetail.repository.todo.BatchDetailDO" resultMap="BatchDetailResult">
<include refid="selectBatchDetailPo"/>
<include refid="selectBatchDetailPo1"/>
</select>
</mapper>