新增
This commit is contained in:
parent
3b55cde262
commit
c6ce8eb246
@ -70,11 +70,13 @@ public abstract class BaseServiceImpl<
|
||||
public VO create(DTO dto) {
|
||||
Entity entity = createEntity();
|
||||
BeanUtil.copyProperties(dto, entity);
|
||||
// 强制新增,将ID置为空
|
||||
entity.setId(null);
|
||||
// 新增数据
|
||||
save(entity);
|
||||
// 仅返回数据ID
|
||||
@SuppressWarnings("all")
|
||||
VO resultVO = (VO) VO.builder().id(entity.getId()).build();
|
||||
VO resultVO = (VO) createVO().setId(entity.getId());
|
||||
// 其他处理...
|
||||
return resultVO;
|
||||
}
|
||||
@ -123,7 +125,7 @@ public abstract class BaseServiceImpl<
|
||||
}
|
||||
|
||||
@Override
|
||||
public List option(QueryDTO dto) {
|
||||
public List<VO> option(QueryDTO dto) {
|
||||
Map<String, Object> paramMap = MapUtils.builder()
|
||||
.onlySelect(
|
||||
VO::getId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user