<?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.fzm.mall.server.admin.order.mapper.PayMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.fzm.mall.server.admin.order.model.Pay">
        <id column="id" property="id" />
        <result column="pay_id" property="payId" />
        <result column="uid" property="uid" />
        <result column="state" property="state" />
        <result column="total" property="total" />
        <result column="paid_amount" property="paidAmount" />
        <result column="unpaid_amount" property="unpaidAmount" />
        <result column="pay_type" property="payType" />
        <result column="oids_json" property="oidsJson" />
        <result column="error" property="error" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="pay_time" property="payTime" />
        <result column="out_biz_no" property="outBizNo" />
    </resultMap>

    <select id="readByOid" resultMap="BaseResultMap">
        select *
        from order_pay where oids_json like CONCAT('%', #{oid},'%')
    </select>
</mapper>
