2ая готова
This commit is contained in:
parent
66bfe560cd
commit
25fdddc6bc
@ -4,8 +4,6 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.modelmapper.ModelMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@ -37,7 +35,10 @@ public class NewController {
|
||||
}
|
||||
|
||||
private NewDto toDto(NewEntity entity) {
|
||||
return modelMapper.map(entity, NewDto.class);
|
||||
var tages = entity.getTage().stream().map(TageEntity::getId).toList();
|
||||
var newdto = modelMapper.map(entity, NewDto.class);
|
||||
newdto.setTagesId(tages);
|
||||
return newdto;
|
||||
}
|
||||
|
||||
private NewEntity toEntity(NewDto dto) {
|
||||
|
Loading…
Reference in New Issue
Block a user