Merge branch 'refs/heads/feature/community-center' into preview
commit
940b6b4125
|
@ -64,6 +64,16 @@ public class SysAdviceController {
|
||||||
return R.ok(adviceVo);
|
return R.ok(adviceVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取官方通知
|
||||||
|
*/
|
||||||
|
@GetMapping("getOfficialMsg")
|
||||||
|
@ApiOperation(value = "获取官方通知")
|
||||||
|
public R<List<AdviceVo>> getOfficialMsg() {
|
||||||
|
List<AdviceVo> adviceVo = sysAdviceService.getOfficialMsg();
|
||||||
|
return R.ok(adviceVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取评论通知
|
* 获取评论通知
|
||||||
|
|
|
@ -32,4 +32,6 @@ public interface ISysAdviceService extends IService<SysAdvice> {
|
||||||
* 一键已读
|
* 一键已读
|
||||||
*/
|
*/
|
||||||
void readAll();
|
void readAll();
|
||||||
|
|
||||||
|
List<AdviceVo> getOfficialMsg();
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,6 +253,18 @@ public class SysAdviceServiceImpl extends ServiceImpl<SysAdviceMapper, SysAdvice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AdviceVo> getOfficialMsg() {
|
||||||
|
|
||||||
|
List<SysAdvice> sysAdviceList = baseMapper.selectList(new LambdaQueryWrapper<SysAdvice>()
|
||||||
|
.eq(SysAdvice::getType, AdviceEnum.SYSTEM_NOTICE)
|
||||||
|
.eq(SysAdvice::getReceiverId, SecurityUtils.getUserId()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return BeanUtil.copyToList(sysAdviceList, AdviceVo.class);
|
||||||
|
}
|
||||||
|
|
||||||
public void postConstruct() {
|
public void postConstruct() {
|
||||||
Long userId = SecurityUtils.getUserId();
|
Long userId = SecurityUtils.getUserId();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue