|
@@ -39,17 +39,17 @@ import static java.util.stream.Collectors.toList;
|
|
* </p>
|
|
* </p>
|
|
*
|
|
*
|
|
* @author miemie
|
|
* @author miemie
|
|
- * @deprecated 3.4.4 {@link com.baomidou.mybatisplus.core.injector.methods.DeleteById}
|
|
|
|
* @since 2018-11-09
|
|
* @since 2018-11-09
|
|
|
|
+ * @deprecated 3.4.4 {@link com.baomidou.mybatisplus.core.injector.methods.DeleteById}
|
|
*/
|
|
*/
|
|
@SuppressWarnings("serial")
|
|
@SuppressWarnings("serial")
|
|
@Deprecated
|
|
@Deprecated
|
|
public class LogicDeleteByIdWithFill extends AbstractMethod {
|
|
public class LogicDeleteByIdWithFill extends AbstractMethod {
|
|
-
|
|
|
|
|
|
+
|
|
public LogicDeleteByIdWithFill() {
|
|
public LogicDeleteByIdWithFill() {
|
|
super("deleteByIdWithFill");
|
|
super("deleteByIdWithFill");
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @param name 方法名
|
|
* @param name 方法名
|
|
* @since 3.4.4
|
|
* @since 3.4.4
|
|
@@ -57,7 +57,7 @@ public class LogicDeleteByIdWithFill extends AbstractMethod {
|
|
public LogicDeleteByIdWithFill(String name) {
|
|
public LogicDeleteByIdWithFill(String name) {
|
|
super(name);
|
|
super(name);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public MappedStatement injectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) {
|
|
public MappedStatement injectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) {
|
|
String sql;
|
|
String sql;
|
|
@@ -65,6 +65,7 @@ public class LogicDeleteByIdWithFill extends AbstractMethod {
|
|
if (tableInfo.isWithLogicDelete()) {
|
|
if (tableInfo.isWithLogicDelete()) {
|
|
List<TableFieldInfo> fieldInfos = tableInfo.getFieldList().stream()
|
|
List<TableFieldInfo> fieldInfos = tableInfo.getFieldList().stream()
|
|
.filter(TableFieldInfo::isWithUpdateFill)
|
|
.filter(TableFieldInfo::isWithUpdateFill)
|
|
|
|
+ .filter(f -> !f.isLogicDelete())
|
|
.collect(toList());
|
|
.collect(toList());
|
|
if (CollectionUtils.isNotEmpty(fieldInfos)) {
|
|
if (CollectionUtils.isNotEmpty(fieldInfos)) {
|
|
String sqlSet = "SET " + fieldInfos.stream().map(i -> i.getSqlSet(EMPTY)).collect(joining(EMPTY))
|
|
String sqlSet = "SET " + fieldInfos.stream().map(i -> i.getSqlSet(EMPTY)).collect(joining(EMPTY))
|