| | |
| | | <!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>
|
| | | |
| | | <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>
|
| | |
|
| | | <!-- 属性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>
|
| | | <update id="updateQuickBuySaleTimeOut">
|
| | | update member_quick_buy_sale
|
| | | set order_status = 5
|
| | | where order_type = 'B' and order_status=1
|
| | | and timestampdiff(MINUTE, create_time, now()) > 30
|
| | | </update>
|
| | | </mapper> |