<?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.simuwang.base.mapper.FundReportFrequencyMapper">
    <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.FundReportFrequencyDO">
        <id column="id" property="id"/>
        <result column="fund_id" property="fundId"/>
        <result column="nav_frequency" property="navFrequency"/>
        <result column="asset_frequency" property="assetFrequency"/>
        <result column="frequency_remark" property="frequencyRemark"/>
        <result column="creatorid" property="creatorId"/>
        <result column="updaterid" property="updaterId"/>
        <result column="createtime" property="createTime"/>
        <result column="updatetime" property="updateTime"/>
        <result column="isvalid" property="isvalid"/>
    </resultMap>
    <sql id="selectFundReportFrequencyVo">
        select id, fund_id, nav_frequency, frequency_remark, asset_frequency, creatorid, updaterid, updatetime, createtime, isvalid
        from PPW_EMAIL.fund_report_frequency
    </sql>
    <sql id="sqlwhereSearch">
        <where>
            isvalid =1
            <if test="fundId !=null and fundId != ''">
                and fund_id = #{fundId}
            </if>
        </where>
    </sql>
    <select id="getFrequencyByFundId" resultType="com.simuwang.base.pojo.dos.FundReportFrequencyDO"
            parameterType="java.lang.String">
        <include refid="selectFundReportFrequencyVo"/>
        <include refid="sqlwhereSearch"/>
    </select>

</mapper>