-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from Bull-BCLS/dev
feat: 新增系统管理/消息管理(列表、查看详情、标记已读、全部已读、删除)
- Loading branch information
Showing
30 changed files
with
1,633 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...ew-admin-system/src/main/java/top/charles7c/cnadmin/system/enums/MessageTemplateEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package top.charles7c.cnadmin.system.enums; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
/** | ||
* 消息模板枚举 | ||
* | ||
* @author BULL_BCLS | ||
* @since 2023/10/15 19:51 | ||
*/ | ||
@Getter | ||
@RequiredArgsConstructor | ||
public enum MessageTemplateEnum { | ||
|
||
/** | ||
* 第三方登录 | ||
*/ | ||
SOCIAL_REGISTER("欢迎注册 {projectName}", "尊敬的 {nickname},欢迎注册使用,请及时配置您的密码。"); | ||
|
||
private final String title; | ||
private final String content; | ||
} |
58 changes: 58 additions & 0 deletions
58
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/mapper/MessageMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package top.charles7c.cnadmin.system.mapper; | ||
|
||
import java.util.List; | ||
|
||
import org.apache.ibatis.annotations.Param; | ||
|
||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
import com.baomidou.mybatisplus.core.metadata.IPage; | ||
import com.baomidou.mybatisplus.core.toolkit.Constants; | ||
|
||
import top.charles7c.cnadmin.common.base.BaseMapper; | ||
import top.charles7c.cnadmin.system.model.entity.MessageDO; | ||
import top.charles7c.cnadmin.system.model.vo.MessageVO; | ||
|
||
/** | ||
* 消息 Mapper | ||
* | ||
* @author BULL_BCLS | ||
* @since 2023/10/15 19:05 | ||
*/ | ||
public interface MessageMapper extends BaseMapper<MessageDO> { | ||
/** | ||
* 分页查询列表 | ||
* | ||
* @param queryWrapper | ||
* 查询条件 | ||
* @param page | ||
* 分页查询条件 | ||
* @return 分页信息 | ||
*/ | ||
IPage<MessageVO> selectVoPage(@Param("page") IPage<Object> page, | ||
@Param(Constants.WRAPPER) QueryWrapper<MessageDO> queryWrapper); | ||
|
||
/** | ||
* 查询列表 | ||
* | ||
* @param queryWrapper | ||
* 查询条件 | ||
* @return 列表信息 | ||
*/ | ||
List<MessageVO> selectVoList(@Param(Constants.WRAPPER) QueryWrapper<MessageDO> queryWrapper); | ||
} |
28 changes: 28 additions & 0 deletions
28
...new-admin-system/src/main/java/top/charles7c/cnadmin/system/mapper/MessageUserMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package top.charles7c.cnadmin.system.mapper; | ||
|
||
import top.charles7c.cnadmin.common.base.BaseMapper; | ||
import top.charles7c.cnadmin.system.model.entity.MessageUserDO; | ||
|
||
/** | ||
* 消息和用户关联 Mapper | ||
* | ||
* @author BULL_BCLS | ||
* @since 2023/10/15 20:25 | ||
*/ | ||
public interface MessageUserMapper extends BaseMapper<MessageUserDO> {} |
56 changes: 56 additions & 0 deletions
56
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/entity/MessageDO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package top.charles7c.cnadmin.system.model.entity; | ||
|
||
import lombok.Data; | ||
|
||
import com.baomidou.mybatisplus.annotation.TableName; | ||
|
||
import top.charles7c.cnadmin.common.base.BaseDO; | ||
|
||
/** | ||
* 消息实体 | ||
* | ||
* @author BULL_BCLS | ||
* @since 2023/10/15 19:05 | ||
*/ | ||
@Data | ||
@TableName("sys_message") | ||
public class MessageDO extends BaseDO { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* 消息ID | ||
*/ | ||
private Long id; | ||
|
||
/** | ||
* 主题 | ||
*/ | ||
private String title; | ||
|
||
/** | ||
* 内容 | ||
*/ | ||
private String content; | ||
|
||
/** | ||
* 类型(取值于字典 message_type) | ||
*/ | ||
private String type; | ||
} |
58 changes: 58 additions & 0 deletions
58
...w-admin-system/src/main/java/top/charles7c/cnadmin/system/model/entity/MessageUserDO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package top.charles7c.cnadmin.system.model.entity; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import lombok.Data; | ||
|
||
import com.baomidou.mybatisplus.annotation.TableName; | ||
|
||
import top.charles7c.cnadmin.common.base.BaseDO; | ||
|
||
/** | ||
* 消息和用户关联实体 | ||
* | ||
* @author BULL_BCLS | ||
* @since 2023/10/15 20:25 | ||
*/ | ||
@Data | ||
@TableName("sys_message_user") | ||
public class MessageUserDO extends BaseDO { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* 消息ID | ||
*/ | ||
private Long messageId; | ||
|
||
/** | ||
* 用户ID | ||
*/ | ||
private Long userId; | ||
|
||
/** | ||
* 读取状态 (0未读 1已读) | ||
*/ | ||
private Boolean readStatus; | ||
|
||
/** | ||
* 读取时间 | ||
*/ | ||
private LocalDateTime readTime; | ||
} |
Oops, something went wrong.