From bdf682ea7286dcc1870a2da6048b7e79ea992ddc Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期三, 28 九月 2022 15:31:29 +0800
Subject: [PATCH] 优化代码生成同步后值NULL问题(I5OJDW)
---
src/main/resources/mybatis/tool/GenTableColumnMapper.xml | 16 ++++++++--------
src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java | 3 +--
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java b/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java
index e8ace4e..1f47d7a 100644
--- a/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java
+++ b/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java
@@ -50,7 +50,6 @@
@Before("@annotation(rateLimiter)")
public void doBefore(JoinPoint point, RateLimiter rateLimiter) throws Throwable
{
- String key = rateLimiter.key();
int time = rateLimiter.time();
int count = rateLimiter.count();
@@ -63,7 +62,7 @@
{
throw new ServiceException("璁块棶杩囦簬棰戠箒锛岃绋嶅�欏啀璇�");
}
- log.info("闄愬埗璇锋眰'{}',褰撳墠璇锋眰'{}',缂撳瓨key'{}'", count, number.intValue(), key);
+ log.info("闄愬埗璇锋眰'{}',褰撳墠璇锋眰'{}',缂撳瓨key'{}'", count, number.intValue(), combineKey);
}
catch (ServiceException e)
{
diff --git a/src/main/resources/mybatis/tool/GenTableColumnMapper.xml b/src/main/resources/mybatis/tool/GenTableColumnMapper.xml
index 9a5ed93..10f9afc 100644
--- a/src/main/resources/mybatis/tool/GenTableColumnMapper.xml
+++ b/src/main/resources/mybatis/tool/GenTableColumnMapper.xml
@@ -92,19 +92,19 @@
<update id="updateGenTableColumn" parameterType="GenTableColumn">
update gen_table_column
<set>
- column_comment = #{columnComment},
- java_type = #{javaType},
- java_field = #{javaField},
is_insert = #{isInsert},
is_edit = #{isEdit},
is_list = #{isList},
is_query = #{isQuery},
is_required = #{isRequired},
- query_type = #{queryType},
- html_type = #{htmlType},
- dict_type = #{dictType},
- sort = #{sort},
- update_by = #{updateBy},
+ <if test="columnComment != null">column_comment = #{columnComment},</if>
+ <if test="javaType != null">java_type = #{javaType},</if>
+ <if test="javaField != null">java_field = #{javaField},</if>
+ <if test="queryType != null">query_type = #{queryType},</if>
+ <if test="htmlType != null">html_type = #{htmlType},</if>
+ <if test="dictType != null">dict_type = #{dictType},</if>
+ <if test="sort != null">sort = #{sort},</if>
+ <if test="updateBy != null">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where column_id = #{columnId}
--
Gitblit v1.9.3