Compare commits
2 Commits
044056a7f2
...
5ebff699a2
Author | SHA1 | Date |
---|---|---|
|
5ebff699a2 | |
|
d4e2ec92ac |
|
@ -31,7 +31,6 @@ public class ${originalName}ServiceImpl extends ServiceImpl<${originalName}Mappe
|
|||
*/
|
||||
@Override
|
||||
public PageResult<${originalName}Vo> get${originalName}List(Page<${originalName}> pageParams, ${originalName}Dto dto) {
|
||||
// 分页查询菜单图标
|
||||
IPage<${originalName}> page = baseMapper.selectListByPage(pageParams, dto);
|
||||
|
||||
List<${originalName}Vo> voList = page.getRecords().stream().map(${lowercaseName} -> {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package cn.bunny.dao.entity;
|
||||
package cn.bunny.dao.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
@ -11,6 +11,7 @@ import java.io.Serializable;
|
|||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Schema(name = "BaseEntity", title = "基础信息字段", description = "基础信息字段")
|
||||
public class BaseEntity implements Serializable {
|
||||
|
||||
@Schema(name = "id", title = "唯一标识")
|
||||
|
@ -44,3 +45,4 @@ public class BaseEntity implements Serializable {
|
|||
private Boolean isDeleted;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package cn.bunny.dao.common.entity;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(name = "BaseUserEntity", title = "基础信息字段包含用户信息", description = "基础信息字段包含用户信息")
|
||||
public class BaseUserEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
private String createUsername;
|
||||
|
||||
@Schema(name = "nickname", title = "昵称")
|
||||
private String updateUsername;
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package cn.bunny.dao.common.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(name = "BaseVo", title = "基础返回对象内容包含用户信息", description = "基础返回对象内容包含用户信息")
|
||||
public class BaseUserVo extends BaseVo {
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
private String createUsername;
|
||||
|
||||
@Schema(name = "nickname", title = "昵称")
|
||||
private String updateUsername;
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package cn.bunny.dao.vo.common;
|
||||
package cn.bunny.dao.common.vo;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.bunny.dao.vo.common;
|
||||
package cn.bunny.dao.common.vo;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
@ -29,3 +29,4 @@ public class I18nTypeAddDto {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package cn.bunny.dao.dto.i18n;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "I18nTypeDto对象", title = "多语言类型", description = "多语言类型")
|
||||
public class I18nTypeDto {
|
||||
|
||||
@Schema(name = "typeName", title = "多语言类型(比如zh,en)")
|
||||
private String typeName;
|
||||
|
||||
@Schema(name = "summary", title = "名称解释(比如中文,英文)")
|
||||
private String summary;
|
||||
|
||||
}
|
|
@ -14,7 +14,7 @@ import java.util.List;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "MessageAddDto对象", title = "系统消息", description = "系统消息")
|
||||
@Schema(name = "MessageAddDto对象", title = "添加系统消息", description = "添加系统消息")
|
||||
public class MessageAddDto {
|
||||
|
||||
@Schema(name = "title", title = "消息标题")
|
||||
|
@ -22,18 +22,13 @@ public class MessageAddDto {
|
|||
@NotBlank(message = "消息标题 不能为空")
|
||||
private String title;
|
||||
|
||||
@Schema(name = "receivedUserId", title = "接收人用户ID")
|
||||
private List<Long> receivedUserId;
|
||||
@Schema(name = "receivedUserIds", title = "接收人用户ID")
|
||||
private List<Long> receivedUserIds;
|
||||
|
||||
@Schema(name = "sendUserId", title = "发送人用户ID")
|
||||
@NotNull(message = "发送人用户ID 不能为空")
|
||||
private Long sendUserId;
|
||||
|
||||
@Schema(name = "sendNickName", title = "发送人昵称")
|
||||
@NotBlank(message = "发送人昵称 不能为空")
|
||||
@NotNull(message = "发送人昵称 不能为空")
|
||||
private String sendNickName;
|
||||
|
||||
@Schema(name = "messageType", title = "消息类型")
|
||||
@NotBlank(message = "消息类型 不能为空")
|
||||
@NotNull(message = "消息类型 不能为空")
|
||||
|
|
|
@ -16,14 +16,8 @@ public class MessageDto {
|
|||
@Schema(name = "title", title = "消息标题")
|
||||
private String title;
|
||||
|
||||
@Schema(name = "receivedUserId", title = "接收人用户ID")
|
||||
private Long receivedUserId;
|
||||
|
||||
@Schema(name = "sendUserId", title = "发送人用户ID")
|
||||
private Long sendUserId;
|
||||
|
||||
@Schema(name = "sendNickName", title = "发送人昵称")
|
||||
private String sendNickName;
|
||||
@Schema(name = "sendNickname", title = "发送人用户昵称")
|
||||
private String sendNickname;
|
||||
|
||||
@Schema(name = "messageType", title = "消息类型")
|
||||
private String messageType;
|
||||
|
|
|
@ -26,18 +26,13 @@ public class MessageUpdateDto {
|
|||
@NotBlank(message = "消息标题 不能为空")
|
||||
private String title;
|
||||
|
||||
@Schema(name = "receivedUserId", title = "接收人用户ID")
|
||||
private List<Long> receivedUserId;
|
||||
@Schema(name = "receivedUserIds", title = "接收人用户ID")
|
||||
private List<Long> receivedUserIds;
|
||||
|
||||
@Schema(name = "sendUserId", title = "发送人用户ID")
|
||||
@NotNull(message = "发送人用户ID 不能为空")
|
||||
private Long sendUserId;
|
||||
|
||||
@Schema(name = "sendNickName", title = "发送人昵称")
|
||||
@NotBlank(message = "发送人昵称 不能为空")
|
||||
@NotNull(message = "发送人昵称 不能为空")
|
||||
private String sendNickName;
|
||||
|
||||
@Schema(name = "messageType", title = "消息类型")
|
||||
@NotBlank(message = "消息类型 不能为空")
|
||||
@NotNull(message = "消息类型 不能为空")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.i18n;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.i18n;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.log;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.log;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.quartz;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
@ -25,15 +25,12 @@ public class Message extends BaseEntity {
|
|||
@Schema(name = "title", title = "消息标题")
|
||||
private String title;
|
||||
|
||||
@Schema(name = "receivedUserId", title = "接收人用户ID")
|
||||
private Long receivedUserId;
|
||||
@Schema(name = "receivedUserIds", title = "接收人用户ID")
|
||||
private String receivedUserIds;
|
||||
|
||||
@Schema(name = "sendUserId", title = "发送人用户ID")
|
||||
private Long sendUserId;
|
||||
|
||||
@Schema(name = "sendNickName", title = "发送人昵称")
|
||||
private String sendNickName;
|
||||
|
||||
@Schema(name = "messageType", title = "sys:系统消息,user用户消息")
|
||||
private String messageType;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
@ -13,7 +13,7 @@ import lombok.experimental.Accessors;
|
|||
@TableName("sys_router_role")
|
||||
@Schema(name = "RouterRole对象", title = "路由角色关系", description = "路由角色关系")
|
||||
public class RouterRole extends BaseEntity {
|
||||
|
||||
|
||||
@Schema(name = "routerId", title = "路由ID")
|
||||
private Long routerId;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.entity.system;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.view;
|
||||
|
||||
import cn.bunny.dao.entity.BaseEntity;
|
||||
import cn.bunny.dao.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.i18n;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseUserVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
@ -10,7 +10,7 @@ import lombok.*;
|
|||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "I18nVo对象", title = "多语言返回内容", description = "多语言返回内容")
|
||||
public class I18nTypeVo extends BaseVo {
|
||||
public class I18nTypeVo extends BaseUserVo {
|
||||
|
||||
@Schema(name = "typeName", title = "多语言类型(比如zh,en)")
|
||||
private String typeName;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.i18n;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseUserVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
@ -10,7 +10,7 @@ import lombok.*;
|
|||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "I18nVo对象", title = "多语言返回内容", description = "多语言返回内容")
|
||||
public class I18nVo extends BaseVo {
|
||||
public class I18nVo extends BaseUserVo {
|
||||
|
||||
@Schema(name = "keyName", title = "多语言key")
|
||||
private String keyName;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.log;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.log;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.quartz;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.email;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.email;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.files;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.files;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.message;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseUserVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
@ -10,7 +10,7 @@ import lombok.*;
|
|||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "MessageTypeVo对象", title = "系统消息类型", description = "系统消息类型")
|
||||
public class MessageTypeVo extends BaseVo {
|
||||
public class MessageTypeVo extends BaseUserVo {
|
||||
|
||||
@Schema(name = "messageName", title = "消息名称")
|
||||
private String messageName;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package cn.bunny.dao.vo.system.message;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseUserVo;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
@ -10,19 +13,21 @@ import lombok.*;
|
|||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "MessageVo对象", title = "系统消息返回内容", description = "系统消息返回内容")
|
||||
public class MessageVo extends BaseVo {
|
||||
public class MessageVo extends BaseUserVo {
|
||||
|
||||
@Schema(name = "title", title = "消息标题")
|
||||
private String title;
|
||||
|
||||
@Schema(name = "receivedUserId", title = "接收人用户ID")
|
||||
private Long receivedUserId;
|
||||
|
||||
@Schema(name = "sendUserId", title = "发送人用户ID")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@JSONField(serializeUsing = ToStringSerializer.class)
|
||||
private Long sendUserId;
|
||||
|
||||
@Schema(name = "sendNickName", title = "发送人昵称")
|
||||
private String sendNickName;
|
||||
@Schema(name = "sendNickname", title = "发送人昵称")
|
||||
private String sendNickname;
|
||||
|
||||
@Schema(name = "receivedUserIds", title = "接收人用户ID")
|
||||
private String receivedUserIds;
|
||||
|
||||
@Schema(name = "messageType", title = "sys:系统消息,user用户消息")
|
||||
private String messageType;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.rolePower;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.rolePower;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.router;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.user;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.user;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
@ -68,5 +68,5 @@ public class LoginVo extends BaseVo {
|
|||
|
||||
@Schema(name = "readMeDay", title = "记住我多久")
|
||||
private Long readMeDay;
|
||||
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.user;
|
||||
|
||||
import cn.bunny.dao.vo.common.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package cn.bunny.services.controller;
|
||||
|
||||
import cn.bunny.dao.dto.i18n.I18nTypeAddDto;
|
||||
import cn.bunny.dao.dto.i18n.I18nTypeDto;
|
||||
import cn.bunny.dao.dto.i18n.I18nTypeUpdateDto;
|
||||
import cn.bunny.dao.pojo.result.Result;
|
||||
import cn.bunny.dao.pojo.result.ResultCodeEnum;
|
||||
|
@ -33,8 +34,8 @@ public class I18nTypeController {
|
|||
|
||||
@Operation(summary = "获取多语言类型", description = "获取多语言类型")
|
||||
@GetMapping("/noAuth/getI18nTypeList")
|
||||
public Mono<Result<List<I18nTypeVo>>> getI18nTypeList() {
|
||||
List<I18nTypeVo> voList = i18nTypeService.getI18nTypeList();
|
||||
public Mono<Result<List<I18nTypeVo>>> getI18nTypeList(I18nTypeDto dto) {
|
||||
List<I18nTypeVo> voList = i18nTypeService.getI18nTypeList(dto);
|
||||
return Mono.just(Result.success(voList));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package cn.bunny.services.factory;
|
||||
|
||||
import cn.bunny.dao.vo.common.TreeSelectVo;
|
||||
import cn.bunny.dao.vo.system.router.RouterManageVo;
|
||||
import cn.bunny.dao.vo.system.router.UserRouterVo;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@ -30,33 +28,4 @@ public class RouterServiceFactory {
|
|||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* * 递归调用设置管理子路由
|
||||
*
|
||||
* @param nodeId 主键
|
||||
* @param nodeList 返回VO列表
|
||||
* @return 返回路由列表
|
||||
*/
|
||||
public List<RouterManageVo> handleGetChildrenWithRouterControllerVo(Long nodeId, List<RouterManageVo> nodeList) {
|
||||
return nodeList.stream()
|
||||
.filter(node -> node.getParentId().equals(nodeId))
|
||||
.peek(node -> node.setChildren(handleGetChildrenWithRouterControllerVo(node.getId(), nodeList)))
|
||||
.toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* * 整理树形结构
|
||||
*
|
||||
* @param nodeId 节点ID
|
||||
* @param nodeList 节点列表
|
||||
* @return 树形列表
|
||||
*/
|
||||
public List<TreeSelectVo> handleGetTreeSelectList(Object nodeId, @NotNull List<TreeSelectVo> nodeList) {
|
||||
// 使用 Stream API 找到所有子节点
|
||||
return nodeList.stream()
|
||||
.filter(node -> node.getParentId().equals(nodeId))
|
||||
.peek(node -> node.setChildren(handleGetTreeSelectList(node.getValue(), nodeList)))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package cn.bunny.services.mapper;
|
|||
|
||||
import cn.bunny.dao.dto.i18n.I18nDto;
|
||||
import cn.bunny.dao.entity.i18n.I18n;
|
||||
import cn.bunny.dao.vo.i18n.I18nVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
@ -28,7 +29,7 @@ public interface I18nMapper extends BaseMapper<I18n> {
|
|||
* @param dto 路由查询表单
|
||||
* @return 分页结果
|
||||
*/
|
||||
IPage<I18n> selectListByPage(@Param("page") Page<I18n> pageParams, @Param("dto") I18nDto dto);
|
||||
IPage<I18nVo> selectListByPage(@Param("page") Page<I18n> pageParams, @Param("dto") I18nDto dto);
|
||||
|
||||
/**
|
||||
* 物理删除多语言
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package cn.bunny.services.mapper;
|
||||
|
||||
import cn.bunny.dao.dto.i18n.I18nTypeDto;
|
||||
import cn.bunny.dao.entity.i18n.I18nType;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -23,4 +25,12 @@ public interface I18nTypeMapper extends BaseMapper<I18nType> {
|
|||
* @param ids 删除 id 列表
|
||||
*/
|
||||
void deleteBatchIdsWithPhysics(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 多语言类型查询
|
||||
*
|
||||
* @param dto 多语言类型查询
|
||||
* @return 多语言类型列表
|
||||
*/
|
||||
List<I18nType> selectListByPage(@Param("dto") I18nTypeDto dto);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package cn.bunny.services.mapper;
|
|||
|
||||
import cn.bunny.dao.dto.system.message.MessageDto;
|
||||
import cn.bunny.dao.entity.system.Message;
|
||||
import cn.bunny.dao.vo.system.message.MessageVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
@ -28,7 +29,7 @@ public interface MessageMapper extends BaseMapper<Message> {
|
|||
* @param dto 系统消息查询表单
|
||||
* @return 系统消息分页结果
|
||||
*/
|
||||
IPage<Message> selectListByPage(@Param("page") Page<Message> pageParams, @Param("dto") MessageDto dto);
|
||||
IPage<MessageVo> selectListByPage(@Param("page") Page<Message> pageParams, @Param("dto") MessageDto dto);
|
||||
|
||||
/**
|
||||
* 物理删除系统消息
|
||||
|
|
|
@ -2,6 +2,7 @@ package cn.bunny.services.mapper;
|
|||
|
||||
import cn.bunny.dao.dto.system.message.MessageTypeDto;
|
||||
import cn.bunny.dao.entity.system.MessageType;
|
||||
import cn.bunny.dao.vo.system.message.MessageTypeVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
@ -28,7 +29,7 @@ public interface MessageTypeMapper extends BaseMapper<MessageType> {
|
|||
* @param dto 系统消息类型查询表单
|
||||
* @return 系统消息类型分页结果
|
||||
*/
|
||||
IPage<MessageType> selectListByPage(@Param("page") Page<MessageType> pageParams, @Param("dto") MessageTypeDto dto);
|
||||
IPage<MessageTypeVo> selectListByPage(@Param("page") Page<MessageType> pageParams, @Param("dto") MessageTypeDto dto);
|
||||
|
||||
/**
|
||||
* 物理删除系统消息类型
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package cn.bunny.services.service;
|
||||
|
||||
import cn.bunny.dao.dto.i18n.I18nTypeAddDto;
|
||||
import cn.bunny.dao.dto.i18n.I18nTypeDto;
|
||||
import cn.bunny.dao.dto.i18n.I18nTypeUpdateDto;
|
||||
import cn.bunny.dao.entity.i18n.I18nType;
|
||||
import cn.bunny.dao.vo.i18n.I18nTypeVo;
|
||||
|
@ -23,7 +24,7 @@ public interface I18nTypeService extends IService<I18nType> {
|
|||
*
|
||||
* @return 多语言类型列表
|
||||
*/
|
||||
List<I18nTypeVo> getI18nTypeList();
|
||||
List<I18nTypeVo> getI18nTypeList(I18nTypeDto dto);
|
||||
|
||||
/**
|
||||
* 添加多语言类型
|
||||
|
|
|
@ -76,15 +76,10 @@ public class I18nServiceImpl extends ServiceImpl<I18nMapper, I18n> implements I1
|
|||
*/
|
||||
@Override
|
||||
public PageResult<I18nVo> getI18nList(Page<I18n> pageParams, I18nDto dto) {
|
||||
IPage<I18n> page = baseMapper.selectListByPage(pageParams, dto);
|
||||
IPage<I18nVo> page = baseMapper.selectListByPage(pageParams, dto);
|
||||
|
||||
List<I18nVo> i18nVoList = page.getRecords().stream().map(i18n -> {
|
||||
I18nVo i18nVo = new I18nVo();
|
||||
BeanUtils.copyProperties(i18n, i18nVo);
|
||||
return i18nVo;
|
||||
}).toList();
|
||||
return PageResult.<I18nVo>builder()
|
||||
.list(i18nVoList)
|
||||
.list(page.getRecords())
|
||||
.pageSize(page.getSize())
|
||||
.pageNo(page.getCurrent())
|
||||
.total(page.getTotal())
|
||||
|
|
|
@ -2,6 +2,7 @@ package cn.bunny.services.service.impl;
|
|||
|
||||
import cn.bunny.common.service.exception.BunnyException;
|
||||
import cn.bunny.dao.dto.i18n.I18nTypeAddDto;
|
||||
import cn.bunny.dao.dto.i18n.I18nTypeDto;
|
||||
import cn.bunny.dao.dto.i18n.I18nTypeUpdateDto;
|
||||
import cn.bunny.dao.entity.i18n.I18nType;
|
||||
import cn.bunny.dao.pojo.result.ResultCodeEnum;
|
||||
|
@ -37,8 +38,9 @@ public class I18nTypeServiceImpl extends ServiceImpl<I18nTypeMapper, I18nType> i
|
|||
*/
|
||||
@Override
|
||||
@Cacheable(cacheNames = "i18n", key = "'i18nType'", cacheManager = "cacheManagerWithMouth")
|
||||
public List<I18nTypeVo> getI18nTypeList() {
|
||||
return list().stream().map(i18nType -> {
|
||||
public List<I18nTypeVo> getI18nTypeList(I18nTypeDto dto) {
|
||||
List<I18nType> i18nTypeList = baseMapper.selectListByPage(dto);
|
||||
return i18nTypeList.stream().map(i18nType -> {
|
||||
I18nTypeVo i18nTypeVo = new I18nTypeVo();
|
||||
BeanUtils.copyProperties(i18nType, i18nTypeVo);
|
||||
return i18nTypeVo;
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.validation.Valid;
|
||||
import jodd.util.StringUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -37,15 +38,13 @@ public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> impl
|
|||
*/
|
||||
@Override
|
||||
public PageResult<MessageVo> getMessageList(Page<Message> pageParams, MessageDto dto) {
|
||||
// 分页查询菜单图标
|
||||
IPage<Message> page = baseMapper.selectListByPage(pageParams, dto);
|
||||
IPage<MessageVo> page = baseMapper.selectListByPage(pageParams, dto);
|
||||
|
||||
List<MessageVo> voList = page.getRecords().stream().map(message -> {
|
||||
MessageVo messageVo = new MessageVo();
|
||||
BeanUtils.copyProperties(message, messageVo);
|
||||
return messageVo;
|
||||
List<MessageVo> voList = page.getRecords().stream().map(messageVo -> {
|
||||
MessageVo vo = new MessageVo();
|
||||
BeanUtils.copyProperties(messageVo, vo);
|
||||
return vo;
|
||||
}).toList();
|
||||
|
||||
return PageResult.<MessageVo>builder()
|
||||
.list(voList)
|
||||
.pageNo(page.getCurrent())
|
||||
|
@ -64,6 +63,10 @@ public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> impl
|
|||
// 保存数据
|
||||
Message message = new Message();
|
||||
BeanUtils.copyProperties(dto, message);
|
||||
|
||||
// 将发送用户逗号分隔
|
||||
String receivedUserIds = StringUtil.join(dto.getReceivedUserIds(), ",");
|
||||
message.setReceivedUserIds(receivedUserIds);
|
||||
save(message);
|
||||
}
|
||||
|
||||
|
@ -77,6 +80,10 @@ public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> impl
|
|||
// 更新内容
|
||||
Message message = new Message();
|
||||
BeanUtils.copyProperties(dto, message);
|
||||
|
||||
// 将发送用户逗号分隔
|
||||
String receivedUserIds = StringUtil.join(dto.getReceivedUserIds(), ",");
|
||||
message.setReceivedUserIds(receivedUserIds);
|
||||
updateById(message);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,16 +39,10 @@ public class MessageTypeServiceImpl extends ServiceImpl<MessageTypeMapper, Messa
|
|||
@Override
|
||||
public PageResult<MessageTypeVo> getMessageTypeList(Page<MessageType> pageParams, MessageTypeDto dto) {
|
||||
// 分页查询菜单图标
|
||||
IPage<MessageType> page = baseMapper.selectListByPage(pageParams, dto);
|
||||
|
||||
List<MessageTypeVo> voList = page.getRecords().stream().map(messageType -> {
|
||||
MessageTypeVo messageTypeVo = new MessageTypeVo();
|
||||
BeanUtils.copyProperties(messageType, messageTypeVo);
|
||||
return messageTypeVo;
|
||||
}).toList();
|
||||
IPage<MessageTypeVo> page = baseMapper.selectListByPage(pageParams, dto);
|
||||
|
||||
return PageResult.<MessageTypeVo>builder()
|
||||
.list(voList)
|
||||
.list(page.getRecords())
|
||||
.pageNo(page.getCurrent())
|
||||
.pageSize(page.getSize())
|
||||
.total(page.getTotal())
|
||||
|
|
|
@ -31,22 +31,27 @@
|
|||
</delete>
|
||||
|
||||
<!-- 分页查询多语言内容 -->
|
||||
<select id="selectListByPage" resultType="cn.bunny.dao.entity.i18n.I18n">
|
||||
<select id="selectListByPage" resultType="cn.bunny.dao.vo.i18n.I18nVo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_i18n
|
||||
i18n.*,
|
||||
create_user.username as create_username,
|
||||
update_user.username as update_username
|
||||
from sys_i18n i18n
|
||||
left join sys_user create_user on create_user.id = i18n.create_user
|
||||
left join sys_user update_user on update_user.id = i18n.update_user
|
||||
<where>
|
||||
is_deleted = 0
|
||||
i18n.is_deleted = 0
|
||||
<if test="dto.keyName != null and dto.keyName != ''">
|
||||
and key_name like CONCAT('%',#{dto.keyName},'%')
|
||||
and i18n.key_name like CONCAT('%',#{dto.keyName},'%')
|
||||
</if>
|
||||
<if test="dto.translation != null and dto.translation != ''">
|
||||
and translation like CONCAT('%',#{dto.translation},'%')
|
||||
and i18n.translation like CONCAT('%',#{dto.translation},'%')
|
||||
</if>
|
||||
<if test="dto.typeName != null and dto.typeName != ''">
|
||||
and type_name like CONCAT('%',#{dto.typeName},'%')
|
||||
and i18n.type_name like CONCAT('%',#{dto.typeName},'%')
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -30,4 +30,24 @@
|
|||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 多语言类型查询 -->
|
||||
<select id="selectListByPage" resultType="cn.bunny.dao.entity.i18n.I18nType">
|
||||
select
|
||||
i18n_type.*,
|
||||
create_user.username as createUsername,
|
||||
update_user.username as updateUsername
|
||||
from sys_i18n_type i18n_type
|
||||
left join sys_user create_user on create_user.id = i18n_type.create_user
|
||||
left join sys_user update_user on update_user.id = i18n_type.update_user
|
||||
<where>
|
||||
i18n_type.is_deleted = 0
|
||||
<if test="dto.typeName != null and dto.typeName != ''">
|
||||
and i18n_type.type_name like CONCAT('%',#{dto.typeName},'%')
|
||||
</if>
|
||||
<if test="dto.summary != null and dto.summary != ''">
|
||||
and i18n_type.summary like CONCAT('%',#{dto.summary},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
<id column="title" property="title"/>
|
||||
<id column="received_user_id" property="receivedUserId"/>
|
||||
<id column="send_user_id" property="sendUserId"/>
|
||||
<id column="send_nick_name" property="sendNickName"/>
|
||||
<id column="message_type" property="messageType"/>
|
||||
<id column="content" property="content"/>
|
||||
<id column="editor_type" property="editorType"/>
|
||||
|
@ -26,35 +25,35 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统消息内容 -->
|
||||
<select id="selectListByPage" resultType="cn.bunny.dao.entity.system.Message">
|
||||
<select id="selectListByPage" resultType="cn.bunny.dao.vo.system.message.MessageVo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_message
|
||||
message.*,
|
||||
create_user.username as create_username,
|
||||
update_user.username as update_username,
|
||||
send_user.nickname as send_nickname
|
||||
from sys_message message
|
||||
left join sys_user create_user on create_user.id = message.create_user
|
||||
left join sys_user update_user on update_user.id = message.update_user
|
||||
left join sys_user send_user on send_user.id = message.send_user_id
|
||||
<where>
|
||||
is_deleted = 0
|
||||
message.is_deleted = 0
|
||||
<if test="dto.title != null and dto.title != ''">
|
||||
and title like CONCAT('%',#{dto.title},'%')
|
||||
and message.title like CONCAT('%',#{dto.title},'%')
|
||||
</if>
|
||||
<if test="dto.receivedUserId != null and dto.receivedUserId != ''">
|
||||
and received_user_id like CONCAT('%',#{dto.receivedUserId},'%')
|
||||
</if>
|
||||
<if test="dto.sendUserId != null and dto.sendUserId != ''">
|
||||
and send_user_id like CONCAT('%',#{dto.sendUserId},'%')
|
||||
</if>
|
||||
<if test="dto.sendNickName != null and dto.sendNickName != ''">
|
||||
and send_nick_name like CONCAT('%',#{dto.sendNickName},'%')
|
||||
<if test="dto.sendNickname != null and dto.sendNickname != ''">
|
||||
and send_user.nickname like CONCAT('%',#{dto.sendNickname},'%')
|
||||
</if>
|
||||
<if test="dto.messageType != null and dto.messageType != ''">
|
||||
and message_type like CONCAT('%',#{dto.messageType},'%')
|
||||
and message.message_type like CONCAT('%',#{dto.messageType},'%')
|
||||
</if>
|
||||
<if test="dto.content != null and dto.content != ''">
|
||||
and content like CONCAT('%',#{dto.content},'%')
|
||||
and message.content like CONCAT('%',#{dto.content},'%')
|
||||
</if>
|
||||
<if test="dto.editorType != null and dto.editorType != ''">
|
||||
and editor_type like CONCAT('%',#{dto.editorType},'%')
|
||||
and message.editor_type = #{dto.editorType}
|
||||
</if>
|
||||
<if test="dto.status != null and dto.status != ''">
|
||||
and status like CONCAT('%',#{dto.status},'%')
|
||||
<if test="dto.status != null">
|
||||
and message.status = #{dto.status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
@ -22,23 +22,27 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统消息类型内容 -->
|
||||
<select id="selectListByPage" resultType="cn.bunny.dao.entity.system.MessageType">
|
||||
<select id="selectListByPage" resultType="cn.bunny.dao.vo.system.message.MessageTypeVo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_message_type
|
||||
message_type.*,
|
||||
create_user.username as create_username,
|
||||
update_user.username as update_username
|
||||
from sys_message_type message_type
|
||||
left join sys_user create_user on create_user.id = message_type.create_user
|
||||
left join sys_user update_user on update_user.id = message_type.update_user
|
||||
<where>
|
||||
is_deleted = 0
|
||||
message_type.is_deleted = 0
|
||||
<if test="dto.status != null">
|
||||
and status = #{dto.status}
|
||||
</if>
|
||||
<if test="dto.messageName != null and dto.messageName != ''">
|
||||
and message_name like CONCAT('%',#{dto.messageName},'%')
|
||||
and message_type.message_name like CONCAT('%',#{dto.messageName},'%')
|
||||
</if>
|
||||
<if test="dto.messageType != null and dto.messageType != ''">
|
||||
and message_type like CONCAT('%',#{dto.messageType},'%')
|
||||
and message_type.message_type like CONCAT('%',#{dto.messageType},'%')
|
||||
</if>
|
||||
<if test="dto.summary != null and dto.summary != ''">
|
||||
and summary like CONCAT('%',#{dto.summary},'%')
|
||||
and message_type.summary like CONCAT('%',#{dto.summary},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue