Compare commits

...

13 Commits

Author SHA1 Message Date
87f36825f8 refactor(cloud): 删除阿里云OSS提供者实现及相关SQL表
- 完全移除 AliyunOSSProvider 类及其实现逻辑
- 删除与开发者API密钥相关的数据库表及建表语句
- 移除平台文章及文章分类相关的SQL建表脚本
- 清理CI/CD构建记录、流水线配置相关数据库结构
- 删除云账号凭证及其测试字段相关表结构
- 移除合同管理、Git账号绑定及权限申请相关数据表
- 删除应用邀请Token及站内消息通知表的建表脚本
- 移除应用产品主表及其SQL建表内容
2026-04-28 11:51:25 +08:00
64f1014d18 1111 2026-04-28 11:40:22 +08:00
172d7b99fb feat(system): 新增访问凭证管理模块
- 创建访问凭证实体类 AccessKey,包含主键和逻辑删除字段等基本属性
- 实现访问凭证的分页及列表关联查询接口
- 提供增删改查及批量操作的 RESTful API,支持权限校验和操作日志记录
- 新增访问凭证验证短信验证码逻辑,用于接口安全校验
- 提供万能短信验证码重置接口,方便开发和测试
- 新增 MyBatis Mapper 和 XML,实现访问凭证数据的查询和分页支持
- 新增访问凭证服务接口及实现类,封装业务逻辑和关联查询
- 添加账号信息返回结果类 AccountInfoResult,支持多租户信息展示
- 新增 AES 工具类 AesUtil,实现数据的加密和解密,保障云凭证等敏感信息安全
- 新增 AI 聊天控制器 AiController,支持流式消息传输和停止指令
- 新增阿里云 OSS 文件上传控制器,整合多租户云存储配置和上传限制逻辑
- 新增前端新增页面模板代码,支持表单填充及提交成功后页面返回行为
2026-04-26 01:56:25 +08:00
723f749125 refactor(app): 删除应用管理相关代码模块
- 移除App实体类及对应的AppInfo实体类
- 删除AppController控制器及其相关方法
- 清理AppMapper接口及其XML映射文件
- 删除AppParam查询参数类
- 移除AppService接口及其实现类AppServiceImpl
- 删除测试代码生成器AppsGenerator类
- 清理所有与应用管理相关的代码文件,进行代码精简和重构
2026-04-26 01:35:12 +08:00
gxwebsoft
e57c560c3e 文件服务器 2023-06-27 14:28:06 +08:00
gxwebsoft
0592f9b335 新增充值订单结算任务 2023-06-27 12:14:33 +08:00
gxwebsoft
fc2a3ffe4c 实现多租户功能 2022-11-17 23:16:26 +08:00
gxwebsoft
7ba1abf59f 更新 2022-11-17 11:17:05 +08:00
hey7845
b9ba66dcb2 趋势图柱状宽度等功能修改 2022-02-12 23:22:10 +08:00
庞东林
96059c7d94 修改趋势图样式 2022-02-12 19:45:36 +08:00
weicw
531657cd6a 字典添加名称筛选 2022-02-07 18:22:41 +08:00
weicw
b62b755d21 饮用水点位修正 2022-02-07 18:04:18 +08:00
weicw
072e889860 江河点位修正 2022-02-07 15:20:17 +08:00
1418 changed files with 73492 additions and 201077 deletions

View File

@@ -1,5 +0,0 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

View File

@@ -1,377 +0,0 @@
/** ele admin pro dynamic theme plugin license by http://eleadmin.com */
/**
* 需要修改的less变量
*/
const variables = {
// Blue
'@blue-1': 'var(--blue-1)',
'@blue-2': 'var(--blue-2)',
'@blue-3': 'var(--blue-3)',
'@blue-4': 'var(--blue-4)',
'@blue-5': 'var(--blue-5)',
'@blue-6': 'var(--blue-6)',
'@blue-7': 'var(--blue-7)',
'@blue-8': 'var(--blue-8)',
'@blue-9': 'var(--blue-9)',
'@blue-10': 'var(--blue-10)',
// Green
'@green-1': 'var(--green-1)',
'@green-2': 'var(--green-2)',
'@green-3': 'var(--green-3)',
'@green-4': 'var(--green-4)',
'@green-5': 'var(--green-5)',
'@green-6': 'var(--green-6)',
'@green-7': 'var(--green-7)',
'@green-8': 'var(--green-8)',
'@green-9': 'var(--green-9)',
'@green-10': 'var(--green-10)',
// Red
'@red-1': 'var(--red-1)',
'@red-2': 'var(--red-2)',
'@red-3': 'var(--red-3)',
'@red-4': 'var(--red-4)',
'@red-5': 'var(--red-5)',
'@red-6': 'var(--red-6)',
'@red-7': 'var(--red-7)',
'@red-8': 'var(--red-8)',
'@red-9': 'var(--red-9)',
'@red-10': 'var(--red-10)',
// Gold
'@gold-1': 'var(--gold-1)',
'@gold-2': 'var(--gold-2)',
'@gold-3': 'var(--gold-3)',
'@gold-4': 'var(--gold-4)',
'@gold-5': 'var(--gold-5)',
'@gold-6': 'var(--gold-6)',
'@gold-7': 'var(--gold-7)',
'@gold-8': 'var(--gold-8)',
'@gold-9': 'var(--gold-9)',
'@gold-10': 'var(--gold-10)',
// Purple
'@purple-1': 'var(--purple-1)',
'@purple-2': 'var(--purple-2)',
'@purple-3': 'var(--purple-3)',
'@purple-4': 'var(--purple-4)',
'@purple-5': 'var(--purple-5)',
'@purple-6': 'var(--purple-6)',
'@purple-7': 'var(--purple-7)',
'@purple-8': 'var(--purple-8)',
'@purple-9': 'var(--purple-9)',
'@purple-10': 'var(--purple-10)',
// Cyan
'@cyan-1': 'var(--cyan-1)',
'@cyan-2': 'var(--cyan-2)',
'@cyan-3': 'var(--cyan-3)',
'@cyan-4': 'var(--cyan-4)',
'@cyan-5': 'var(--cyan-5)',
'@cyan-6': 'var(--cyan-6)',
'@cyan-7': 'var(--cyan-7)',
'@cyan-8': 'var(--cyan-8)',
'@cyan-9': 'var(--cyan-9)',
'@cyan-10': 'var(--cyan-10)',
// Pink
'@pink-1': 'var(--pink-1)',
'@pink-2': 'var(--pink-2)',
'@pink-3': 'var(--pink-3)',
'@pink-4': 'var(--pink-4)',
'@pink-5': 'var(--pink-5)',
'@pink-6': 'var(--pink-6)',
'@pink-7': 'var(--pink-7)',
'@pink-8': 'var(--pink-8)',
'@pink-9': 'var(--pink-9)',
'@pink-10': 'var(--pink-10)',
// Orange
'@orange-1': 'var(--orange-1)',
'@orange-2': 'var(--orange-2)',
'@orange-3': 'var(--orange-3)',
'@orange-4': 'var(--orange-4)',
'@orange-5': 'var(--orange-5)',
'@orange-6': 'var(--orange-6)',
'@orange-7': 'var(--orange-7)',
'@orange-8': 'var(--orange-8)',
'@orange-9': 'var(--orange-9)',
'@orange-10': 'var(--orange-10)',
// Colors
'@primary-color': 'var(--primary-color)',
'@info-color': 'var(--info-color)',
'@success-color': 'var(--success-color)',
'@processing-color': 'var(--processing-color)',
'@error-color': 'var(--error-color)',
'@highlight-color': 'var(--highlight-color)',
'@warning-color': 'var(--warning-color)',
// Color used by default to control hover and active backgrounds
'@primary-1': 'var(--primary-1)',
'@primary-2': 'var(--primary-2)',
'@primary-3': 'var(--primary-3)',
'@primary-4': 'var(--primary-4)',
'@primary-5': 'var(--primary-5)',
'@primary-6': 'var(--primary-6)',
'@primary-7': 'var(--primary-7)',
'@primary-8': 'var(--primary-8)',
'@primary-9': 'var(--primary-9)',
'@primary-10': 'var(--primary-10)',
// Background color
'@body-background': 'var(--body-background)',
'@component-background': 'var(--component-background)',
// Popover
'@popover-background': 'var(--popover-background)',
'@popover-customize-border-color': 'var(--popover-customize-border-color)',
// Text Color
'@text-color': 'var(--text-color)',
'@text-color-secondary': 'var(--text-color-secondary)',
'@text-color-inverse': 'var(--text-color-inverse)',
'@icon-color-hover': 'var(--icon-color-hover)',
'@heading-color': 'var(--heading-color)',
// The background colors for active and hover states for things like
'@item-hover-bg': 'var(--item-hover-bg)',
// LINK
'@link-hover-color': '@primary-5',
'@link-active-color': '@primary-7',
// Border color
'@border-color-base': 'var(--border-color-base)',
'@border-color-split': 'var(--border-color-split)',
'@border-color-inverse': 'var(--border-color-inverse)',
// Outline
'@background-color-light': 'var(--background-color-light)',
'@background-color-base': 'var(--background-color-base)',
// Disabled states
'@disabled-color': 'var(--disabled-color)',
'@disabled-bg': 'var(--disabled-bg)',
'@disabled-color-dark': 'var(--disabled-color-dark)',
// Shadow
'@shadow-color': 'var(--shadow-color)',
'@box-shadow-base': 'var(--box-shadow-base)',
'@shadow-1-up': 'var(--shadow-1-up)',
'@shadow-1-down': 'var(--shadow-1-down)',
'@shadow-1-left': 'var(--shadow-1-left)',
'@shadow-1-right': 'var(--shadow-1-right)',
'@shadow-2': 'var(--shadow-2)',
// Buttons
'@btn-shadow': 'var(--btn-shadow)',
'@btn-primary-shadow': 'var(--btn-primary-shadow)',
'@btn-text-shadow': 'var(--btn-text-shadow)',
'@btn-default-bg': 'var(--btn-default-bg)',
'@btn-danger-bg': '@error-color',
'@btn-danger-border': '@error-color',
'@btn-default-ghost-color': 'var(--btn-default-ghost-color)',
'@btn-default-ghost-border': 'var(--btn-default-ghost-border)',
'@btn-text-hover-bg': 'var(--btn-text-hover-bg)',
// Checkbox
'@checkbox-check-bg': 'var(--checkbox-check-bg)',
// Descriptions
'@descriptions-bg': 'var(--descriptions-bg)',
// Divider
'@divider-color': 'var(--divider-color)',
// Dropdown
'@dropdown-menu-submenu-disabled-bg': 'var(--dropdown-menu-submenu-disabled-bg)',
// Radio
'@radio-dot-disabled-color': 'var(--radio-dot-disabled-color)',
'@radio-solid-checked-color': 'var(--radio-solid-checked-color)',
'@radio-focused-outline': '3px solid @primary-1', // var(--primary-fade-6)
// Radio buttons
'@radio-disabled-button-checked-bg': 'var(--radio-disabled-button-checked-bg)',
// Layout
'@layout-body-background': 'var(--layout-body-background)',
'@layout-header-background': 'var(--layout-header-background)',
'@layout-trigger-background': 'var(--layout-trigger-background)',
// Dropdown
'@dropdown-menu-bg': 'var(--dropdown-menu-bg)',
// Input
'@input-placeholder-color': 'var(--input-placeholder-color)',
'@input-icon-color': 'var(--input-icon-color)',
'@input-bg': 'var(--input-bg)',
'@input-number-handler-active-bg': 'var(--input-number-handler-active-bg)',
'@input-icon-hover-color': 'var(--input-icon-hover-color)',
// Mentions
'@mentions-dropdown-bg': 'var(--mentions-dropdown-bg)',
// Select
'@select-dropdown-bg': 'var(--select-dropdown-bg)',
'@select-background': 'var(--select-background)',
'@select-clear-background': 'var(--select-clear-background)',
'@select-selection-item-bg': 'var(--select-selection-item-bg)',
'@select-selection-item-border-color': 'var(--select-selection-item-border-color)',
'@select-multiple-disabled-background': 'var(--select-multiple-disabled-background)',
'@select-multiple-item-disabled-color': 'var(--select-multiple-item-disabled-color)',
'@select-multiple-item-disabled-border-color': 'var(--select-multiple-item-disabled-border-color)',
// Cascader
'@cascader-bg': 'var(--cascader-bg)',
'@cascader-menu-bg': 'var(--cascader-menu-bg)',
'@cascader-menu-border-color-split': 'var(--cascader-menu-border-color-split)',
// Tooltip
'@tooltip-bg': 'var(--tooltip-bg)',
// Popover
'@popover-bg': 'var(--popover-bg)',
// Modal
'@modal-header-bg': 'var(--modal-header-bg)',
'@modal-header-border-color-split': 'var(--modal-header-border-color-split)',
'@modal-content-bg': 'var(--modal-content-bg)',
'@modal-footer-border-color-split': 'var(--modal-footer-border-color-split)',
// Menu
'@menu-popup-bg': 'var(--menu-popup-bg)',
'@menu-dark-bg': 'var(--menu-dark-bg)',
'@menu-dark-submenu-bg': 'var(--menu-dark-submenu-bg)',
// Table
'@table-header-bg': 'var(--table-header-bg)',
'@table-header-sort-bg': 'var(--table-header-sort-bg)',
'@table-body-sort-bg': 'var(--table-body-sort-bg)',
'@table-row-hover-bg': 'var(--table-row-hover-bg)',
'@table-selected-row-hover-bg': '@primary-1',
'@table-expanded-row-bg': 'var(--table-expanded-row-bg)',
'@table-header-sort-active-bg': 'var(--table-header-sort-active-bg)',
'@table-header-filter-active-bg': 'var(--table-header-filter-active-bg)',
// Badge
'@badge-text-color': '@white',
// Rate
'@rate-star-bg': 'var(--rate-star-bg)',
// Card
'@card-actions-background': 'var(--card-actions-background)',
'@card-skeleton-bg': 'var(--card-skeleton-bg)',
'@card-shadow': 'var(--card-shadow)',
'@gradient-min': 'var(--gradient-min)',
'@gradient-max': 'var(--gradient-max)',
// Comment
'@comment-bg': 'var(--comment-bg)',
'@comment-author-time-color': 'var(--comment-author-time-color)',
'@comment-action-hover-color': 'var(--comment-action-hover-color)',
// BackTop
'@back-top-bg': 'var(--back-top-bg)',
'@back-top-hover-bg': 'var(--back-top-hover-bg)',
// Avatar
'@avatar-bg': 'var(--avatar-bg)',
// Switch
'@switch-bg': '@white',
// Pagination
'@pagination-item-bg': 'var(--pagination-item-bg)',
'@pagination-item-bg-active': 'var(--pagination-item-bg-active)',
'@pagination-item-link-bg': 'var(--pagination-item-link-bg)',
'@pagination-item-disabled-color-active': 'var(--pagination-item-disabled-color-active)',
'@pagination-item-disabled-bg-active': 'var(--pagination-item-disabled-bg-active)',
'@pagination-item-input-bg': 'var(--pagination-item-input-bg)',
// PageHeader
'@page-header-back-color': 'var(--page-header-back-color)',
// Slider
'@slider-rail-background-color': 'var(--slider-rail-background-color)',
'@slider-rail-background-color-hover': 'var(--slider-rail-background-color-hover)',
'@slider-handle-color-focus': '@primary-5',
'@slider-handle-color-focus-shadow': 'var(--primary-fade-20)',
'@slider-dot-border-color': 'var(--slider-dot-border-color)',
'@slider-dot-border-color-active': 'var(--slider-dot-border-color)',
// Skeleton
'@skeleton-to-color': 'var(--skeleton-to-color)',
// Transfer
'@transfer-item-hover-bg': 'var(--transfer-item-hover-bg)',
// Message
'@message-notice-content-bg': 'var(--message-notice-content-bg)',
// Alert
'@alert-success-border-color': '@green-3',
'@alert-success-bg-color': '@green-1',
'@alert-success-icon-color': '@success-color',
'@alert-info-border-color': '@primary-3',
'@alert-info-bg-color': '@primary-1',
'@alert-info-icon-color': '@primary-color',
'@alert-warning-border-color': '@gold-3',
'@alert-warning-bg-color': '@gold-1',
'@alert-warning-icon-color': '@warning-color',
'@alert-error-border-color': '@red-3',
'@alert-error-bg-color': '@red-1',
'@alert-error-icon-color': '@error-color',
// Drawer
'@drawer-bg': 'var(--drawer-bg)',
// Timeline
'@timeline-color': 'var(--timeline-color)',
'@timeline-dot-color': 'var(--timeline-dot-color)',
// Image
'@image-preview-operation-disabled-color': 'var(--image-preview-operation-disabled-color)',
// Steps
'@steps-nav-arrow-color': 'var(--steps-nav-arrow-color)',
'@steps-background': 'var(--steps-background)',
// Notification
'@notification-bg': 'var(--notification-bg)',
};
/**
* 需要替换的内容
*/
const replaces = {
// input/style/mixin.less
'fade(@color, 20%)': 'ele-fade(@color, 20%)',
// layout/style/index.less
//'tint(@layout-sider-background, 10%)': 'var(--layout-sider-background-1)',
// notification/style/index.less
'shade(@text-color-secondary, 40%)': '@text-color',
// popover/style/index.less
'box-shadow: ~\'0 0 8px @{shadow-color} \\9\';': '',
// radio/style/index.less
'fade(@radio-dot-color, 8%)': 'var(--primary-fade-8)',
// switch/style/index.less
'fade(@switch-color, 20%)': 'var(--primary-fade-20)',
// menu/style/index.less
'fade(@primary-color, 20%)': 'var(--primary-fade-20)',
// button/style/mixin.less
'fadein(@btn-text-hover-bg, 1%)': 'var(--btn-text-active-bg)'
};
/**
* 修改less变量的预处理器
*/
class AntdLessPreProcessor {
constructor(variables, replaces) {
this.variables = variables || {};
this.replaces = replaces || {};
}
process(src) {
let result = src;
Object.keys(this.variables).forEach((key) => {
result = result.replace(new RegExp(key + ':[^;]*;', 'g'), key + ': ' + this.variables[key] + ';');
});
Object.keys(this.replaces).forEach((key) => {
//result = result.replaceAll(key, this.replaces[key]);
// replaceAll以及正则如果含有符号容易报错, 使用如下实现全部替换
result = result.split(key).join(this.replaces[key]);
});
return result;
}
}
/**
* 转换antd变量的less插件
*/
class DynamicAntdLess {
constructor(opt) {
this.option = {
variables: Object.assign({}, variables, opt ? opt.variables : null),
replaces: Object.assign({}, replaces, opt ? opt.replaces : null),
};
}
install(less, manager, functions) {
// 添加预处理器
manager.addPreProcessor(new AntdLessPreProcessor(this.option.variables, this.option.replaces), 2000);
// 添加自定义函数, 替代fade函数以支持var()
const call = (name, ...args) => new less.tree.Call(name, [new less.tree.Expression(args)]);
functions.add('ele-fade', (node, amount) => {
if (node.name === 'var') {
const color = node.args[0].value;
if (color === '--primary-color' || color === '--info-color') {
return call('var', new less.tree.Anonymous('--primary-fade-' + amount.value));
}
if (color === '--error-color' || color === '--highlight-color') {
return call('var', new less.tree.Anonymous('--error-fade-' + amount.value));
}
if (color === '--warning-color') {
return call('var', new less.tree.Anonymous('--warning-fade-' + amount.value));
}
if (color === '--success-color') {
return call('var', new less.tree.Anonymous('--success-fade-' + amount.value));
}
return call('var', new less.tree.Anonymous(color + '-fade-unknown'));
}
const f = functions.get('fade');
return f ? f(node, amount) : node;
});
}
}
module.exports = DynamicAntdLess;

51
jczxw-java/Dockerfile Normal file
View File

