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.

448 lines
21 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.foreverwin.mesnac.anomaly.mapper.WxOrderReceivedMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.anomaly.model.WxOrderReceived">
<id column="HANDLE" property="handle"/>
<result column="WX_ORDER_BO" property="wxOrderBo"/>
<result column="RECEIVE_NUMBER" property="receiveNumber"/>
<result column="CREATED_DATE_TIME" property="createdDateTime"/>
<result column="CREATED_USER" property="createdUser"/>
<result column="MODIFY_USER" property="modifyUser"/>
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime"/>
<result column="OTHER_1" property="other1"/>
<result column="OTHER_2" property="other2"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
WX_ORDER_BO, RECEIVE_NUMBER, CREATED_DATE_TIME, CREATED_USER, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2,
HANDLE
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectById" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_WX_ORDER_RECEIVED WHERE HANDLE=#{handle}
</select>
<select id="selectByMap" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"></include>
FROM Z_WX_ORDER_RECEIVED
<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="selectBatchIds" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"></include>
FROM Z_WX_ORDER_RECEIVED WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_WX_ORDER_RECEIVED
<where>
<if test="ew.entity.wxOrderBo!=null">
WX_ORDER_BO=#{ew.wxOrderBo}
</if>
<if test="ew.entity.receiveNumber!=null">AND RECEIVE_NUMBER=#{ew.entity.receiveNumber}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.createdUser!=null">AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.modifyUser!=null">AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null">AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.other1!=null">AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.handle!=null">AND HANDLE=#{ew.entity.handle}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM Z_WX_ORDER_RECEIVED
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.wxOrderBo!=null">
WX_ORDER_BO=#{ew.entity.wxOrderBo}
</if>
<if test="ew.entity.receiveNumber!=null">AND RECEIVE_NUMBER=#{ew.entity.receiveNumber}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.createdUser!=null">AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.modifyUser!=null">AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null">AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test="ew.entity.other1!=null">AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.handle!=null">AND HANDLE=#{ew.entity.handle}</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 Z_WX_ORDER_RECEIVED
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.wxOrderBo!=null">
WX_ORDER_BO=#{ew.entity.wxOrderBo}
</if>
<if test="ew.entity.receiveNumber!=null">AND RECEIVE_NUMBER=#{ew.entity.receiveNumber}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.createdUser!=null">AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.modifyUser!=null">AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null">AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test="ew.entity.other1!=null">AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.handle!=null">AND HANDLE=#{ew.entity.handle}</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 Z_WX_ORDER_RECEIVED
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.wxOrderBo!=null">
WX_ORDER_BO=#{ew.entity.wxOrderBo}
</if>
<if test="ew.entity.receiveNumber!=null">AND RECEIVE_NUMBER=#{ew.entity.receiveNumber}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.createdUser!=null">AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.modifyUser!=null">AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null">AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test="ew.entity.other1!=null">AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.handle!=null">AND HANDLE=#{ew.entity.handle}</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 Z_WX_ORDER_RECEIVED
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.wxOrderBo!=null">
WX_ORDER_BO=#{ew.entity.wxOrderBo}
</if>
<if test="ew.entity.receiveNumber!=null">AND RECEIVE_NUMBER=#{ew.entity.receiveNumber}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.createdUser!=null">AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.modifyUser!=null">AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null">AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test="ew.entity.other1!=null">AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.handle!=null">AND HANDLE=#{ew.entity.handle}</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 Z_WX_ORDER_RECEIVED
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.wxOrderBo!=null">
WX_ORDER_BO=#{ew.entity.wxOrderBo}
</if>
<if test="ew.entity.receiveNumber!=null">AND RECEIVE_NUMBER=#{ew.entity.receiveNumber}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.createdUser!=null">AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.modifyUser!=null">AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null">AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test="ew.entity.other1!=null">AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.handle!=null">AND HANDLE=#{ew.entity.handle}</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 Z_WX_ORDER_RECEIVED
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.wxOrderBo!=null">
WX_ORDER_BO=#{ew.entity.wxOrderBo}
</if>
<if test="ew.entity.receiveNumber!=null">AND RECEIVE_NUMBER=#{ew.entity.receiveNumber}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.createdUser!=null">AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.modifyUser!=null">AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null">AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test="ew.entity.other1!=null">AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.handle!=null">AND HANDLE=#{ew.entity.handle}</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.anomaly.model.WxOrderReceived">
INSERT INTO Z_WX_ORDER_RECEIVED
<trim prefix="(" suffix=")" suffixOverrides=",">
WX_ORDER_BO,
<if test="receiveNumber!=null">RECEIVE_NUMBER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="createdUser!=null">CREATED_USER,</if>
<if test="modifyUser!=null">MODIFY_USER,</if>
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
<if test="other1!=null">OTHER_1,</if>
<if test="other2!=null">OTHER_2,</if>
<if test="handle!=null">HANDLE,</if>
</trim>
VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{wxOrderBo},
<if test="receiveNumber!=null">#{receiveNumber},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="createdUser!=null">#{createdUser},</if>
<if test="modifyUser!=null">#{modifyUser},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
<if test="other1!=null">#{other1},</if>
<if test="other2!=null">#{other2},</if>
<if test="handle!=null">#{handle},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.anomaly.model.WxOrderReceived">
INSERT INTO Z_WX_ORDER_RECEIVED
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim>
VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{wxOrderBo},
#{receiveNumber},
#{createdDateTime},
#{createdUser},
#{modifyUser},
#{modifiedDateTime},
#{other1},
#{other2},
#{handle},
</trim>
</insert>
<update id="updateById">
UPDATE Z_WX_ORDER_RECEIVED
<trim prefix="SET" suffixOverrides=",">
<if test="et.wxOrderBo!=null">WX_ORDER_BO=#{et.wxOrderBo},</if>
<if test="et.receiveNumber!=null">RECEIVE_NUMBER=#{et.receiveNumber},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.createdUser!=null">CREATED_USER=#{et.createdUser},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test="et.other1!=null">OTHER_1=#{et.other1},</if>
<if test="et.other2!=null">OTHER_2=#{et.other2},</if>
</trim>
WHERE HANDLE=#{et.handle}
<if test="et instanceof java.util.Map">
<if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and
${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
</if>
</if>
</update>
<update id="updateAllColumnById">
UPDATE Z_WX_ORDER_RECEIVED <trim prefix="SET" suffixOverrides=",">
WX_ORDER_BO=#{et.wxOrderBo},
RECEIVE_NUMBER=#{et.receiveNumber},
CREATED_DATE_TIME=#{et.createdDateTime},
CREATED_USER=#{et.createdUser},
MODIFY_USER=#{et.modifyUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
OTHER_1=#{et.other1},
OTHER_2=#{et.other2},
</trim> WHERE HANDLE=#{et.handle}
<if test="et instanceof java.util.Map">
<if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and
${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
</if>
</if>
</update>
<update id="update">
UPDATE Z_WX_ORDER_RECEIVED
<trim prefix="SET" suffixOverrides=",">
<if test="et.wxOrderBo!=null">WX_ORDER_BO=#{et.wxOrderBo},</if>
<if test="et.receiveNumber!=null">RECEIVE_NUMBER=#{et.receiveNumber},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.createdUser!=null">CREATED_USER=#{et.createdUser},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test="et.other1!=null">OTHER_1=#{et.other1},</if>
<if test="et.other2!=null">OTHER_2=#{et.other2},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
WX_ORDER_BO=#{ew.entity.wxOrderBo}
<if test="ew.entity.receiveNumber!=null">AND RECEIVE_NUMBER=#{ew.entity.receiveNumber}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.createdUser!=null">AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.modifyUser!=null">AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null">AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test="ew.entity.other1!=null">AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.handle!=null">AND HANDLE=#{ew.entity.handle}</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="deleteById">
DELETE FROM Z_WX_ORDER_RECEIVED WHERE HANDLE=#{handle}
</delete>
<delete id="deleteByMap">
DELETE FROM Z_WX_ORDER_RECEIVED
<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 Z_WX_ORDER_RECEIVED
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
WX_ORDER_BO=#{ew.entity.wxOrderBo}
</if>
<if test="ew.entity.receiveNumber!=null">AND RECEIVE_NUMBER=#{ew.entity.receiveNumber}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.createdUser!=null">AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.modifyUser!=null">AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null">AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test="ew.entity.other1!=null">AND OTHER_1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER_2=#{ew.entity.other2}</if>
<if test="ew.entity.handle!=null">AND HANDLE=#{ew.entity.handle}</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>
<delete id="deleteBatchIds">
DELETE FROM Z_WX_ORDER_RECEIVED WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>