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