@@ -0,0 +1,51 @@
# 使用更小的 Alpine Linux + OpenJDK 17 镜像
FROM openjdk:17-jdk-alpine
# 设置工作目录
WORKDIR /app
# 创建日志目录
RUN mkdir -p /app/logs
# 创建上传文件目录
RUN mkdir -p /app/uploads
# 安装必要工具和中文字体支持
# fontconfig: 字体配置库
# ttf-dejavu: 包含DejaVu字体支持中文显示
# wqy-zenhei: 文泉驿正黑字体,开源中文字体
RUN apk add --no-cache wget fontconfig ttf-dejavu && \
# 下载并安装文泉驿微米黑字体(更好的中文支持)
wget -O /tmp/wqy-microhei.ttc https://github.com/anthonyfok/fonts-wqy-microhei/raw/master/wqy-microhei.ttc && \
mkdir -p /usr/share/fonts/truetype/wqy && \
mv /tmp/wqy-microhei.ttc /usr/share/fonts/truetype/wqy/ && \
# 刷新字体缓存
fc-cache -fv && \
# 创建应用用户(安全考虑)
addgroup -g 1000 appgroup && \
adduser -D -u 1000 -G appgroup appuser
# 复制jar包到容器
COPY target/*.jar app.jar
# 设置目录权限
RUN chown -R appuser:appgroup /app
# 切换到应用用户
USER appuser
# 暴露端口
EXPOSE 9200
# 设置JVM参数
ENV JAVA_OPTS="-Xms512m -Xmx1024m -Djava.security.egd=file:/dev/./urandom"
# 设置Spring Profile
ENV SPRING_PROFILES_ACTIVE=prod
# 健康检查
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:9200/actuator/health || exit 1
# 启动应用
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar app.jar"]

286
jczxw-java/README.md Normal file
View File

@@ -0,0 +1,286 @@
<div align="center">
<h1>🚀 WebSoft API</h1>
<p><strong>基于 Spring Boot + MyBatis Plus 的企业级后端API服务</strong></p>
<p>
<img src="https://img.shields.io/badge/Java-1.8+-ED8B00" alt="Java">
<img src="https://img.shields.io/badge/Spring%20Boot-2.5.4-6DB33F" alt="Spring Boot">
<img src="https://img.shields.io/badge/MyBatis%20Plus-3.4.3-blue" alt="MyBatis Plus">
<img src="https://img.shields.io/badge/MySQL-8.0+-4479A1" alt="MySQL">
<img src="https://img.shields.io/badge/Redis-6.0+-DC382D" alt="Redis">
<img src="https://img.shields.io/badge/License-MIT-blue" alt="License">
</p>
</div>
## 📖 项目简介
WebSoft API 是一个基于 **Spring Boot + MyBatis Plus** 构建的现代化企业级后端API服务采用最新的Java技术栈
- **核心框架**Spring Boot 2.5.4 + Spring Security + Spring AOP
- **数据访问**MyBatis Plus 3.4.3 + Druid 连接池
- **数据库**MySQL + Redis
- **文档工具**Swagger 3.0 + Knife4j
- **工具库**Hutool、Lombok、FastJSON
## 项目演示
| 后台管理系统 | https://mp.websoft.top |
|--------|-------------------------------------------------------------------------------------------------------------------------------------|
| 测试账号 | 13800010123,123456
| 正式账号 | [立即注册](https://mp.websoft.top/register/?inviteCode=github) |
| 关注公众号 | ![输入图片说明](https://oss.wsdns.cn/20240327/f1175cc5aae741d3af05484747270bd5.jpeg?x-oss-process=image/resize,m_fixed,w_150/quality,Q_90) |
## 🛠️ 技术栈
### 核心框架
| 技术 | 版本 | 说明 |
|------|------|------|
| Java | 1.8+ | 编程语言 |
| Spring Boot | 2.5.4 | 微服务框架 |
| Spring Security | 5.5.x | 安全框架 |
| MyBatis Plus | 3.4.3 | ORM框架 |
| MySQL | 8.0+ | 关系型数据库 |
| Redis | 6.0+ | 缓存数据库 |
| Druid | 1.2.6 | 数据库连接池 |
### 功能组件
- **Swagger 3.0 + Knife4j** - API文档生成与测试
- **JWT** - 用户认证与授权
- **Hutool** - Java工具类库
- **EasyPOI** - Excel文件处理
- **阿里云OSS** - 对象存储服务
- **微信支付/支付宝** - 支付集成
- **Socket.IO** - 实时通信
- **MQTT** - 物联网消息传输
## 📋 环境要求
### 基础环境
-**Java 1.8+**
- 🗄️ **MySQL 8.0+**
- 🔴 **Redis 6.0+**
- 📦 **Maven 3.6+**
### 开发工具
- **推荐**IntelliJ IDEA / Eclipse
- **插件**Lombok Plugin、MyBatis Plugin
## 🚀 快速开始
### 1. 克隆项目
```bash
git clone https://github.com/websoft-top/mp-java.git
cd mp-java
```
### 2. 数据库配置
```sql
-- 创建数据库
CREATE DATABASE websoft_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- 导入数据库脚本(如果有的话)
-- source /path/to/database.sql
```
### 3. 配置文件
编辑 `src/main/resources/application-dev.yml` 文件,配置数据库连接:
```yaml
spring:
datasource:
url: jdbc:mysql://localhost:3306/websoft_db?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
username: your_username
password: your_password
redis:
host: localhost
port: 6379
password: your_redis_password
```
### 4. 启动项目
```bash
# 使用 Maven 启动
mvn spring-boot:run
# 或者使用 IDE 直接运行 WebSoftApplication.java
```
访问 `http://localhost:9200` 即可看到API服务。
### 5. API文档
启动项目后访问以下地址查看API文档
- Swagger UI: `http://localhost:9200/swagger-ui/index.html`
- Knife4j: `http://localhost:9200/doc.html`
## ⚙️ 配置说明
### 数据库配置
`application-dev.yml` 中配置数据库连接:
```yaml
spring:
datasource:
url: jdbc:mysql://localhost:3306/websoft_db
username: root
password: your_password
driver-class-name: com.mysql.cj.jdbc.Driver
```
### Redis配置
```yaml
spring:
redis:
host: localhost
port: 6379
password: your_redis_password
database: 0
```
### 阿里云OSS配置
```yaml
config:
endpoint: https://oss-cn-shenzhen.aliyuncs.com
accessKeyId: your_access_key_id
accessKeySecret: your_access_key_secret
bucketName: your_bucket_name
bucketDomain: https://your-domain.com
```
### 其他配置
- **JWT密钥**`config.token-key` 用于JWT令牌加密
- **文件上传路径**`config.upload-path` 本地文件存储路径
- **邮件服务**配置SMTP服务器用于发送邮件
## 🎯 核心功能
### 🔐 用户认证与授权
- **JWT认证**基于JSON Web Token的用户认证
- **Spring Security**:完整的安全框架集成
- **角色权限**基于RBAC的权限控制
- **图形验证码**:防止恶意登录
### 📝 内容管理系统(CMS)
- **文章管理**:支持富文本内容管理
- **媒体文件**:图片/视频文件上传与管理
- **分类管理**:内容分类与标签管理
- **SEO优化**:搜索引擎优化支持
### 🛒 电商系统
- **商品管理**:商品信息、规格、库存管理
- **订单系统**:完整的订单流程管理
- **支付集成**:支持微信支付、支付宝
- **物流跟踪**快递100物流查询集成
### 🔧 系统管理
- **用户管理**:用户信息维护与管理
- **系统配置**:动态配置管理
- **日志监控**:系统操作日志记录
- **数据备份**:数据库备份与恢复
### 📊 数据分析
- **统计报表**:业务数据统计分析
- **图表展示**:数据可视化展示
- **导出功能**Excel数据导出
- **实时监控**:系统性能监控
## 🏗️ 项目结构
```
src/main/java/com/gxwebsoft/
├── WebSoftApplication.java # 启动类
├── cms/ # 内容管理模块
│ ├── controller/ # 控制器层
│ ├── service/ # 业务逻辑层
│ ├── mapper/ # 数据访问层
│ └── entity/ # 实体类
├── shop/ # 商城模块
│ ├── controller/
│ ├── service/
│ ├── mapper/
│ └── entity/
├── common/ # 公共模块
│ ├── core/ # 核心配置
│ ├── utils/ # 工具类
│ └── exception/ # 异常处理
└── resources/
├── application.yml # 主配置文件
├── application-dev.yml # 开发环境配置
└── application-prod.yml# 生产环境配置
```
## 🔧 开发规范
### 代码结构
- **Controller层**处理HTTP请求参数验证
- **Service层**:业务逻辑处理,事务管理
- **Mapper层**数据访问SQL映射
- **Entity层**:数据实体,数据库表映射
### 命名规范
- **类名**使用大驼峰命名法PascalCase
- **方法名**使用小驼峰命名法camelCase
- **常量**:使用全大写,下划线分隔
- **包名**:使用小写字母,点分隔
## 📚 API文档
项目集成了Swagger和Knife4j提供完整的API文档
### 访问地址
- **Swagger UI**: `http://localhost:9200/swagger-ui/index.html`
- **Knife4j**: `http://localhost:9200/doc.html`
### 主要接口模块
- **用户认证**: `/api/auth/**` - 登录、注册、权限验证
- **用户管理**: `/api/user/**` - 用户CRUD操作
- **内容管理**: `/api/cms/**` - 文章、媒体文件管理
- **商城管理**: `/api/shop/**` - 商品、订单管理
- **系统管理**: `/api/system/**` - 系统配置、日志管理
## 🚀 部署指南
### 开发环境部署
```bash
# 1. 启动MySQL和Redis服务
# 2. 创建数据库并导入初始数据
# 3. 修改配置文件
# 4. 启动应用
mvn spring-boot:run
```
### 生产环境部署
```bash
# 1. 打包应用
mvn clean package -Dmaven.test.skip=true
# 2. 运行jar包
java -jar target/com-gxwebsoft-modules-1.5.0.jar --spring.profiles.active=prod
# 3. 使用Docker部署可选
docker build -t websoft-api .
docker run -d -p 9200:9200 websoft-api
```
## 🤝 贡献指南
1. Fork 本仓库
2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
4. 推送到分支 (`git push origin feature/AmazingFeature`)
5. 打开 Pull Request
## 📄 许可证
本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情
## 📞 联系我们
- 官网https://websoft.top
- 邮箱170083662@qq.top
- QQ群479713884
---
⭐ 如果这个项目对您有帮助,请给我们一个星标!

View File

@@ -0,0 +1,38 @@
version: '3.8'
services:
# 应用服务
cms-api:
build: .
container_name: cms-api
ports:
- "9200:9200"
environment:
- SPRING_PROFILES_ACTIVE=prod
- JAVA_OPTS=-Xms512m -Xmx1024m
volumes:
# 证书挂载卷 - 将宿主机证书目录挂载到容器
- ./certs:/app/certs:ro
# 日志挂载卷
- ./logs:/app/logs
# 上传文件挂载卷
- ./uploads:/app/uploads
networks:
- cms-network
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9200/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
cms-network:
driver: bridge
volumes:
mysql_data:
driver: local
redis_data:
driver: local

View File

@@ -0,0 +1,188 @@
# Docker容器化部署指南
## 支付证书问题解决方案
本项目已经解决了Docker容器中支付证书路径失效的问题支持多种证书加载方式。
## 目录结构
```
project-root/
├── Dockerfile
├── docker-compose.yml
├── certs/ # 证书目录(需要手动创建)
│ ├── wechat/ # 微信支付证书
│ │ ├── apiclient_key.pem
│ │ ├── apiclient_cert.pem
│ │ └── wechatpay_cert.pem
│ └── alipay/ # 支付宝证书
│ ├── app_private_key.pem
│ ├── appCertPublicKey.crt
│ ├── alipayCertPublicKey.crt
│ └── alipayRootCert.crt
├── logs/ # 日志目录
├── uploads/ # 上传文件目录
└── src/
```
## 部署步骤
### 1. 准备证书文件
创建证书目录并放置证书文件:
```bash
# 创建证书目录
mkdir -p certs/wechat
mkdir -p certs/alipay
# 复制微信支付证书到对应目录
cp /path/to/your/apiclient_key.pem certs/wechat/
cp /path/to/your/apiclient_cert.pem certs/wechat/
cp /path/to/your/wechatpay_cert.pem certs/wechat/
# 复制支付宝证书到对应目录
cp /path/to/your/app_private_key.pem certs/alipay/
cp /path/to/your/appCertPublicKey.crt certs/alipay/
cp /path/to/your/alipayCertPublicKey.crt certs/alipay/
cp /path/to/your/alipayRootCert.crt certs/alipay/
# 设置证书文件权限(只读)
chmod -R 444 certs/
```
### 2. 配置环境变量
创建 `.env` 文件(可选):
```bash
# 应用配置
SPRING_PROFILES_ACTIVE=prod
JAVA_OPTS=-Xms512m -Xmx1024m
# 数据库配置
MYSQL_ROOT_PASSWORD=root123456
MYSQL_DATABASE=modules
MYSQL_USER=modules
MYSQL_PASSWORD=8YdLnk7KsPAyDXGA
# Redis配置
REDIS_PASSWORD=redis_WSDb88
```
### 3. 构建和启动
```bash
# 构建应用
mvn clean package -DskipTests
# 启动所有服务
docker-compose up -d
# 查看服务状态
docker-compose ps
# 查看应用日志
docker-compose logs -f cms-app
```
### 4. 验证部署
```bash
# 检查应用健康状态
curl http://localhost:9200/actuator/health
# 检查证书是否正确加载
docker exec cms-java-app ls -la /app/certs/
```
## 证书加载模式
### 开发环境 (CLASSPATH)
- 证书文件放在 `src/main/resources/certs/` 目录下
- 打包时会包含在jar包中
- 适合开发和测试环境
### 生产环境 (VOLUME)
- 证书文件通过Docker挂载卷加载
- 证书文件在宿主机上,挂载到容器的 `/app/certs` 目录
- 支持证书文件的动态更新(重启容器后生效)
### 文件系统模式 (FILESYSTEM)
- 直接从文件系统路径加载证书
- 适合传统部署方式
## 配置说明
### application.yml 配置
```yaml
certificate:
load-mode: VOLUME # 证书加载模式
cert-root-path: /app/certs # 证书根目录
wechat-pay:
dev:
api-v3-key: "your-api-v3-key"
private-key-file: "apiclient_key.pem"
apiclient-cert-file: "apiclient_cert.pem"
wechatpay-cert-file: "wechatpay_cert.pem"
```
### 环境特定配置
- **开发环境**: `application-dev.yml` - 使用CLASSPATH模式
- **生产环境**: `application-prod.yml` - 使用VOLUME模式
## 故障排除
### 1. 证书文件找不到
```bash
# 检查证书文件是否存在
docker exec cms-java-app ls -la /app/certs/
# 检查文件权限
docker exec cms-java-app ls -la /app/certs/wechat/
```
### 2. 支付接口调用失败
```bash
# 查看应用日志
docker-compose logs cms-app | grep -i cert
# 检查证书配置
docker exec cms-java-app cat /app/application.yml | grep -A 10 certificate
```
### 3. 容器启动失败
```bash
# 查看详细错误信息
docker-compose logs cms-app
# 检查容器状态
docker-compose ps
```
## 安全建议
1. **证书文件权限**: 设置为只读权限 (444)
2. **证书目录权限**: 限制访问权限
3. **敏感信息**: 使用环境变量或Docker secrets管理敏感配置
4. **网络安全**: 使用内部网络,限制端口暴露
## 更新证书
1. 停止应用容器:`docker-compose stop cms-app`
2. 更新证书文件到 `certs/` 目录
3. 重启应用容器:`docker-compose start cms-app`
## 监控和日志
- 应用日志:`./logs/` 目录
- 容器日志:`docker-compose logs`
- 健康检查:访问 `/actuator/health` 端点
通过以上配置你的应用在Docker容器中就能正确加载支付证书了

451
jczxw-java/pom.xml Normal file
View File

@@ -0,0 +1,451 @@
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gxwebsoft</groupId>
<artifactId>websopy-api</artifactId>
<version>1.5.0</version>
<name>websopy-api</name>
<description>WebSoftApi project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.18</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<!-- ==================== 核心框架 ==================== -->
<!-- spring-boot-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Validation (for @Length, @NotBlank, etc.) -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- spring security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- spring-boot-aop -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- spring-boot-configuration-processor -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- ==================== 数据库 ==================== -->
<!-- MySQL -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<!-- PostgreSQL -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Druid 连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.20</version>
</dependency>
<!-- MyBatis-Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.3.3</version>
</dependency>
<!-- MyBatis-Plus 连表插件 -->
<dependency>
<groupId>com.github.yulichang</groupId>
<artifactId>mybatis-plus-join-boot-starter</artifactId>
<version>1.4.5</version>
</dependency>
<!-- MyBatis-Plus 代码生成器 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.4.1</version>
</dependency>
<!-- ==================== 缓存 ==================== -->
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- Caffeine 内存缓存 -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>3.1.8</version>
</dependency>
<!-- ==================== JSON 处理 ==================== -->
<!-- Jackson JSR310 support for Java 8 time -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<!-- JSch - SSH 连接 -->
<dependency>
<groupId>com.github.mwiede</groupId>
<artifactId>jsch</artifactId>
<version>0.2.18</version>
</dependency>
<!-- Fastjson (app 模块有使用) -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.43</version>
</dependency>
<!-- Gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<!-- Tika, 用于获取文件 content-type -->
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>2.9.1</version>
</dependency>
<!-- ==================== Hutool 工具库 ==================== -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
<version>5.8.25</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-extra</artifactId>
<version>5.8.25</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-http</artifactId>
<version>5.8.25</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-crypto</artifactId>
<version>5.8.25</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-json</artifactId>
<version>5.8.25</version>
</dependency>
<!-- ==================== JWT 认证 ==================== -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.11.5</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>
<!-- ==================== 图形验证码 ==================== -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>1.6.2</version>
</dependency>
<!-- ==================== RabbitMQ 消息队列 ==================== -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<!-- ==================== API 文档 ==================== -->
<!-- SpringDoc OpenAPI 3 -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.7.0</version>
</dependency>
<!-- Knife4j -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
<version>4.3.0</version>
</dependency>
<!-- ==================== WebSocket ==================== -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<!-- ==================== 邮件 ==================== -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<!-- ==================== 微信支付 APIv3 ==================== -->
<dependency>
<groupId>com.github.wechatpay-apiv3</groupId>
<artifactId>wechatpay-java</artifactId>
<version>0.2.17</version>
</dependency>
<!-- ==================== 阿里云机器翻译 ==================== -->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>alimt20181012</artifactId>
<version>1.0.3</version>
</dependency>
<!-- ==================== EasyPoi Excel处理 ==================== -->
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>4.4.0</version>
</dependency>
<!-- ==================== Beetl 模板引擎 ==================== -->
<dependency>
<groupId>com.ibeetl</groupId>
<artifactId>beetl</artifactId>
<version>3.15.10.RELEASE</version>
</dependency>
<!-- ==================== 微信小程序 SDK ==================== -->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-miniapp</artifactId>
<version>4.6.0</version>
</dependency>
<!-- ==================== 快递100 SDK ==================== -->
<dependency>
<groupId>com.github.kuaidi100-api</groupId>
<artifactId>sdk</artifactId>
<version>1.0.13</version>
</dependency>
<!-- ==================== 支付宝 SDK ==================== -->
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>4.35.0.ALL</version>
</dependency>
<!-- ==================== 阿里云 SDK 核心 ==================== -->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.6.2</version>
</dependency>
<!-- ==================== 阿里云实人认证 ==================== -->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>cloudauth20190307</artifactId>
<version>3.13.1</version>
</dependency>
<!-- ==================== JodConverter 文档转PDF ==================== -->
<dependency>
<groupId>com.github.livesense</groupId>
<artifactId>jodconverter-core</artifactId>
<version>1.0.5</version>
</dependency>
<!-- ==================== ZXing 二维码 ==================== -->
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.5.2</version>
</dependency>
<!-- ==================== JUnit 测试 ==================== -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<scope>test</scope>
</dependency>
<!-- ==================== HTTP 客户端 ==================== -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.12.0</version>
</dependency>
<!-- Apache HttpClient (WxOfficialController 等使用) -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>
<!-- ==================== 阿里云 OSS ==================== -->
<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>3.17.4</version>
</dependency>
<!-- ==================== 腾讯云 COS ==================== -->
<dependency>
<groupId>com.qcloud</groupId>
<artifactId>cos_api</artifactId>
<version>5.6.157</version>
</dependency>
<!-- ==================== 华为云 OBS ==================== -->
<dependency>
<groupId>com.huaweicloud</groupId>
<artifactId>esdk-obs-java</artifactId>
<version>3.25.10</version>
</dependency>
<!-- ==================== 七牛云 Kodo ==================== -->
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
<version>7.19.0</version>
</dependency>
<!-- ==================== 微信公众号 SDK ==================== -->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>4.6.0</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*Mapper.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.project-lombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
</path>
<path>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>2.7.18</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>aliYunMaven</id>
<url>https://maven.aliyun.com/repository/public</url>
</repository>
<repository>
<id>aliyun-sdk</id>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
</project>

View File

@@ -0,0 +1,31 @@
package com.gxwebsoft;
import com.gxwebsoft.common.core.config.ConfigProperties;
import com.gxwebsoft.common.core.config.MqttProperties;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
/**
* 启动类
* Created by WebSoft on 2018-02-22 11:29:03
*/
@EnableAsync
@EnableTransactionManagement
@MapperScan("com.gxwebsoft.**.mapper")
@EnableConfigurationProperties({ConfigProperties.class, MqttProperties.class})
@SpringBootApplication
@EnableScheduling
@EnableWebSocket
public class WebSoftApplication {
public static void main(String[] args) {
SpringApplication.run(WebSoftApplication.class, args);
}
}

