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.
347 lines
18 KiB
XML
347 lines
18 KiB
XML
4 years 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.foreverwin.mesnac.meapi.mapper.NcCodeMapper">
|
||
|
|
||
|
<!-- 通用查询映射结果 -->
|
||
|
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.NcCode">
|
||
|
<result column="HANDLE" property="handle" />
|
||
|
<result column="CHANGE_STAMP" property="changeStamp" />
|
||
|
<result column="SITE" property="site" />
|
||
|
<result column="NC_CODE" property="ncCode" />
|
||
|
<result column="STATUS_BO" property="statusBo" />
|
||
|
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||
|
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||
|
<result column="NC_CATEGORY" property="ncCategory" />
|
||
|
<result column="DPMO_CATEGORY_BO" property="dpmoCategoryBo" />
|
||
|
</resultMap>
|
||
|
|
||
|
<!-- 通用查询结果列 -->
|
||
|
<sql id="Base_Column_List">
|
||
|
HANDLE, CHANGE_STAMP, SITE, NC_CODE, STATUS_BO, CREATED_DATE_TIME, MODIFIED_DATE_TIME, NC_CATEGORY, DPMO_CATEGORY_BO
|
||
|
</sql>
|
||
|
|
||
|
<!-- BaseMapper标准查询/修改/删除 -->
|
||
|
|
||
|
<select id="selectByMap" resultMap="BaseResultMap">
|
||
|
SELECT <include refid="Base_Column_List"></include>
|
||
|
FROM NC_CODE
|
||
|
<if test="cm!=null and !cm.isEmpty">
|
||
|
<where>
|
||
|
<foreach collection="cm.keys" item="k" separator="AND">
|
||
|
<if test="cm[k] != null">
|
||
|
${k} = #{cm[${k}]}
|
||
|
</if>
|
||
|
</foreach>
|
||
|
</where>
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<select id="selectOne" resultMap="BaseResultMap">
|
||
|
SELECT <include refid="Base_Column_List"></include> FROM NC_CODE
|
||
|
<where>
|
||
|
<if test="ew.entity.handle!=null">
|
||
|
HANDLE=#{ew.handle}
|
||
|
</if>
|
||
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||
|
<if test="ew.entity.ncCategory!=null"> AND NC_CATEGORY=#{ew.entity.ncCategory}</if>
|
||
|
<if test="ew.entity.dpmoCategoryBo!=null"> AND DPMO_CATEGORY_BO=#{ew.entity.dpmoCategoryBo}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectCount" resultType="Integer">
|
||
|
SELECT COUNT(1) FROM NC_CODE
|
||
|
<where>
|
||
|
<if test="ew!=null">
|
||
|
<if test="ew.entity!=null">
|
||
|
<if test="ew.entity.handle!=null">
|
||
|
HANDLE=#{ew.entity.handle}
|
||
|
</if>
|
||
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||
|
<if test="ew.entity.ncCategory!=null"> AND NC_CATEGORY=#{ew.entity.ncCategory}</if>
|
||
|
<if test="ew.entity.dpmoCategoryBo!=null"> AND DPMO_CATEGORY_BO=#{ew.entity.dpmoCategoryBo}</if>
|
||
|
</if>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</if>
|
||
|
</where>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectList" resultMap="BaseResultMap">
|
||
|
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM NC_CODE
|
||
|
<where>
|
||
|
<if test="ew!=null">
|
||
|
<if test="ew.entity!=null">
|
||
|
<if test="ew.entity.handle!=null">
|
||
|
HANDLE=#{ew.entity.handle}
|
||
|
</if>
|
||
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||
|
<if test="ew.entity.ncCategory!=null"> AND NC_CATEGORY=#{ew.entity.ncCategory}</if>
|
||
|
<if test="ew.entity.dpmoCategoryBo!=null"> AND DPMO_CATEGORY_BO=#{ew.entity.dpmoCategoryBo}</if>
|
||
|
</if>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</if>
|
||
|
</where>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectMaps" resultType="HashMap">
|
||
|
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM NC_CODE
|
||
|
<where>
|
||
|
<if test="ew!=null">
|
||
|
<if test="ew.entity!=null">
|
||
|
<if test="ew.entity.handle!=null">
|
||
|
HANDLE=#{ew.entity.handle}
|
||
|
</if>
|
||
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||
|
<if test="ew.entity.ncCategory!=null"> AND NC_CATEGORY=#{ew.entity.ncCategory}</if>
|
||
|
<if test="ew.entity.dpmoCategoryBo!=null"> AND DPMO_CATEGORY_BO=#{ew.entity.dpmoCategoryBo}</if>
|
||
|
</if>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</if>
|
||
|
</where>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectObjs" resultType="Object">
|
||
|
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM NC_CODE
|
||
|
<where>
|
||
|
<if test="ew!=null">
|
||
|
<if test="ew.entity!=null">
|
||
|
<if test="ew.entity.handle!=null">
|
||
|
HANDLE=#{ew.entity.handle}
|
||
|
</if>
|
||
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||
|
<if test="ew.entity.ncCategory!=null"> AND NC_CATEGORY=#{ew.entity.ncCategory}</if>
|
||
|
<if test="ew.entity.dpmoCategoryBo!=null"> AND DPMO_CATEGORY_BO=#{ew.entity.dpmoCategoryBo}</if>
|
||
|
</if>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</if>
|
||
|
</where>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectPage" resultMap="BaseResultMap">
|
||
|
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM NC_CODE
|
||
|
<where>
|
||
|
<if test="ew!=null">
|
||
|
<if test="ew.entity!=null">
|
||
|
<if test="ew.entity.handle!=null">
|
||
|
HANDLE=#{ew.entity.handle}
|
||
|
</if>
|
||
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||
|
<if test="ew.entity.ncCategory!=null"> AND NC_CATEGORY=#{ew.entity.ncCategory}</if>
|
||
|
<if test="ew.entity.dpmoCategoryBo!=null"> AND DPMO_CATEGORY_BO=#{ew.entity.dpmoCategoryBo}</if>
|
||
|
</if>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</if>
|
||
|
</where>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectMapsPage" resultType="HashMap">
|
||
|
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM NC_CODE
|
||
|
<where>
|
||
|
<if test="ew!=null">
|
||
|
<if test="ew.entity!=null">
|
||
|
<if test="ew.entity.handle!=null">
|
||
|
HANDLE=#{ew.entity.handle}
|
||
|
</if>
|
||
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||
|
<if test="ew.entity.ncCategory!=null"> AND NC_CATEGORY=#{ew.entity.ncCategory}</if>
|
||
|
<if test="ew.entity.dpmoCategoryBo!=null"> AND DPMO_CATEGORY_BO=#{ew.entity.dpmoCategoryBo}</if>
|
||
|
</if>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</if>
|
||
|
</where>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.NcCode">
|
||
|
INSERT INTO NC_CODE
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
HANDLE,
|
||
|
<if test="changeStamp!=null">CHANGE_STAMP,</if>
|
||
|
<if test="site!=null">SITE,</if>
|
||
|
<if test="ncCode!=null">NC_CODE,</if>
|
||
|
<if test="statusBo!=null">STATUS_BO,</if>
|
||
|
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||
|
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
||
|
<if test="ncCategory!=null">NC_CATEGORY,</if>
|
||
|
<if test="dpmoCategoryBo!=null">DPMO_CATEGORY_BO,</if>
|
||
|
</trim> VALUES
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
#{handle},
|
||
|
<if test="changeStamp!=null">#{changeStamp},</if>
|
||
|
<if test="site!=null">#{site},</if>
|
||
|
<if test="ncCode!=null">#{ncCode},</if>
|
||
|
<if test="statusBo!=null">#{statusBo},</if>
|
||
|
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||
|
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||
|
<if test="ncCategory!=null">#{ncCategory},</if>
|
||
|
<if test="dpmoCategoryBo!=null">#{dpmoCategoryBo},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.NcCode">
|
||
|
INSERT INTO NC_CODE
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<include refid="Base_Column_List"></include>
|
||
|
</trim> VALUES
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
#{handle},
|
||
|
#{changeStamp},
|
||
|
#{site},
|
||
|
#{ncCode},
|
||
|
#{statusBo},
|
||
|
#{createdDateTime},
|
||
|
#{modifiedDateTime},
|
||
|
#{ncCategory},
|
||
|
#{dpmoCategoryBo},
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<update id="update">
|
||
|
UPDATE NC_CODE <trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
|
||
|
<if test="et.changeStamp!=null">CHANGE_STAMP=#{et.changeStamp},</if>
|
||
|
<if test="et.site!=null">SITE=#{et.site},</if>
|
||
|
<if test="et.ncCode!=null">NC_CODE=#{et.ncCode},</if>
|
||
|
<if test="et.statusBo!=null">STATUS_BO=#{et.statusBo},</if>
|
||
|
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||
|
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||
|
<if test="et.ncCategory!=null">NC_CATEGORY=#{et.ncCategory},</if>
|
||
|
<if test="et.dpmoCategoryBo!=null">DPMO_CATEGORY_BO=#{et.dpmoCategoryBo},</if>
|
||
|
</trim>
|
||
|
<where>
|
||
|
<if test="ew!=null">
|
||
|
<if test="ew.entity!=null">
|
||
|
HANDLE=#{ew.entity.handle}
|
||
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||
|
<if test="ew.entity.ncCategory!=null"> AND NC_CATEGORY=#{ew.entity.ncCategory}</if>
|
||
|
<if test="ew.entity.dpmoCategoryBo!=null"> AND DPMO_CATEGORY_BO=#{ew.entity.dpmoCategoryBo}</if>
|
||
|
</if>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</if>
|
||
|
</where>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</update>
|
||
|
|
||
|
|
||
|
<delete id="deleteByMap">
|
||
|
DELETE FROM NC_CODE
|
||
|
<if test="cm!=null and !cm.isEmpty">
|
||
|
<where>
|
||
|
<foreach collection="cm.keys" item="k" separator="AND">
|
||
|
<if test="cm[k] != null">
|
||
|
${k} = #{cm[${k}]}
|
||
|
</if>
|
||
|
</foreach>
|
||
|
</where>
|
||
|
</if>
|
||
|
</delete>
|
||
|
|
||
|
<delete id="delete">
|
||
|
DELETE FROM NC_CODE
|
||
|
<where>
|
||
|
<if test="ew!=null">
|
||
|
<if test="ew.entity!=null">
|
||
|
<if test="ew.entity.handle!=null">
|
||
|
HANDLE=#{ew.entity.handle}
|
||
|
</if>
|
||
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||
|
<if test="ew.entity.ncCategory!=null"> AND NC_CATEGORY=#{ew.entity.ncCategory}</if>
|
||
|
<if test="ew.entity.dpmoCategoryBo!=null"> AND DPMO_CATEGORY_BO=#{ew.entity.dpmoCategoryBo}</if>
|
||
|
</if>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</if>
|
||
|
</where>
|
||
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||
|
${ew.sqlSegment}
|
||
|
</if>
|
||
|
</delete>
|
||
|
|
||
|
<!-- BaseMapper标准查询/修改/删除 -->
|
||
|
|
||
|
</mapper>
|