xiaoyong931011
2021-07-14 8d08ca6bdfc3dd61b0aaa7daa27308c3d59f0df1
gc-shop/src/main/resources/mapper/shop/ScoreDetailsMapper.xml
@@ -5,6 +5,7 @@
    <select id="queryScoreDetailsList" resultType="com.xzx.gc.shop.vo.QueryScoreDetailsListVo">
        SELECT
        a.*,
               b.nick_name name,
        a.CREATED_TIME createTime
        FROM
        xzx_score_details a
@@ -26,4 +27,18 @@
        order by a.CREATED_TIME desc
    </select>
    <select id="selectXcxScoreDetailsList" resultType="com.xzx.gc.shop.vo.XcxScoreDetailsVo">
        select
            *
            ,change_score score
        from xzx_score_details
        where user_id=#{record.userId}
        order by id desc
    </select>
    <select id="selectTotalScoreByUserId" resultType="java.math.BigDecimal">
        select sum(change_score)
        from xzx_score_details
        where user_id=#{userId} and type=#{type}
    </select>
</mapper>