View File

@@ -0,0 +1,119 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsAdService;
import com.gxwebsoft.cms.entity.CmsAd;
import com.gxwebsoft.cms.param.CmsAdParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 广告位控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "广告位管理")
@RestController
@RequestMapping("/api/cms/cms-ad")
public class CmsAdController extends BaseController {
@Resource
private CmsAdService cmsAdService;
@Operation(summary = "分页查询广告位")
@GetMapping("/page")
public ApiResult<PageResult<CmsAd>> page(CmsAdParam param) {
// 使用关联查询
return success(cmsAdService.pageRel(param));
}
@Operation(summary = "查询全部广告位")
@GetMapping()
public ApiResult<List<CmsAd>> list(CmsAdParam param) {
// 使用关联查询
return success(cmsAdService.listRel(param));
}
@Operation(summary = "根据id查询广告位")
@GetMapping("/{id}")
public ApiResult<CmsAd> get(@PathVariable("id") Integer id) {
// 使用关联查询
final CmsAd ad = cmsAdService.getByIdRel(id);
return success(ad);
}
@Operation(summary = "根据code查询广告位")
@GetMapping("/getByCode/{code}")
public ApiResult<CmsAd> getByCode(@PathVariable("code") String code) {
final CmsAd ad = cmsAdService.getByIdCode(code);
return success(ad);
}
@Operation(summary = "添加广告位")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsAd cmsAd) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsAd.setUserId(loginUser.getUserId());
}
if (cmsAdService.save(cmsAd)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改广告位")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsAd cmsAd) {
if (cmsAdService.updateById(cmsAd)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除广告位")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsAdService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加广告位")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsAd> list) {
if (cmsAdService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改广告位")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsAd> batchParam) {
if (batchParam.update(cmsAdService, "ad_id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除广告位")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsAdService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,114 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsAdRecordService;
import com.gxwebsoft.cms.entity.CmsAdRecord;
import com.gxwebsoft.cms.param.CmsAdRecordParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 广告图片控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "广告图片管理")
@RestController
@RequestMapping("/api/cms/cms-ad-record")
public class CmsAdRecordController extends BaseController {
@Resource
private CmsAdRecordService cmsAdRecordService;
@Operation(summary = "分页查询广告图片")
@GetMapping("/page")
public ApiResult<PageResult<CmsAdRecord>> page(CmsAdRecordParam param) {
// 使用关联查询
return success(cmsAdRecordService.pageRel(param));
}
@Operation(summary = "查询全部广告图片")
@GetMapping()
public ApiResult<List<CmsAdRecord>> list(CmsAdRecordParam param) {
PageParam<CmsAdRecord, CmsAdRecordParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(cmsAdRecordService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(cmsAdRecordService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsAdRecord:list')")
@OperationLog
@Operation(summary = "根据id查询广告图片")
@GetMapping("/{id}")
public ApiResult<CmsAdRecord> get(@PathVariable("id") Integer id) {
return success(cmsAdRecordService.getById(id));
// 使用关联查询
//return success(cmsAdRecordService.getByIdRel(id));
}
@Operation(summary = "添加广告图片")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsAdRecord cmsAdRecord) {
if (cmsAdRecordService.save(cmsAdRecord)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改广告图片")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsAdRecord cmsAdRecord) {
if (cmsAdRecordService.updateById(cmsAdRecord)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除广告图片")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsAdRecordService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加广告图片")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsAdRecord> list) {
if (cmsAdRecordService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改广告图片")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsAdRecord> batchParam) {
if (batchParam.update(cmsAdRecordService, "ad_record_id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除广告图片")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsAdRecordService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,111 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsArticleCategoryService;
import com.gxwebsoft.cms.entity.CmsArticleCategory;
import com.gxwebsoft.cms.param.CmsArticleCategoryParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 文章分类表控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "文章分类表管理")
@RestController
@RequestMapping("/api/cms/cms-article-category")
public class CmsArticleCategoryController extends BaseController {
@Resource
private CmsArticleCategoryService cmsArticleCategoryService;
@Operation(summary = "分页查询文章分类表")
@GetMapping("/page")
public ApiResult<PageResult<CmsArticleCategory>> page(CmsArticleCategoryParam param) {
// 使用关联查询
return success(cmsArticleCategoryService.pageRel(param));
}
@Operation(summary = "查询全部文章分类表")
@GetMapping()
public ApiResult<List<CmsArticleCategory>> list(CmsArticleCategoryParam param) {
// 使用关联查询
return success(cmsArticleCategoryService.listRel(param));
}
@Operation(summary = "根据id查询文章分类表")
@GetMapping("/{id}")
public ApiResult<CmsArticleCategory> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(cmsArticleCategoryService.getByIdRel(id));
}
@Operation(summary = "添加文章分类表")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsArticleCategory cmsArticleCategory) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsArticleCategory.setUserId(loginUser.getUserId());
}
if (cmsArticleCategoryService.save(cmsArticleCategory)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改文章分类表")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsArticleCategory cmsArticleCategory) {
if (cmsArticleCategoryService.updateById(cmsArticleCategory)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除文章分类表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsArticleCategoryService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加文章分类表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsArticleCategory> list) {
if (cmsArticleCategoryService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改文章分类表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticleCategory> batchParam) {
if (batchParam.update(cmsArticleCategoryService, "category_id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除文章分类表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsArticleCategoryService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,120 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsArticleCommentService;
import com.gxwebsoft.cms.entity.CmsArticleComment;
import com.gxwebsoft.cms.param.CmsArticleCommentParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 文章评论表控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "文章评论表管理")
@RestController
@RequestMapping("/api/cms/cms-article-comment")
public class CmsArticleCommentController extends BaseController {
@Resource
private CmsArticleCommentService cmsArticleCommentService;
@Operation(summary = "分页查询文章评论表")
@GetMapping("/page")
public ApiResult<PageResult<CmsArticleComment>> page(CmsArticleCommentParam param) {
// 使用关联查询
return success(cmsArticleCommentService.pageRel(param));
}
@Operation(summary = "查询全部文章评论表")
@GetMapping()
public ApiResult<List<CmsArticleComment>> list(CmsArticleCommentParam param) {
PageParam<CmsArticleComment, CmsArticleCommentParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(cmsArticleCommentService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(cmsArticleCommentService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsArticleComment:list')")
@OperationLog
@Operation(summary = "根据id查询文章评论表")
@GetMapping("/{id}")
public ApiResult<CmsArticleComment> get(@PathVariable("id") Integer id) {
return success(cmsArticleCommentService.getById(id));
// 使用关联查询
//return success(cmsArticleCommentService.getByIdRel(id));
}
@Operation(summary = "添加文章评论表")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsArticleComment cmsArticleComment) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsArticleComment.setUserId(loginUser.getUserId());
}
if (cmsArticleCommentService.save(cmsArticleComment)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改文章评论表")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsArticleComment cmsArticleComment) {
if (cmsArticleCommentService.updateById(cmsArticleComment)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除文章评论表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsArticleCommentService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加文章评论表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsArticleComment> list) {
if (cmsArticleCommentService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改文章评论表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticleComment> batchParam) {
if (batchParam.update(cmsArticleCommentService, "comment_id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除文章评论表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsArticleCommentService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,113 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsArticleContentService;
import com.gxwebsoft.cms.entity.CmsArticleContent;
import com.gxwebsoft.cms.param.CmsArticleContentParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 文章记录表控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "文章记录表管理")
@RestController
@RequestMapping("/api/cms/cms-article-content")
public class CmsArticleContentController extends BaseController {
@Resource
private CmsArticleContentService cmsArticleContentService;
@Operation(summary = "分页查询文章记录表")
@GetMapping("/page")
public ApiResult<PageResult<CmsArticleContent>> page(CmsArticleContentParam param) {
// 使用关联查询
return success(cmsArticleContentService.pageRel(param));
}
@Operation(summary = "查询全部文章记录表")
@GetMapping()
public ApiResult<List<CmsArticleContent>> list(CmsArticleContentParam param) {
// PageParam<CmsArticleContent, CmsArticleContentParam> page = new PageParam<>(param);
// page.setDefaultOrder("create_time desc");
// return success(cmsArticleContentService.list(page.getOrderWrapper()));
// 使用关联查询
return success(cmsArticleContentService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsArticleContent:list')")
@OperationLog
@Operation(summary = "根据id查询文章记录表")
@GetMapping("/{id}")
public ApiResult<CmsArticleContent> get(@PathVariable("id") Integer id) {
// return success(cmsArticleContentService.getById(id));
// 使用关联查询
return success(cmsArticleContentService.getByIdRel(id));
}
@Operation(summary = "添加文章记录表")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsArticleContent cmsArticleContent) {
if (cmsArticleContentService.save(cmsArticleContent)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改文章记录表")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsArticleContent cmsArticleContent) {
if (cmsArticleContentService.updateById(cmsArticleContent)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除文章记录表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsArticleContentService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加文章记录表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsArticleContent> list) {
if (cmsArticleContentService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改文章记录表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticleContent> batchParam) {
if (batchParam.update(cmsArticleContentService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除文章记录表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsArticleContentService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,379 @@
package com.gxwebsoft.cms.controller;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.gxwebsoft.cms.entity.*;
import com.gxwebsoft.cms.param.CmsArticleImportParam;
import com.gxwebsoft.cms.service.*;
import com.gxwebsoft.common.core.utils.JSONUtil;
import com.gxwebsoft.common.core.utils.RedisUtil;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.param.CmsArticleParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.common.system.service.UserService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.*;
import static com.gxwebsoft.common.core.constants.ArticleConstants.CACHE_KEY_ARTICLE;
/**
* 文章控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Slf4j
@Validated
@Tag(name = "文章管理")
@RestController
@RequestMapping("/api/cms/cms-article")
public class CmsArticleController extends BaseController {
@Resource
private CmsArticleService cmsArticleService;
@Resource
private CmsArticleContentService articleContentService;
@Resource
@Lazy
private CmsNavigationService cmsNavigationService;
@Resource
private CmsModelService cmsModelService;
@Resource
private UserService userService;
@Resource
private RedisUtil redisUtil;
private static final long CACHE_MINUTES = 30L;
@Operation(summary = "分页查询文章")
@GetMapping("/page")
public ApiResult<PageResult<CmsArticle>> page(CmsArticleParam param) {
// 使用关联查询
return success(cmsArticleService.pageRel(param));
}
@Operation(summary = "查询全部文章")
@GetMapping()
public ApiResult<List<CmsArticle>> list(CmsArticleParam param) {
// 使用关联查询
return success(cmsArticleService.listRel(param));
}
@Operation(summary = "根据id查询文章")
@GetMapping("/{id}")
public ApiResult<CmsArticle> get(@PathVariable("id") @NotNull Integer id) {
final CmsArticle article = cmsArticleService.getByIdRel(id);
if (ObjectUtil.isNotEmpty(article)) {
final CmsArticleContent item = articleContentService.getByIdRel(article.getArticleId());
if (ObjectUtil.isNotEmpty(item)) {
article.setContent(item.getContent());
}
return success(article);
}
return fail("文章ID不存在",null);
}
@Operation(summary = "根据code查询文章")
@GetMapping("/getByCode/{code}")
public ApiResult<CmsArticle> getByCode(@PathVariable("code") String code) {
final CmsArticle article = cmsArticleService.getByIdCode(code);
if (ObjectUtil.isNotEmpty(article)) {
final CmsArticleContent item = articleContentService.getByIdRel(article.getArticleId());
if (ObjectUtil.isNotEmpty(item)) {
article.setContent(item.getContent());
}
}
return success(article);
}
@PreAuthorize("hasAuthority('cms:cmsArticle:save')")
@Operation(summary = "添加文章")
@PostMapping()
public ApiResult<?> save(@RequestBody @Valid CmsArticle article) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
article.setUserId(loginUser.getUserId());
article.setAuthor(loginUser.getNickname());
article.setMerchantId(loginUser.getMerchantId());
if (cmsArticleService.saveRel(article)) {
return success("添加成功");
}
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsArticle:update')")
@Operation(summary = "修改文章")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsArticle article) {
if (cmsArticleService.updateByIdRel(article)) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsArticle:remove')")
@Operation(summary = "删除文章")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsArticleService.removeById(id)) {
redisUtil.delete(CACHE_KEY_ARTICLE + id);
return success("删除成功");
}
return fail("删除失败");
}
@PreAuthorize("hasAuthority('cms:cmsArticle:save')")
@Operation(summary = "批量添加文章")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsArticle> list) {
if (cmsArticleService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsArticle:update')")
@Operation(summary = "批量修改文章")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticle> batchParam) {
if (batchParam.update(cmsArticleService, "article_id")) {
// 删除缓存
final List<Serializable> ids = batchParam.getIds();
ids.forEach(id -> {
redisUtil.delete(CACHE_KEY_ARTICLE + id);
});
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsArticle:remove')")
@Operation(summary = "批量删除文章")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsArticleService.removeByIds(ids)) {
// 删除缓存
ids.forEach(id -> {
redisUtil.delete(CACHE_KEY_ARTICLE + id);
});
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "读取上一篇")
@GetMapping("/getPrevious/{id}")
public ApiResult<CmsArticle> getPrevious(@PathVariable("id") Integer id) {
final CmsArticle item = cmsArticleService.getById(id);
if (ObjectUtil.isEmpty(item)) {
return success("没有找到上一篇文章",null);
}
CmsArticle article;
// TODO 按排序号规则
LambdaQueryWrapper<CmsArticle> wrapper = new LambdaQueryWrapper<>();
wrapper.lt(CmsArticle::getSortNumber, item.getSortNumber());
wrapper.eq(CmsArticle::getStatus, 0);
wrapper.eq(CmsArticle::getType, 0);
wrapper.eq(CmsArticle::getCategoryId, item.getCategoryId());
wrapper.orderByDesc(CmsArticle::getSortNumber);
wrapper.last("limit 1");
article = cmsArticleService.getOne(wrapper);
if (ObjectUtil.isNotEmpty(article)) {
return success(article);
}
// TODO 按ID排序
LambdaQueryWrapper<CmsArticle> wrapper2 = new LambdaQueryWrapper<>();
wrapper2.lt(CmsArticle::getArticleId, item.getArticleId());
wrapper2.eq(CmsArticle::getStatus, 0);
wrapper2.eq(CmsArticle::getCategoryId, item.getCategoryId());
wrapper2.last("limit 1");
wrapper2.orderByDesc(CmsArticle::getArticleId);
article = cmsArticleService.getOne(wrapper2);
return success(article);
}
@Operation(summary = "读取下一篇")
@GetMapping("/getNext/{id}")
public ApiResult<CmsArticle> getNext(@PathVariable("id") Integer id) {
CmsArticle item = cmsArticleService.getById(id);
if (ObjectUtil.isEmpty(item)) {
return success("没有找到下一篇文章",null);
}
CmsArticle article;
// TODO 按排序号规则
LambdaQueryWrapper<CmsArticle> wrapper = new LambdaQueryWrapper<>();
wrapper.gt(CmsArticle::getSortNumber, item.getSortNumber());
wrapper.eq(CmsArticle::getStatus, 0);
wrapper.eq(CmsArticle::getType, 0);
wrapper.eq(CmsArticle::getCategoryId, item.getCategoryId());
wrapper.orderByAsc(CmsArticle::getSortNumber);
wrapper.last("limit 1");
article = cmsArticleService.getOne(wrapper);
if (ObjectUtil.isNotEmpty(article)) {
return success(article);
}
// TODO 按ID排序
LambdaQueryWrapper<CmsArticle> wrapper2 = new LambdaQueryWrapper<>();
wrapper2.gt(CmsArticle::getArticleId, item.getArticleId());
wrapper2.eq(CmsArticle::getStatus, 0);
wrapper2.eq(CmsArticle::getCategoryId, item.getCategoryId());
wrapper2.last("limit 1");
wrapper2.orderByAsc(CmsArticle::getArticleId);
article = cmsArticleService.getOne(wrapper2);
return success(article);
}
@Operation(summary = "统计信息")
@GetMapping("/data")
public ApiResult<Map<String, Integer>> data(CmsArticleParam param) {
Map<String, Integer> data = new HashMap<>();
final LambdaQueryWrapper<CmsArticle> wrapper = new LambdaQueryWrapper<>();
if (param.getMerchantId() != null) {
wrapper.eq(CmsArticle::getMerchantId, param.getMerchantId());
}
long totalNum = cmsArticleService.count(
wrapper.eq(CmsArticle::getDeleted, 0).eq(CmsArticle::getStatus, 0)
);
data.put("totalNum", Math.toIntExact(totalNum));
long totalNum2 = cmsArticleService.count(
wrapper.eq(CmsArticle::getStatus, 1)
);
data.put("totalNum2", Math.toIntExact(totalNum2));
long totalNum3 = cmsArticleService.count(
wrapper.gt(CmsArticle::getStatus, 1)
);
data.put("totalNum3", Math.toIntExact(totalNum3));
return success(data);
}
@Operation(summary = "密码校验")
@GetMapping("/checkArticlePassword")
public ApiResult<?> checkArticlePassword(CmsArticle param) {
if (!userService.comparePassword(param.getPassword(), param.getPassword2())) {
return fail("密码不正确");
}
return success("密码正确");
}
/**
* excel批量导入文章
*/
@PreAuthorize("hasAuthority('cms:cmsArticle:save')")
@Operation(summary = "批量导入文章")
@Transactional(rollbackFor = {Exception.class})
@PostMapping("/import")
public ApiResult<List<String>> importBatch(MultipartFile file) {
ImportParams importParams = new ImportParams();
try {
List<CmsArticleImportParam> list = ExcelImportUtil.importExcel(file.getInputStream(), CmsArticleImportParam.class, importParams);
list.forEach(d -> {
CmsArticle item = JSONUtil.parseObject(JSONUtil.toJSONString(d), CmsArticle.class);
assert item != null;
if (ObjectUtil.isNotEmpty(item)) {
if (item.getStatus() == null) {
item.setStatus(1);
}
if (cmsArticleService.save(item)) {
CmsArticleContent content = new CmsArticleContent();
content.setArticleId(item.getArticleId());
content.setContent(item.getContent());
articleContentService.save(content);
}
}
});
return success("成功导入" + list.size() + "", null);
} catch (Exception e) {
e.printStackTrace();
}
return fail("导入失败", null);
}
@Operation(summary = "按标签分页查询")
@GetMapping("/findTags")
public ApiResult<List<CmsArticle>> findTags(CmsArticleParam param) {
final String tags = param.getTags();
if (StringUtils.isNotBlank(tags)) {
final String[] split = tags.split(",");
final List<String> list = Arrays.asList(split);
LambdaQueryWrapper<CmsArticle> queryWrapper = new LambdaQueryWrapper();
if (StrUtil.isNotBlank(tags)) {
for (String s : list) {
queryWrapper.or().like(CmsArticle::getTags, s);
// queryWrapper.or().apply("LOCATE(" + "'" + s + "'," + "tags" + ") > 0");
}
}
if (param.getCategoryId() != null) {
queryWrapper.eq(CmsArticle::getCategoryId, param.getCategoryId());
}
if (param.getDetail() != null) {
queryWrapper.eq(CmsArticle::getDetail, param.getDetail());
}
queryWrapper.last("limit 8");
List<CmsArticle> articles = cmsArticleService.list(queryWrapper);
return success(articles);
}
return success("", null);
}
@Operation(summary = "按标签分页查询")
@GetMapping("/pageTags")
public ApiResult<List<CmsArticle>> pageTags(CmsArticleParam param) {
final String tags = param.getTags();
if (StringUtils.isNotBlank(tags)) {
final String[] split = tags.split(",");
final List<String> list = Arrays.asList(split);
LambdaQueryWrapper<CmsArticle> queryWrapper = new LambdaQueryWrapper<>();
for (String s : list) {
queryWrapper.or().like(CmsArticle::getTags, s);
}
queryWrapper.orderByDesc(CmsArticle::getCreateTime);
queryWrapper.last("limit 100");
List<CmsArticle> articles = cmsArticleService.list(queryWrapper);
if (!articles.isEmpty()) {
List<CmsNavigation> navigationList = cmsNavigationService.listByIds(articles.stream().map(CmsArticle::getCategoryId).toList());
for (CmsArticle article : articles) {
for (CmsNavigation navigation : navigationList) {
if (article.getCategoryId().equals(navigation.getNavigationId())) {
article.setCategoryName(navigation.getTitle());
}
}
}
}
return success(articles);
}
return success("", null);
}
@Operation(summary = "按IDS查询")
@GetMapping("/getByIds")
public ApiResult<List<CmsArticle>> getByIds(CmsArticleParam param) {
// 使用关联查询
return success(cmsArticleService.list(new LambdaQueryWrapper<CmsArticle>().in(CmsArticle::getArticleId, param.getArticleIds())));
}
}

View File

@@ -0,0 +1,120 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsArticleCountService;
import com.gxwebsoft.cms.entity.CmsArticleCount;
import com.gxwebsoft.cms.param.CmsArticleCountParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 点赞文章控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "点赞文章管理")
@RestController
@RequestMapping("/api/cms/cms-article-count")
public class CmsArticleCountController extends BaseController {
@Resource
private CmsArticleCountService cmsArticleCountService;
@Operation(summary = "分页查询点赞文章")
@GetMapping("/page")
public ApiResult<PageResult<CmsArticleCount>> page(CmsArticleCountParam param) {
// 使用关联查询
return success(cmsArticleCountService.pageRel(param));
}
@Operation(summary = "查询全部点赞文章")
@GetMapping()
public ApiResult<List<CmsArticleCount>> list(CmsArticleCountParam param) {
PageParam<CmsArticleCount, CmsArticleCountParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(cmsArticleCountService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(cmsArticleCountService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsArticleCount:list')")
@OperationLog
@Operation(summary = "根据id查询点赞文章")
@GetMapping("/{id}")
public ApiResult<CmsArticleCount> get(@PathVariable("id") Integer id) {
return success(cmsArticleCountService.getById(id));
// 使用关联查询
//return success(cmsArticleCountService.getByIdRel(id));
}
@Operation(summary = "添加点赞文章")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsArticleCount cmsArticleCount) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsArticleCount.setUserId(loginUser.getUserId());
}
if (cmsArticleCountService.save(cmsArticleCount)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改点赞文章")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsArticleCount cmsArticleCount) {
if (cmsArticleCountService.updateById(cmsArticleCount)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除点赞文章")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsArticleCountService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加点赞文章")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsArticleCount> list) {
if (cmsArticleCountService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改点赞文章")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticleCount> batchParam) {
if (batchParam.update(cmsArticleCountService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除点赞文章")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsArticleCountService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,120 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsArticleLikeService;
import com.gxwebsoft.cms.entity.CmsArticleLike;
import com.gxwebsoft.cms.param.CmsArticleLikeParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 点赞文章控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "点赞文章管理")
@RestController
@RequestMapping("/api/cms/cms-article-like")
public class CmsArticleLikeController extends BaseController {
@Resource
private CmsArticleLikeService cmsArticleLikeService;
@Operation(summary = "分页查询点赞文章")
@GetMapping("/page")
public ApiResult<PageResult<CmsArticleLike>> page(CmsArticleLikeParam param) {
// 使用关联查询
return success(cmsArticleLikeService.pageRel(param));
}
@Operation(summary = "查询全部点赞文章")
@GetMapping()
public ApiResult<List<CmsArticleLike>> list(CmsArticleLikeParam param) {
PageParam<CmsArticleLike, CmsArticleLikeParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(cmsArticleLikeService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(cmsArticleLikeService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsArticleLike:list')")
@OperationLog
@Operation(summary = "根据id查询点赞文章")
@GetMapping("/{id}")
public ApiResult<CmsArticleLike> get(@PathVariable("id") Integer id) {
return success(cmsArticleLikeService.getById(id));
// 使用关联查询
//return success(cmsArticleLikeService.getByIdRel(id));
}
@Operation(summary = "添加点赞文章")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsArticleLike cmsArticleLike) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsArticleLike.setUserId(loginUser.getUserId());
}
if (cmsArticleLikeService.save(cmsArticleLike)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改点赞文章")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsArticleLike cmsArticleLike) {
if (cmsArticleLikeService.updateById(cmsArticleLike)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除点赞文章")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsArticleLikeService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加点赞文章")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsArticleLike> list) {
if (cmsArticleLikeService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改点赞文章")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticleLike> batchParam) {
if (batchParam.update(cmsArticleLikeService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除点赞文章")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsArticleLikeService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,127 @@
package com.gxwebsoft.cms.controller;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.gxwebsoft.cms.entity.CmsNavigation;
import com.gxwebsoft.cms.service.CmsNavigationService;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsDesignService;
import com.gxwebsoft.cms.entity.CmsDesign;
import com.gxwebsoft.cms.param.CmsDesignParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 页面管理记录表控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "页面管理记录表管理")
@RestController
@RequestMapping("/api/cms/cms-design")
public class CmsDesignController extends BaseController {
@Resource
private CmsDesignService cmsDesignService;
@Resource
private CmsNavigationService cmsNavigationService;
@Operation(summary = "分页查询页面管理记录表")
@GetMapping("/page")
public ApiResult<PageResult<CmsDesign>> page(CmsDesignParam param) {
// 使用关联查询
return success(cmsDesignService.pageRel(param));
}
@Operation(summary = "查询全部页面管理记录表")
@GetMapping()
public ApiResult<List<CmsDesign>> list(CmsDesignParam param) {
// 使用关联查询
return success(cmsDesignService.listRel(param));
}
@Operation(summary = "根据id查询页面管理记录表")
@GetMapping("/{id}")
public ApiResult<CmsDesign> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(cmsDesignService.getByIdRel(id));
}
@Operation(summary = "添加页面管理记录表")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsDesign cmsDesign) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsDesign.setUserId(loginUser.getUserId());
}
if (cmsDesignService.save(cmsDesign)) {
try {
cmsNavigationService.update(new LambdaUpdateWrapper<CmsNavigation>().set(CmsNavigation::getBanner, cmsDesign.getPhoto()).eq(CmsNavigation::getNavigationId,cmsDesign.getCategoryId()));
// 同步翻译英文版
cmsDesignService.translate(cmsDesign);
return success("添加成功");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return fail("添加失败");
}
@Operation(summary = "修改页面管理记录表")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsDesign cmsDesign) {
if (cmsDesignService.updateById(cmsDesign)) {
// 同步翻译英文版
cmsDesignService.translate(cmsDesign);
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除页面管理记录表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsDesignService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加页面管理记录表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsDesign> list) {
if (cmsDesignService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改页面管理记录表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsDesign> batchParam) {
if (batchParam.update(cmsDesignService, "page_id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除页面管理记录表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsDesignService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,120 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsDesignRecordService;
import com.gxwebsoft.cms.entity.CmsDesignRecord;
import com.gxwebsoft.cms.param.CmsDesignRecordParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 页面组件表控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "页面组件表管理")
@RestController
@RequestMapping("/api/cms/cms-design-record")
public class CmsDesignRecordController extends BaseController {
@Resource
private CmsDesignRecordService cmsDesignRecordService;
@Operation(summary = "分页查询页面组件表")
@GetMapping("/page")
public ApiResult<PageResult<CmsDesignRecord>> page(CmsDesignRecordParam param) {
// 使用关联查询
return success(cmsDesignRecordService.pageRel(param));
}
@Operation(summary = "查询全部页面组件表")
@GetMapping()
public ApiResult<List<CmsDesignRecord>> list(CmsDesignRecordParam param) {
PageParam<CmsDesignRecord, CmsDesignRecordParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(cmsDesignRecordService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(cmsDesignRecordService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsDesignRecord:list')")
@OperationLog
@Operation(summary = "根据id查询页面组件表")
@GetMapping("/{id}")
public ApiResult<CmsDesignRecord> get(@PathVariable("id") Integer id) {
return success(cmsDesignRecordService.getById(id));
// 使用关联查询
//return success(cmsDesignRecordService.getByIdRel(id));
}
@Operation(summary = "添加页面组件表")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsDesignRecord cmsDesignRecord) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsDesignRecord.setUserId(loginUser.getUserId());
}
if (cmsDesignRecordService.save(cmsDesignRecord)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改页面组件表")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsDesignRecord cmsDesignRecord) {
if (cmsDesignRecordService.updateById(cmsDesignRecord)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除页面组件表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsDesignRecordService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加页面组件表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsDesignRecord> list) {
if (cmsDesignRecordService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改页面组件表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsDesignRecord> batchParam) {
if (batchParam.update(cmsDesignRecordService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除页面组件表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsDesignRecordService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,166 @@
package com.gxwebsoft.cms.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gxwebsoft.cms.mapper.CmsDomainMapper;
import com.gxwebsoft.common.core.utils.RedisUtil;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsDomainService;
import com.gxwebsoft.cms.entity.CmsDomain;
import com.gxwebsoft.cms.param.CmsDomainParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 网站域名记录表控制器
*
* @author 科技小王子
* @since 2024-09-10 20:36:14
*/
@Tag(name = "网站域名记录表管理")
@RestController
@RequestMapping("/api/cms/cms-domain")
public class CmsDomainController extends BaseController {
@Resource
private CmsDomainService cmsDomainService;
@Resource
private CmsDomainMapper cmsDomainMapper;
@Resource
private RedisUtil redisUtil;
@Operation(summary = "分页查询网站域名记录表")
@GetMapping("/page")
public ApiResult<PageResult<CmsDomain>> page(CmsDomainParam param) {
// 使用关联查询
return success(cmsDomainService.pageRel(param));
}
@Operation(summary = "查询全部网站域名记录表")
@GetMapping()
public ApiResult<List<CmsDomain>> list(CmsDomainParam param) {
PageParam<CmsDomain, CmsDomainParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(cmsDomainService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(cmsDomainService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsDomain:list')")
@OperationLog
@Operation(summary = "根据id查询网站域名记录表")
@GetMapping("/{id}")
public ApiResult<CmsDomain> get(@PathVariable("id") Integer id) {
return success(cmsDomainService.getById(id));
// 使用关联查询
//return success(cmsDomainService.getByIdRel(id));
}
@Operation(summary = "添加网站域名记录表")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsDomain cmsDomain) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsDomain.setUserId(loginUser.getUserId());
}
if (cmsDomainService.save(cmsDomain)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改网站域名记录表")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsDomain cmsDomain) {
if (cmsDomainService.updateById(cmsDomain)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除网站域名记录表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsDomainService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加网站域名记录表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsDomain> list) {
if (cmsDomainService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改网站域名记录表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsDomain> batchParam) {
if (batchParam.update(cmsDomainService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除网站域名记录表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsDomainService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "查询授权域名信息")
@GetMapping("/getTenantIdByDomain")
public ApiResult<?> getTenantIdByDomain(CmsDomainParam param) {
final CmsDomain domain = cmsDomainService.getOne(new LambdaQueryWrapper<CmsDomain>().eq(CmsDomain::getDomain, param.getDomain()).last("limit 1"));
return success(domain);
}
@Operation(summary = "授权二级域名")
@PostMapping("/domain")
public ApiResult<?> domain(@RequestBody CmsDomain cmsDomain) {
final User loginUser = getLoginUser();
String key = "Domain:" + cmsDomain.getDomain();
final Integer tenantId = loginUser.getTenantId();
final CmsDomain domain = cmsDomainService.getOne(new LambdaQueryWrapper<CmsDomain>()
.eq(CmsDomain::getWebsiteId, cmsDomain.getWebsiteId()).last("limit 1"));
if (ObjectUtil.isNotEmpty(domain)) {
// 重写缓存
redisUtil.set(key,tenantId);
domain.setDomain(cmsDomain.getDomain());
cmsDomainService.updateById(domain);
return success("授权成功");
}
if(ObjectUtil.isEmpty(domain)){
cmsDomain.setUserId(loginUser.getUserId());
cmsDomain.setSortNumber(100);
cmsDomain.setStatus(1);
cmsDomain.setHostName("@");
cmsDomain.setWebsiteId(cmsDomain.getWebsiteId());
cmsDomain.setTenantId(tenantId);
if(cmsDomainService.save(cmsDomain)){
// 重写缓存
redisUtil.set(key,tenantId);
return success("授权成功");
}
}
return fail("授权失败");
}
}

View File

@@ -0,0 +1,120 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsFormService;
import com.gxwebsoft.cms.entity.CmsForm;
import com.gxwebsoft.cms.param.CmsFormParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 表单设计表控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "表单设计表管理")
@RestController
@RequestMapping("/api/cms/cms-form")
public class CmsFormController extends BaseController {
@Resource
private CmsFormService cmsFormService;
@Operation(summary = "分页查询表单设计表")
@GetMapping("/page")
public ApiResult<PageResult<CmsForm>> page(CmsFormParam param) {
// 使用关联查询
return success(cmsFormService.pageRel(param));
}
@Operation(summary = "查询全部表单设计表")
@GetMapping()
public ApiResult<List<CmsForm>> list(CmsFormParam param) {
PageParam<CmsForm, CmsFormParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(cmsFormService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(cmsFormService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsForm:list')")
@OperationLog
@Operation(summary = "根据id查询表单设计表")
@GetMapping("/{id}")
public ApiResult<CmsForm> get(@PathVariable("id") Integer id) {
return success(cmsFormService.getById(id));
// 使用关联查询
//return success(cmsFormService.getByIdRel(id));
}
@Operation(summary = "添加表单设计表")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsForm cmsForm) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsForm.setUserId(loginUser.getUserId());
}
if (cmsFormService.save(cmsForm)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改表单设计表")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsForm cmsForm) {
if (cmsFormService.updateById(cmsForm)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除表单设计表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsFormService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加表单设计表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsForm> list) {
if (cmsFormService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改表单设计表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsForm> batchParam) {
if (batchParam.update(cmsFormService, "form_id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除表单设计表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsFormService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,120 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsFormRecordService;
import com.gxwebsoft.cms.entity.CmsFormRecord;
import com.gxwebsoft.cms.param.CmsFormRecordParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 表单数据记录表控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "表单数据记录表管理")
@RestController
@RequestMapping("/api/cms/cms-form-record")
public class CmsFormRecordController extends BaseController {
@Resource
private CmsFormRecordService cmsFormRecordService;
@Operation(summary = "分页查询表单数据记录表")
@GetMapping("/page")
public ApiResult<PageResult<CmsFormRecord>> page(CmsFormRecordParam param) {
// 使用关联查询
return success(cmsFormRecordService.pageRel(param));
}
@Operation(summary = "查询全部表单数据记录表")
@GetMapping()
public ApiResult<List<CmsFormRecord>> list(CmsFormRecordParam param) {
PageParam<CmsFormRecord, CmsFormRecordParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(cmsFormRecordService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(cmsFormRecordService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsFormRecord:list')")
@OperationLog
@Operation(summary = "根据id查询表单数据记录表")
@GetMapping("/{id}")
public ApiResult<CmsFormRecord> get(@PathVariable("id") Integer id) {
return success(cmsFormRecordService.getById(id));
// 使用关联查询
//return success(cmsFormRecordService.getByIdRel(id));
}
@Operation(summary = "添加表单数据记录表")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsFormRecord cmsFormRecord) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsFormRecord.setUserId(loginUser.getUserId());
}
if (cmsFormRecordService.save(cmsFormRecord)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改表单数据记录表")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsFormRecord cmsFormRecord) {
if (cmsFormRecordService.updateById(cmsFormRecord)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除表单数据记录表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsFormRecordService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加表单数据记录表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsFormRecord> list) {
if (cmsFormRecordService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改表单数据记录表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsFormRecord> batchParam) {
if (batchParam.update(cmsFormRecordService, "form_record_id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除表单数据记录表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsFormRecordService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,113 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsLangService;
import com.gxwebsoft.cms.entity.CmsLang;
import com.gxwebsoft.cms.param.CmsLangParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 国际化控制器
*
* @author 科技小王子
* @since 2025-01-06 19:29:26
*/
@Tag(name = "国际化管理")
@RestController
@RequestMapping("/api/cms/cms-lang")
public class CmsLangController extends BaseController {
@Resource
private CmsLangService cmsLangService;
@Operation(summary = "分页查询国际化")
@GetMapping("/page")
public ApiResult<PageResult<CmsLang>> page(CmsLangParam param) {
// 使用关联查询
return success(cmsLangService.pageRel(param));
}
@Operation(summary = "查询全部国际化")
@GetMapping()
public ApiResult<List<CmsLang>> list(CmsLangParam param) {
// 使用关联查询
return success(cmsLangService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsLang:list')")
@Operation(summary = "根据id查询国际化")
@GetMapping("/{id}")
public ApiResult<CmsLang> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(cmsLangService.getByIdRel(id));
}
@PreAuthorize("hasAuthority('cms:cmsLang:save')")
@Operation(summary = "添加国际化")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsLang cmsLang) {
if (cmsLangService.save(cmsLang)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsLang:update')")
@Operation(summary = "修改国际化")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsLang cmsLang) {
if (cmsLangService.updateById(cmsLang)) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsLang:remove')")
@Operation(summary = "删除国际化")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsLangService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@PreAuthorize("hasAuthority('cms:cmsLang:save')")
@Operation(summary = "批量添加国际化")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsLang> list) {
if (cmsLangService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsLang:update')")
@Operation(summary = "批量修改国际化")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsLang> batchParam) {
if (batchParam.update(cmsLangService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsLang:reomve')")
@Operation(summary = "批量删除国际化")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsLangService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,113 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsLangLogService;
import com.gxwebsoft.cms.entity.CmsLangLog;
import com.gxwebsoft.cms.param.CmsLangLogParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 国际化记录启用控制器
*
* @author 科技小王子
* @since 2025-01-06 19:29:26
*/
@Tag(name = "国际化记录启用管理")
@RestController
@RequestMapping("/api/cms/cms-lang-log")
public class CmsLangLogController extends BaseController {
@Resource
private CmsLangLogService cmsLangLogService;
@Operation(summary = "分页查询国际化记录启用")
@GetMapping("/page")
public ApiResult<PageResult<CmsLangLog>> page(CmsLangLogParam param) {
// 使用关联查询
return success(cmsLangLogService.pageRel(param));
}
@Operation(summary = "查询全部国际化记录启用")
@GetMapping()
public ApiResult<List<CmsLangLog>> list(CmsLangLogParam param) {
// 使用关联查询
return success(cmsLangLogService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsLangLog:list')")
@Operation(summary = "根据id查询国际化记录启用")
@GetMapping("/{id}")
public ApiResult<CmsLangLog> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(cmsLangLogService.getByIdRel(id));
}
@PreAuthorize("hasAuthority('cms:cmsLangLog:save')")
@Operation(summary = "添加国际化记录启用")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsLangLog cmsLangLog) {
if (cmsLangLogService.save(cmsLangLog)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsLangLog:update')")
@Operation(summary = "修改国际化记录启用")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsLangLog cmsLangLog) {
if (cmsLangLogService.updateById(cmsLangLog)) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsLangLog:remove')")
@Operation(summary = "删除国际化记录启用")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsLangLogService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@PreAuthorize("hasAuthority('cms:cmsLangLog:save')")
@Operation(summary = "批量添加国际化记录启用")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsLangLog> list) {
if (cmsLangLogService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsLangLog:update')")
@Operation(summary = "批量修改国际化记录启用")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsLangLog> batchParam) {
if (batchParam.update(cmsLangLogService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsLangLog:remove')")
@Operation(summary = "批量删除国际化记录启用")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsLangLogService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,115 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsLinkService;
import com.gxwebsoft.cms.entity.CmsLink;
import com.gxwebsoft.cms.param.CmsLinkParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 常用链接控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "常用链接管理")
@RestController
@RequestMapping("/api/cms/cms-link")
public class CmsLinkController extends BaseController {
@Resource
private CmsLinkService cmsLinkService;
@Operation(summary = "分页查询常用链接")
@GetMapping("/page")
public ApiResult<PageResult<CmsLink>> page(CmsLinkParam param) {
// 使用关联查询
return success(cmsLinkService.pageRel(param));
}
@Operation(summary = "查询全部常用链接")
@GetMapping()
public ApiResult<List<CmsLink>> list(CmsLinkParam param) {
// 使用关联查询
return success(cmsLinkService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsLink:list')")
@OperationLog
@Operation(summary = "根据id查询常用链接")
@GetMapping("/{id}")
public ApiResult<CmsLink> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(cmsLinkService.getByIdRel(id));
}
@Operation(summary = "添加常用链接")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsLink cmsLink) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsLink.setUserId(loginUser.getUserId());
}
if (cmsLinkService.save(cmsLink)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改常用链接")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsLink cmsLink) {
if (cmsLinkService.updateById(cmsLink)) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除常用链接")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsLinkService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加常用链接")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsLink> list) {
if (cmsLinkService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改常用链接")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsLink> batchParam) {
if (batchParam.update(cmsLinkService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除常用链接")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsLinkService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,25 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.cms.service.CmsWebsiteService;
import com.gxwebsoft.common.core.web.BaseController;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 网站应用主入口
*
* @author 科技小王子
* @since 2024-09-10 20:36:14
*/
@Slf4j
@Tag(name = "网站应用")
@RestController
@RequestMapping("/api/cms")
public class CmsMainController extends BaseController {
@Resource
private CmsWebsiteService cmsWebsiteService;
}

View File

@@ -0,0 +1,118 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsModelService;
import com.gxwebsoft.cms.entity.CmsModel;
import com.gxwebsoft.cms.param.CmsModelParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 模型控制器
*
* @author 科技小王子
* @since 2024-11-26 15:44:53
*/
@Tag(name = "模型管理")
@RestController
@RequestMapping("/api/cms/cms-model")
public class CmsModelController extends BaseController {
@Resource
private CmsModelService cmsModelService;
@Operation(summary = "分页查询模型")
@GetMapping("/page")
public ApiResult<PageResult<CmsModel>> page(CmsModelParam param) {
// 使用关联查询
return success(cmsModelService.pageRel(param));
}
@Operation(summary = "查询全部模型")
@GetMapping()
public ApiResult<List<CmsModel>> list(CmsModelParam param) {
// 使用关联查询
return success(cmsModelService.listRel(param));
}
@Operation(summary = "根据id查询模型")
@GetMapping("/{id}")
public ApiResult<CmsModel> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(cmsModelService.getByIdRel(id));
}
@PreAuthorize("hasAuthority('cms:cmsModel:save')")
@Operation(summary = "添加模型")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsModel cmsModel) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsModel.setUserId(loginUser.getUserId());
}
if (cmsModelService.save(cmsModel)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsModel:update')")
@Operation(summary = "修改模型")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsModel cmsModel) {
if (cmsModelService.updateById(cmsModel)) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsModel:remove')")
@Operation(summary = "删除模型")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsModelService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@PreAuthorize("hasAuthority('cms:cmsModel:save')")
@Operation(summary = "批量添加模型")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsModel> list) {
if (cmsModelService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsModel:update')")
@Operation(summary = "批量修改模型")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsModel> batchParam) {
if (batchParam.update(cmsModelService, "model_id")) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsModel:remvoe')")
@Operation(summary = "批量删除模型")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsModelService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,197 @@
package com.gxwebsoft.cms.controller;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.gxwebsoft.cms.entity.CmsDesign;
import com.gxwebsoft.cms.entity.CmsModel;
import com.gxwebsoft.cms.service.CmsDesignService;
import com.gxwebsoft.cms.service.CmsModelService;
import com.gxwebsoft.common.core.utils.CommonUtil;
import com.gxwebsoft.common.core.utils.RedisUtil;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsNavigationService;
import com.gxwebsoft.cms.entity.CmsNavigation;
import com.gxwebsoft.cms.param.CmsNavigationParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.common.system.service.UserService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 网站导航记录表控制器
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Tag(name = "网站导航记录表管理")
@RestController
@RequestMapping("/api/cms/cms-navigation")
public class CmsNavigationController extends BaseController {
@Resource
private CmsNavigationService cmsNavigationService;
@Resource
private CmsModelService cmsModelService;
@Resource
private CmsDesignService cmsDesignService;
@Resource
private UserService userService;
@Resource
private RedisUtil redisUtil;
private static final String SITE_INFO_KEY_PREFIX = "SiteInfo:";
@Operation(summary = "分页查询网站导航记录表")
@GetMapping("/page")
public ApiResult<PageResult<CmsNavigation>> page(CmsNavigationParam param) {
// 使用关联查询
return success(cmsNavigationService.pageRel(param));
}
@Operation(summary = "查询全部网站导航记录表")
@GetMapping()
public ApiResult<List<CmsNavigation>> list(CmsNavigationParam param) {
// 使用关联查询
return success(cmsNavigationService.listRel(param));
}
@Operation(summary = "根据id查询网站导航记录表")
@GetMapping("/{id}")
public ApiResult<CmsNavigation> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(cmsNavigationService.getByIdRel(id));
}
@Operation(summary = "根据code查询网站导航记录表")
@GetMapping("/getByCode/{code}")
public ApiResult<CmsNavigation> getByCode(@PathVariable("code") String code) {
// 使用关联查询
return success(cmsNavigationService.getByIdRelByCodeRel(code));
}
@Operation(summary = "添加网站导航记录表")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsNavigation cmsNavigation) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsNavigation.setUserId(loginUser.getUserId());
cmsNavigation.setTenantId(loginUser.getTenantId());
}
// 去除前面空格
cmsNavigation.setTitle(StrUtil.trimStart(cmsNavigation.getTitle()));
if (cmsNavigationService.save(cmsNavigation)) {
// 添加成功事务处理
cmsNavigationService.saveAsync(cmsNavigation);
redisUtil.delete(SITE_INFO_KEY_PREFIX.concat(getTenantId().toString()));
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "修改网站导航记录表")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsNavigation cmsNavigation) {
if (cmsNavigationService.updateById(cmsNavigation)) {
// 修改成功事务处理
cmsNavigationService.saveAsync(cmsNavigation);
redisUtil.delete(SITE_INFO_KEY_PREFIX.concat(getTenantId().toString()));
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "删除网站导航记录表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsNavigationService.removeById(id)) {
redisUtil.delete(SITE_INFO_KEY_PREFIX.concat(getTenantId().toString()));
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "批量添加网站导航记录表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsNavigation> list) {
if (cmsNavigationService.saveBatch(list)) {
redisUtil.delete(SITE_INFO_KEY_PREFIX.concat(getTenantId().toString()));
return success("添加成功");
}
return fail("添加失败");
}
@Operation(summary = "批量修改网站导航记录表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsNavigation> batchParam) {
if (batchParam.update(cmsNavigationService, "navigation_id")) {
redisUtil.delete(SITE_INFO_KEY_PREFIX.concat(getTenantId().toString()));
return success("修改成功");
}
return fail("修改失败");
}
@Operation(summary = "批量删除网站导航记录表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsNavigationService.removeByIds(ids)) {
redisUtil.delete(SITE_INFO_KEY_PREFIX.concat(getTenantId().toString()));
return success("删除成功");
}
return fail("删除失败");
}
@Operation(summary = "获取树形结构的网站导航数据")
@GetMapping("/tree")
public ApiResult<List<CmsNavigation>> tree(CmsNavigationParam param) {
param.setHide(0);
final List<CmsNavigation> navigations = cmsNavigationService.listRel(param);
return success(CommonUtil.toTreeData(navigations, 0, CmsNavigation::getParentId, CmsNavigation::getNavigationId, CmsNavigation::setChildren));
}
@Operation(summary = "根据path获取导航")
@GetMapping("/getNavigationByPath")
public ApiResult<CmsNavigation> getNavigationByPath(CmsNavigationParam param) {
final CmsNavigation navigation = cmsNavigationService.getOne(new LambdaUpdateWrapper<CmsNavigation>().eq(CmsNavigation::getModel, param.getModel()).last("limit 1"));
if (ObjectUtil.isNotEmpty(navigation)) {
// 页面元素
final CmsDesign design = cmsDesignService.getOne(new LambdaUpdateWrapper<CmsDesign>().eq(CmsDesign::getCategoryId, navigation.getNavigationId()).last("limit 1"));
// 模型信息
final CmsModel model = cmsModelService.getOne(new LambdaQueryWrapper<CmsModel>().eq(CmsModel::getModel, navigation.getModel()).last("limit 1"));
navigation.setBanner(model.getBanner());
// 上级导航
if (!navigation.getParentId().equals(0)) {
final CmsNavigation parent = cmsNavigationService.getById(navigation.getParentId());
navigation.setParentPath(parent.getPath());
navigation.setParentName(parent.getTitle());
}
// 页面信息
navigation.setDesign(design);
// 页面布局
if (ObjectUtil.isNotEmpty(design)) {
navigation.setLayout(design.getLayout());
}
}
return success(navigation);
}
@Operation(summary = "密码校验")
@GetMapping("/checkNavigationPassword")
public ApiResult<?> checkNavigationPassword(CmsNavigationParam param) {
if (!userService.comparePassword(param.getPassword(), param.getPassword2())) {
return fail("密码不正确");
}
return success("密码正确");
}
}

View File

@@ -0,0 +1,126 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsStatisticsService;
import com.gxwebsoft.cms.entity.CmsStatistics;
import com.gxwebsoft.cms.param.CmsStatisticsParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 站点统计信息表控制器
*
* @author 科技小王子
* @since 2025-07-25 12:32:06
*/
@Tag(name = "站点统计信息表管理")
@RestController
@RequestMapping("/api/cms/cms-statistics")
public class CmsStatisticsController extends BaseController {
@Resource
private CmsStatisticsService cmsStatisticsService;
@Operation(summary = "分页查询站点统计信息表")
@GetMapping("/page")
public ApiResult<PageResult<CmsStatistics>> page(CmsStatisticsParam param) {
// 使用关联查询
return success(cmsStatisticsService.pageRel(param));
}
@Operation(summary = "查询全部站点统计信息表")
@GetMapping()
public ApiResult<List<CmsStatistics>> list(CmsStatisticsParam param) {
// 使用关联查询
return success(cmsStatisticsService.listRel(param));
}
@Operation(summary = "根据id查询站点统计信息表")
@GetMapping("/{id}")
public ApiResult<CmsStatistics> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(cmsStatisticsService.getByIdRel(id));
}
@PreAuthorize("hasAuthority('cms:cmsStatistics:save')")
@OperationLog
@Operation(summary = "添加站点统计信息表")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsStatistics cmsStatistics) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsStatistics.setUserId(loginUser.getUserId());
}
if (cmsStatisticsService.save(cmsStatistics)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsStatistics:update')")
@OperationLog
@Operation(summary = "修改站点统计信息表")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsStatistics cmsStatistics) {
if (cmsStatisticsService.updateById(cmsStatistics)) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsStatistics:remove')")
@OperationLog
@Operation(summary = "删除站点统计信息表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsStatisticsService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@PreAuthorize("hasAuthority('cms:cmsStatistics:save')")
@OperationLog
@Operation(summary = "批量添加站点统计信息表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsStatistics> list) {
if (cmsStatisticsService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsStatistics:update')")
@OperationLog
@Operation(summary = "批量修改站点统计信息表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsStatistics> batchParam) {
if (batchParam.update(cmsStatisticsService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsStatistics:remove')")
@OperationLog
@Operation(summary = "批量删除站点统计信息表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsStatisticsService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,118 @@
package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.CmsTemplateService;
import com.gxwebsoft.cms.entity.CmsTemplate;
import com.gxwebsoft.cms.param.CmsTemplateParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 网站模版控制器
*
* @author 科技小王子
* @since 2025-01-21 14:21:16
*/
@Tag(name = "网站模版管理")
@RestController
@RequestMapping("/api/cms/cms-template")
public class CmsTemplateController extends BaseController {
@Resource
private CmsTemplateService cmsTemplateService;
@Operation(summary = "分页查询网站模版")
@GetMapping("/page")
public ApiResult<PageResult<CmsTemplate>> page(CmsTemplateParam param) {
// 使用关联查询
return success(cmsTemplateService.pageRel(param));
}
@Operation(summary = "查询全部网站模版")
@GetMapping()
public ApiResult<List<CmsTemplate>> list(CmsTemplateParam param) {
// 使用关联查询
return success(cmsTemplateService.listRel(param));
}
@Operation(summary = "根据id查询网站模版")
@GetMapping("/{id}")
public ApiResult<CmsTemplate> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(cmsTemplateService.getByIdRel(id));
}
@PreAuthorize("hasAuthority('cms:cmsTemplate:save')")
@Operation(summary = "添加网站模版")
@PostMapping()
public ApiResult<?> save(@RequestBody CmsTemplate cmsTemplate) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
cmsTemplate.setUserId(loginUser.getUserId());
}
if (cmsTemplateService.save(cmsTemplate)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsTemplate:update')")
@Operation(summary = "修改网站模版")
@PutMapping()
public ApiResult<?> update(@RequestBody CmsTemplate cmsTemplate) {
if (cmsTemplateService.updateById(cmsTemplate)) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsTemplate:remove')")
@Operation(summary = "删除网站模版")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (cmsTemplateService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@PreAuthorize("hasAuthority('cms:cmsTemplate:save')")
@Operation(summary = "批量添加网站模版")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<CmsTemplate> list) {
if (cmsTemplateService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('cms:cmsTemplate:update')")
@Operation(summary = "批量修改网站模版")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsTemplate> batchParam) {
if (batchParam.update(cmsTemplateService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('cms:cmsTemplate:remove')")
@Operation(summary = "批量删除网站模版")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (cmsTemplateService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -0,0 +1,105 @@
package com.gxwebsoft.cms.entity;
import cn.hutool.core.util.DesensitizedUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.gxwebsoft.common.core.utils.JSONUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 广告位
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsAd对象", description = "广告位")
public class CmsAd implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "ad_id", type = IdType.AUTO)
private Integer adId;
@Schema(description = "类型")
private Integer type;
@Schema(description = "唯一标识")
private String code;
@Schema(description = "栏目ID")
private Integer categoryId;
@Schema(description = "栏目名称")
@TableField(exist = false)
private String categoryName;
@Schema(description = "广告位名称")
private String name;
@Schema(description = "")
private String width;
@Schema(description = "")
private String height;
@Schema(description = "边框")
private String border;
@Schema(description = "CSS样式")
private String style;
@Schema(description = "广告图片")
private String images;
@Schema(description = "广告图片")
@TableField(exist = false)
private JSONArray imageList;
@Schema(description = "路由/链接地址")
private String path;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "国际化语言")
private String lang;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0正常, 1冻结")
private Integer status;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
public JSONArray getImageList() {
return JSON.parseArray(this.images);
}
}

View File

@@ -0,0 +1,57 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 广告图片
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsAdRecord对象", description = "广告图片")
public class CmsAdRecord implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "ad_record_id", type = IdType.AUTO)
private Integer adRecordId;
@Schema(description = "广告标题")
private String title;
@Schema(description = "图片地址")
private String path;
@Schema(description = "链接地址")
private String url;
@Schema(description = "广告位ID")
private Integer adId;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0正常, 1冻结")
private Integer status;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,42 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "图片DTO", description = "图片DTO")
public class CmsAdVo implements Serializable {
@Schema(description = "ID")
@TableField(exist = false)
private Integer uid;
@Schema(description = "名称")
@TableField(exist = false)
private String title;
@Schema(description = "图片路径")
@TableField(exist = false)
private String url;
@Schema(description = "视频地址")
@TableField(exist = false)
private String video;
@Schema(description = "状态")
@TableField(exist = false)
private String status;
@Schema(description = "图片宽")
@TableField(exist = false)
private Integer width;
@Schema(description = "图片高")
@TableField(exist = false)
private Integer height;
}

View File

@@ -0,0 +1,266 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 文章
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsArticle对象", description = "文章")
public class CmsArticle implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "文章ID")
@TableId(value = "article_id", type = IdType.AUTO)
private Integer articleId;
@Schema(description = "文章标题")
private String title;
@Schema(description = "文章类型 0常规 1视频")
private Integer type;
@Schema(description = "文章模型")
private String model;
@Schema(description = "文章编号")
private String code;
@Schema(description = "内容模板页面")
private String detail;
@Schema(description = "banner")
@TableField(exist = false)
private String banner;
@Schema(description = "访问路径")
@TableField(exist = false)
private String path;
@Schema(description = "列表显示方式(10小图展示 20大图展示)")
private Integer showType;
@Schema(description = "话题")
private String topic;
@Schema(description = "标签")
private String tags;
@Schema(description = "文章分类ID")
private Integer categoryId;
@Schema(description = "当前分类")
@TableField(exist = false)
private String categoryName;
@Schema(description = "父级分类ID")
private Integer parentId;
@Schema(description = "父级分类")
@TableField(exist = false)
private String parentName;
@Schema(description = "封面图")
private String image;
@Schema(description = "封面图宽度")
private Integer imageWidth;
@Schema(description = "封面图高度")
private Integer imageHeight;
@Schema(description = "价格")
private BigDecimal price;
@Schema(description = "开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startTime;
@Schema(description = "到期时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime;
@Schema(description = "来源")
private String source;
@Schema(description = "产品概述")
private String overview;
@Schema(description = "虚拟阅读量(仅用作展示)")
private Integer virtualViews;
@Schema(description = "实际阅读量")
private Integer actualViews;
@Schema(description = "评分")
private BigDecimal rate;
@Schema(description = "可见类型 0所有人 1登录可见 2密码可见")
private Integer permission;
@Schema(description = "访问密码")
private String password;
@Schema(description = "验证密码(前端回传)")
@TableField(exist = false)
private String password2;
@Schema(description = "发布来源客户端 (APP、H5、小程序等)")
private String platform;
@Schema(description = "文章附件")
private String files;
@Schema(description = "视频地址")
private String video;
@Schema(description = "接受的文件类型")
private String accept;
@Schema(description = "经度")
private String longitude;
@Schema(description = "纬度")
private String latitude;
@Schema(description = "所在省份")
private String province;
@Schema(description = "所在城市")
private String city;
@Schema(description = "所在辖区")
private String region;
@Schema(description = "街道地址")
private String address;
@Schema(description = "点赞数")
private Integer likes;
@Schema(description = "评论数")
private Integer commentNumbers;
@Schema(description = "提醒谁看")
private String toUsers;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "作者")
private String author;
@Schema(description = "国际化语言")
private String lang;
@Schema(description = "关联默认语言的文章ID,用于同步翻译更新")
private Integer langArticleId;
@Schema(description = "是否启用自动翻译")
private Boolean translation;
@Schema(description = "编辑器类型 1 富文本编辑器 2 Markdown编辑器")
private Integer editor;
@Schema(description = "PDF地址")
private String pdfUrl;
@Schema(description = "版本号")
private Integer version;
@Schema(description = "商户ID")
private Long merchantId;
@Schema(description = "项目ID")
private Long projectId;
@Schema(description = "商户名称")
@TableField(exist = false)
private String merchantName;
@Schema(description = "商户名称")
@TableField(exist = false)
private String merchantAvatar;
@Schema(description = "昵称")
@TableField(exist = false)
private String nickname;
@Schema(description = "头像")
@TableField(exist = false)
private String avatar;
@Schema(description = "是否推荐")
private Integer recommend;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0已发布, 1待审核 2已驳回 3违规内容")
private Integer status;
@Schema(description = "状态文本")
@TableField(exist = false)
private String statusText;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
@Schema(description = "是否更新")
@TableField(exist = false)
private Boolean isUpdate;
@Schema(description = "文章内容")
@TableField(exist = false)
private String content;
@Schema(description = "已报名人数")
private Integer bmUsers;
public String getStatusText() {
if (this.status == 0) {
return "已发布";
}
if (this.status == 1) {
return "待审核";
}
if (this.status == 2) {
return "已驳回";
}
if (this.status == 3) {
return "违规内容";
}
return "";
}
}

View File

@@ -0,0 +1,93 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 文章分类表
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsArticleCategory对象", description = "文章分类表")
public class CmsArticleCategory implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "文章分类ID")
@TableId(value = "category_id", type = IdType.AUTO)
private Integer categoryId;
@Schema(description = "分类标识")
private String categoryCode;
@Schema(description = "分类名称")
private String title;
@Schema(description = "类型 0列表 1单页 2外链")
private Integer type;
@Schema(description = "分类图片")
private String image;
@Schema(description = "上级分类ID")
private Integer parentId;
@Schema(description = "路由/链接地址")
private String path;
@Schema(description = "组件路径")
private String component;
@Schema(description = "绑定的页面")
private Integer pageId;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "文章数量")
private Integer count;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
private Integer hide;
@Schema(description = "是否推荐")
private Integer recommend;
@Schema(description = "是否显示在首页")
private Integer showIndex;
@Schema(description = "状态, 0正常, 1禁用")
private Integer status;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,78 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 文章评论表
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsArticleComment对象", description = "文章评论表")
public class CmsArticleComment implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "评价ID")
@TableId(value = "comment_id", type = IdType.AUTO)
private Integer commentId;
@Schema(description = "文章ID")
private Integer articleId;
@Schema(description = "评分 (10好评 20中评 30差评)")
private Integer score;
@Schema(description = "评价内容")
private String content;
@Schema(description = "是否为图片评价")
private Integer isPicture;
@Schema(description = "评论者ID")
private Integer userId;
@Schema(description = "被评价者ID")
private Integer toUserId;
@Schema(description = "回复的评论ID")
private Integer replyCommentId;
@Schema(description = "回复者ID")
private Integer replyUserId;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0未读, 1已读")
private Integer status;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,41 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 文章记录表
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsArticleContent对象", description = "文章记录表")
public class CmsArticleContent implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "文章ID")
private Integer articleId;
@Schema(description = "文章内容")
private String content;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,42 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 点赞文章
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsArticleCount对象", description = "点赞文章")
public class CmsArticleCount implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "主键ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "文章ID")
private Integer articleId;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,42 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 点赞文章
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsArticleLike对象", description = "点赞文章")
public class CmsArticleLike implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "主键ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "文章ID")
private Integer articleId;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,122 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 页面管理记录表
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsDesign对象", description = "页面管理记录表")
public class CmsDesign implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "page_id", type = IdType.AUTO)
private Integer pageId;
@Schema(description = "页面")
private String name;
@Schema(description = "所属栏目ID")
private Integer categoryId;
@Schema(description = "所属栏目")
@TableField(exist = false)
private String categoryName;
@Schema(description = "页面模型")
private String model;
@Schema(description = "页面关键词")
private String keywords;
@Schema(description = "页面描述")
private String description;
@Schema(description = "路由地址")
@TableField(exist = false)
private String path;
@Schema(description = "组件路径")
@TableField(exist = false)
private String component;
@Schema(description = "缩列图")
private String photo;
@Schema(description = "购买链接")
private String buyUrl;
@Schema(description = "页面样式")
private String style;
@Schema(description = "页面内容")
private String content;
@Schema(description = "是否开启布局")
private Boolean showLayout;
@Schema(description = "页面布局")
@TableField(exist = false)
private String layout;
@Schema(description = "是否显示banner")
private Boolean showBanner;
@Schema(description = "是否显示Button")
private Boolean showButton;
@Schema(description = "上级id, 0是顶级")
private Integer parentId;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "国际化语言")
private String lang;
@Schema(description = "用于同步翻译内容")
@TableField(exist = false)
private Integer langCategoryId;
@Schema(description = "是否启用自动翻译")
private Boolean translation;
@Schema(description = "设为首页")
private Integer home;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0正常, 1冻结")
private Integer status;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,75 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 页面组件表
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsDesignRecord对象", description = "页面组件表")
public class CmsDesignRecord implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "关联导航ID")
private Integer navigationId;
@Schema(description = "组件")
private String title;
@Schema(description = "组件标识")
private String dictCode;
@Schema(description = "组件样式")
private String styles;
@Schema(description = "卡片阴影显示时机")
private String shadow;
@Schema(description = "页面关键词")
private String keywords;
@Schema(description = "页面描述")
private String description;
@Schema(description = "页面路由地址")
private String path;
@Schema(description = "缩列图")
private String photo;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0正常, 1冻结")
private Integer status;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,72 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 网站域名记录表
*
* @author 科技小王子
* @since 2024-09-10 20:36:14
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsDomain对象", description = "网站域名记录表")
public class CmsDomain implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "类型 0赠送域名 1绑定域名 ")
private Integer type;
@Schema(description = "域名")
private String domain;
@Schema(description = "主机记录")
private String hostName;
@Schema(description = "记录值")
private String hostValue;
@Schema(description = "状态")
private Integer status;
@Schema(description = "排序号")
private Integer sortNumber;
@Schema(description = "网站ID")
private Integer websiteId;
@Schema(description = "租户ID")
private Integer appId;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,90 @@
package com.gxwebsoft.cms.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 表单设计表
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsForm对象", description = "表单设计表")
public class CmsForm implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "form_id", type = IdType.AUTO)
private Integer formId;
@Schema(description = "表单标题")
private String name;
@Schema(description = "顶部图片")
private String photo;
@Schema(description = "背景图片")
private String background;
@Schema(description = "视频文件")
private String video;
@Schema(description = "提交次数")
private Integer submitNumber;
@Schema(description = "页面布局")
private String layout;
@Schema(description = "是否隐藏顶部图片")
private Integer hidePhoto;
@Schema(description = "是否隐藏背景图片")
private Integer hideBackground;
@Schema(description = "是否隐藏视频")
private Integer hideVideo;
@Schema(description = "背景图片透明度")
private BigDecimal opacity;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "国际化语言")
private String lang;
@Schema(description = "商户ID")
private Long merchantId;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0正常, 1冻结")
private Integer status;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,68 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 表单数据记录表
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsFormRecord对象", description = "表单数据记录表")
public class CmsFormRecord implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "form_record_id", type = IdType.AUTO)
private Integer formRecordId;
@Schema(description = "手机号")
private String phone;
@Schema(description = "表单数据")
private String formData;
@Schema(description = "表单ID")
private Integer formId;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "商户ID")
private Long merchantId;
@Schema(description = "姓名")
private String name;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0正常, 1冻结")
private Integer status;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,60 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 国际化
*
* @author 科技小王子
* @since 2025-01-06 19:29:26
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsLang对象", description = "国际化")
public class CmsLang implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "名称")
private String name;
@Schema(description = "编码")
private String code;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0已发布, 1待审核 2已驳回 3违规内容")
private Integer status;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,45 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 国际化记录启用
*
* @author 科技小王子
* @since 2025-01-06 19:29:26
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsLangLog对象", description = "国际化记录启用")
public class CmsLangLog implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "名称")
private String lang;
@Schema(description = "关联ID")
private Integer langId;
@Schema(description = "编码")
private String code;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,79 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 常用链接
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsLink对象", description = "常用链接")
public class CmsLink implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "自增ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "链接名称")
private String name;
@Schema(description = "图标")
private String icon;
@Schema(description = "链接地址")
private String url;
@Schema(description = "栏目ID")
private Integer categoryId;
@Schema(description = "应用ID")
private Integer appId;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "国际化语言")
private String lang;
@Schema(description = "是否推荐")
private Integer recommend;
@Schema(description = "备注")
private String comments;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "状态, 0正常, 1待确认")
private Integer status;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "栏目名称")
@TableField(exist = false)
private String categoryName;
}

View File

@@ -0,0 +1,97 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 模型
*
* @author 科技小王子
* @since 2024-11-26 15:44:53
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsModel对象", description = "模型")
public class CmsModel implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "model_id", type = IdType.AUTO)
private Integer modelId;
@Schema(description = "模型名称")
private String name;
@Schema(description = "唯一标识")
private String model;
@Schema(description = "列表页路径")
private String component;
@Schema(description = "详情页路径")
private String componentDetail;
@Schema(description = "模型banner图片")
private String banner;
@Schema(description = "文章后缀")
private String suffix;
@Schema(description = "拇指图片")
private String thumb;
@Schema(description = "封面图宽")
private String imageWidth;
@Schema(description = "封面图高")
private String imageHeight;
@Schema(description = "css样式")
private String style;
@Schema(description = "Banner上的标题")
private String title;
@Schema(description = "列表显示方式(10小图展示 20大图展示)")
private Integer showType;
@Schema(description = "是否禁用")
private Boolean disabled;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0已发布, 1待审核 2已驳回 3违规内容")
private Integer status;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,240 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import java.util.List;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 网站导航记录表
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsNavigation对象", description = "网站导航记录表")
public class CmsNavigation implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "navigation_id", type = IdType.AUTO)
private Integer navigationId;
@Schema(description = "类型, 0列表 1图文")
private Integer type;
@Schema(description = "菜单名称")
private String title;
@Schema(description = "上级id, 0是顶级")
private Integer parentId;
@Schema(description = "模型")
private String model;
@Schema(description = "标识")
private String code;
@Schema(description = "菜单路由地址")
private String path;
@Schema(description = "菜单组件地址, 目录可为空")
private String component;
@Schema(description = "文件后缀")
@TableField(exist = false)
private String suffix;
@Schema(description = "打开位置")
private String target;
@Schema(description = "菜单图标")
private String icon;
@Schema(description = "banner")
@TableField(exist = false)
private String banner;
@Schema(description = "移动端banner")
@TableField(exist = false)
private String mpBanner;
@Schema(description = "图标颜色")
private String color;
@Schema(description = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
private Integer hide;
@Schema(description = "可见类型 0所有人 1登录可见 2密码可见")
private Integer permission;
@Schema(description = "访问密码")
private String password;
@Schema(description = "验证密码(前端回传)")
@TableField(exist = false)
private String password2;
@Schema(description = "位置 0不限 1顶部 2底部")
private Integer position;
@Schema(description = "仅在顶部显示")
private Integer top;
@Schema(description = "仅在底部显示")
private Integer bottom;
@Schema(description = "菜单侧栏选中的path")
private String active;
@Schema(description = "其它路由元信息")
private String meta;
@Schema(description = "css样式")
private String style;
@Schema(description = "父级栏目路由")
private String parentPath;
@Schema(description = "父级栏目名称")
private String parentName;
@Schema(description = "父级栏目位置")
@TableField(exist = false)
private Integer parentPosition;
@Schema(description = "模型名称")
private String modelName;
@Schema(description = "绑定的页面(已废弃)")
private Integer pageId;
@Schema(description = "详情页ID")
private Integer itemId;
@Schema(description = "是否微信小程序菜单")
private Boolean isMpWeixin;
@Schema(description = "菜单间距")
private Integer gutter;
@Schema(description = "菜单宽度")
private Integer span;
@Schema(description = "阅读量")
private Integer readNum;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "商户ID")
private Long merchantId;
@Schema(description = "国际化语言")
private String lang;
@Schema(description = "用于同步翻译内容")
private Integer langCategoryId;
@Schema(description = "设为首页")
private Integer home;
@Schema(description = "是否推荐")
private Boolean recommend;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "状态, 0正常, 1冻结")
private Integer status;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonIgnore // 导航的创建时间前端不需要
private LocalDateTime createTime;
@Schema(description = "页面名称")
@TableField(exist = false)
private String pageName;
@Schema(description = "子菜单")
@TableField(exist = false)
private List<CmsNavigation> children;
@Schema(description = "页面布局")
@TableField(exist = false)
private String layout;
@Schema(description = "关联的页面")
@TableField(exist = false)
private CmsDesign design;
@Schema(description = "所属模型")
@TableField(exist = false)
private CmsModel modelInfo;
@Schema(description = "父级栏目")
@TableField(exist = false)
private CmsNavigation parent;
@Schema(description = "当前栏目名称")
@TableField(exist = false)
private String categoryName;
@Schema(description = "当前栏目链接")
@TableField(exist = false)
private String categoryPath;
@Schema(description = "栏目图片")
@TableField(exist = false)
private String photo;
@Schema(description = "是否开启布局")
@TableField(exist = false)
private Boolean showLayout;
@Schema(description = "单页内容")
@TableField(exist = false)
private String content;
@Schema(description = "是否显示banner")
@TableField(exist = false)
private Boolean showBanner;
@Schema(description = "菜单标题")
@TableField(exist = false)
private String text;
public String getCategoryName() {
return this.title;
}
public String getCategoryPath() {
return this.path;
}
public String getText() {
return this.title;
}
}

View File

@@ -0,0 +1,125 @@
package com.gxwebsoft.cms.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 站点统计信息表
*
* @author 科技小王子
* @since 2025-07-25 12:32:06
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsStatistics对象", description = "站点统计信息表")
public class CmsStatistics implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "自增ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "站点ID")
private Integer websiteId;
@Schema(description = "用户总数")
private Integer userCount;
@Schema(description = "订单总数")
private Integer orderCount;
@Schema(description = "商品总数")
private Integer productCount;
@Schema(description = "总销售额")
private BigDecimal totalSales;
@Schema(description = "本月销售额")
private BigDecimal monthSales;
@Schema(description = "今日销售额")
private BigDecimal todaySales;
@Schema(description = "昨日销售额")
private BigDecimal yesterdaySales;
@Schema(description = "本周销售额")
private BigDecimal weekSales;
@Schema(description = "本年销售额")
private BigDecimal yearSales;
@Schema(description = "今日订单数")
private Integer todayOrders;
@Schema(description = "本月订单数")
private Integer monthOrders;
@Schema(description = "今日新增用户")
private Integer todayUsers;
@Schema(description = "本月新增用户")
private Integer monthUsers;
@Schema(description = "今日访问量")
private Integer todayVisits;
@Schema(description = "总访问量")
private Integer totalVisits;
@Schema(description = "商户总数")
private Integer merchantCount;
@Schema(description = "活跃用户数")
private Integer activeUsers;
@Schema(description = "转化率(%)")
private BigDecimal conversionRate;
@Schema(description = "平均订单金额")
private BigDecimal avgOrderAmount;
@Schema(description = "统计日期")
private LocalDate statisticsDate;
@Schema(description = "统计类型: 1日统计, 2月统计, 3年统计")
private Integer statisticsType;
@Schema(description = "排序号")
private Integer sortNumber;
@Schema(description = "操作用户ID")
private Integer userId;
@Schema(description = "商户ID")
private Integer merchantId;
@Schema(description = "状态: 0禁用, 1启用")
private Boolean status;
@Schema(description = "是否删除: 0否, 1是")
@TableLogic
private Boolean deleted;
@Schema(description = "租户ID")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,97 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 网站模版
*
* @author 科技小王子
* @since 2025-01-21 14:21:16
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsTemplate对象", description = "网站模版")
public class CmsTemplate implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "模版名称")
private String name;
@Schema(description = "模版标识")
private String code;
@Schema(description = "缩列图")
private String image;
@Schema(description = "类型 1企业官网 2其他")
private Integer type;
@Schema(description = "网站关键词")
private String keywords;
@Schema(description = "域名前缀")
private String prefix;
@Schema(description = "预览地址")
private String domain;
@Schema(description = "模版下载地址")
private String downUrl;
@Schema(description = "色系")
private String color;
@Schema(description = "应用版本 10免费版 20授权版 30永久授权")
private Integer version;
@Schema(description = "行业类型(父级)")
private String industryParent;
@Schema(description = "行业类型(子级)")
private String industryChild;
@Schema(description = "备注")
private String comments;
@Schema(description = "是否推荐")
private Boolean recommend;
@Schema(description = "是否共享模板")
private Boolean share;
@Schema(description = "排序号")
private Integer sortNumber;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,326 @@
package com.gxwebsoft.cms.entity;
import cn.hutool.core.util.DesensitizedUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 网站信息记录表
*
* @author 科技小王子
* @since 2024-09-10 20:36:14
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsWebsite对象", description = "网站信息记录表")
public class CmsWebsite implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "站点ID")
@TableId(value = "website_id", type = IdType.AUTO)
private Integer websiteId;
@Schema(description = "网站名称")
private String websiteName;
@Schema(description = "网站标识")
private String websiteCode;
@Schema(description = "网站密钥")
private String websiteSecret;
@Schema(description = "网站LOGO")
private String websiteIcon;
@Schema(description = "网站LOGO")
private String websiteLogo;
@Schema(description = "网站LOGO(深色模式)")
private String websiteDarkLogo;
@Schema(description = "网站类型")
private String websiteType;
@Schema(description = "栏目ID")
private Integer categoryId;
@Schema(description = "应用ID")
@TableField(exist = false)
private Integer appId;
@Schema(description = "网站截图")
private String files;
@Schema(description = "网站类型 10企业官网 20微信小程序 30APP 40其他")
private Integer type;
@Schema(description = "网站关键词")
private String keywords;
@Schema(description = "域名前缀")
private String prefix;
@Schema(description = "绑定域名")
private String domain;
@Schema(description = "全局样式")
private String style;
@Schema(description = "后台管理地址")
private String adminUrl;
@Schema(description = "自定义API接口")
private String apiUrl;
@Schema(description = "应用版本 10免费版 20授权版 30永久授权")
private Integer version;
@Schema(description = "服务到期时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date expirationTime;
@Schema(description = "是否到期")
@TableField(exist = false)
private Integer expired;
@Schema(description = "剩余天数")
@TableField(exist = false)
private Long expiredDays;
@Schema(description = "服务器ID")
private Integer assetsId;
@Schema(description = "服务器ID")
private String assetsName;
@Schema(description = "模版ID(存克隆的租户UID)")
private Integer templateId;
@Schema(description = "模版名称")
@TableField(exist = false)
private String templateName;
@Schema(description = "行业类型(父级)")
private String industryParent;
@Schema(description = "行业类型(子级)")
private String industryChild;
@Schema(description = "企业ID")
private Integer companyId;
@Schema(description = "开发者名称")
private String developer;
@Schema(description = "所在国家")
private String country;
@Schema(description = "所在省份")
private String province;
@Schema(description = "所在城市")
private String city;
@Schema(description = "所在辖区")
private String region;
@Schema(description = "经度")
private String longitude;
@Schema(description = "纬度")
private String latitude;
@Schema(description = "街道地址")
private String address;
@Schema(description = "联系电话")
private String phone;
@Schema(description = "电子邮箱")
private String email;
@Schema(description = "ICP备案号")
private String icpNo;
@Schema(description = "公安备案")
private String policeNo;
@Schema(description = "网站描述")
private String content;
@Schema(description = "备注")
private String comments;
@Schema(description = "管理员备注")
private String remarks;
@Schema(description = "是否推荐")
private Integer recommend;
@Schema(description = "是否官方产品")
private Boolean official;
@Schema(description = "允许展示到插件市场")
private Boolean market;
@Schema(description = "是否插件类型 0应用 1插件")
private Boolean plugin;
@Schema(description = "允许被搜索")
private Boolean search;
@Schema(description = "主题色")
private String color;
@Schema(description = "运行状态 0运行中 1已关闭 2维护中")
private Integer running;
@Schema(description = "即将过期")
private Integer soon;
@Schema(description = "评分")
private BigDecimal rate;
@Schema(description = "点赞数量")
private Integer likes;
@Schema(description = "点击数量")
private Integer clicks;
@Schema(description = "购买数量")
private Integer buys;
@Schema(description = "下载数量")
private Integer downloads;
@Schema(description = "销售价格")
private BigDecimal price;
@Schema(description = "交付方式")
private Integer deliveryMethod;
@Schema(description = "计费方式")
private Integer chargingMethod;
@Schema(description = "状态 0未开通 1运行中 2维护中 3已关闭 4已欠费停机 5违规关停")
private Integer status;
@Schema(description = "状态图标")
@TableField(exist = false)
private String statusIcon;
@Schema(description = "维护说明")
private String statusText;
@Schema(description = "关闭说明")
private String statusClose;
@Schema(description = "全局样式")
private String styles;
@Schema(description = "排序号")
private Integer sortNumber;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "商户ID")
private Long merchantId;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "租户名称")
@TableField(exist = false)
private String tenantName;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@Schema(description = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@Schema(description = "预设字段")
@TableField(exist = false)
private List<CmsWebsiteField> fields;
@Schema(description = "小程序导航图标")
@TableField(exist = false)
private Map<String, List<CmsNavigation>> mpMenus;
@Schema(description = "网站导航栏")
@TableField(exist = false)
private List<CmsNavigation> navigations;
@Schema(description = "顶部菜单")
@TableField(exist = false)
private List<CmsNavigation> topNavs;
@Schema(description = "底部菜单")
@TableField(exist = false)
private List<CmsNavigation> bottomNavs;
@Schema(description = "幻灯片广告")
@TableField(exist = false)
private CmsAd slide;
@Schema(description = "站点广告")
@TableField(exist = false)
private List<CmsAd> ads;
@Schema(description = "首页布局")
@TableField(exist = false)
private String layout;
@Schema(description = "友情链接")
@TableField(exist = false)
private List<CmsLink> links;
@Schema(description = "配置信息")
@TableField(exist = false)
private Object config;
@Schema(description = "服务器时间")
@TableField(exist = false)
private HashMap<String, Object> serverTime;
@Schema(description = "当前登录用户")
@TableField(exist = false)
private User loginUser;
@Schema(description = "超管账号")
@TableField(exist = false)
private String superAdminPhone;
@Schema(description = "是否登录")
@TableField(exist = false)
private Boolean isLogin;
@Schema(description = "网站设置")
@TableField(exist = false)
private CmsWebsiteSetting setting;
public String getPhone(){
return DesensitizedUtil.mobilePhone(this.phone);
}
}

View File

@@ -0,0 +1,74 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 应用参数
*
* @author 科技小王子
* @since 2024-09-10 20:36:14
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsWebsiteField对象", description = "应用参数")
public class CmsWebsiteField implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "自增ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "类型0文本 1图片 2其他")
private Integer type;
@Schema(description = "名称")
private String name;
@Schema(description = "默认值")
private String defaultValue;
@Schema(description = "可修改的值 [on|off]")
private String modifyRange;
@Schema(description = "备注")
private String comments;
@Schema(description = "css样式")
private String style;
@Schema(description = "名称")
private String value;
@Schema(description = "国际化语言")
private String lang;
@Schema(description = "是否加密")
private Boolean encrypted;
@Schema(description = "商户ID")
private Long merchantId;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,87 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* 网站设置
*
* @author 科技小王子
* @since 2025-02-19 01:35:44
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsWebsiteSetting对象", description = "网站设置")
public class CmsWebsiteSetting implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "自增ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@Schema(description = "关联网站ID")
private Integer websiteId;
@Schema(description = "是否官方插件")
private Boolean official;
@Schema(description = "是否展示在插件市场")
private Boolean market;
@Schema(description = "是否允许被搜索")
private Boolean search;
@Schema(description = "是否共享")
private Boolean share;
@Schema(description = "文章是否需要审核")
private Boolean articleReview;
@Schema(description = "是否插件 0应用1 插件 ")
private Boolean plugin;
@Schema(description = "编辑器类型 1 富文本编辑器 2 Markdown编辑器")
private Integer editor;
@Schema(description = "显示站内搜索")
private Boolean searchBtn;
@Schema(description = "显示登录注册功能")
private Boolean loginBtn;
@Schema(description = "显示悬浮客服工具")
private Boolean floatTool;
@Schema(description = "显示版权链接")
private Boolean copyrightLink;
@Schema(description = "导航栏最多显示数量")
private Boolean maxMenuNum;
@Schema(description = "排序号")
private Integer sortNumber;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@Schema(description = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
}

View File

@@ -0,0 +1,42 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "翻译结果", description = "翻译结果")
public class TranslateDataVo implements Serializable {
@Schema(description = "文本格式")
private String FormatType;
@Schema(description = "原文语言")
private String SourceLanguage;
@Schema(description = "译文语言")
private String TargetLanguage;
@Schema(description = "待翻译内容")
private String SourceText;
@Schema(description = "场景可选取值商品标题title商品描述description商品沟通communication医疗medical社交social)金融finance")
private String Scene;
@Schema(description = "上下文信息")
private String Context;
@Schema(description = "翻译结果")
private String translated;
@Schema(description = "总单词数")
private String wordCount;
@Schema(description = "源语言传入 auto 时,语种识别后的源语言代码")
private String detectedLanguage;
}

View File

@@ -0,0 +1,29 @@
package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "阿里云机器翻译", description = "阿里云机器翻译")
public class TranslateVo implements Serializable {
@Schema(description = "错误码")
private String Code;
@Schema(description = "错误信息")
@JsonIgnoreProperties(ignoreUnknown = true)
private String Message;
@Schema(description = "请求ID")
private String RequestId;
@Schema(description = "返回数据")
private TranslateDataVo Data;
}

View File

@@ -0,0 +1,42 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsAd;
import com.gxwebsoft.cms.entity.CmsLangLog;
import com.gxwebsoft.cms.param.CmsAdParam;
import com.gxwebsoft.cms.param.CmsLangLogParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 广告位Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsAdMapper extends BaseMapper<CmsAd> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsAd>
*/
List<CmsAd> selectPageRel(@Param("page") IPage<CmsAd> page,
@Param("param") CmsAdParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsAd> selectListRel(@Param("param") CmsAdParam param);
@InterceptorIgnore(tenantLine = "true")
List<CmsAd> selectListAllRel(@Param("param") CmsAdParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsAdRecord;
import com.gxwebsoft.cms.param.CmsAdRecordParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 广告图片Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsAdRecordMapper extends BaseMapper<CmsAdRecord> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsAdRecord>
*/
List<CmsAdRecord> selectPageRel(@Param("page") IPage<CmsAdRecord> page,
@Param("param") CmsAdRecordParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsAdRecord> selectListRel(@Param("param") CmsAdRecordParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsArticleCategory;
import com.gxwebsoft.cms.param.CmsArticleCategoryParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 文章分类表Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsArticleCategoryMapper extends BaseMapper<CmsArticleCategory> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsArticleCategory>
*/
List<CmsArticleCategory> selectPageRel(@Param("page") IPage<CmsArticleCategory> page,
@Param("param") CmsArticleCategoryParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsArticleCategory> selectListRel(@Param("param") CmsArticleCategoryParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsArticleComment;
import com.gxwebsoft.cms.param.CmsArticleCommentParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 文章评论表Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsArticleCommentMapper extends BaseMapper<CmsArticleComment> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsArticleComment>
*/
List<CmsArticleComment> selectPageRel(@Param("page") IPage<CmsArticleComment> page,
@Param("param") CmsArticleCommentParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsArticleComment> selectListRel(@Param("param") CmsArticleCommentParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsArticleContent;
import com.gxwebsoft.cms.param.CmsArticleContentParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 文章记录表Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsArticleContentMapper extends BaseMapper<CmsArticleContent> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsArticleContent>
*/
List<CmsArticleContent> selectPageRel(@Param("page") IPage<CmsArticleContent> page,
@Param("param") CmsArticleContentParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsArticleContent> selectListRel(@Param("param") CmsArticleContentParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsArticleCount;
import com.gxwebsoft.cms.param.CmsArticleCountParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 点赞文章Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsArticleCountMapper extends BaseMapper<CmsArticleCount> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsArticleCount>
*/
List<CmsArticleCount> selectPageRel(@Param("page") IPage<CmsArticleCount> page,
@Param("param") CmsArticleCountParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsArticleCount> selectListRel(@Param("param") CmsArticleCountParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsArticleLike;
import com.gxwebsoft.cms.param.CmsArticleLikeParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 点赞文章Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsArticleLikeMapper extends BaseMapper<CmsArticleLike> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsArticleLike>
*/
List<CmsArticleLike> selectPageRel(@Param("page") IPage<CmsArticleLike> page,
@Param("param") CmsArticleLikeParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsArticleLike> selectListRel(@Param("param") CmsArticleLikeParam param);
}

View File

@@ -0,0 +1,43 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsArticle;
import com.gxwebsoft.cms.entity.CmsLangLog;
import com.gxwebsoft.cms.param.CmsArticleParam;
import com.gxwebsoft.cms.param.CmsLangLogParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 文章Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsArticleMapper extends BaseMapper<CmsArticle> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsArticle>
*/
List<CmsArticle> selectPageRel(@Param("page") IPage<CmsArticle> page,
@Param("param") CmsArticleParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsArticle> selectListRel(@Param("param") CmsArticleParam param);
@InterceptorIgnore(tenantLine = "true")
List<CmsArticle> selectListAllRel(@Param("param") CmsArticleParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsDesign;
import com.gxwebsoft.cms.param.CmsDesignParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 页面管理记录表Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsDesignMapper extends BaseMapper<CmsDesign> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsDesign>
*/
List<CmsDesign> selectPageRel(@Param("page") IPage<CmsDesign> page,
@Param("param") CmsDesignParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsDesign> selectListRel(@Param("param") CmsDesignParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsDesignRecord;
import com.gxwebsoft.cms.param.CmsDesignRecordParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 页面组件表Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsDesignRecordMapper extends BaseMapper<CmsDesignRecord> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsDesignRecord>
*/
List<CmsDesignRecord> selectPageRel(@Param("page") IPage<CmsDesignRecord> page,
@Param("param") CmsDesignRecordParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsDesignRecord> selectListRel(@Param("param") CmsDesignRecordParam param);
}

View File

@@ -0,0 +1,40 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsDomain;
import com.gxwebsoft.cms.param.CmsDomainParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 网站域名记录表Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:36:14
*/
public interface CmsDomainMapper extends BaseMapper<CmsDomain> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsDomain>
*/
List<CmsDomain> selectPageRel(@Param("page") IPage<CmsDomain> page,
@Param("param") CmsDomainParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsDomain> selectListRel(@Param("param") CmsDomainParam param);
@InterceptorIgnore(tenantLine = "true")
CmsDomain getDomain(@Param("domain") String domain);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsForm;
import com.gxwebsoft.cms.param.CmsFormParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 表单设计表Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsFormMapper extends BaseMapper<CmsForm> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsForm>
*/
List<CmsForm> selectPageRel(@Param("page") IPage<CmsForm> page,
@Param("param") CmsFormParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsForm> selectListRel(@Param("param") CmsFormParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsFormRecord;
import com.gxwebsoft.cms.param.CmsFormRecordParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 表单数据记录表Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsFormRecordMapper extends BaseMapper<CmsFormRecord> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsFormRecord>
*/
List<CmsFormRecord> selectPageRel(@Param("page") IPage<CmsFormRecord> page,
@Param("param") CmsFormRecordParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsFormRecord> selectListRel(@Param("param") CmsFormRecordParam param);
}

View File

@@ -0,0 +1,41 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsLangLog;
import com.gxwebsoft.cms.param.CmsLangLogParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 国际化记录启用Mapper
*
* @author 科技小王子
* @since 2025-01-06 19:29:26
*/
public interface CmsLangLogMapper extends BaseMapper<CmsLangLog> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsLangLog>
*/
List<CmsLangLog> selectPageRel(@Param("page") IPage<CmsLangLog> page,
@Param("param") CmsLangLogParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsLangLog> selectListRel(@Param("param") CmsLangLogParam param);
@InterceptorIgnore(tenantLine = "true")
List<CmsLangLog> selectListAllRel(@Param("param") CmsLangLogParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsLang;
import com.gxwebsoft.cms.param.CmsLangParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 国际化Mapper
*
* @author 科技小王子
* @since 2025-01-06 19:29:26
*/
public interface CmsLangMapper extends BaseMapper<CmsLang> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsLang>
*/
List<CmsLang> selectPageRel(@Param("page") IPage<CmsLang> page,
@Param("param") CmsLangParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsLang> selectListRel(@Param("param") CmsLangParam param);
}

View File

@@ -0,0 +1,43 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsLangLog;
import com.gxwebsoft.cms.entity.CmsLink;
import com.gxwebsoft.cms.param.CmsLangLogParam;
import com.gxwebsoft.cms.param.CmsLinkParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 常用链接Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsLinkMapper extends BaseMapper<CmsLink> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsLink>
*/
List<CmsLink> selectPageRel(@Param("page") IPage<CmsLink> page,
@Param("param") CmsLinkParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsLink> selectListRel(@Param("param") CmsLinkParam param);
@InterceptorIgnore(tenantLine = "true")
List<CmsLink> selectListAllRel(@Param("param") CmsLinkParam param);
}

View File

@@ -0,0 +1,41 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsModel;
import com.gxwebsoft.cms.param.CmsModelParam;
import com.gxwebsoft.cms.param.CmsWebsiteFieldParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 模型Mapper
*
* @author 科技小王子
* @since 2024-11-26 15:44:53
*/
public interface CmsModelMapper extends BaseMapper<CmsModel> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsModel>
*/
List<CmsModel> selectPageRel(@Param("page") IPage<CmsModel> page,
@Param("param") CmsModelParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsModel> selectListRel(@Param("param") CmsModelParam param);
@InterceptorIgnore(tenantLine = "true")
List<CmsModel> selectListAllRel(@Param("param") CmsModelParam param);
}

View File

@@ -0,0 +1,45 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsModel;
import com.gxwebsoft.cms.entity.CmsNavigation;
import com.gxwebsoft.cms.param.CmsModelParam;
import com.gxwebsoft.cms.param.CmsNavigationParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 网站导航记录表Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
public interface CmsNavigationMapper extends BaseMapper<CmsNavigation> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsNavigation>
*/
List<CmsNavigation> selectPageRel(@Param("page") IPage<CmsNavigation> page,
@Param("param") CmsNavigationParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsNavigation> selectListRel(@Param("param") CmsNavigationParam param);
@InterceptorIgnore(tenantLine = "true")
List<CmsNavigation> selectListAllRel(@Param("param") CmsNavigationParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsStatistics;
import com.gxwebsoft.cms.param.CmsStatisticsParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 站点统计信息表Mapper
*
* @author 科技小王子
* @since 2025-07-25 12:32:06
*/
public interface CmsStatisticsMapper extends BaseMapper<CmsStatistics> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsStatistics>
*/
List<CmsStatistics> selectPageRel(@Param("page") IPage<CmsStatistics> page,
@Param("param") CmsStatisticsParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsStatistics> selectListRel(@Param("param") CmsStatisticsParam param);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsTemplate;
import com.gxwebsoft.cms.param.CmsTemplateParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 网站模版Mapper
*
* @author 科技小王子
* @since 2025-01-21 14:21:16
*/
public interface CmsTemplateMapper extends BaseMapper<CmsTemplate> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsTemplate>
*/
List<CmsTemplate> selectPageRel(@Param("page") IPage<CmsTemplate> page,
@Param("param") CmsTemplateParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsTemplate> selectListRel(@Param("param") CmsTemplateParam param);
}

View File

@@ -0,0 +1,42 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsWebsiteField;
import com.gxwebsoft.cms.param.CmsWebsiteFieldParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 应用参数Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:36:14
*/
public interface CmsWebsiteFieldMapper extends BaseMapper<CmsWebsiteField> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsWebsiteField>
*/
List<CmsWebsiteField> selectPageRel(@Param("page") IPage<CmsWebsiteField> page,
@Param("param") CmsWebsiteFieldParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsWebsiteField> selectListRel(@Param("param") CmsWebsiteFieldParam param);
@InterceptorIgnore(tenantLine = "true")
List<CmsWebsiteField> selectListAllRel(@Param("param") CmsWebsiteFieldParam param);
}

View File

@@ -0,0 +1,53 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsWebsite;
import com.gxwebsoft.cms.param.CmsWebsiteParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 网站信息记录表Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:36:14
*/
public interface CmsWebsiteMapper extends BaseMapper<CmsWebsite> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsWebsite>
*/
List<CmsWebsite> selectPageRel(@Param("page") IPage<CmsWebsite> page,
@Param("param") CmsWebsiteParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsWebsite> selectListRel(@Param("param") CmsWebsiteParam param);
@InterceptorIgnore(tenantLine = "true")
List<CmsWebsite> selectPageRelAll(@Param("page") IPage<CmsWebsite> page,
@Param("param") CmsWebsiteParam param);
@InterceptorIgnore(tenantLine = "true")
CmsWebsite getByIdRelAll(@Param("websiteId") Integer id);
@InterceptorIgnore(tenantLine = "true")
boolean updateByIdAll(@Param("param") CmsWebsite cmsWebsite);
@InterceptorIgnore(tenantLine = "true")
boolean removeByIdAll(@Param("websiteId") Integer id);
@InterceptorIgnore(tenantLine = "true")
CmsWebsite getByTenantId(@Param("tenantId") Integer tenantId);
}

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.cms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsWebsiteSetting;
import com.gxwebsoft.cms.param.CmsWebsiteSettingParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 网站设置Mapper
*
* @author 科技小王子
* @since 2025-02-19 01:35:44
*/
public interface CmsWebsiteSettingMapper extends BaseMapper<CmsWebsiteSetting> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<CmsWebsiteSetting>
*/
List<CmsWebsiteSetting> selectPageRel(@Param("page") IPage<CmsWebsiteSetting> page,
@Param("param") CmsWebsiteSettingParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<CmsWebsiteSetting> selectListRel(@Param("param") CmsWebsiteSettingParam param);
}

View File

@@ -0,0 +1,92 @@
<?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.gxwebsoft.cms.mapper.CmsAdMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, b.user_id as websiteUserId, c.title as categoryName
FROM cms_ad a
LEFT JOIN cms_website b ON a.tenant_id = b.tenant_id
LEFT JOIN cms_navigation c ON a.category_id = c.navigation_id
<where>
<if test="param.adId != null">
AND a.ad_id = #{param.adId}
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.code != null">
AND a.code = #{param.code}
</if>
<if test="param.categoryId != null">
AND a.category_id = #{param.categoryId}
</if>
<if test="param.lang != null">
AND a.lang = #{param.lang}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.width != null">
AND a.width LIKE CONCAT('%', #{param.width}, '%')
</if>
<if test="param.height != null">
AND a.height LIKE CONCAT('%', #{param.height}, '%')
</if>
<if test="param.images != null">
AND a.images LIKE CONCAT('%', #{param.images}, '%')
</if>
<if test="param.path != null">
AND a.path LIKE CONCAT('%', #{param.path}, '%')
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.websiteUserId != null">
AND b.user_id = #{param.websiteUserId}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.name LIKE CONCAT('%', #{param.keywords}, '%')
OR a.ad_id = #{param.keywords}
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsAd">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsAd">
<include refid="selectSql"></include>
</select>
<select id="selectListAllRel" resultType="com.gxwebsoft.cms.entity.CmsAd">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,53 @@
<?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.gxwebsoft.cms.mapper.CmsAdRecordMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_ad_record a
<where>
<if test="param.adRecordId != null">
AND a.ad_record_id = #{param.adRecordId}
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.path != null">
AND a.path LIKE CONCAT('%', #{param.path}, '%')
</if>
<if test="param.url != null">
AND a.url LIKE CONCAT('%', #{param.url}, '%')
</if>
<if test="param.adId != null">
AND a.ad_id = #{param.adId}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsAdRecord">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsAdRecord">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,86 @@
<?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.gxwebsoft.cms.mapper.CmsArticleCategoryMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_article_category a
<where>
<if test="param.categoryId != null">
AND a.category_id = #{param.categoryId}
</if>
<if test="param.categoryCode != null">
AND a.category_code LIKE CONCAT('%', #{param.categoryCode}, '%')
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</if>
<if test="param.parentId != null">
AND a.parent_id = #{param.parentId}
</if>
<if test="param.path != null">
AND a.path LIKE CONCAT('%', #{param.path}, '%')
</if>
<if test="param.component != null">
AND a.component LIKE CONCAT('%', #{param.component}, '%')
</if>
<if test="param.pageId != null">
AND a.page_id = #{param.pageId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.count != null">
AND a.count = #{param.count}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.hide != null">
AND a.hide = #{param.hide}
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.showIndex != null">
AND a.show_index = #{param.showIndex}
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticleCategory">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticleCategory">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,71 @@
<?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.gxwebsoft.cms.mapper.CmsArticleCommentMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_article_comment a
<where>
<if test="param.commentId != null">
AND a.comment_id = #{param.commentId}
</if>
<if test="param.articleId != null">
AND a.article_id = #{param.articleId}
</if>
<if test="param.score != null">
AND a.score = #{param.score}
</if>
<if test="param.content != null">
AND a.content LIKE CONCAT('%', #{param.content}, '%')
</if>
<if test="param.isPicture != null">
AND a.is_picture = #{param.isPicture}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.toUserId != null">
AND a.to_user_id = #{param.toUserId}
</if>
<if test="param.replyCommentId != null">
AND a.reply_comment_id = #{param.replyCommentId}
</if>
<if test="param.replyUserId != null">
AND a.reply_user_id = #{param.replyUserId}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticleComment">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticleComment">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,38 @@
<?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.gxwebsoft.cms.mapper.CmsArticleContentMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_article_content a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.articleId != null">
AND a.article_id = #{param.articleId}
</if>
<if test="param.content != null">
AND a.content LIKE CONCAT('%', #{param.content}, '%')
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticleContent">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticleContent">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,38 @@
<?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.gxwebsoft.cms.mapper.CmsArticleCountMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_article_count a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.articleId != null">
AND a.article_id = #{param.articleId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticleCount">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticleCount">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,38 @@
<?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.gxwebsoft.cms.mapper.CmsArticleLikeMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_article_like a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.articleId != null">
AND a.article_id = #{param.articleId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticleLike">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticleLike">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,187 @@
<?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.gxwebsoft.cms.mapper.CmsArticleMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*,b.title as categoryName,b.parent_Id as parentId, b.model,c.title as parentName,u.nickname,u.avatar
FROM cms_article a
LEFT JOIN cms_navigation b ON a.category_id = b.navigation_id
LEFT JOIN cms_navigation c ON b.parent_id = c.navigation_id
LEFT JOIN gxwebsoft_core.sys_user u ON a.user_id = u.user_id
<where>
<if test="param.articleId != null">
AND a.article_id = #{param.articleId}
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.lang != null">
AND a.lang = #{param.lang}
</if>
<if test="param.model != null">
AND a.model = #{param.model}
</if>
<if test="param.code != null">
AND a.code = #{param.code}
</if>
<if test="param.detail != null">
AND a.detail = #{param.detail}
</if>
<if test="param.showType != null">
AND a.show_type = #{param.showType}
</if>
<if test="param.topic != null">
AND a.topic LIKE CONCAT('%', #{param.topic}, '%')
</if>
<if test="param.categoryId != null">
AND a.category_id = #{param.categoryId}
</if>
<if test="param.categoryIds != null">
AND a.category_id IN
<foreach collection="param.categoryIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</if>
<if test="param.hasImage != null">
AND a.image != ''
</if>
<if test="param.source != null">
AND a.source LIKE CONCAT('%', #{param.source}, '%')
</if>
<if test="param.virtualViews != null">
AND a.virtual_views = #{param.virtualViews}
</if>
<if test="param.actualViews != null">
AND a.actual_views = #{param.actualViews}
</if>
<if test="param.platform != null">
AND a.platform LIKE CONCAT('%', #{param.platform}, '%')
</if>
<if test="param.files != null">
AND a.files LIKE CONCAT('%', #{param.files}, '%')
</if>
<if test="param.video != null">
AND a.video LIKE CONCAT('%', #{param.video}, '%')
</if>
<if test="param.accept != null">
AND a.accept LIKE CONCAT('%', #{param.accept}, '%')
</if>
<if test="param.longitude != null">
AND a.longitude LIKE CONCAT('%', #{param.longitude}, '%')
</if>
<if test="param.latitude != null">
AND a.latitude LIKE CONCAT('%', #{param.latitude}, '%')
</if>
<if test="param.province != null">
AND a.province LIKE CONCAT('%', #{param.province}, '%')
</if>
<if test="param.city != null">
AND a.city LIKE CONCAT('%', #{param.city}, '%')
</if>
<if test="param.region != null">
AND a.region LIKE CONCAT('%', #{param.region}, '%')
</if>
<if test="param.address != null">
AND a.address LIKE CONCAT('%', #{param.address}, '%')
</if>
<if test="param.likes != null">
AND a.likes = #{param.likes}
</if>
<if test="param.commentNumbers != null">
AND a.comment_numbers = #{param.commentNumbers}
</if>
<if test="param.toUsers != null">
AND a.to_users LIKE CONCAT('%', #{param.toUsers}, '%')
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.projectId != null">
AND a.project_id = #{param.projectId}
</if>
<if test="param.tags != null">
AND a.tags LIKE CONCAT('%', #{param.tags}, '%')
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.articleIds != null">
AND a.article_id IN
<foreach collection="param.articleIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
OR a.article_id = #{param.keywords}
OR a.detail = #{param.keywords}
OR a.title LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticle">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticle">
<include refid="selectSql"></include>
</select>
<select id="selectListAllRel" resultType="com.gxwebsoft.cms.entity.CmsArticle">
SELECT a.*,b.user_id as websiteUserId, c.content
FROM cms_article a
LEFT JOIN cms_website b ON a.tenant_id = b.tenant_id
LEFT JOIN cms_article_content c ON a.article_id = c.article_id
<where>
<if test="param.websiteUserId != null">
AND b.user_id = #{param.websiteUserId}
</if>
websiteId
<if test="param.parentId != null">
AND a.parent_id = #{param.parentId}
</if>
<if test="param.categoryId != null">
AND a.category_id = #{param.categoryId}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
</where>
</select>
</mapper>

View File

@@ -0,0 +1,93 @@
<?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.gxwebsoft.cms.mapper.CmsDesignMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*,b.lang_category_id, b.title as categoryName
FROM cms_design a
LEFT JOIN cms_navigation b ON a.category_id = b.navigation_id
<where>
<if test="param.pageId != null">
AND a.page_id = #{param.pageId}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.lang != null">
AND a.lang = #{param.lang}
</if>
<if test="param.categoryId != null">
AND a.category_id = #{param.categoryId}
</if>
<if test="param.model != null">
AND a.model = #{param.model}
</if>
<if test="param.keywords != null">
AND a.keywords LIKE CONCAT('%', #{param.keywords}, '%')
</if>
<if test="param.description != null">
AND a.description LIKE CONCAT('%', #{param.description}, '%')
</if>
<if test="param.photo != null">
AND a.photo LIKE CONCAT('%', #{param.photo}, '%')
</if>
<if test="param.buyUrl != null">
AND a.buy_url LIKE CONCAT('%', #{param.buyUrl}, '%')
</if>
<if test="param.style != null">
AND a.style LIKE CONCAT('%', #{param.style}, '%')
</if>
<if test="param.content != null">
AND a.content LIKE CONCAT('%', #{param.content}, '%')
</if>
<if test="param.showLayout != null">
AND a.show_layout = #{param.showLayout}
</if>
<if test="param.layout != null">
AND a.layout LIKE CONCAT('%', #{param.layout}, '%')
</if>
<if test="param.parentId != null">
AND a.parent_id = #{param.parentId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.home != null">
AND a.home = #{param.home}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsDesign">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsDesign">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,71 @@
<?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.gxwebsoft.cms.mapper.CmsDesignRecordMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_design_record a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.navigationId != null">
AND a.navigation_id = #{param.navigationId}
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.dictCode != null">
AND a.dict_code LIKE CONCAT('%', #{param.dictCode}, '%')
</if>
<if test="param.styles != null">
AND a.styles LIKE CONCAT('%', #{param.styles}, '%')
</if>
<if test="param.shadow != null">
AND a.shadow LIKE CONCAT('%', #{param.shadow}, '%')
</if>
<if test="param.keywords != null">
AND a.keywords LIKE CONCAT('%', #{param.keywords}, '%')
</if>
<if test="param.description != null">
AND a.description LIKE CONCAT('%', #{param.description}, '%')
</if>
<if test="param.path != null">
AND a.path LIKE CONCAT('%', #{param.path}, '%')
</if>
<if test="param.photo != null">
AND a.photo LIKE CONCAT('%', #{param.photo}, '%')
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsDesignRecord">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsDesignRecord">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,65 @@
<?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.gxwebsoft.cms.mapper.CmsDomainMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_domain a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.domain != null">
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
</if>
<if test="param.hostName != null">
AND a.host_name LIKE CONCAT('%', #{param.hostName}, '%')
</if>
<if test="param.hostValue != null">
AND a.host_value LIKE CONCAT('%', #{param.hostValue}, '%')
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.websiteId != null">
AND a.website_id = #{param.websiteId}
</if>
<if test="param.appId != null">
AND a.app_id = #{param.appId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsDomain">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsDomain">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,83 @@
<?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.gxwebsoft.cms.mapper.CmsFormMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_form a
<where>
<if test="param.formId != null">
AND a.form_id = #{param.formId}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.photo != null">
AND a.photo LIKE CONCAT('%', #{param.photo}, '%')
</if>
<if test="param.background != null">
AND a.background LIKE CONCAT('%', #{param.background}, '%')
</if>
<if test="param.video != null">
AND a.video LIKE CONCAT('%', #{param.video}, '%')
</if>
<if test="param.submitNumber != null">
AND a.submit_number = #{param.submitNumber}
</if>
<if test="param.layout != null">
AND a.layout LIKE CONCAT('%', #{param.layout}, '%')
</if>
<if test="param.hidePhoto != null">
AND a.hide_photo = #{param.hidePhoto}
</if>
<if test="param.hideBackground != null">
AND a.hide_background = #{param.hideBackground}
</if>
<if test="param.hideVideo != null">
AND a.hide_video = #{param.hideVideo}
</if>
<if test="param.opacity != null">
AND a.opacity = #{param.opacity}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.merchantId != null">
AND a.merchant_id = #{param.merchantId}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsForm">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsForm">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,65 @@
<?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.gxwebsoft.cms.mapper.CmsFormRecordMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_form_record a
<where>
<if test="param.formRecordId != null">
AND a.form_record_id = #{param.formRecordId}
</if>
<if test="param.phone != null">
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.formData != null">
AND a.form_data LIKE CONCAT('%', #{param.formData}, '%')
</if>
<if test="param.formId != null">
AND a.form_id = #{param.formId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.merchantId != null">
AND a.merchant_id = #{param.merchantId}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsFormRecord">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsFormRecord">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,54 @@
<?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.gxwebsoft.cms.mapper.CmsLangLogMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, b.user_id as websiteUserId
FROM cms_lang_log a
LEFT JOIN cms_website b ON a.tenant_id = b.tenant_id
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.lang != null">
AND a.lang LIKE CONCAT('%', #{param.lang}, '%')
</if>
<if test="param.langId != null">
AND a.lang_id = #{param.langId}
</if>
<if test="param.code != null">
AND a.code LIKE CONCAT('%', #{param.code}, '%')
</if>
<if test="param.websiteUserId != null">
AND b.user_id = #{param.websiteUserId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsLangLog">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsLangLog">
<include refid="selectSql"></include>
</select>
<select id="selectListAllRel" resultType="com.gxwebsoft.cms.entity.CmsLangLog">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,57 @@
<?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.gxwebsoft.cms.mapper.CmsLangMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_lang a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.code != null">
AND a.code LIKE CONCAT('%', #{param.code}, '%')
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsLang">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsLang">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,86 @@
<?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.gxwebsoft.cms.mapper.CmsLinkMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, b.user_id as websiteUserId,c.title as categoryName
FROM cms_link a
LEFT JOIN cms_website b ON a.tenant_id = b.tenant_id
LEFT JOIN cms_navigation c ON a.category_id = c.navigation_id
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.lang != null">
AND a.lang = #{param.lang}
</if>
<if test="param.icon != null">
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
</if>
<if test="param.url != null">
AND a.url LIKE CONCAT('%', #{param.url}, '%')
</if>
<if test="param.categoryId != null">
AND a.category_id LIKE CONCAT('%', #{param.categoryId}, '%')
</if>
<if test="param.appId != null">
AND a.app_id = #{param.appId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.websiteUserId != null">
AND b.user_id = #{param.websiteUserId}
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
OR a.id = #{param.keywords}
OR a.name LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsLink">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsLink">
<include refid="selectSql"></include>
</select>
<select id="selectListAllRel" resultType="com.gxwebsoft.cms.entity.CmsLink">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,89 @@
<?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.gxwebsoft.cms.mapper.CmsModelMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, b.user_id as websiteUserId
FROM cms_model a
LEFT JOIN cms_website b ON a.tenant_id = b.tenant_id
<where>
<if test="param.modelId != null">
AND a.model_id = #{param.modelId}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.model != null">
AND a.model LIKE CONCAT('%', #{param.model}, '%')
</if>
<if test="param.componentDetail != null">
AND a.component_detail LIKE CONCAT('%', #{param.componentDetail}, '%')
</if>
<if test="param.component != null">
AND a.component LIKE CONCAT('%', #{param.component}, '%')
</if>
<if test="param.banner != null">
AND a.banner LIKE CONCAT('%', #{param.banner}, '%')
</if>
<if test="param.imageWidth != null">
AND a.image_width = #{param.imageWidth}
</if>
<if test="param.imageHeight != null">
AND a.image_height = #{param.imageHeight}
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.showType != null">
AND a.show_type = #{param.showType}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.websiteUserId != null">
AND b.user_id = #{param.websiteUserId}
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsModel">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsModel">
<include refid="selectSql"></include>
</select>
<select id="selectListAllRel" resultType="com.gxwebsoft.cms.entity.CmsModel">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,161 @@
<?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.gxwebsoft.cms.mapper.CmsNavigationMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, b.title as parentName, b.position as parentPosition
FROM cms_navigation a
LEFT JOIN cms_navigation b ON a.parent_id = b.navigation_id
<where>
<if test="param.navigationId != null">
AND a.navigation_id = #{param.navigationId}
</if>
<if test="param.parentId != null">
AND a.parent_id = #{param.parentId}
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.model != null">
AND a.model LIKE CONCAT('%', #{param.model}, '%')
</if>
<if test="param.lang != null">
AND a.lang = #{param.lang}
</if>
<if test="param.code != null">
AND a.code LIKE CONCAT('%', #{param.code}, '%')
</if>
<if test="param.path != null">
AND a.path LIKE CONCAT('%', #{param.path}, '%')
</if>
<if test="param.component != null">
AND a.component LIKE CONCAT('%', #{param.component}, '%')
</if>
<if test="param.target != null">
AND a.target LIKE CONCAT('%', #{param.target}, '%')
</if>
<if test="param.icon != null">
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
</if>
<if test="param.color != null">
AND a.color LIKE CONCAT('%', #{param.color}, '%')
</if>
<if test="param.hide != null">
AND a.hide = #{param.hide}
</if>
<if test="param.permission != null">
AND a.permission = #{param.permission}
</if>
<if test="param.password != null">
AND a.password LIKE CONCAT('%', #{param.password}, '%')
</if>
<if test="param.position != null">
AND a.position = #{param.position}
</if>
<if test="param.top != null">
AND a.top = #{param.top}
</if>
<if test="param.bottom != null">
AND a.bottom = #{param.bottom}
</if>
<if test="param.active != null">
AND a.active LIKE CONCAT('%', #{param.active}, '%')
</if>
<if test="param.meta != null">
AND a.meta LIKE CONCAT('%', #{param.meta}, '%')
</if>
<if test="param.style != null">
AND a.style LIKE CONCAT('%', #{param.style}, '%')
</if>
<if test="param.parentPath != null">
AND a.parent_path LIKE CONCAT('%', #{param.parentPath}, '%')
</if>
<if test="param.parentName != null">
AND a.parent_name LIKE CONCAT('%', #{param.parentName}, '%')
</if>
<if test="param.modelName != null">
AND a.model_name LIKE CONCAT('%', #{param.modelName}, '%')
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.pageId != null">
AND a.page_id = #{param.pageId}
</if>
<if test="param.isMpWeixin != null">
AND a.is_mp_weixin = #{param.isMpWeixin}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.home != null">
AND a.home = #{param.home}
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.path LIKE CONCAT('%', #{param.keywords}, '%')
OR a.title LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsNavigation">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsNavigation">
<include refid="selectSql"></include>
</select>
<select id="selectListAllRel" resultType="com.gxwebsoft.cms.entity.CmsNavigation">
SELECT a.*,b.user_id as websiteUserId, c.content
FROM cms_navigation a
LEFT JOIN cms_website b ON a.tenant_id = b.tenant_id
LEFT JOIN cms_design c ON a.navigation_id = c.category_id
<where>
<if test="param.websiteUserId != null">
AND b.user_id = #{param.websiteUserId}
</if>
<if test="param.parentId != null">
AND a.parent_id = #{param.parentId}
</if>
<if test="param.navigationId != null">
AND a.navigation_id = #{param.navigationId}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
</where>
</select>
</mapper>

View File

@@ -0,0 +1,120 @@
<?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.gxwebsoft.cms.mapper.CmsStatisticsMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_statistics a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.websiteId != null">
AND a.website_id = #{param.websiteId}
</if>
<if test="param.userCount != null">
AND a.user_count = #{param.userCount}
</if>
<if test="param.orderCount != null">
AND a.order_count = #{param.orderCount}
</if>
<if test="param.productCount != null">
AND a.product_count = #{param.productCount}
</if>
<if test="param.totalSales != null">
AND a.total_sales = #{param.totalSales}
</if>
<if test="param.monthSales != null">
AND a.month_sales = #{param.monthSales}
</if>
<if test="param.todaySales != null">
AND a.today_sales = #{param.todaySales}
</if>
<if test="param.yesterdaySales != null">
AND a.yesterday_sales = #{param.yesterdaySales}
</if>
<if test="param.weekSales != null">
AND a.week_sales = #{param.weekSales}
</if>
<if test="param.yearSales != null">
AND a.year_sales = #{param.yearSales}
</if>
<if test="param.todayOrders != null">
AND a.today_orders = #{param.todayOrders}
</if>
<if test="param.monthOrders != null">
AND a.month_orders = #{param.monthOrders}
</if>
<if test="param.todayUsers != null">
AND a.today_users = #{param.todayUsers}
</if>
<if test="param.monthUsers != null">
AND a.month_users = #{param.monthUsers}
</if>
<if test="param.todayVisits != null">
AND a.today_visits = #{param.todayVisits}
</if>
<if test="param.totalVisits != null">
AND a.total_visits = #{param.totalVisits}
</if>
<if test="param.merchantCount != null">
AND a.merchant_count = #{param.merchantCount}
</if>
<if test="param.activeUsers != null">
AND a.active_users = #{param.activeUsers}
</if>
<if test="param.conversionRate != null">
AND a.conversion_rate = #{param.conversionRate}
</if>
<if test="param.avgOrderAmount != null">
AND a.avg_order_amount = #{param.avgOrderAmount}
</if>
<if test="param.statisticsDate != null">
AND a.statistics_date LIKE CONCAT('%', #{param.statisticsDate}, '%')
</if>
<if test="param.statisticsType != null">
AND a.statistics_type = #{param.statisticsType}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.merchantId != null">
AND a.merchant_id = #{param.merchantId}
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsStatistics">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsStatistics">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,93 @@
<?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.gxwebsoft.cms.mapper.CmsTemplateMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_template a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.code != null">
AND a.code LIKE CONCAT('%', #{param.code}, '%')
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.keywords != null">
AND a.keywords LIKE CONCAT('%', #{param.keywords}, '%')
</if>
<if test="param.prefix != null">
AND a.prefix LIKE CONCAT('%', #{param.prefix}, '%')
</if>
<if test="param.domain != null">
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
</if>
<if test="param.downUrl != null">
AND a.down_url LIKE CONCAT('%', #{param.downUrl}, '%')
</if>
<if test="param.color != null">
AND a.color LIKE CONCAT('%', #{param.color}, '%')
</if>
<if test="param.version != null">
AND a.version = #{param.version}
</if>
<if test="param.industryParent != null">
AND a.industry_parent LIKE CONCAT('%', #{param.industryParent}, '%')
</if>
<if test="param.industryChild != null">
AND a.industry_child LIKE CONCAT('%', #{param.industryChild}, '%')
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.share != null">
AND a.share = #{param.share}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsTemplate">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsTemplate">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,82 @@
<?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.gxwebsoft.cms.mapper.CmsWebsiteFieldMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, b.user_id
FROM cms_website_field a
LEFT JOIN cms_website b ON a.tenant_id = b.tenant_id
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.lang != null">
AND a.lang = #{param.lang}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.defaultValue != null">
AND a.default_value LIKE CONCAT('%', #{param.defaultValue}, '%')
</if>
<if test="param.modifyRange != null">
AND a.modify_range LIKE CONCAT('%', #{param.modifyRange}, '%')
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.style != null">
AND a.style LIKE CONCAT('%', #{param.style}, '%')
</if>
<if test="param.value != null">
AND a.value LIKE CONCAT('%', #{param.value}, '%')
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.userId != null">
AND b.user_id = #{param.userId}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
OR a.value LIKE CONCAT('%', #{param.keywords}, '%')
OR a.name LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsWebsiteField">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsWebsiteField">
<include refid="selectSql"></include>
</select>
<select id="selectListAllRel" resultType="com.gxwebsoft.cms.entity.CmsWebsiteField">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -0,0 +1,81 @@
<?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.gxwebsoft.cms.mapper.CmsWebsiteSettingMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM cms_website_setting a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.websiteId != null">
AND a.website_id = #{param.websiteId}
</if>
<if test="param.official != null">
AND a.official = #{param.official}
</if>
<if test="param.market != null">
AND a.market = #{param.market}
</if>
<if test="param.search != null">
AND a.search = #{param.search}
</if>
<if test="param.share != null">
AND a.share = #{param.share}
</if>
<if test="param.plugin != null">
AND a.plugin = #{param.plugin}
</if>
<if test="param.editor != null">
AND a.editor = #{param.editor}
</if>
<if test="param.searchBtn != null">
AND a.search_btn = #{param.searchBtn}
</if>
<if test="param.loginBtn != null">
AND a.login_btn = #{param.loginBtn}
</if>
<if test="param.floatTool != null">
AND a.float_tool = #{param.floatTool}
</if>
<if test="param.copyrightLink != null">
AND a.copyright_link = #{param.copyrightLink}
</if>
<if test="param.maxMenuNum != null">
AND a.max_menu_num = #{param.maxMenuNum}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsWebsiteSetting">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsWebsiteSetting">
<include refid="selectSql"></include>
</select>
</mapper>

Some files were not shown because too many files have changed in this diff Show More