diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/controller/SysMessageController.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/controller/SysMessageController.java new file mode 100644 index 000000000..7f5b67cf2 --- /dev/null +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/controller/SysMessageController.java @@ -0,0 +1,114 @@ +package cn.stylefeng.roses.kernel.sys.modular.message.controller; + +import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult; +import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest; +import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData; +import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData; +import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource; +import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource; +import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource; +import cn.stylefeng.roses.kernel.sys.modular.message.entity.SysMessage; +import cn.stylefeng.roses.kernel.sys.modular.message.pojo.request.SysMessageRequest; +import cn.stylefeng.roses.kernel.sys.modular.message.service.SysMessageService; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 系统消息控制器 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ +@RestController +@ApiResource(name = "系统消息") +public class SysMessageController { + + @Resource + private SysMessageService sysMessageService; + + /** + * 添加系统消息 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + @PostResource(name = "添加系统消息", path = "/sysMessage/add") + public ResponseData add(@RequestBody @Validated(SysMessageRequest.add.class) SysMessageRequest sysMessageRequest) { + sysMessageService.add(sysMessageRequest); + return new SuccessResponseData<>(); + } + + /** + * 删除系统消息 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + @PostResource(name = "删除系统消息", path = "/sysMessage/delete") + public ResponseData delete(@RequestBody @Validated(SysMessageRequest.delete.class) SysMessageRequest sysMessageRequest) { + sysMessageService.del(sysMessageRequest); + return new SuccessResponseData<>(); + } + + /** + * 批量删除系统消息 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + @PostResource(name = "批量删除系统消息", path = "/sysMessage/batchDelete") + public ResponseData batchDelete(@RequestBody @Validated(BaseRequest.batchDelete.class) SysMessageRequest sysMessageRequest) { + sysMessageService.batchDelete(sysMessageRequest); + return new SuccessResponseData<>(); + } + + /** + * 编辑系统消息 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + @PostResource(name = "编辑系统消息", path = "/sysMessage/edit") + public ResponseData edit(@RequestBody @Validated(SysMessageRequest.edit.class) SysMessageRequest sysMessageRequest) { + sysMessageService.edit(sysMessageRequest); + return new SuccessResponseData<>(); + } + + /** + * 查看系统消息详情 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + @GetResource(name = "查看系统消息详情", path = "/sysMessage/detail") + public ResponseData detail(@Validated(SysMessageRequest.detail.class) SysMessageRequest sysMessageRequest) { + return new SuccessResponseData<>(sysMessageService.detail(sysMessageRequest)); + } + + /** + * 获取系统消息列表 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + @GetResource(name = "获取系统消息列表", path = "/sysMessage/list") + public ResponseData> list(SysMessageRequest sysMessageRequest) { + return new SuccessResponseData<>(sysMessageService.findList(sysMessageRequest)); + } + + /** + * 获取系统消息列表(带分页) + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + @GetResource(name = "获取系统消息列表(带分页)", path = "/sysMessage/page") + public ResponseData> page(SysMessageRequest sysMessageRequest) { + return new SuccessResponseData<>(sysMessageService.findPage(sysMessageRequest)); + } + +} diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/entity/SysMessage.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/entity/SysMessage.java new file mode 100644 index 000000000..593d63b35 --- /dev/null +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/entity/SysMessage.java @@ -0,0 +1,113 @@ +package cn.stylefeng.roses.kernel.sys.modular.message.entity; + +import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseBusinessEntity; +import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 系统消息实例类 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ +@TableName("sys_message") +@Data +@EqualsAndHashCode(callSuper = true) +public class SysMessage extends BaseBusinessEntity { + + /** + * 主键 + */ + @TableId(value = "message_id", type = IdType.ASSIGN_ID) + @ChineseDescription("主键") + private Long messageId; + + /** + * 接收用户id + */ + @TableField("receive_user_id") + @ChineseDescription("接收用户id") + private Long receiveUserId; + + /** + * 发送用户id + */ + @TableField("send_user_id") + @ChineseDescription("发送用户id") + private Long sendUserId; + + /** + * 消息标题 + */ + @TableField("message_title") + @ChineseDescription("消息标题") + private String messageTitle; + + /** + * 消息内容 + */ + @TableField("message_content") + @ChineseDescription("消息内容") + private String messageContent; + + /** + * 消息类型:NORMAL-普通类型,URL-带链接跳转 + */ + @TableField("message_type") + @ChineseDescription("消息类型:NORMAL-普通类型,URL-带链接跳转") + private String messageType; + + /** + * 消息跳转的URL + */ + @TableField("message_url") + @ChineseDescription("消息跳转的URL") + private String messageUrl; + + /** + * 优先级:high-高优先级,middle-中,low-低 + */ + @TableField("priority_level") + @ChineseDescription("优先级:high-高优先级,middle-中,low-低") + private String priorityLevel; + + /** + * 消息发送时间 + */ + @TableField("message_send_time") + @ChineseDescription("消息发送时间") + private Date messageSendTime; + + /** + * 关联业务id + */ + @TableField("business_id") + @ChineseDescription("关联业务id") + private String businessId; + + /** + * 业务类型(根据业务id和业务类型可以确定业务数据) + */ + @TableField("business_type") + @ChineseDescription("业务类型(根据业务id和业务类型可以确定业务数据)") + private String businessType; + + /** + * 阅读状态:0-未读,1-已读 + */ + @TableField("read_flag") + @ChineseDescription("阅读状态:0-未读,1-已读") + private Integer readFlag; + + /** + * 租户号 + */ + @TableField(value = "tenant_id", fill = FieldFill.INSERT) + @ChineseDescription("租户号") + private Long tenantId; + +} diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/enums/SysMessageExceptionEnum.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/enums/SysMessageExceptionEnum.java new file mode 100644 index 000000000..978d21125 --- /dev/null +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/enums/SysMessageExceptionEnum.java @@ -0,0 +1,36 @@ +package cn.stylefeng.roses.kernel.sys.modular.message.enums; + +import cn.stylefeng.roses.kernel.rule.constants.RuleConstants; +import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum; +import lombok.Getter; + +/** + * 系统消息异常相关枚举 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ +@Getter +public enum SysMessageExceptionEnum implements AbstractExceptionEnum { + + /** + * 查询结果不存在 + */ + SYS_MESSAGE_NOT_EXISTED(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10001", "查询结果不存在"); + + /** + * 错误编码 + */ + private final String errorCode; + + /** + * 提示用户信息 + */ + private final String userTip; + + SysMessageExceptionEnum(String errorCode, String userTip) { + this.errorCode = errorCode; + this.userTip = userTip; + } + +} diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/mapper/SysMessageMapper.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/mapper/SysMessageMapper.java new file mode 100644 index 000000000..dc6803575 --- /dev/null +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/mapper/SysMessageMapper.java @@ -0,0 +1,28 @@ +package cn.stylefeng.roses.kernel.sys.modular.message.mapper; + +import cn.stylefeng.roses.kernel.sys.modular.message.entity.SysMessage; +import cn.stylefeng.roses.kernel.sys.modular.message.pojo.request.SysMessageRequest; +import cn.stylefeng.roses.kernel.sys.modular.message.pojo.response.SysMessageVo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 系统消息 Mapper 接口 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ +public interface SysMessageMapper extends BaseMapper { + + /** + * 获取自定义查询列表 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + List customFindList(@Param("page") Page page, @Param("param")SysMessageRequest request); + +} diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/mapper/mapping/SysMessageMapper.xml b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/mapper/mapping/SysMessageMapper.xml new file mode 100644 index 000000000..e5e93189a --- /dev/null +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/mapper/mapping/SysMessageMapper.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + message_id,receive_user_id,send_user_id,message_title,message_content,message_type,message_url,priority_level,message_send_time,business_id,business_type,read_flag,version_flag,del_flag,create_user,create_time,update_user,update_time,tenant_id + + + + + + + + diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/pojo/request/SysMessageRequest.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/pojo/request/SysMessageRequest.java new file mode 100644 index 000000000..e74ceb5e8 --- /dev/null +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/pojo/request/SysMessageRequest.java @@ -0,0 +1,126 @@ +package cn.stylefeng.roses.kernel.sys.modular.message.pojo.request; + +import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription; +import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * 系统消息封装类 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class SysMessageRequest extends BaseRequest { + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = {edit.class, delete.class}) + @ChineseDescription("主键") + private Long messageId; + + /** + * 接收用户id + */ + @NotNull(message = "接收用户id不能为空", groups = {add.class, edit.class}) + @ChineseDescription("接收用户id") + private Long receiveUserId; + + /** + * 发送用户id + */ + @ChineseDescription("发送用户id") + private Long sendUserId; + + /** + * 消息标题 + */ + @NotBlank(message = "消息标题不能为空", groups = {add.class, edit.class}) + @ChineseDescription("消息标题") + private String messageTitle; + + /** + * 消息内容 + */ + @ChineseDescription("消息内容") + private String messageContent; + + /** + * 消息类型:NORMAL-普通类型,URL-带链接跳转 + */ + @NotBlank(message = "消息类型:NORMAL-普通类型,URL-带链接跳转不能为空", groups = {add.class, edit.class}) + @ChineseDescription("消息类型:NORMAL-普通类型,URL-带链接跳转") + private String messageType; + + /** + * 消息跳转的URL + */ + @ChineseDescription("消息跳转的URL") + private String messageUrl; + + /** + * 优先级:high-高优先级,middle-中,low-低 + */ + @NotBlank(message = "优先级:high-高优先级,middle-中,low-低不能为空", groups = {add.class, edit.class}) + @ChineseDescription("优先级:high-高优先级,middle-中,low-低") + private String priorityLevel; + + /** + * 消息发送时间 + */ + @ChineseDescription("消息发送时间") + private String messageSendTime; + + /** + * 关联业务id + */ + @ChineseDescription("关联业务id") + private String businessId; + + /** + * 业务类型(根据业务id和业务类型可以确定业务数据) + */ + @ChineseDescription("业务类型(根据业务id和业务类型可以确定业务数据)") + private String businessType; + + /** + * 阅读状态:0-未读,1-已读 + */ + @ChineseDescription("阅读状态:0-未读,1-已读") + private Integer readFlag; + + /** + * 乐观锁 + */ + @ChineseDescription("乐观锁") + private Long versionFlag; + + /** + * 是否删除:Y-被删除,N-未删除 + */ + @NotBlank(message = "是否删除:Y-被删除,N-未删除不能为空", groups = {add.class, edit.class}) + @ChineseDescription("是否删除:Y-被删除,N-未删除") + private String delFlag; + + /** + * 租户号 + */ + @ChineseDescription("租户号") + private Long tenantId; + + + /** + * 批量删除用的id集合 + */ + @NotNull(message = "批量删除id集合不能为空", groups = batchDelete.class) + @ChineseDescription("批量删除用的id集合") + private List batchDeleteIdList; + +} diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/pojo/response/SysMessageVo.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/pojo/response/SysMessageVo.java new file mode 100644 index 000000000..fee94895f --- /dev/null +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/pojo/response/SysMessageVo.java @@ -0,0 +1,17 @@ +package cn.stylefeng.roses.kernel.sys.modular.message.pojo.response; + +import cn.stylefeng.roses.kernel.sys.modular.message.entity.SysMessage; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 系统消息返回值封装 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class SysMessageVo extends SysMessage { + +} diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/service/SysMessageService.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/service/SysMessageService.java new file mode 100644 index 000000000..d47253249 --- /dev/null +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/service/SysMessageService.java @@ -0,0 +1,83 @@ +package cn.stylefeng.roses.kernel.sys.modular.message.service; + +import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult; +import cn.stylefeng.roses.kernel.sys.modular.message.entity.SysMessage; +import cn.stylefeng.roses.kernel.sys.modular.message.pojo.request.SysMessageRequest; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * 系统消息服务类 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ +public interface SysMessageService extends IService { + + /** + * 新增系统消息 + * + * @param sysMessageRequest 请求参数 + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + void add(SysMessageRequest sysMessageRequest); + + /** + * 删除系统消息 + * + * @param sysMessageRequest 请求参数 + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + void del(SysMessageRequest sysMessageRequest); + + /** + * 批量删除系统消息 + * + * @param sysMessageRequest 请求参数 + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + void batchDelete(SysMessageRequest sysMessageRequest); + + /** + * 编辑系统消息 + * + * @param sysMessageRequest 请求参数 + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + void edit(SysMessageRequest sysMessageRequest); + + /** + * 查询详情系统消息 + * + * @param sysMessageRequest 请求参数 + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + SysMessage detail(SysMessageRequest sysMessageRequest); + + /** + * 获取系统消息列表 + * + * @param sysMessageRequest 请求参数 + * @return List 返回结果 + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + List findList(SysMessageRequest sysMessageRequest); + + /** + * 获取系统消息分页列表 + * + * @param sysMessageRequest 请求参数 + * @return PageResult 返回结果 + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + PageResult findPage(SysMessageRequest sysMessageRequest); + +} diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/service/impl/SysMessageServiceImpl.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/service/impl/SysMessageServiceImpl.java new file mode 100644 index 000000000..1c7e79d24 --- /dev/null +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/service/impl/SysMessageServiceImpl.java @@ -0,0 +1,133 @@ +package cn.stylefeng.roses.kernel.sys.modular.message.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.stylefeng.roses.kernel.db.api.factory.PageFactory; +import cn.stylefeng.roses.kernel.db.api.factory.PageResultFactory; +import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult; +import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException; +import cn.stylefeng.roses.kernel.sys.modular.message.entity.SysMessage; +import cn.stylefeng.roses.kernel.sys.modular.message.enums.SysMessageExceptionEnum; +import cn.stylefeng.roses.kernel.sys.modular.message.mapper.SysMessageMapper; +import cn.stylefeng.roses.kernel.sys.modular.message.pojo.request.SysMessageRequest; +import cn.stylefeng.roses.kernel.sys.modular.message.service.SysMessageService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 系统消息业务实现层 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ +@Service +public class SysMessageServiceImpl extends ServiceImpl implements SysMessageService { + + @Override + public void add(SysMessageRequest sysMessageRequest) { + SysMessage sysMessage = new SysMessage(); + BeanUtil.copyProperties(sysMessageRequest, sysMessage); + this.save(sysMessage); + } + + @Override + public void del(SysMessageRequest sysMessageRequest) { + SysMessage sysMessage = this.querySysMessage(sysMessageRequest); + this.removeById(sysMessage.getMessageId()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void batchDelete(SysMessageRequest sysMessageRequest) { + this.removeByIds(sysMessageRequest.getBatchDeleteIdList()); + } + + @Override + public void edit(SysMessageRequest sysMessageRequest) { + SysMessage sysMessage = this.querySysMessage(sysMessageRequest); + BeanUtil.copyProperties(sysMessageRequest, sysMessage); + this.updateById(sysMessage); + } + + @Override + public SysMessage detail(SysMessageRequest sysMessageRequest) { + return this.querySysMessage(sysMessageRequest); + } + + @Override + public PageResult findPage(SysMessageRequest sysMessageRequest) { + LambdaQueryWrapper wrapper = createWrapper(sysMessageRequest); + Page pageList = this.page(PageFactory.defaultPage(), wrapper); + return PageResultFactory.createPageResult(pageList); + } + + @Override + public List findList(SysMessageRequest sysMessageRequest) { + LambdaQueryWrapper wrapper = this.createWrapper(sysMessageRequest); + return this.list(wrapper); + } + + /** + * 获取信息 + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + private SysMessage querySysMessage(SysMessageRequest sysMessageRequest) { + SysMessage sysMessage = this.getById(sysMessageRequest.getMessageId()); + if (ObjectUtil.isEmpty(sysMessage)) { + throw new ServiceException(SysMessageExceptionEnum.SYS_MESSAGE_NOT_EXISTED); + } + return sysMessage; + } + + /** + * 创建查询wrapper + * + * @author fengshuonan + * @since 2024/01/12 17:31 + */ + private LambdaQueryWrapper createWrapper(SysMessageRequest sysMessageRequest) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + + Long messageId = sysMessageRequest.getMessageId(); + Long receiveUserId = sysMessageRequest.getReceiveUserId(); + Long sendUserId = sysMessageRequest.getSendUserId(); + String messageTitle = sysMessageRequest.getMessageTitle(); + String messageContent = sysMessageRequest.getMessageContent(); + String messageType = sysMessageRequest.getMessageType(); + String messageUrl = sysMessageRequest.getMessageUrl(); + String priorityLevel = sysMessageRequest.getPriorityLevel(); + String messageSendTime = sysMessageRequest.getMessageSendTime(); + String businessId = sysMessageRequest.getBusinessId(); + String businessType = sysMessageRequest.getBusinessType(); + Integer readFlag = sysMessageRequest.getReadFlag(); + Long versionFlag = sysMessageRequest.getVersionFlag(); + String delFlag = sysMessageRequest.getDelFlag(); + Long tenantId = sysMessageRequest.getTenantId(); + + queryWrapper.eq(ObjectUtil.isNotNull(messageId), SysMessage::getMessageId, messageId); + queryWrapper.eq(ObjectUtil.isNotNull(receiveUserId), SysMessage::getReceiveUserId, receiveUserId); + queryWrapper.eq(ObjectUtil.isNotNull(sendUserId), SysMessage::getSendUserId, sendUserId); + queryWrapper.like(ObjectUtil.isNotEmpty(messageTitle), SysMessage::getMessageTitle, messageTitle); + queryWrapper.like(ObjectUtil.isNotEmpty(messageContent), SysMessage::getMessageContent, messageContent); + queryWrapper.like(ObjectUtil.isNotEmpty(messageType), SysMessage::getMessageType, messageType); + queryWrapper.like(ObjectUtil.isNotEmpty(messageUrl), SysMessage::getMessageUrl, messageUrl); + queryWrapper.like(ObjectUtil.isNotEmpty(priorityLevel), SysMessage::getPriorityLevel, priorityLevel); + queryWrapper.eq(ObjectUtil.isNotNull(messageSendTime), SysMessage::getMessageSendTime, messageSendTime); + queryWrapper.like(ObjectUtil.isNotEmpty(businessId), SysMessage::getBusinessId, businessId); + queryWrapper.like(ObjectUtil.isNotEmpty(businessType), SysMessage::getBusinessType, businessType); + queryWrapper.eq(ObjectUtil.isNotNull(readFlag), SysMessage::getReadFlag, readFlag); + queryWrapper.eq(ObjectUtil.isNotNull(versionFlag), SysMessage::getVersionFlag, versionFlag); + queryWrapper.like(ObjectUtil.isNotEmpty(delFlag), SysMessage::getDelFlag, delFlag); + queryWrapper.eq(ObjectUtil.isNotNull(tenantId), SysMessage::getTenantId, tenantId); + + return queryWrapper; + } + +}