浏览代码

feat: 基金管理展示兼容gauss,缺失列表查询报错修复

chenjianhua 6 月之前
父节点
当前提交
da70388fc3

+ 4 - 0
service-base/src/main/java/com/simuwang/base/common/support/query/PageQuery.java

@@ -84,6 +84,10 @@ public class PageQuery extends BaseQuery {
         return order;
     }
 
+    public void setOffset(Long offset) {
+        this.offset = offset;
+    }
+
     public Long getOffset() {
         return (current - 1) * pageSize;
     }

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

@@ -38,10 +38,10 @@
         </foreach>
     </insert>
     <delete id="deleteAsset">
-        update asset set isvalid=0,updatetime=sysdate(),updaterid=#{updaterId}  where fund_id=#{fundId} and price_date=#{priceDate}
+        update asset set isvalid=0,updatetime=now(),updaterid=#{updaterId}  where fund_id=#{fundId} and price_date=#{priceDate}
     </delete>
     <delete id="batchDeleteAsset">
-        update asset set isvalid=0,updatetime=sysdate() where fund_id=#{fundId}
+        update asset set isvalid=0,updatetime=now() where fund_id=#{fundId}
         and price_date in
         <foreach collection="priceDateList" index="index" item="priceDate" separator="," open="(" close=")">
             #{priceDate}

+ 3 - 3
service-base/src/main/resources/mapper/CompanyEmailConfigMapper.xml

@@ -22,8 +22,8 @@
         <if test="creatorId != null and creatorId != ''">#{creatorId},</if>
         <if test="updaterId != null and updaterId != ''">#{updaterId},</if>
         1,
-        sysdate(),
-        sysdate()
+        now(),
+        now()
         )
     </insert>
 
@@ -42,7 +42,7 @@
     </update>
 
     <update id="deleteCompanyEmailConfig">
-        update company_email_config set isvalid =0,updatetime=sysdate(),updaterid=#{updaterId} where id=#{id}
+        update company_email_config set isvalid =0,updatetime=now(),updaterid=#{updaterId} where id=#{id}
     </update>
     <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.CompanyEmailConfigDO">
         <id column="id" property="id"/>

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

@@ -21,13 +21,13 @@
         values (#{companyId},#{email},#{sendStatus},#{sendTime},#{sendRemark},#{isvalid},#{createTime},#{updateTime},#{creatorId},#{updaterId})
     </insert>
     <update id="deleteEmailHistory">
-        update company_email_send_history set isvalid =0,updatetime=sysdate() where email in
+        update company_email_send_history set isvalid =0,updatetime=now() where email in
         <foreach item="email" collection="emailList" open="(" separator="," close=")">
             #{email}
         </foreach>
     </update>
     <update id="deleteEmailHistoryByIds">
-        update company_email_send_history set isvalid =0,updatetime=sysdate(),updaterid=#{userId} where id in
+        update company_email_send_history set isvalid =0,updatetime=now(),updaterid=#{userId} where id in
         <foreach item="id" collection="ids" open="(" separator="," close=")">
             #{id}
         </foreach>

+ 7 - 9
service-base/src/main/resources/mapper/DeletionInfoMapper.xml

@@ -33,7 +33,7 @@
                 deletion_type = #{itemDo.deletionType},
                 deletion_date=#{itemDo.deletionDate},
                 remark=#{itemDo.remark},
-                updatetime=sysdate(),
+                updatetime=now(),
                 updaterid=#{itemDo.updaterId}
             </set>
             where isvalid = 1 and id=#{itemDo.id}
@@ -52,13 +52,13 @@
         </if>
     </update>
     <delete id="deleteDeletionRemark">
-        update deletion_info  set isvalid=0,updatetime=sysdate() where isvalid=1 and fund_id=#{fundId} and deletion_type=#{deletionType}
+        update deletion_info  set isvalid=0,updatetime=now() where isvalid=1 and fund_id=#{fundId} and deletion_type=#{deletionType}
         <if test="tradeDate != null and tradeDate !=''">
             and deletion_date=#{tradeDate}
         </if>
     </delete>
     <delete id="deleteDeletion">
-        update deletion_info  set isvalid=0,updatetime=sysdate() where isvalid=1 and fund_id=#{fundId} and deletion_type=#{deletionType} and remark is null
+        update deletion_info  set isvalid=0,updatetime=now() where isvalid=1 and fund_id=#{fundId} and deletion_type=#{deletionType} and remark is null
     </delete>
     <select id="searchDeletionList" resultMap="BaseResultMap"
             parameterType="com.simuwang.base.pojo.dto.query.DeletionPageQuery">
@@ -117,7 +117,6 @@
         <if test="deletionEndNum != null and deletionEndNum != ''">
             and ddn.deletion_num <![CDATA[ <= ]]> #{deletionEndNum}
         </if>
-        group by d.fund_id,d.deletion_type
         limit #{offset},#{pageSize}
     </select>
     <select id="countDeletion" resultType="java.lang.Long"
@@ -176,8 +175,7 @@
         </if>
         <if test="deletionEndNum != null and deletionEndNum != ''">
             and ddn.deletion_num <![CDATA[ <= ]]> #{deletionEndNum}
-        </if>
-        group by d.fund_id,d.deletion_type) a
+        </if>) a
     </select>
     <select id="getLastDeletionDateByFundId" resultType="java.lang.String">
         select max(deletion_date) from deletion_info where fund_id=#{fundId} and deletion_type=#{deletionType}
