|
@@ -121,7 +121,7 @@ public class TableServiceCmdService {
|
|
if (ActionType.INSERT.equals(context.getActionType())) {
|
|
if (ActionType.INSERT.equals(context.getActionType())) {
|
|
List<GenTableColumn> columns = context.getColumns();
|
|
List<GenTableColumn> columns = context.getColumns();
|
|
Long maxId = IdUtils.getMaxId(dto.getTable(), pkName);
|
|
Long maxId = IdUtils.getMaxId(dto.getTable(), pkName);
|
|
- ColumnUtils.packUpdateByAndTime(columns, commitData, new Timestamp(System.currentTimeMillis()), true);
|
|
|
|
|
|
+ packUpdateByAndTime(columns, commitData, new Timestamp(System.currentTimeMillis()), true);
|
|
// 处理默认值
|
|
// 处理默认值
|
|
handlerDefaultValue(commitData, columns);
|
|
handlerDefaultValue(commitData, columns);
|
|
// 如果有单据、按照单据编号规则
|
|
// 如果有单据、按照单据编号规则
|
|
@@ -208,17 +208,14 @@ public class TableServiceCmdService {
|
|
List<RowResult> result = Lists.newArrayListWithCapacity(idArr.length);
|
|
List<RowResult> result = Lists.newArrayListWithCapacity(idArr.length);
|
|
for (Long id : idArr) {
|
|
for (Long id : idArr) {
|
|
// 校验权限
|
|
// 校验权限
|
|
- if (BooleanUtils.isTrue(checkAuthObjectDelete(genTable, id, pkName))) {
|
|
|
|
- rowResult = deleteService.deleteById(dto.getTable(), pkName, id);
|
|
|
|
- if (rowResult.isOk()) {
|
|
|
|
- LOGGER.info("删除成功, tableName: {}, id: {}, 操作人: {}", tableContext.getTableName(), id, getLoginUser().getUsername());
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- LOGGER.info("删除失败, tableName: {}, id: {}, 操作人: {}", tableContext.getTableName(), id, getLoginUser().getUsername());
|
|
|
|
- } else {
|
|
|
|
|
|
+ if (BooleanUtils.isFalse(checkAuthObjectDelete(genTable, id, pkName))) {
|
|
rowResult = RowResult.create(RowResult.FAIL, "无操作权限");
|
|
rowResult = RowResult.create(RowResult.FAIL, "无操作权限");
|
|
|
|
+ result.add(rowResult);
|
|
|
|
+ continue;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ rowResult = deleteService.deleteById(dto.getTable(), pkName, id);
|
|
|
|
+ LOGGER.info("删除" + (rowResult.isOk() ? "成功" : "失败") + ", tableName: {}, id: {}, 操作人: {}", tableContext.getTableName(), id, getLoginUser().getUsername());
|
|
result.add(rowResult);
|
|
result.add(rowResult);
|
|
}
|
|
}
|
|
|
|
|