|
@@ -43,21 +43,41 @@
|
|
|
</select>
|
|
|
<select id="searchFundFileInfo" resultType="com.simuwang.base.pojo.vo.FundFileInfoVO">
|
|
|
SELECT DISTINCT efi.id as "fileId",
|
|
|
+ <if test="fileType != 3">
|
|
|
efn.fund_id as "fundId",
|
|
|
efn.fund_name as "fundName",
|
|
|
+ </if>
|
|
|
+ <if test="fileType == 3">
|
|
|
+ info.fund_id as "fundId",
|
|
|
+ efn.fund_name as "fundName",
|
|
|
+ </if>
|
|
|
efi.file_name as "fileName",
|
|
|
efi.file_path as "filePath",
|
|
|
efi.createtime as "createTime"
|
|
|
FROM
|
|
|
PPW_EMAIL.EMAIL_FILE_INFO efi
|
|
|
+ <if test="fileType != 3">
|
|
|
JOIN PPW_EMAIL.EMAIL_FUND_NAV efn
|
|
|
- ON efi.id = efn.file_id
|
|
|
+ ON efi.id = efn.file_id
|
|
|
+ </if>
|
|
|
+ <if test="fileType == 3">
|
|
|
+ JOIN PPW_EMAIL.AMAC_REPORT_FUND_INFO efn
|
|
|
+ ON efi.id = efn.file_id
|
|
|
+ left join PPW_EMAIL.PVN_FUND_INFO info
|
|
|
+ on efn.register_number=info.register_number and info.isvalid=1
|
|
|
+ </if>
|
|
|
JOIN PPW_EMAIL.EMAIL_PARSE_INFO epi
|
|
|
ON epi.id = efi.email_id
|
|
|
WHERE efi.isvalid = 1
|
|
|
AND efn.isvalid = 1
|
|
|
AND epi.isvalid = 1
|
|
|
- AND epi.EMAIL_TYPE = #{fileType} and efn.fund_id=#{fundId}
|
|
|
+ AND epi.EMAIL_TYPE = #{fileType}
|
|
|
+ <if test="fileType != 3">
|
|
|
+ and efn.fund_id=#{fundId}
|
|
|
+ </if>
|
|
|
+ <if test="fileType == 3">
|
|
|
+ and info.fund_id=#{fundId}
|
|
|
+ </if>
|
|
|
order by efi.createtime desc
|
|
|
limit #{offset},#{pageSize}
|
|
|
</select>
|
|
@@ -117,22 +137,42 @@
|
|
|
<select id="countFundFileInfo" resultType="java.lang.Long"
|
|
|
parameterType="com.simuwang.base.pojo.dto.query.FundFilePageQuery">
|
|
|
select count(1) from (
|
|
|
- SELECT DISTINCT
|
|
|
+ SELECT DISTINCT efi.id as "fileId",
|
|
|
+ <if test="fileType != 3">
|
|
|
efn.fund_id as "fundId",
|
|
|
efn.fund_name as "fundName",
|
|
|
- efi.file_name as "fileName",
|
|
|
- efi.file_path as "filePath",
|
|
|
- efi.createtime as "createTime"
|
|
|
+ </if>
|
|
|
+ <if test="fileType == 3">
|
|
|
+ info.fund_id as "fundId",
|
|
|
+ efn.fund_name as "fundName",
|
|
|
+ </if>
|
|
|
+ efi.file_name as "fileName",
|
|
|
+ efi.file_path as "filePath",
|
|
|
+ efi.createtime as "createTime"
|
|
|
FROM
|
|
|
- PPW_EMAIL.EMAIL_FILE_INFO efi
|
|
|
- JOIN PPW_EMAIL.EMAIL_FUND_NAV efn
|
|
|
- ON efi.id = efn.file_id
|
|
|
- JOIN PPW_EMAIL.EMAIL_PARSE_INFO epi
|
|
|
- ON epi.id = efi.email_id
|
|
|
+ PPW_EMAIL.EMAIL_FILE_INFO efi
|
|
|
+ <if test="fileType != 3">
|
|
|
+ JOIN PPW_EMAIL.EMAIL_FUND_NAV efn
|
|
|
+ ON efi.id = efn.file_id
|
|
|
+ </if>
|
|
|
+ <if test="fileType == 3">
|
|
|
+ JOIN PPW_EMAIL.AMAC_REPORT_FUND_INFO efn
|
|
|
+ ON efi.id = efn.file_id
|
|
|
+ left join PPW_EMAIL.PVN_FUND_INFO info
|
|
|
+ on efn.register_number=info.register_number and info.isvalid=1
|
|
|
+ </if>
|
|
|
+ JOIN PPW_EMAIL.EMAIL_PARSE_INFO epi
|
|
|
+ ON epi.id = efi.email_id
|
|
|
WHERE efi.isvalid = 1
|
|
|
- AND efn.isvalid = 1
|
|
|
- AND epi.isvalid = 1
|
|
|
- AND epi.EMAIL_TYPE = #{fileType} and efn.fund_id=#{fundId}) a
|
|
|
+ AND efn.isvalid = 1
|
|
|
+ AND epi.isvalid = 1
|
|
|
+ AND epi.EMAIL_TYPE = #{fileType}
|
|
|
+ <if test="fileType != 3">
|
|
|
+ and efn.fund_id=#{fundId}
|
|
|
+ </if>
|
|
|
+ <if test="fileType == 3">
|
|
|
+ and info.fund_id=#{fundId}
|
|
|
+ </if>) a
|
|
|
</select>
|
|
|
<select id="countEmailDetailById" resultType="java.lang.Long"
|
|
|
parameterType="com.simuwang.base.pojo.dto.query.EmailFileQuery">
|