<?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="cn.pluss.platform.mapper.MerchantMarketMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="cn.pluss.platform.entity.MerchantMarket">
        <id column="id" property="id" />
        <result column="marketAmt" property="marketAmt" />
        <result column="source" property="source" />
        <result column="createTime" property="createTime" />
        <result column="updateTime" property="updateTime" />
        <result column="userName" property="userName" />
        <result column="userId" property="userId" />
    </resultMap>

    <select id="getCountMarketAmt" parameterType="java.lang.Long" resultType="java.math.BigDecimal">
        select IFNULL(SUM(marketAmt),'0.00') from tb_pluss_merchant_market
        where  userId = #{userId}
    </select>
</mapper>
