修改通用Serive,update返回类型

This commit is contained in:
lhc
2021-12-16 15:33:26 +08:00
parent d552eb0e97
commit 1af1c5e0a1
2 changed files with 6 additions and 2 deletions

View File

@@ -75,7 +75,6 @@ public class BaseMapperImpl implements BaseMapper {
dataMap.setPkValue(id);
}
SqlException.base(i, "保存失败");
dataMap.toBuilder().remove("id");
return i;
}
@@ -117,7 +116,6 @@ public class BaseMapperImpl implements BaseMapper {
data.put(pkName, data.get("id"));
}
SqlException.base(i, "保存失败");
data.remove("id");
return i;
}

View File

@@ -246,6 +246,12 @@ public class TableServiceImpl implements TableService {
@Override
public PageInfo<Map<String, Object>> getReference(OsSysTable tableName, String data, WebPageInfo webPageInfo, String target, String id) {
if (StringUtils.isEmpty(target)) {
return new PageInfo<>();
}
if (StringUtils.isEmpty(id)) {
return new PageInfo<>();
}
Condition.ConditionBuilder builder = getMapList(tableName, data);
builder.andEqual(target, id);
return baseMapper.selectByCondition(builder.build(), webPageInfo);