mirror of https://github.com/halo-dev/halo
fix: the problem that meta is not deleted when the sheet is deleted.
parent
79e66cd3c0
commit
013fa1fdcb
|
@ -43,7 +43,7 @@ public class SheetParam implements InputConverter<Sheet> {
|
||||||
|
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
@Size(max = 255, message = "Length of password must not be more than {max}")
|
@Size(max = 255, message = "页面密码的字符长度不能超过 {max}")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Size(max = 255, message = "Length of template must not be more than {max}")
|
@Size(max = 255, message = "Length of template must not be more than {max}")
|
||||||
|
|
|
@ -226,6 +226,10 @@ public class SheetServiceImpl extends BasePostServiceImpl<Sheet> implements Shee
|
||||||
@Override
|
@Override
|
||||||
public Sheet removeById(Integer id) {
|
public Sheet removeById(Integer id) {
|
||||||
|
|
||||||
|
// Remove sheet metas
|
||||||
|
List<SheetMeta> sheetMetas = sheetMetaService.removeByPostId(id);
|
||||||
|
log.debug("Removed sheet metas: [{}]", sheetMetas);
|
||||||
|
|
||||||
// Remove sheet comments
|
// Remove sheet comments
|
||||||
List<SheetComment> sheetComments = sheetCommentService.removeByPostId(id);
|
List<SheetComment> sheetComments = sheetCommentService.removeByPostId(id);
|
||||||
log.debug("Removed sheet comments: [{}]", sheetComments);
|
log.debug("Removed sheet comments: [{}]", sheetComments);
|
||||||
|
|
Loading…
Reference in New Issue