@@ -269,17 +267,17 @@
             order by info.fund_id desc,d.deletion_type desc,d.deletion_date desc
     </select>
     <update id="removeDistributeDeletion" parameterType="java.lang.String">
-        update deletion_info set isvalid=0,updatetime=sysdate() where fund_id=#{fundId} and remark is null
+        update deletion_info set isvalid=0,updatetime=now() where fund_id=#{fundId} and remark is null
     </update>
     <update id="updateSendStatusByFundId">
-        update deletion_info d set is_send=1,updatetime=sysdate() where isvalid=1
+        update deletion_info d set is_send=1,updatetime=now() where isvalid=1
         and d.fund_id in
         <foreach collection="fundIdList" index="index" item="fundId" separator="," open="(" close=")">
             #{fundId}
         </foreach>
     </update>
     <update id="updateDeletionInfoDO">
-        update deletion_info d set isvalid=1,updatetime=sysdate() where id=#{id}
+        update deletion_info d set isvalid=1,updatetime=now() where id=#{id}
     </update>
 
 </mapper>

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

@@ -40,7 +40,7 @@
         where id=#{id} and isvalid =1
     </update>
     <delete id="deleteDistribution" parameterType="com.simuwang.base.pojo.vo.IdListVO">
-        update distribution set isvalid =0,updatetime=sysdate(),updaterid=#{updaterId} where isvalid =1 and id in
+        update distribution set isvalid =0,updatetime=now(),updaterid=#{updaterId} where isvalid =1 and id in
         <foreach item="id" collection="ids" open="(" separator="," close=")">
             #{id}
         </foreach>

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

@@ -48,7 +48,7 @@
         </foreach>
     </update>
     <delete id="deleteByFileId" parameterType="java.lang.Integer">
-        update email_fund_nav nav set isvalid = 0,updatetime=sysdate() where file_id=#{fileId}
+        update email_fund_nav nav set isvalid = 0,updatetime=now() where file_id=#{fileId}
     </delete>
     <select id="searchNavDetail" resultMap="BaseResultMap">
         SELECT distinct nav.id,nav.file_id,

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

@@ -24,13 +24,13 @@
                 #{itemDo.isvalid}, #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime})
     </insert>
     <update id="updateTaskStatus">
-        update email_task_info set task_status=#{taskStatus},updatetime=sysdate() where email=#{email} and start_time=#{startTime} and end_time=#{endTime}
+        update email_task_info set task_status=#{taskStatus},updatetime=now() where email=#{email} and start_time=#{startTime} and end_time=#{endTime}
     </update>
     <update id="updateTaskStatusById">
         update email_task_info set task_status=#{taskStatus},updatetime=#{updateTime},end_time=#{endTime} where id=#{id}
     </update>
     <delete id="deleteTaskLog">
-        update email_task_info set isvalid=0,updatetime=sysdate(),updaterid=#{userId} where isvalid=1
+        update email_task_info set isvalid=0,updatetime=now(),updaterid=#{userId} where isvalid=1
         and id in
         <foreach collection="idList" index="index" item="id" separator="," open="(" close=")">
             #{id}

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

@@ -40,14 +40,14 @@
         </foreach>
     </update>
     <update id="deleteByTemplateId">
-        update email_template_application_rule set isvalid=0,updatetime=sysdate(),updaterid=#{userId}
+        update email_template_application_rule set isvalid=0,updatetime=now(),updaterid=#{userId}
         where isvalid=1 and  template_id in
         <foreach collection="templateIdList" index="index" item="templateId" open="(" separator="," close=")">
             #{templateId}
         </foreach>
     </update>
     <delete id="deleteByIdList">
-        update email_template_application_rule set isvalid=0,updatetime=sysdate(),updaterid=#{userId}
+        update email_template_application_rule set isvalid=0,updatetime=now(),updaterid=#{userId}
         where isvalid = 1 and id in
         <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
             #{id}

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

@@ -42,7 +42,7 @@
         </foreach>
     </update>
     <update id="deleteByTemplateId">
