Sfoglia il codice sorgente

fix: 公司邮箱配置查询

chenjianhua 6 mesi fa
parent
commit
8c5e94f88b

+ 26 - 2
service-base/src/main/resources/mapper/CompanyEmailHistoryMapper.xml

@@ -46,7 +46,19 @@
         PPW_EMAIL.company_email_config cec
         JOIN PPW_EMAIL.pvn_company_info c
         ON cec.company_id = c.company_id
-        LEFT JOIN (select me.email as email,max(me.send_time) as send_time,me.company_id,me.send_remark,me.send_status from PPW_EMAIL.company_email_send_history me where isvalid =1 group by me.email,me.company_id) maxce
+        LEFT JOIN
+        (SELECT
+        me.email AS email,
+        me.send_time AS send_time,
+        me.company_id,
+        me.send_remark,
+        me.send_status
+        FROM
+        PPW_EMAIL.company_email_send_history me
+        join (select mx.company_id,mx.email,max(mx.send_time) as max_send_time from PPW_EMAIL.company_email_send_history mx where mx.isvalid=1
+        GROUP BY mx.email,
+        mx.company_id) as mx on me.email=mx.email and me.company_id=mx.company_id and me.send_time=mx.max_send_time
+        WHERE me.isvalid = 1) maxce
         ON cec.email = maxce.email and cec.company_id = maxce.company_id
         WHERE cec.isvalid = 1 and c.isvalid=1
         <if test="companyName != null and companyName !=''">
@@ -78,7 +90,19 @@
         PPW_EMAIL.company_email_config cec
         JOIN PPW_EMAIL.pvn_company_info c
         ON cec.company_id = c.company_id
-        LEFT JOIN (select me.email as email,max(me.send_time) as send_time,me.company_id,me.send_remark,me.send_status from PPW_EMAIL.company_email_send_history me where isvalid =1 group by me.email,me.company_id) maxce
+        LEFT JOIN
+        (SELECT
+        me.email AS email,
+        me.send_time AS send_time,
+        me.company_id,
+        me.send_remark,
+        me.send_status
+        FROM
+        PPW_EMAIL.company_email_send_history me
+        join (select mx.company_id,mx.email,max(mx.send_time) as max_send_time from PPW_EMAIL.company_email_send_history mx where mx.isvalid=1
+        GROUP BY mx.email,
+        mx.company_id) as mx on me.email=mx.email and me.company_id=mx.company_id and me.send_time=mx.max_send_time
+        WHERE me.isvalid = 1) maxce
         ON cec.email = maxce.email and cec.company_id = maxce.company_id
         WHERE cec.isvalid = 1 and c.isvalid=1
         <if test="companyName != null and companyName !=''">

+ 2 - 1
service-base/src/main/resources/mapper/FundReportFrequencyMapper.xml

@@ -6,6 +6,7 @@
         <result column="fund_id" property="fundId"/>
         <result column="nav_frequency" property="navFrequency"/>
         <result column="asset_frequency" property="assetFrequency"/>
+        <result column="valuation_frequency" property="valuationFrequency"/>
         <result column="frequency_remark" property="frequencyRemark"/>
         <result column="creatorid" property="creatorId"/>
         <result column="updaterid" property="updaterId"/>
@@ -14,7 +15,7 @@
         <result column="isvalid" property="isvalid"/>
     </resultMap>
     <sql id="selectFundReportFrequencyVo">
-        select id, fund_id, nav_frequency, frequency_remark, asset_frequency, creatorid, updaterid, updatetime, createtime, isvalid
+        select id, fund_id, nav_frequency, frequency_remark, asset_frequency, creatorid, updaterid, updatetime, createtime, isvalid,valuation_frequency
         from PPW_EMAIL.fund_report_frequency
     </sql>
     <sql id="sqlwhereSearch">