123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <?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.kmall.admin.dao.compared.TaxComparedErrorDao">
- <resultMap type="com.kmall.admin.entity.compared.TaxComparedErrorEntity" id="taxComparedErrorMap">
- <result property="mtceId" column="mtce_id"/>
- <result property="merchOrderSn" column="merch_order_sn"/>
- <result property="kmallTax" column="kmall_tax"/>
- <result property="omsTax" column="oms_tax"/>
- <result property="createTime" column="create_time"/>
- </resultMap>
- <select id="queryObject" resultType="com.kmall.admin.entity.compared.TaxComparedErrorEntity">
- select
- `mtce_id`,
- `merch_order_sn`,
- `kmall_tax`,
- `oms_tax`,
- `create_time`
- from mall_tax_compared_error
- where mtce_id = #{id}
- </select>
- <select id="queryList" resultType="com.kmall.admin.entity.compared.TaxComparedErrorEntity">
- select
- `mtce_id`,
- `merch_order_sn`,
- `kmall_tax`,
- `oms_tax`,
- `create_time`
- from mall_tax_compared_error
- WHERE 1=1
- <if test="createTime != null and createTime.trim() != ''">
- AND DATE_FORMAT(create_time,'%Y-%m-%d') = #{createTime}
- </if>
- order by create_time desc
- <if test="offset != null and limit != null">
- limit #{offset}, #{limit}
- </if>
- </select>
- <select id="queryTotal" resultType="int">
- select count(*) from mall_tax_compared_error
- WHERE 1=1
- <if test="name != null and name.trim() != ''">
- AND name LIKE concat('%',#{name},'%')
- </if>
- <if test="createTime != null and createTime.trim() != ''">
- AND DATE_FORMAT(create_time,'%Y-%m-%d') = #{createTime}
- </if>
- </select>
- <insert id="save" parameterType="com.kmall.admin.entity.compared.TaxComparedErrorEntity" useGeneratedKeys="true" keyProperty="mtceId">
- insert into mall_tax_compared_error(
- `merch_order_sn`,
- `kmall_tax`,
- `oms_tax`,
- `create_time`)
- values(
- #{merchOrderSn},
- #{kmallTax},
- #{omsTax},
- #{createTime})
- </insert>
- <update id="update" parameterType="com.kmall.admin.entity.compared.TaxComparedErrorEntity">
- update mall_tax_compared_error
- <set>
- <if test="merchOrderSn != null">`merch_order_sn` = #{merchOrderSn}, </if>
- <if test="kmallTax != null">`kmall_tax` = #{kmallTax}, </if>
- <if test="omsTax != null">`oms_tax` = #{omsTax}, </if>
- <if test="createTime != null">`create_time` = #{createTime}</if>
- </set>
- where mtce_id = #{mtceId}
- </update>
- <delete id="delete">
- delete from mall_tax_compared_error where mtce_id = #{value}
- </delete>
- <delete id="deleteBatch">
- delete from mall_tax_compared_error where mtce_id in
- <foreach item="mtceId" collection="array" open="(" separator="," close=")">
- #{mtceId}
- </foreach>
- </delete>
- <insert id="saveBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="mtceId">
- insert into mall_tax_compared_error(
- `merch_order_sn`,
- `kmall_tax`,
- `oms_tax`,
- `create_time`)
- values
- <foreach collection="list" index="index" item="item" separator=",">
- (
- #{item.merchOrderSn},
- #{item.kmallTax},
- #{item.omsTax},
- #{item.createTime}
- )
- </foreach>
- </insert>
- </mapper>
|