-        update email_template_data_rule set isvalid=0,updatetime=sysdate(),updaterid=#{userId}
+        update email_template_data_rule set isvalid=0,updatetime=now(),updaterid=#{userId}
         where isvalid=1 and template_id in
         <foreach collection="templateIdList" index="index" item="templateId" open="(" separator="," close=")">
             #{templateId}

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

@@ -22,7 +22,7 @@
             (#{name},#{type},#{direction},#{startIndex},#{endIndex},#{description},#{status},#{isvalid},#{creatorId},#{createTime},#{updaterId},#{updateTime})
     </insert>
     <update id="deleteTemplateList">
-        update email_template_info set isvalid=0,updatetime=sysdate(),updaterid=#{userId} where isvalid=1
+        update email_template_info set isvalid=0,updatetime=now(),updaterid=#{userId} where isvalid=1
         and id in
         <foreach item="id" collection="idList" open="(" separator="," close=")">
             #{id}

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

@@ -22,7 +22,7 @@
             (#{templateId},#{title},#{email},#{companyName},#{companyId},#{status},#{isvalid},#{creatorId},#{createTime},#{updaterId},#{updateTime})
     </insert>
     <update id="deleteTemplateSetting">
-        update  email_template_mapping set isvalid=0,updatetime=sysdate(),updaterid=#{userId}
+        update  email_template_mapping set isvalid=0,updatetime=now(),updaterid=#{userId}
         where isvalid=1 and id in
         <foreach item="id" collection="idList" open="(" separator="," close=")">
             #{id}

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

@@ -26,6 +26,6 @@
         values (#{nav},#{valuation},#{report},1,#{creatorId},#{createTime},#{updaterId},#{updateTime})
     </insert>
     <update id="updateEmailType">
-        update email_type_rule set nav=#{nav},valuation=#{valuation},report=#{report},updatetime=sysdate(),updaterid=#{updaterId} where id=#{id} and isvalid =1
+        update email_type_rule set nav=#{nav},valuation=#{valuation},report=#{report},updatetime=now(),updaterid=#{updaterId} where id=#{id} and isvalid =1
     </update>
 </mapper>

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

@@ -20,7 +20,7 @@
         where isvalid =1 and id=#{id}
     </update>
     <update id="batchDelete">
-        update fund_alias set isvalid=0,updatetime=sysdate(),updaterid=#{updaterId} where isvalid =1 and id in
+        update fund_alias set isvalid=0,updatetime=now(),updaterid=#{updaterId} where isvalid =1 and id in
         <foreach collection="idList" index="index" item="id" separator="," open="(" close=")">
             #{id}
         </foreach>

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

@@ -19,7 +19,7 @@
         <result column="isvalid" property="isvalid"/>
     </resultMap>
     <update id="deleteEmailConfigByIds">
-        update mailbox_info set isvalid =0,updatetime=sysdate(),updaterid=#{updaterId} where id in
+        update mailbox_info set isvalid =0,updatetime=now(),updaterid=#{updaterId} where id in
         <foreach item="id" collection="ids" open="(" separator="," close=")">
             #{id}
         </foreach>

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

@@ -57,14 +57,14 @@
         and id=#{id}
     </update>
     <update id="batchDeleteNav">
-        update nav set isvalid=0,updatetime=sysdate() where fund_id=#{fundId}
+        update nav set isvalid=0,updatetime=now() where fund_id=#{fundId}
         and price_date in
         <foreach collection="priceDateList" index="index" item="priceDate" separator="," open="(" close=")">
             #{priceDate}
         </foreach>
     </update>
     <delete id="deleteNav">
-        update nav set isvalid=0,updatetime=sysdate(),updaterid=#{updaterId} where fund_id=#{fundId} and price_date=#{priceDate}
+        update nav set isvalid=0,updatetime=now(),updaterid=#{updaterId} where fund_id=#{fundId} and price_date=#{priceDate}
     </delete>
 
     <select id="queryFundNavByDate" resultType="java.lang.String">

+ 3 - 3
service-base/src/main/resources/mapper/system/SysConfigMapper.xml

@@ -101,8 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updaterId != null and updaterId != ''">#{updaterId},</if>
 			<if test="remark != null and remark != ''">#{remark},</if>
             1,
- 			sysdate(),
-            sysdate()
+ 			now(),
+            now()
 		)
     </insert>
 	 
@@ -115,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="configType != null and configType != ''">config_type = #{configType},</if>
             <if test="updaterId != null and updaterId != ''">updaterid = #{updaterId},</if>
             <if test="remark != null">remark = #{remark},</if>
- 			updatetime = sysdate()
+ 			updatetime = now()
         </set>
         where config_id = #{configId} and isvalid=1
     </update>