xiaoyong931011
2020-06-08 f97a701a3cceed8cb86fce14124c1c67a0f59ae0
src/main/resources/mapper/home/MemberQuickBuySaleDao.xml
@@ -2,47 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
   namespace="com.xcong.excoin.modules.home.dao.MemberQuickBuySaleDao">
   <!-- 字段sql -->
   <sql id="columns">
      id,
      member_id,
      amount_cny,
      amount_usdt,
      payment_type,
      payment_account,
      payment_name,
      payment_code,
      unit_price,
      order_status,
      order_no,
      order_type
   </sql>
   <!-- 属性sql -->
   <sql id="propertys">
      #{item.id},
      #{item.memberId},
      #{item.amountCny},
      #{item.amountUsdt},
      #{item.paymentType},
      #{item.paymentAccount},
      #{item.paymentName},
      #{item.paymentCode},
      #{item.unitPrice},
      #{item.orderStatus},
      #{item.orderNo},
      #{item.orderType}
   </sql>
   <!-- 插入方法 -->
   <insert id="insert"
      parameterType="com.xcong.excoin.modules.home.entity.MemberQuickBuySaleEntity"
      useGeneratedKeys="true" keyProperty="id">
      INSERT INTO member_quick_buy_sale (
      <include refid="columns"></include>
      )
      VALUES (
      <include refid="propertys"></include>
      )
   </insert>
   <select id="selectByIdAndMemberId" resultType="com.xcong.excoin.modules.home.entity.MemberQuickBuySaleEntity">
      SELECT a.* FROM member_quick_buy_sale a WHERE a.id = #{id} AND a.member_id = #{memberId}
   </select>
</mapper>