|
|
@ -1,12 +1,14 @@ |
|
|
package com.zdxt.enforcementcode.controller.app.enforcement; |
|
|
package com.zdxt.enforcementcode.controller.app.enforcement; |
|
|
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaIgnore; |
|
|
import cn.dev33.satoken.annotation.SaIgnore; |
|
|
|
|
|
import com.zdxt.enforcementcode.common.commonenum.MsgSourceTypeEnum; |
|
|
import com.zdxt.enforcementcode.domain.bo.EfcodeCpNoticeBo; |
|
|
import com.zdxt.enforcementcode.domain.bo.EfcodeCpNoticeBo; |
|
|
import com.zdxt.enforcementcode.domain.bo.EfcodeCpNoticeMessageBo; |
|
|
import com.zdxt.enforcementcode.domain.bo.EfcodeCpNoticeMessageBo; |
|
|
import com.zdxt.enforcementcode.domain.vo.EfcodeCpNoticeMessageVo; |
|
|
import com.zdxt.enforcementcode.domain.vo.EfcodeCpNoticeMessageVo; |
|
|
import com.zdxt.enforcementcode.domain.vo.EfcodeCpNoticeVo; |
|
|
import com.zdxt.enforcementcode.domain.vo.EfcodeCpNoticeVo; |
|
|
import com.zdxt.enforcementcode.service.IEfcodeCpNoticeMessageService; |
|
|
import com.zdxt.enforcementcode.service.IEfcodeCpNoticeMessageService; |
|
|
import com.zdxt.enforcementcode.service.IEfcodeCpNoticeService; |
|
|
import com.zdxt.enforcementcode.service.IEfcodeCpNoticeService; |
|
|
|
|
|
import com.zdxt.enforcementcode.service.ISysMessageViewLogService; |
|
|
import jakarta.validation.constraints.NotBlank; |
|
|
import jakarta.validation.constraints.NotBlank; |
|
|
import jakarta.validation.constraints.NotEmpty; |
|
|
import jakarta.validation.constraints.NotEmpty; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
@ -14,6 +16,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
import org.dromara.common.core.domain.R; |
|
|
import org.dromara.common.core.domain.R; |
|
|
import org.dromara.common.mybatis.core.page.PageQuery; |
|
|
import org.dromara.common.mybatis.core.page.PageQuery; |
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
@ -33,7 +36,8 @@ public class AppEnfCpNoticeController { |
|
|
|
|
|
|
|
|
private final IEfcodeCpNoticeService efcodeCpNoticeService; |
|
|
private final IEfcodeCpNoticeService efcodeCpNoticeService; |
|
|
private final IEfcodeCpNoticeMessageService efcodeCpNoticeMessageService; |
|
|
private final IEfcodeCpNoticeMessageService efcodeCpNoticeMessageService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private ISysMessageViewLogService sysMessageViewLogService; |
|
|
/** |
|
|
/** |
|
|
* 查询我的预告列表(分页,只返回当前用户创建的预告) |
|
|
* 查询我的预告列表(分页,只返回当前用户创建的预告) |
|
|
* 通过status区分tab:0=草稿, 1=待执法(已发布), 3=历史(已执行) |
|
|
* 通过status区分tab:0=草稿, 1=待执法(已发布), 3=历史(已执行) |
|
|
@ -44,6 +48,11 @@ public class AppEnfCpNoticeController { |
|
|
return efcodeCpNoticeService.queryMyPageList(bo, pageQuery); |
|
|
return efcodeCpNoticeService.queryMyPageList(bo, pageQuery); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@SaIgnore |
|
|
|
|
|
@GetMapping("/noticeList") |
|
|
|
|
|
public TableDataInfo<EfcodeCpNoticeVo> noticeList(EfcodeCpNoticeBo bo, PageQuery pageQuery) { |
|
|
|
|
|
return efcodeCpNoticeService.queryMyPageList(bo, pageQuery); |
|
|
|
|
|
} |
|
|
/** |
|
|
/** |
|
|
* 获取预告详情 |
|
|
* 获取预告详情 |
|
|
*/ |
|
|
*/ |
|
|
@ -119,4 +128,22 @@ public class AppEnfCpNoticeController { |
|
|
efcodeCpNoticeMessageService.deleteWithValidByIds(List.of(ids), false); |
|
|
efcodeCpNoticeMessageService.deleteWithValidByIds(List.of(ids), false); |
|
|
return R.ok(); |
|
|
return R.ok(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 预告消息查看后置已读 |
|
|
|
|
|
*/ |
|
|
|
|
|
@SaIgnore |
|
|
|
|
|
@GetMapping("/messageRead") |
|
|
|
|
|
public R<Void> messageRead(String noticeId) { |
|
|
|
|
|
Boolean flag= efcodeCpNoticeService.updateEnfIsRead(noticeId); |
|
|
|
|
|
if(!flag){ |
|
|
|
|
|
return R.fail("修改任务状态为已读失败!"); |
|
|
|
|
|
} |
|
|
|
|
|
// 插入查看记录(调用公共方法)
|
|
|
|
|
|
if (flag != null) { |
|
|
|
|
|
sysMessageViewLogService.insertViewLog(noticeId, MsgSourceTypeEnum.ZFYG.getKey()); |
|
|
|
|
|
} |
|
|
|
|
|
return R.ok(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|