<?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.czg.service.market.mapper.MkPointsUserRecordMapper">

    <select id="getPointsUserRecord" resultType="com.czg.market.entity.MkPointsUserRecord">
        select record.*, shop.shop_name as shopName
        from mk_points_user_record record
                 left join tb_shop_info shop on shop.id = record.shop_id
        where record.mk_points_user_id = #{mkPointsUserId}
        having record.id is not null
        order by record.create_time desc
    </select>
</mapper>
