|
@@ -2,6 +2,7 @@ package com.gis.cms.service.impl;
|
|
|
|
|
|
import com.gis.cms.entity.dto.MournDto;
|
|
import com.gis.cms.entity.dto.MournDto;
|
|
import com.gis.cms.entity.po.MournEntity;
|
|
import com.gis.cms.entity.po.MournEntity;
|
|
|
|
+import com.gis.cms.entity.vo.MournVo;
|
|
import com.gis.cms.mapper.MournMapper;
|
|
import com.gis.cms.mapper.MournMapper;
|
|
import com.gis.common.base.exception.BaseRuntimeException;
|
|
import com.gis.common.base.exception.BaseRuntimeException;
|
|
import com.gis.common.base.entity.dto.PageDateDto;
|
|
import com.gis.common.base.entity.dto.PageDateDto;
|
|
@@ -38,10 +39,10 @@ public class MournServiceImpl extends IBaseServiceImpl<MournEntity, Long> implem
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Result<MournEntity> search(PageDateDto param, Integer display) {
|
|
|
|
|
|
+ public Result<MournVo> search(PageDateDto param, Integer display) {
|
|
startPage(param);
|
|
startPage(param);
|
|
- List<MournEntity> list = entityMapper.search(param, display);
|
|
|
|
- PageInfo<MournEntity> pageInfo = new PageInfo<>(list);
|
|
|
|
|
|
+ List<MournVo> list = entityMapper.search(param, display);
|
|
|
|
+ PageInfo<MournVo> pageInfo = new PageInfo<>(list);
|
|
return Result.success(pageInfo);
|
|
return Result.success(pageInfo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -53,15 +54,22 @@ public class MournServiceImpl extends IBaseServiceImpl<MournEntity, Long> implem
|
|
}
|
|
}
|
|
entity.setDisplay(display);
|
|
entity.setDisplay(display);
|
|
entity.setUpdateTime(LocalDateTime.now());
|
|
entity.setUpdateTime(LocalDateTime.now());
|
|
- this.save(entity);
|
|
|
|
|
|
+ this.update(entity);
|
|
return Result.success();
|
|
return Result.success();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public Result mournComment(Long martyrId) {
|
|
|
|
+ List<MournEntity> list = entityMapper.findByMartyrIdMapper(martyrId);
|
|
|
|
+ return Result.success(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Result saveEntity(MournDto param) {
|
|
public Result saveEntity(MournDto param) {
|
|
MournEntity entity = new MournEntity();
|
|
MournEntity entity = new MournEntity();
|
|
BeanUtils.copyProperties(param, entity);
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
|
+ entity.setUserId(getTokenUserId());
|
|
this.save(entity);
|
|
this.save(entity);
|
|
return Result.success(entity);
|
|
return Result.success(entity);
|
|
}
|
|
}
|