feat: 增加抄送标记未读功能
This commit is contained in:
@@ -66,7 +66,14 @@ public class HrmFlowCcController extends BaseController {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
return toAjax(service.markRead(ccId, userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 标记抄送未读(新增)
|
||||
*/
|
||||
@PostMapping("/{ccId}/unread")
|
||||
public R<Void> unread(@PathVariable Long ccId) {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
return toAjax(service.markUnread(ccId, userId));
|
||||
}
|
||||
@GetMapping("/ping")
|
||||
public R<String> ping(@RequestParam @NotNull String x) {
|
||||
return R.ok(x);
|
||||
|
||||
@@ -27,5 +27,9 @@ public interface IHrmFlowCcService {
|
||||
* 标记已读
|
||||
*/
|
||||
Boolean markRead(Long ccId, Long userId);
|
||||
/**
|
||||
* 标记未读
|
||||
*/
|
||||
Boolean markUnread(Long ccId, Long userId);
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +99,23 @@ public class HrmFlowCcServiceImpl implements IHrmFlowCcService {
|
||||
.eq(HrmFlowCc::getDelFlag, 0)
|
||||
) > 0;
|
||||
}
|
||||
/**
|
||||
* 标记未读
|
||||
*/
|
||||
@Override
|
||||
public Boolean markUnread(Long ccId, Long userId) {
|
||||
if (ccId == null || userId == null) {
|
||||
return false;
|
||||
}
|
||||
return baseMapper.update(
|
||||
null,
|
||||
Wrappers.<HrmFlowCc>lambdaUpdate()
|
||||
.set(HrmFlowCc::getReadFlag, 0)
|
||||
.eq(HrmFlowCc::getCcId, ccId)
|
||||
.eq(HrmFlowCc::getCcUserId, userId)
|
||||
.eq(HrmFlowCc::getDelFlag, 0)
|
||||
) > 0;
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<HrmFlowCc> buildQueryWrapper(HrmFlowCcBo bo) {
|
||||
LambdaQueryWrapper<HrmFlowCc> lqw = Wrappers.lambdaQuery();
|
||||
|
||||
Reference in New Issue
Block a user