Browse Source

多语言插件更新场景bug修复

liangbo.huang 2 weeks ago
parent
commit
5a6c8942a3

+ 2 - 1
trade-common/src/main/java/com/trade/common/config/mybatis/plugin/I18nSqlProcessInterceptor.java

@@ -126,7 +126,8 @@ public class I18nSqlProcessInterceptor implements Interceptor {
                     if (Map.class.isAssignableFrom(boundSql.getParameterObject().getClass())
                             && Map.class.isAssignableFrom(parameterClass)) {
                         MapperMethod.ParamMap parameterMap = (MapperMethod.ParamMap) boundSql.getParameterObject();
-                        if (parameterMap.containsKey("ew")) {
+                        if (parameterMap.containsKey("ew") && parameterMap.containsKey("et")
+                                && parameterMap.get("et") != null) {
                             // update method
                             Object entityWrapper = parameterMap.get("ew");
                             // update 不带where 直接返回原逻辑