|
@@ -128,7 +128,7 @@ public class TableServiceCmdService {
|
|
|
for (Long id : idArr) {
|
|
|
RowResult rowResult = deleteService.deleteById(dto.getTable(), pkName, id);
|
|
|
result.add(rowResult);
|
|
|
- LOGGER.info(rowResult.getMessage() + ", id: {}", Arrays.toString(idArr));
|
|
|
+ LOGGER.info(rowResult.getMessage() + ", id: {}", id);
|
|
|
}
|
|
|
|
|
|
// RowResult rowResult = deleteService.objectDelete(idArr, dto.getTable(), requireNonNull(pkName, "主键名称为空"));
|
|
@@ -152,12 +152,16 @@ public class TableServiceCmdService {
|
|
|
GenTable genTable = getTableFromRedisByTableName(RedisKey.TABLE_INFO, dto.getTable());
|
|
|
String pkName = IdUtils.getPkName(genTable.getColumns());
|
|
|
|
|
|
+ List<RowResult> result = Lists.newArrayListWithCapacity(idArr.length);
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put(dto.getLogicDelName(), dto.getLogicDelValue());
|
|
|
+ for (Long id : idArr) {
|
|
|
+ RowResult rowResult = deleteService.objectLogicDelete(new Long[]{id}, dto.getTable(), pkName, jsonObject);
|
|
|
+ result.add(rowResult);
|
|
|
+ LOGGER.info(rowResult.getMessage() + ", id: {}", id);
|
|
|
+ }
|
|
|
|
|
|
- RowResult rowResult = deleteService.objectLogicDelete(idArr, dto.getTable(), requireNonNull(pkName, "主键名称为空"), jsonObject);
|
|
|
- LOGGER.info(rowResult.getMessage() + ", id: {}", Arrays.toString(idArr));
|
|
|
- return AjaxResult.success(rowResult);
|
|
|
+ return AjaxResult.success(result);
|
|
|
}
|
|
|
|
|
|
/**
|