123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <?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.caimei.modules.order.dao.CmChangePayShopRecondDao">
- <sql id="cmChangePayShopRecondColumns">
- a.id AS "id",
- a.recondType AS "recondType",
- a.changeType AS "changeType",
- a.orderId AS "orderId",
- a.shopOrderId AS "shopOrderId",
- a.shopOrderTotalAmount AS "shopOrderTotalAmount",
- a.shopPostFee AS "shopPostFee",
- a.shopOtherFee AS "shopOtherFee",
- a.shouldPayShopAmount AS "shouldPayShopAmount",
- a.modifyShouldPayUserId AS "modifyShouldPayUserId",
- a.modifyShouldPayDate AS "modifyShouldPayDate",
- a.modifyShouldPayNote AS "modifyShouldPayNote",
- a.remarkImage AS "remarkImage",
- a.discount AS "discount"
- </sql>
- <sql id="cmChangePayShopRecondJoins">
- </sql>
- <select id="get" resultType="CmChangePayShopRecond">
- SELECT
- <include refid="cmChangePayShopRecondColumns"/>
- FROM cm_change_pay_shop_recond a
- <include refid="cmChangePayShopRecondJoins"/>
- WHERE a.id = #{id}
- </select>
- <select id="findList" resultType="CmChangePayShopRecond">
- SELECT
- <include refid="cmChangePayShopRecondColumns"/>
- FROM cm_change_pay_shop_recond a
- <include refid="cmChangePayShopRecondJoins"/>
- <where>
- <if test="recondType != null and recondType != ''">
- AND a.recondType = #{recondType}
- </if>
- <if test="changeType != null and changeType != ''">
- AND a.changeType = #{changeType}
- </if>
- <if test="orderId != null and orderId != ''">
- AND a.orderId = #{orderId}
- </if>
- <if test="shopOrderId != null and shopOrderId != ''">
- AND a.shopOrderId = #{shopOrderId}
- </if>
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- </otherwise>
- </choose>
- </select>
- <select id="findAllList" resultType="CmChangePayShopRecond">
- SELECT
- <include refid="cmChangePayShopRecondColumns"/>
- FROM cm_change_pay_shop_recond a
- <include refid="cmChangePayShopRecondJoins"/>
- <where>
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- </otherwise>
- </choose>
- </select>
- <select id="getByShopOrderId" resultType="com.caimei.modules.order.entity.CmChangePayShopRecond">
- SELECT
- <include refid="cmChangePayShopRecondColumns"/>,su.name as "sysUserName"
- FROM cm_change_pay_shop_recond a
- left join sys_user su on su.id = a.modifyShouldPayUserId
- WHERE a.shopOrderId = #{shopOrderId}
- ORDER BY a.modifyShouldPayDate desc
- </select>
- <insert id="insert" parameterType="CmChangePayShopRecond" keyProperty="id" useGeneratedKeys="true">
- INSERT INTO cm_change_pay_shop_recond(
- recondType,
- changeType,
- orderId,
- shopOrderId,
- shopOrderTotalAmount,
- shopPostFee,
- shopOtherFee,
- shouldPayShopAmount,
- modifyShouldPayUserId,
- modifyShouldPayDate,
- modifyShouldPayNote,
- remarkImage,
- discount
- ) VALUES (
- #{recondType},
- #{changeType},
- #{orderId},
- #{shopOrderId},
- #{shopOrderTotalAmount},
- #{shopPostFee},
- #{shopOtherFee},
- #{shouldPayShopAmount},
- #{modifyShouldPayUserId},
- #{modifyShouldPayDate},
- #{modifyShouldPayNote},
- #{remarkImage},
- #{discount}
- )
- </insert>
- <update id="update">
- UPDATE cm_change_pay_shop_recond SET
- recondType = #{recondType},
- changeType = #{changeType},
- orderId = #{orderId},
- shopOrderId = #{shopOrderId},
- shopOrderTotalAmount = #{shopOrderTotalAmount},
- shopPostFee = #{shopPostFee},
- shopOtherFee = #{shopOtherFee},
- shouldPayShopAmount = #{shouldPayShopAmount},
- modifyShouldPayUserId = #{modifyShouldPayUserId},
- modifyShouldPayDate = #{modifyShouldPayDate},
- modifyShouldPayNote = #{modifyShouldPayNote},
- remarkImage = #{remarkImage},
- discount = #{discount}
- WHERE id = #{id}
- </update>
- <delete id="delete">
- DELETE FROM cm_change_pay_shop_recond
- WHERE id = #{id}
- </delete>
- </mapper>
|