You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
112 lines
4.0 KiB
XML
112 lines
4.0 KiB
XML
3 months ago
|
<?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.xisc.pm.infra.mapper.PmRetainStMapper">
|
||
|
|
||
|
|
||
|
<sql id = "BaseSql">
|
||
|
PRS.ID,
|
||
|
PRS.ST_NO,
|
||
|
PRS.ST_DESCRIBE,
|
||
|
PRS.RATE,
|
||
|
PRS.DO_FLG,
|
||
|
PRS.TENANT_ID,
|
||
|
PRS.ATTRIBUTE1,
|
||
|
PRS.ATTRIBUTE2,
|
||
|
PRS.ATTRIBUTE3,
|
||
|
PRS.ATTRIBUTE4,
|
||
|
PRS.ATTRIBUTE5,
|
||
|
PRS.creation_date, PRS.created_by, PRS.last_updated_by, PRS.last_update_date, PRS.object_version_number
|
||
|
</sql>
|
||
|
|
||
|
<select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmRetainSt">
|
||
|
select
|
||
|
<include refid = "BaseSql"/>
|
||
|
from PM_RETAIN_ST PRS
|
||
|
<where>
|
||
|
<if test="id !=null">
|
||
|
and PRS.ID = #{id,jdbcType = INTEGER}
|
||
|
</if>
|
||
|
<if test="stNo !=null">
|
||
|
and PRS.ST_NO like concat(concat('%',#{stNo,jdbcType = VARCHAR}), '%')
|
||
|
</if>
|
||
|
<if test="stDescribe !=null">
|
||
|
and PRS.ST_DESCRIBE = #{stDescribe,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
<if test="rate !=null">
|
||
|
and PRS.RATE = #{rate,jdbcType = INTEGER}
|
||
|
</if>
|
||
|
<if test="tenantId !=null">
|
||
|
and PRS.TENANT_ID = #{tenantId,jdbcType = INTEGER}
|
||
|
</if>
|
||
|
<if test="attribute1 !=null">
|
||
|
and PRS.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
<if test="attribute2 !=null">
|
||
|
and PRS.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
<if test="attribute3 !=null">
|
||
|
and PRS.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
<if test="attribute4 !=null">
|
||
|
and PRS.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
<if test="attribute5 !=null">
|
||
|
and PRS.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id = "exportList" parameterType="com.xisc.pm.domain.entity.PmRetainSt" resultType = "com.xisc.pm.api.dto.export.PmRetainStDTO">
|
||
|
select
|
||
|
<include refid = "BaseSql"/>
|
||
|
from PM_RETAIN_ST PRS
|
||
|
<where>
|
||
|
<if test="id !=null">
|
||
|
and PRS.ID = #{id,jdbcType = INTEGER}
|
||
|
</if>
|
||
|
<if test="stNo !=null">
|
||
|
and PRS.ST_NO like concat(concat('%',#{stNo,jdbcType = VARCHAR}), '%')
|
||
|
</if>
|
||
|
<if test="stDescribe !=null">
|
||
|
and PRS.ST_DESCRIBE = #{stDescribe,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
<if test="rate !=null">
|
||
|
and PRS.RATE = #{rate,jdbcType = INTEGER}
|
||
|
</if>
|
||
|
<if test="tenantId !=null">
|
||
|
and PRS.TENANT_ID = #{tenantId,jdbcType = INTEGER}
|
||
|
</if>
|
||
|
<if test="attribute1 !=null">
|
||
|
and PRS.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
<if test="attribute2 !=null">
|
||
|
and PRS.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
<if test="attribute3 !=null">
|
||
|
and PRS.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
<if test="attribute4 !=null">
|
||
|
and PRS.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
<if test="attribute5 !=null">
|
||
|
and PRS.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
|
||
|
</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id = "checkList" resultType = "com.xisc.pm.domain.entity.PmRetainSt">
|
||
|
select
|
||
|
<include refid = "BaseSql"/>
|
||
|
from PM_RETAIN_ST PRS
|
||
|
<where>
|
||
|
<if test="stNoList != null and stNoList.size()>0">
|
||
|
and (PRS.ST_NO in
|
||
|
<foreach collection="stNoList" item="stNo" open="(" close=")" separator="," index="index">
|
||
|
<if test="(index % 999) == 998"> NULL ) OR PRS.ST_NO in (</if> #{stNo}
|
||
|
</foreach>)
|
||
|
</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
</mapper>
|
||
|
|