通知优化
This commit is contained in:
parent
a911fdeee9
commit
d0cca3951c
|
@ -333,6 +333,7 @@ public class ActivitiNoticeAspect {
|
||||||
dto.setSenderDate(new Date());
|
dto.setSenderDate(new Date());
|
||||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||||
dto.setCreateDate(new Date());
|
dto.setCreateDate(new Date());
|
||||||
|
dto.setFrom("通知");
|
||||||
sysNoticeService.save(dto);
|
sysNoticeService.save(dto);
|
||||||
}).thenRunAsync(() -> { // 审批者
|
}).thenRunAsync(() -> { // 审批者
|
||||||
SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator));
|
SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator));
|
||||||
|
@ -348,6 +349,7 @@ public class ActivitiNoticeAspect {
|
||||||
dto.setSenderDate(new Date());
|
dto.setSenderDate(new Date());
|
||||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||||
dto.setCreateDate(new Date());
|
dto.setCreateDate(new Date());
|
||||||
|
dto.setFrom("通知");
|
||||||
sysNoticeService.save(dto);
|
sysNoticeService.save(dto);
|
||||||
}).thenRunAsync(() -> { // 防止重放
|
}).thenRunAsync(() -> { // 防止重放
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
@Api(tags = "")
|
@Api(tags = "评论审核")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/comment/center")
|
@RequestMapping("/comment/center")
|
||||||
public class CommentController {
|
public class CommentController {
|
||||||
|
|
|
@ -40,6 +40,7 @@ public class SysNoticeEntity extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 发送状态 0:草稿 1:已发布
|
* 发送状态 0:草稿 1:已发布
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "`status`")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
/**
|
/**
|
||||||
* 发送者
|
* 发送者
|
||||||
|
@ -68,5 +69,6 @@ public class SysNoticeEntity extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 通知来源 (通知、评论、其他)
|
* 通知来源 (通知、评论、其他)
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "`from`")
|
||||||
private String from;
|
private String from;
|
||||||
}
|
}
|
|
@ -86,7 +86,9 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void save(SysNoticeDTO dto) {
|
public void save(SysNoticeDTO dto) {
|
||||||
SysNoticeEntity entity = ConvertUtils.sourceToTarget(dto, SysNoticeEntity.class);
|
SysNoticeEntity entity = ConvertUtils.sourceToTarget(dto, SysNoticeEntity.class);
|
||||||
|
if (StringUtils.isEmpty(entity.getFrom())) {
|
||||||
entity.setFrom("其它"); // 站内信通知来源 (通知、评论、其它)
|
entity.setFrom("其它"); // 站内信通知来源 (通知、评论、其它)
|
||||||
|
}
|
||||||
|
|
||||||
//更新发送者信息
|
//更新发送者信息
|
||||||
if (dto.getStatus() == NoticeStatusEnum.SEND.value() && StringUtils.isEmpty(dto.getSenderName())) {
|
if (dto.getStatus() == NoticeStatusEnum.SEND.value() && StringUtils.isEmpty(dto.getSenderName())) {
|
||||||
|
|
Loading…
Reference in New Issue