初始化
This commit is contained in:
28
smart-fishery-port-message/pom.xml
Normal file
28
smart-fishery-port-message/pom.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.ltgk</groupId>
|
||||
<artifactId>smart-fishery-port-server</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<artifactId>smart-fishery-port-message</artifactId>
|
||||
|
||||
<description>
|
||||
公众信息模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ltgk</groupId>
|
||||
<artifactId>smart-fishery-port-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ltgk</groupId>
|
||||
<artifactId>smart-fishery-port-system</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,169 @@
|
||||
package com.ltgk.message.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ltgk.common.annotation.Log;
|
||||
import com.ltgk.common.core.controller.BaseController;
|
||||
import com.ltgk.common.core.domain.AjaxResult;
|
||||
import com.ltgk.common.core.page.TableDataInfo;
|
||||
import com.ltgk.common.enums.BusinessType;
|
||||
import com.ltgk.common.utils.SecurityUtils;
|
||||
import com.ltgk.common.utils.StringUtils;
|
||||
import com.ltgk.common.utils.poi.ExcelUtil;
|
||||
import com.ltgk.common.validation.groups.Add;
|
||||
import com.ltgk.common.validation.groups.Detail;
|
||||
import com.ltgk.common.validation.groups.Update;
|
||||
import com.ltgk.message.domain.entity.PushAppLog;
|
||||
import com.ltgk.message.service.IPushAppLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* APP推送日志 (PushAppLog) Controller控制器
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/fishingPort/pushAppLog")
|
||||
@Api(tags = "APP推送日志")
|
||||
public class PushAppLogController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private IPushAppLogService pushAppLogService;
|
||||
|
||||
/**
|
||||
* 分页查询APP推送日志列表
|
||||
*
|
||||
* @param req: APP推送日志 实体对象
|
||||
* @return com.ltgk.common.core.page.TableDataInfo
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
@ApiOperation(value = "分页查询APP推送日志列表")
|
||||
public TableDataInfo page(@RequestBody PushAppLog req) {
|
||||
LambdaQueryWrapper<PushAppLog> wrapper = getLambdaQueryWrapperByReq(req);
|
||||
wrapper.orderByDesc(PushAppLog::getNoticeContent);
|
||||
startPage(req.getPageNum(), req.getPageSize());
|
||||
List<PushAppLog> list = pushAppLogService.list(wrapper);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取APP推送日志详细数据
|
||||
*
|
||||
* @param req: APP推送日志 实体对象
|
||||
* @return com.ltgk.common.core.domain.AjaxResult
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
@PostMapping(value = "/detail")
|
||||
@ApiOperation(value = "获取APP推送日志详细数据")
|
||||
public AjaxResult detail(@Validated(Detail.class) @RequestBody PushAppLog req) {
|
||||
return AjaxResult.success(pushAppLogService.getById(req.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增APP推送日志数据
|
||||
* 接口权限: fishingPort:pushAppLog:add
|
||||
*
|
||||
* @param pushAppLog: APP推送日志实体对象
|
||||
* @return com.ltgk.common.core.domain.AjaxResult
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
@Log(title = "新增APP推送日志数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "新增APP推送日志数据")
|
||||
public AjaxResult add(@Validated(Add.class) @RequestBody PushAppLog pushAppLog) {
|
||||
String userName = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
pushAppLog.setCreateBy(userName)
|
||||
.setCreateAt(new Date())
|
||||
.setUpdateBy(userName)
|
||||
.setUpdateAt(new Date());
|
||||
return toAjax(pushAppLogService.save(pushAppLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改APP推送日志数据
|
||||
* 接口权限: fishingPort:pushAppLog:edit
|
||||
*
|
||||
* @param pushAppLog: APP推送日志实体对象
|
||||
* @return com.ltgk.common.core.domain.AjaxResult
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
@Log(title = "修改APP推送日志", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value = "修改APP推送日志数据")
|
||||
public AjaxResult edit(@Validated(Update.class) @RequestBody PushAppLog pushAppLog) {
|
||||
String userName = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
pushAppLog.setUpdateBy(userName)
|
||||
.setUpdateAt(new Date());
|
||||
return toAjax(pushAppLogService.updateById(pushAppLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除APP推送日志数据
|
||||
* 接口权限: fishingPort:pushAppLog:remove
|
||||
*
|
||||
* @param req: APP推送日志 实体对象
|
||||
* @return com.ltgk.common.core.domain.AjaxResult
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
@Log(title = "删除APP推送日志数据", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation(value = "删除APP推送日志数据")
|
||||
public AjaxResult delete(@Validated(Detail.class) @RequestBody PushAppLog req) {
|
||||
return toAjax(pushAppLogService.removeById(req.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出APP推送日志数据
|
||||
* 接口权限: fishingPort:pushAppLog:export
|
||||
*
|
||||
* @param response:
|
||||
* @param req: APP推送日志 实体对象
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
@Log(title = "导出APP推送日志数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ApiOperation(value = "导出APP推送日志数据")
|
||||
public void export(HttpServletResponse response, PushAppLog req) {
|
||||
LambdaQueryWrapper<PushAppLog> wrapper = getLambdaQueryWrapperByReq(req);
|
||||
List<PushAppLog> list = pushAppLogService.list(wrapper);
|
||||
ExcelUtil<PushAppLog> util = new ExcelUtil<>(PushAppLog.class);
|
||||
util.exportExcel(response, list, "APP推送日志数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据请求参数转换成 LambdaQueryWrapper
|
||||
*
|
||||
* @param req: APP推送日志 实体对象
|
||||
* @return com.ltgk.common.core.page.TableDataInfo
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
private static LambdaQueryWrapper<PushAppLog> getLambdaQueryWrapperByReq(PushAppLog req) {
|
||||
req.queryCheck();
|
||||
String startTime = req.getStartTime();
|
||||
String endTime = req.getEndTime();
|
||||
boolean beNotBlankTime = StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime);
|
||||
return new LambdaQueryWrapper<>(req)
|
||||
.between(beNotBlankTime, PushAppLog::getUpdateAt, startTime, endTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ltgk.message.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.ltgk.common.core.page.BasePage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 下发消息请求参数
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/06 11:22:36
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GetMessageListReq extends BasePage {
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonProperty("startTime")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonProperty("endTime")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "消息类型 -- 需根据消息类型枚举类来进行查询")
|
||||
@JsonProperty("messageType")
|
||||
private Integer messageType;
|
||||
|
||||
@ApiModelProperty(value = "消息等级 1:紧急,2:平急,3:一般")
|
||||
@JsonProperty("messageLevel")
|
||||
private Integer messageLevel;
|
||||
|
||||
@ApiModelProperty(value = "0-未发布,1-已发布,2-已撤回")
|
||||
@JsonProperty("publishState")
|
||||
private Integer publishState;
|
||||
|
||||
@ApiModelProperty(value = "收发消息 1:发送的,2:接收的")
|
||||
@JsonProperty("sendOrReceive")
|
||||
private Integer sendOrReceive;
|
||||
|
||||
@ApiModelProperty(value = "消息状态 0:未读,1:已读,2:已下发")
|
||||
@JsonProperty("state")
|
||||
private Integer state;
|
||||
|
||||
@ApiModelProperty(value = "接收单位id 查询已发送时使用")
|
||||
@JsonProperty("receiveDeptId")
|
||||
private String receiveDeptId;
|
||||
|
||||
@ApiModelProperty(value = "发送单位id 查询已接收时使用")
|
||||
@JsonProperty("sendDeptId")
|
||||
private String sendDeptId;
|
||||
|
||||
@ApiModelProperty(value = "单位模糊查询 接收发送都共同使用这个字段")
|
||||
@JsonProperty("deptName")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty(value = "接收人")
|
||||
@JsonProperty("recipients")
|
||||
private String recipients;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ltgk.message.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.ltgk.common.core.page.BasePage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 查询发送消息状态列表请求参数列表
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/06 13:22:36
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GetSendMessageStateReq extends BasePage {
|
||||
|
||||
@ApiModelProperty(value = "消息id")
|
||||
@JsonProperty("messageId")
|
||||
private String messageId;
|
||||
|
||||
@ApiModelProperty(value = "状态 0未读 1已读")
|
||||
@JsonProperty("state")
|
||||
private Integer state;
|
||||
|
||||
@ApiModelProperty(value = "查询是不是已回复 1查询已回复的 默认不传")
|
||||
@JsonProperty("replaceType")
|
||||
private Integer replaceType = 0;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ltgk.message.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 下发消息请求参数
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/03 14:59:36
|
||||
*/
|
||||
@Data
|
||||
public class IssuedMessageReq {
|
||||
|
||||
@ApiModelProperty(value = "消息log id")
|
||||
@JsonProperty("messageLogId")
|
||||
private String messageLogId;
|
||||
|
||||
@ApiModelProperty(value = "接收部门id集合")
|
||||
@JsonProperty("receiveDepartIds")
|
||||
private List<String> receiveDepartIdList;
|
||||
|
||||
@ApiModelProperty("接收人uid集合")
|
||||
@JsonProperty("receiveUserIds")
|
||||
private List<String> receiveUserIdList;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ltgk.message.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 阅读消息请求参数
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/02 10:43:36
|
||||
*/
|
||||
@Data
|
||||
public class ReadMessageReq {
|
||||
|
||||
@ApiModelProperty(value = "消息log id")
|
||||
@JsonProperty("messageLogIdList")
|
||||
@NotNull(message = "消息log id不能为空")
|
||||
private List<String> messageLogIdList;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ltgk.message.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 回复消息
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/06 14:22:36
|
||||
*/
|
||||
@Data
|
||||
public class ReplaceMessageReq {
|
||||
|
||||
@NotBlank(message = "messageLogId不能为空")
|
||||
@ApiModelProperty(value = "消息日志id")
|
||||
@JsonProperty("messageLogId")
|
||||
private String messageLogId;
|
||||
|
||||
@NotBlank(message = "回复内容不能为空")
|
||||
@ApiModelProperty(value = "回复内容")
|
||||
@JsonProperty("content")
|
||||
private String content;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ltgk.message.domain.dto;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发送消息请求参数
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/02 08:59:36
|
||||
*/
|
||||
@Data
|
||||
public class SendMessageReq {
|
||||
|
||||
@NotBlank(message = "标题不能为空")
|
||||
@ApiModelProperty("消息标题")
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
@NotBlank(message = "消息内容不能为空")
|
||||
@ApiModelProperty("消息内容")
|
||||
@JsonProperty("content")
|
||||
private String content;
|
||||
|
||||
@NotNull(message = "消息等级不能为空")
|
||||
@ApiModelProperty("消息等级 1:紧急,2:平急,3:一般")
|
||||
@JsonProperty("messageLevel")
|
||||
private Integer messageLevel;
|
||||
|
||||
@ApiModelProperty("消息附件url")
|
||||
@JsonProperty("fileId")
|
||||
private String fileId;
|
||||
|
||||
@ApiModelProperty("消息附件名称")
|
||||
@JsonProperty("fileName")
|
||||
private String fileName;
|
||||
|
||||
@NotNull(message = "消息等级不能为空")
|
||||
@ApiModelProperty("消息类型 1:信息公示,2:工作寻呼")
|
||||
@JsonProperty("messageType")
|
||||
private Integer messageType;
|
||||
|
||||
@ApiModelProperty("接收部门id集合")
|
||||
@JsonProperty("receiveDepartIds")
|
||||
private List<String> receiveDepartIdList;
|
||||
|
||||
@ApiModelProperty("封面图片id")
|
||||
@JsonProperty("coverId")
|
||||
private String coverId;
|
||||
|
||||
@ApiModelProperty("是不是要发送短信验证码")
|
||||
@JsonProperty("isSendMsg")
|
||||
private Boolean isSendMsg = false;
|
||||
|
||||
@ApiModelProperty("接收人uid集合")
|
||||
@JsonProperty("receiveUserIds")
|
||||
private List<String> receiveUserIdList;
|
||||
|
||||
@ApiModelProperty(value = "行政区域编码")
|
||||
private String areaCode;
|
||||
|
||||
@ApiModelProperty(value = "行政区域名称")
|
||||
private String areaName;
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.ltgk.message.domain.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.ltgk.common.core.page.BasePage;
|
||||
import com.ltgk.common.validation.groups.Detail;
|
||||
import com.ltgk.common.validation.groups.Update;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* APP推送日志 (PushAppLog)实体类
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "push_app_log")
|
||||
@ApiModel(value = "APP推送日志对象", description = "PushAppLog表")
|
||||
public class PushAppLog extends BasePage implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@NotBlank(message = "主键信息不能为空", groups = {Detail.class, Update.class})
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "业务主键")
|
||||
@TableField(value = "business_id")
|
||||
private String businessId;
|
||||
|
||||
@ApiModelProperty(value = "client ID")
|
||||
@TableField(value = "cid", condition = SqlCondition.LIKE)
|
||||
private String cid;
|
||||
|
||||
@ApiModelProperty(value = "通知类型")
|
||||
@TableField(value = "notice_type", condition = SqlCondition.LIKE)
|
||||
private String noticeType;
|
||||
|
||||
@ApiModelProperty(value = "通知名称")
|
||||
@TableField(value = "notice_name", condition = SqlCondition.LIKE)
|
||||
private String noticeName;
|
||||
|
||||
@ApiModelProperty(value = "通知内容")
|
||||
@TableField(value = "notice_content", condition = SqlCondition.LIKE)
|
||||
private String noticeContent;
|
||||
|
||||
@ApiModelProperty(value = "通知时间")
|
||||
@TableField(value = "notice_time")
|
||||
private Date noticeTime;
|
||||
|
||||
@ApiModelProperty(value = "删除标志: 0-未删除, 1-已删除")
|
||||
@TableField(value = "del_flag")
|
||||
@TableLogic(delval = "1", value = "0")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty(value = "行政区域编码")
|
||||
@TableField(value = "area_code")
|
||||
private String areaCode;
|
||||
|
||||
@ApiModelProperty(value = "行政区域名称")
|
||||
@TableField(value = "area_name")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField(value = "create_at")
|
||||
private Date createAt;
|
||||
|
||||
@ApiModelProperty(value = "更新人")
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@TableField(value = "update_at")
|
||||
private Date updateAt;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@TableField(value = "remark")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@TableField(exist = false)
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@TableField(exist = false)
|
||||
private String endTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.ltgk.message.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 消息列表视图
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/06 11:22:36
|
||||
*/
|
||||
@Data
|
||||
public class MessageListVo {
|
||||
|
||||
@ApiModelProperty(value = "消息log id")
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "消息id")
|
||||
@JsonProperty("messageId")
|
||||
private String messageId;
|
||||
|
||||
@ApiModelProperty(value = "发送部门id")
|
||||
@JsonProperty("sendDepartId")
|
||||
private String sendDepartId;
|
||||
|
||||
@ApiModelProperty(value = "接收部门id")
|
||||
@JsonProperty("receiveDepartId")
|
||||
private String receiveDepartId;
|
||||
|
||||
@ApiModelProperty(value = "发送方式 1:直接发送,2:指派下发")
|
||||
@JsonProperty("sendType")
|
||||
private String sendType;
|
||||
|
||||
@ApiModelProperty(value = "消息状态 0:未读,1:已读,2:已下发")
|
||||
@JsonProperty("state")
|
||||
private Integer state;
|
||||
|
||||
@ApiModelProperty(value = "读取用户id")
|
||||
@JsonProperty("readUid")
|
||||
private String readUid;
|
||||
|
||||
@ApiModelProperty(value = "读取时间")
|
||||
@JsonProperty("readTime")
|
||||
private String readTime;
|
||||
|
||||
@ApiModelProperty(value = "下发用户id")
|
||||
@JsonProperty("issuedUid")
|
||||
private String issuedUid;
|
||||
|
||||
@ApiModelProperty(value = "下发时间")
|
||||
@JsonProperty("issuedTime")
|
||||
private String issuedTime;
|
||||
|
||||
@ApiModelProperty(value = "消息标题")
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "消息内容")
|
||||
@JsonProperty("content")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "消息等级 1:紧急,2:平急,3:一般")
|
||||
@JsonProperty("messageLevel")
|
||||
private String messageLevel;
|
||||
|
||||
@ApiModelProperty(value = "附件id")
|
||||
@JsonProperty("fileId")
|
||||
private String fileId;
|
||||
|
||||
@ApiModelProperty(value = "附件名称")
|
||||
@JsonProperty("fileName")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty(value = "消息类型 1:信息公示,2:工作寻呼")
|
||||
@JsonProperty("messageType")
|
||||
private String messageType;
|
||||
|
||||
@ApiModelProperty(value = "发布部门名称")
|
||||
@JsonProperty("sendDepartName")
|
||||
private String sendDepartName;
|
||||
|
||||
@ApiModelProperty(value = "接收部门名称")
|
||||
@JsonProperty("receiveDepartName")
|
||||
private String receiveDepartName;
|
||||
|
||||
@ApiModelProperty(value = "发送时间")
|
||||
@JsonProperty("sendTime")
|
||||
private String sendTime;
|
||||
|
||||
@ApiModelProperty(value = "回复内容")
|
||||
@JsonProperty("replaceContent")
|
||||
private String replaceContent;
|
||||
|
||||
@ApiModelProperty(value = "回复时间")
|
||||
@JsonProperty("replaceTime")
|
||||
private String replaceTime;
|
||||
|
||||
@ApiModelProperty(value = "回复人uid")
|
||||
@JsonProperty("replaceUid")
|
||||
private String replaceUid;
|
||||
|
||||
@ApiModelProperty(value = "封面图片id")
|
||||
@JsonProperty("coverId")
|
||||
private String coverId;
|
||||
|
||||
@ApiModelProperty(value = "接收人uid")
|
||||
@JsonProperty("receiveUid")
|
||||
private String receiveUid;
|
||||
|
||||
@ApiModelProperty(value = "接收人姓名")
|
||||
@JsonProperty("recipients")
|
||||
private String recipients;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ltgk.message.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 消息等级枚举
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/02 10:08:36
|
||||
*/
|
||||
@Getter
|
||||
public enum MessageLevelEnum {
|
||||
EMERGENCY(1, "紧急"),
|
||||
URGENT(2, "平急"),
|
||||
GENERAL(3, "一般");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
MessageLevelEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ltgk.message.enums;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 消息发布状态枚举类
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/16 18:34:47
|
||||
*/
|
||||
|
||||
@Getter
|
||||
public enum MessagePublishStateEnums {
|
||||
/*
|
||||
* 0-未发布,1-已发布,2-已撤回
|
||||
* */
|
||||
UNPUBLISHED(0, "未发布"),
|
||||
PUBLISHED(1, "已发布"),
|
||||
REVOKED(2, "已撤回");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
MessagePublishStateEnums(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ltgk.message.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 消息阅读状态枚举
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/02 10:08:36
|
||||
*/
|
||||
@Getter
|
||||
public enum MessageReadStatusEnum {
|
||||
UNREAD(0, "未读"),
|
||||
READ(1, "已读"),
|
||||
ISSUED(2, "已下发");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
MessageReadStatusEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ltgk.message.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 消息发送方式枚举
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/02 10:06:00
|
||||
*/
|
||||
@Getter
|
||||
public enum MessageSendTypeEnum {
|
||||
DIRECT(1, "直接发送"),
|
||||
ASSIGN(2, "指派下发");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
MessageSendTypeEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.ltgk.message.enums;
|
||||
|
||||
import com.ltgk.common.utils.enums.CodeDescEnumInterface;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 消息分类枚举
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025/01/02 10:00:00
|
||||
*/
|
||||
@Getter
|
||||
public enum MessageTypeEnum implements CodeDescEnumInterface {
|
||||
|
||||
INFORMATION_PUBLICITY(1, "信息公示"),
|
||||
WORK_HUNTING(2, "工作寻呼"),
|
||||
CLIMATIC_METEOROLOGY(3, "气候气象"),
|
||||
TIDAL_HYDROLOGY(4, "潮汐水文"),
|
||||
WATERWAY_BEACONS(5, "航道灯标"),
|
||||
PORT_ACTIVITIES(6, "渔港活动"),
|
||||
MANAGE_NEW_RULES(7, "管理新规"),
|
||||
FESTIVALS(8, "节庆活动"),
|
||||
POLICY_MESSAGES(9, "政策消息"),
|
||||
OTHER(10, "其他");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
MessageTypeEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
private static final Map<Integer, MessageTypeEnum> CODE_MAP = new HashMap<>();
|
||||
static {
|
||||
for (MessageTypeEnum value : values()) {
|
||||
// 保留首个出现的 code,跳过重复值以保持原逻辑
|
||||
if (!CODE_MAP.containsKey(value.code)) {
|
||||
CODE_MAP.put(value.code, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getDescByCode(Integer messageType) {
|
||||
MessageTypeEnum result = CODE_MAP.get(messageType);
|
||||
return result != null ? result.desc : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ltgk.message.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ltgk.message.domain.entity.PushAppLog;
|
||||
|
||||
/**
|
||||
* APP推送日志 (PushAppLog)数据访问层
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
public interface PushAppLogMapper extends BaseMapper<PushAppLog> {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ltgk.message.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ltgk.message.domain.entity.PushAppLog;
|
||||
|
||||
/**
|
||||
* APP推送日志 (PushAppLog)服务层
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
public interface IPushAppLogService extends IService<PushAppLog> {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ltgk.message.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ltgk.message.domain.entity.PushAppLog;
|
||||
import com.ltgk.message.mapper.PushAppLogMapper;
|
||||
import com.ltgk.message.service.IPushAppLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* APP推送日志 (PushAppLog)实现层
|
||||
*
|
||||
* @author Qi ChengBin
|
||||
* @date 2025-05-19
|
||||
*/
|
||||
@Service
|
||||
public class PushAppLogServiceImpl extends ServiceImpl<PushAppLogMapper, PushAppLog> implements IPushAppLogService {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ltgk.message.mapper.PushAppLogMapper">
|
||||
|
||||
<resultMap type="com.ltgk.message.domain.entity.PushAppLog" id="PushAppLogMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="businessId" column="business_id"/>
|
||||
<result property="cid" column="cid"/>
|
||||
<result property="noticeType" column="notice_type"/>
|
||||
<result property="noticeName" column="notice_name"/>
|
||||
<result property="noticeContent" column="notice_content"/>
|
||||
<result property="noticeTime" column="notice_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="areaCode" column="area_code"/>
|
||||
<result property="areaName" column="area_name"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createAt" column="create_at"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateAt" column="update_at"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user