Conflicts:
	README.md
This commit is contained in:
YunaiV 2023-09-19 22:28:45 +08:00
commit 9630f236f8
25 changed files with 176 additions and 157 deletions

View File

@ -256,9 +256,9 @@ _前端基于 crmeb uniapp 经过授权重构,优化代码实现,接入芋
| 框架 | 说明 | 版本 | 学习指南 | | 框架 | 说明 | 版本 | 学习指南 |
|---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------| |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------|
| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.14 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | | [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.15 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
| [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | | | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | |
| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.18 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.19 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
| [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) | | [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) |
| [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.6.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.6.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
| [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 | | | [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 | |

View File

@ -40,7 +40,7 @@
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version> <flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
<!-- 看看咋放到 bom 里 --> <!-- 看看咋放到 bom 里 -->
<lombok.version>1.18.28</lombok.version> <lombok.version>1.18.28</lombok.version>
<spring.boot.version>2.7.14</spring.boot.version> <spring.boot.version>2.7.15</spring.boot.version>
<mapstruct.version>1.5.5.Final</mapstruct.version> <mapstruct.version>1.5.5.Final</mapstruct.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>

View File

@ -17,13 +17,13 @@
<revision>1.8.1-snapshot</revision> <revision>1.8.1-snapshot</revision>
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version> <flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
<!-- 统一依赖管理 --> <!-- 统一依赖管理 -->
<spring.boot.version>2.7.14</spring.boot.version> <spring.boot.version>2.7.15</spring.boot.version>
<!-- Web 相关 --> <!-- Web 相关 -->
<springdoc.version>1.7.0</springdoc.version> <springdoc.version>1.7.0</springdoc.version>
<knife4j.version>4.3.0</knife4j.version> <knife4j.version>4.3.0</knife4j.version>
<servlet.versoin>2.5</servlet.versoin> <servlet.versoin>2.5</servlet.versoin>
<!-- DB 相关 --> <!-- DB 相关 -->
<druid.version>1.2.18</druid.version> <druid.version>1.2.19</druid.version>
<mybatis-plus.version>3.5.3.2</mybatis-plus.version> <mybatis-plus.version>3.5.3.2</mybatis-plus.version>
<mybatis-plus-generator.version>3.5.3.2</mybatis-plus-generator.version> <mybatis-plus-generator.version>3.5.3.2</mybatis-plus-generator.version>
<dynamic-datasource.version>3.6.1</dynamic-datasource.version> <dynamic-datasource.version>3.6.1</dynamic-datasource.version>
@ -44,11 +44,11 @@
<!-- Bpm 工作流相关 --> <!-- Bpm 工作流相关 -->
<flowable.version>6.8.0</flowable.version> <flowable.version>6.8.0</flowable.version>
<!-- 工具类相关 --> <!-- 工具类相关 -->
<captcha-plus.version>1.0.6</captcha-plus.version> <captcha-plus.version>1.0.7</captcha-plus.version>
<jsoup.version>1.15.4</jsoup.version> <jsoup.version>1.15.4</jsoup.version>
<lombok.version>1.18.28</lombok.version> <lombok.version>1.18.28</lombok.version>
<mapstruct.version>1.5.5.Final</mapstruct.version> <mapstruct.version>1.5.5.Final</mapstruct.version>
<hutool.version>5.8.20</hutool.version> <hutool.version>5.8.21</hutool.version>
<easyexcel.verion>3.3.2</easyexcel.verion> <easyexcel.verion>3.3.2</easyexcel.verion>
<velocity.version>2.3</velocity.version> <velocity.version>2.3</velocity.version>
<screw.version>1.0.5</screw.version> <screw.version>1.0.5</screw.version>
@ -64,12 +64,12 @@
<okio.version>3.0.0</okio.version> <okio.version>3.0.0</okio.version>
<okhttp3.version>4.10.0</okhttp3.version> <okhttp3.version>4.10.0</okhttp3.version>
<commons-io.version>2.11.0</commons-io.version> <commons-io.version>2.11.0</commons-io.version>
<minio.version>8.5.4</minio.version> <minio.version>8.5.5</minio.version>
<aliyun-java-sdk-core.version>4.6.3</aliyun-java-sdk-core.version> <aliyun-java-sdk-core.version>4.6.3</aliyun-java-sdk-core.version>
<aliyun-java-sdk-dysmsapi.version>2.2.1</aliyun-java-sdk-dysmsapi.version> <aliyun-java-sdk-dysmsapi.version>2.2.1</aliyun-java-sdk-dysmsapi.version>
<tencentcloud-sdk-java.version>3.1.758</tencentcloud-sdk-java.version> <tencentcloud-sdk-java.version>3.1.758</tencentcloud-sdk-java.version>
<justauth.version>1.0.3</justauth.version> <justauth.version>1.0.4</justauth.version>
<jimureport.version>1.5.8</jimureport.version> <jimureport.version>1.6.1</jimureport.version>
<xercesImpl.version>2.12.2</xercesImpl.version> <xercesImpl.version>2.12.2</xercesImpl.version>
<weixin-java.version>4.5.0</weixin-java.version> <weixin-java.version>4.5.0</weixin-java.version>
</properties> </properties>

View File

@ -21,7 +21,7 @@
<maven.compiler.target>8</maven.compiler.target> <maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- 统一依赖管理 --> <!-- 统一依赖管理 -->
<spring.boot.version>2.7.14</spring.boot.version> <spring.boot.version>2.7.15</spring.boot.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
@ -52,7 +52,7 @@
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>5.8.20</version> <version>5.8.21</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -21,7 +21,7 @@
<maven.compiler.target>8</maven.compiler.target> <maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- 统一依赖管理 --> <!-- 统一依赖管理 -->
<spring.boot.version>2.7.14</spring.boot.version> <spring.boot.version>2.7.15</spring.boot.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
@ -52,7 +52,7 @@
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>5.8.20</version> <version>5.8.21</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -1,36 +1,36 @@
package cn.iocoder.yudao.framework.social.config; package cn.iocoder.yudao.framework.social.config;
import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory; import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory;
import com.xingyuv.http.HttpUtil; import com.xingyuv.http.HttpUtil;
import com.xingyuv.http.support.hutool.HutoolImpl; import com.xingyuv.http.support.hutool.HutoolImpl;
import com.xingyuv.jushauth.cache.AuthStateCache; import com.xingyuv.jushauth.cache.AuthStateCache;
import com.xingyuv.justauth.autoconfigure.JustAuthProperties; import com.xingyuv.justauth.autoconfigure.JustAuthProperties;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
/** /**
* 社交自动装配类 * 社交自动装配类
* *
* @author timfruit * @author timfruit
* @date 2021-10-30 * @date 2021-10-30
*/ */
@Slf4j @Slf4j
@AutoConfiguration @AutoConfiguration
@EnableConfigurationProperties(JustAuthProperties.class) @EnableConfigurationProperties(JustAuthProperties.class)
public class YudaoSocialAutoConfiguration { public class YudaoSocialAutoConfiguration {
@Bean @Bean
@Primary @Primary
@ConditionalOnProperty(prefix = "justauth", value = "enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnProperty(prefix = "justauth", value = "enabled", havingValue = "true", matchIfMissing = true)
public YudaoAuthRequestFactory yudaoAuthRequestFactory(JustAuthProperties properties, AuthStateCache authStateCache) { public YudaoAuthRequestFactory yudaoAuthRequestFactory(JustAuthProperties properties, AuthStateCache authStateCache) {
// 需要修改 HttpUtil 使用的实现避免类报错 // 需要修改 HttpUtil 使用的实现避免类报错
HttpUtil.setHttp(new HutoolImpl()); HttpUtil.setHttp(new HutoolImpl());
// 创建 YudaoAuthRequestFactory // 创建 YudaoAuthRequestFactory
return new YudaoAuthRequestFactory(properties, authStateCache); return new YudaoAuthRequestFactory(properties, authStateCache);
} }
} }

View File

@ -3,27 +3,27 @@ import { defHttp } from '@/utils/http/axios'
// 查询${table.classComment}列表 // 查询${table.classComment}列表
export function get${simpleClassName}Page(params) { export function get${simpleClassName}Page(params) {
return defHttp.get({ url: '${baseURL}/page', params }) return defHttp.get({ url: '${baseURL}/page', params })
} }
// 查询${table.classComment}详情 // 查询${table.classComment}详情
export function get${simpleClassName}(id: number) { export function get${simpleClassName}(id: number) {
return defHttp.get({ url: '${baseURL}/get?id=' + id }) return defHttp.get({ url: `${baseURL}/get?id=${id}` })
} }
// 新增${table.classComment} // 新增${table.classComment}
export function create${simpleClassName}(data) { export function create${simpleClassName}(data) {
return defHttp.post({ url: '${baseURL}/create', data }) return defHttp.post({ url: '${baseURL}/create', data })
} }
// 修改${table.classComment} // 修改${table.classComment}
export function update${simpleClassName}(data) { export function update${simpleClassName}(data) {
return defHttp.put({ url: '${baseURL}/update', data }) return defHttp.put({ url: '${baseURL}/update', data })
} }
// 删除${table.classComment} // 删除${table.classComment}
export function delete${simpleClassName}(id: number) { export function delete${simpleClassName}(id: number) {
return defHttp.delete({ url: '${baseURL}/delete?id=' + id }) return defHttp.delete({ url: `${baseURL}/delete?id=${id}` })
} }
// 导出${table.classComment} Excel // 导出${table.classComment} Excel

View File

@ -1,4 +1,5 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' import type { BasicColumn, FormSchema } from '@/components/Table'
import { useRender } from '@/components/Table'
import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { DICT_TYPE, getDictOptions } from '@/utils/dict'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
@ -92,13 +93,13 @@ export const createFormSchema: FormSchema[] = [
#elseif($column.htmlType == "imageUpload")## 图片上传 #elseif($column.htmlType == "imageUpload")## 图片上传
component: 'FileUpload', component: 'FileUpload',
componentProps: { componentProps: {
fileType: 'file', fileType: 'image',
maxCount: 1, maxCount: 1,
}, },
#elseif($column.htmlType == "fileUpload")## 文件上传 #elseif($column.htmlType == "fileUpload")## 文件上传
component: 'FileUpload', component: 'FileUpload',
componentProps: { componentProps: {
fileType: 'image', fileType: 'file',
maxCount: 1, maxCount: 1,
}, },
#elseif($column.htmlType == "editor")## 文本编辑器 #elseif($column.htmlType == "editor")## 文本编辑器
@ -132,6 +133,11 @@ export const createFormSchema: FormSchema[] = [
}, },
#elseif($column.htmlType == "datetime")## 时间框 #elseif($column.htmlType == "datetime")## 时间框
component: 'DatePicker', component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
},
#elseif($column.htmlType == "textarea")## 文本域 #elseif($column.htmlType == "textarea")## 文本域
component: 'InputTextArea', component: 'InputTextArea',
#end #end
@ -154,7 +160,7 @@ export const updateFormSchema: FormSchema[] = [
#set ($javaField = $column.javaField) #set ($javaField = $column.javaField)
#set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
#set ($comment = $column.columnComment) #set ($comment = $column.columnComment)
#if (!$column.primaryKey)## 忽略主键,不用在表单里 #if (!$column.primaryKey)## 忽略主键,不用在表单里
{ {
label: '${comment}', label: '${comment}',
field: '${javaField}', field: '${javaField}',
@ -164,45 +170,57 @@ export const updateFormSchema: FormSchema[] = [
#if ($column.htmlType == "input") #if ($column.htmlType == "input")
component: 'Input', component: 'Input',
#elseif($column.htmlType == "imageUpload")## 图片上传 #elseif($column.htmlType == "imageUpload")## 图片上传
component: 'Upload', component: 'FileUpload',
componentProps: {
fileType: 'image',
maxCount: 1,
},
#elseif($column.htmlType == "fileUpload")## 文件上传 #elseif($column.htmlType == "fileUpload")## 文件上传
component: 'Upload', component: 'FileUpload',
#elseif($column.htmlType == "editor")## 文本编辑器 componentProps: {
component: 'Editor', fileType: 'file',
maxCount: 1,
},
#elseif($column.htmlType == "editor")## 文本编辑器component: 'Editor',
#elseif($column.htmlType == "select")## 下拉框 #elseif($column.htmlType == "select")## 下拉框
component: 'Select', component: 'Select',
componentProps: { componentProps: {
#if ("" != $dictType)## 有数据字典 #if ("" != $dictType)## 有数据字典
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'), options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
#else##没数据字典 #else##没数据字典
options:[], options:[],
#end #end
}, },
#elseif($column.htmlType == "checkbox")## 多选框 #elseif($column.htmlType == "checkbox")## 多选框
component: 'Checkbox', component: 'Checkbox',
componentProps: { componentProps: {
#if ("" != $dictType)## 有数据字典 #if ("" != $dictType)## 有数据字典
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'), options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
#else##没数据字典 #else##没数据字典
options:[], options:[],
#end #end
}, },
#elseif($column.htmlType == "radio")## 单选框 #elseif($column.htmlType == "radio")## 单选框
component: 'RadioButtonGroup', component: 'RadioButtonGroup',
componentProps: { componentProps: {
#if ("" != $dictType)## 有数据字典 #if ("" != $dictType)## 有数据字典
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'), options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
#else##没数据字典 #else##没数据字典
options:[], options:[],
#end #end
}, },
#elseif($column.htmlType == "datetime")## 时间框 #elseif($column.htmlType == "datetime")## 时间框
component: 'DatePicker', component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
},
#elseif($column.htmlType == "textarea")## 文本域 #elseif($column.htmlType == "textarea")## 文本域
component: 'InputTextArea', component: 'InputTextArea',
#end #end
}, },
#end #end
#end #end
#end #end
] ]

View File

@ -9,9 +9,10 @@ import { create${simpleClassName}, get${simpleClassName}, update${simpleClassNam
defineOptions({ name: '${table.className}Modal' }) defineOptions({ name: '${table.className}Modal' })
const emit = defineEmits(['success', 'register'])
const { t } = useI18n() const { t } = useI18n()
const { createMessage } = useMessage() const { createMessage } = useMessage()
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true) const isUpdate = ref(true)
const [registerForm, { setFieldsValue, resetFields, resetSchema, validate }] = useForm({ const [registerForm, { setFieldsValue, resetFields, resetSchema, validate }] = useForm({
@ -37,11 +38,11 @@ async function handleSubmit() {
try { try {
const values = await validate() const values = await validate()
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) { if (unref(isUpdate))
await update${simpleClassName}(values) await update${simpleClassName}(values)
} else { else
await create${simpleClassName}(values) await create${simpleClassName}(values)
}
closeModal() closeModal()
emit('success') emit('success')
createMessage.success(t('common.saveSuccessText')) createMessage.success(t('common.saveSuccessText'))
@ -51,7 +52,7 @@ async function handleSubmit() {
} }
</script> </script>
<template> <template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="isUpdate ? t('action.edit') : t('action.create')" @ok="handleSubmit"> <BasicModal v-bind="$attrs" :title="isUpdate ? t('action.edit') : t('action.create')" @register="registerModal" @ok="handleSubmit">
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
</BasicModal> </BasicModal>
</template> </template>

View File

@ -1,12 +1,12 @@
<script lang="ts" setup> <script lang="ts" setup>
import ${simpleClassName}Modal from './${simpleClassName}Modal.vue' import ${ simpleClassName }Modal from './${simpleClassName}Modal.vue'
import { columns, searchFormSchema } from './${classNameVar}.data' import { columns, searchFormSchema } from './${classNameVar}.data'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage' import { useMessage } from '@/hooks/web/useMessage'
import { useModal } from '@/components/Modal' import { useModal } from '@/components/Modal'
import { IconEnum } from '@/enums/appEnum' import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table' import { BasicTable, useTable, TableAction } from '@/components/Table'
import { delete${simpleClassName}, export${simpleClassName}, get${simpleClassName}Page } from '@/api/${table.moduleName}/${classNameVar}' import { delete${ simpleClassName }, export${ simpleClassName }, get${ simpleClassName } Page } from '@/api/${table.moduleName}/${classNameVar}'
defineOptions({ name: '${table.className}' }) defineOptions({ name: '${table.className}' })
@ -16,17 +16,17 @@ const [registerModal, { openModal }] = useModal()
const [registerTable, { getForm, reload }] = useTable({ const [registerTable, { getForm, reload }] = useTable({
title: '${table.classComment}列表', title: '${table.classComment}列表',
api: get${simpleClassName}Page, api: get${ simpleClassName }Page,
columns, columns,
formConfig: { labelWidth: 120, schemas: searchFormSchema }, formConfig: { labelWidth: 120, schemas: searchFormSchema },
useSearchForm: true, useSearchForm: true,
showTableSetting: true, showTableSetting: true,
actionColumn: { actionColumn: {
width: 140, width: 140,
title: t('common.action'), title: t('common.action'),
dataIndex: 'action', dataIndex: 'action',
fixed: 'right', fixed: 'right',
}, },
}) })
function handleCreate() { function handleCreate() {
@ -43,14 +43,14 @@ async function handleExport() {
iconType: 'warning', iconType: 'warning',
content: t('common.exportMessage'), content: t('common.exportMessage'),
async onOk() { async onOk() {
await export${simpleClassName}(getForm().getFieldsValue()) await export${ simpleClassName } (getForm().getFieldsValue())
createMessage.success(t('common.exportSuccessText')) createMessage.success(t('common.exportSuccessText'))
}, },
}) })
} }
async function handleDelete(record: Recordable) { async function handleDelete(record: Recordable) {
await delete${simpleClassName}(record.id) await delete${ simpleClassName } (record.id)
createMessage.success(t('common.delSuccessText')) createMessage.success(t('common.delSuccessText'))
reload() reload()
} }
@ -89,4 +89,4 @@ async function handleDelete(record: Recordable) {
</BasicTable> </BasicTable>
<${simpleClassName}Modal @register="registerModal" @success="reload()" /> <${simpleClassName}Modal @register="registerModal" @success="reload()" />
</div> </div>
</template> </template>

View File

@ -9,41 +9,41 @@ import java.time.LocalDateTime;
@Data @Data
public class AppArticleRespVO { public class AppArticleRespVO {
@Schema(description = "文章编号", required = true, example = "1") @Schema(description = "文章编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "文章标题", required = true, example = "芋道源码 - 促销模块") @Schema(description = "文章标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码 - 促销模块")
private String title; private String title;
@Schema(description = "文章作者", required = true, example = "芋道源码") @Schema(description = "文章作者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
private String author; private String author;
@Schema(description = "分类编号", required = true, example = "2048") @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private Long categoryId; private Long categoryId;
@Schema(description = "图文封面", required = true, example = "https://www.iocoder.cn/1.png") @Schema(description = "图文封面", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png")
private String picUrl; private String picUrl;
@Schema(description = "文章简介", required = true, example = "我是简介") @Schema(description = "文章简介", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是简介")
private String introduction; private String introduction;
@Schema(description = "文章内容", required = true, example = "我是详细") @Schema(description = "文章内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是详细")
private String description; private String description;
@Schema(description = "发布时间", required = true) @Schema(description = "发布时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
@Schema(description = "浏览量", required = true, example = "1024") @Schema(description = "浏览量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer browseCount; private Integer browseCount;
@Schema(description = "关联的商品 SPU 编号", example = "1024") @Schema(description = "关联的商品 SPU 编号", example = "1024")
private Long spuId; private Long spuId;
// TODO 芋艿下面 2 个字段后端要存储前端不用返回 // TODO 芋艿下面 2 个字段后端要存储前端不用返回
// @Schema(description = "是否热卖推荐", required = true, example = "true") // @Schema(description = "是否热卖推荐", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
// private Boolean recommendHot; // private Boolean recommendHot;
// //
// @Schema(description = "是否 Banner 推荐", required = true, example = "true") // @Schema(description = "是否 Banner 推荐", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
// private Boolean recommendBanner; // private Boolean recommendBanner;
} }

View File

@ -7,20 +7,20 @@ import lombok.Data;
@Data @Data
public class AppArticleCategoryRespVO { public class AppArticleCategoryRespVO {
@Schema(description = "分类编号", required = true, example = "1") @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "分类名称", required = true, example = "技术") @Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "技术")
private String name; private String name;
@Schema(description = "分类图标", required = true, example = "https://www.iocoder.cn/1.png") @Schema(description = "分类图标", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png")
private String picUrl; private String picUrl;
// TODO 芋艿下面 2 个字段后端要存储前端不用返回 // TODO 芋艿下面 2 个字段后端要存储前端不用返回
// @Schema(description = "状态", required = true, example = "1") // @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
// private Integer status; // private Integer status;
// //
// @Schema(description = "排序", required = true, example = "1024") // @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
// private Integer sort; // private Integer sort;
} }

View File

@ -9,46 +9,46 @@ import java.time.LocalDateTime;
@Data @Data
public class AppBargainActivityDetailRespVO { public class AppBargainActivityDetailRespVO {
@Schema(description = "砍价活动编号", required = true, example = "1024") @Schema(description = "砍价活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "砍价活动名称", required = true, example = "618 大砍价") @Schema(description = "砍价活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大砍价")
private String name; private String name;
@Schema(description = "活动开始时间", required = true) @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime startTime; private LocalDateTime startTime;
@Schema(description = "活动结束时间", required = true) @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime; private LocalDateTime endTime;
@Schema(description = "商品 SPU 编号", required = true, example = "2048") @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private Long spuId; private Long spuId;
@Schema(description = "商品 SKU 编号", required = true, example = "1024") @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long skuId; private Long skuId;
@Schema(description = "商品价格,单位:分", required = true, example = "100") @Schema(description = "商品价格,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
private Integer price; private Integer price;
@Schema(description = "商品描述", required = true, example = "我要吃西红柿") @Schema(description = "商品描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "我要吃西红柿")
private String description; private String description;
@Schema(description = "砍价库存", required = true, example = "512") @Schema(description = "砍价库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "512")
private Integer stock; private Integer stock;
@Schema(description = "商品图片", required = true, example = "4096") // SPU picUrl 读取 @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") // SPU picUrl 读取
private String picUrl; private String picUrl;
@Schema(description = "商品市场价,单位:分", required = true, example = "50") // SPU marketPrice 读取 @Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") // SPU marketPrice 读取
private Integer marketPrice; private Integer marketPrice;
@Schema(description = "商品单位", required = true, example = "") // SPU unit 读取然后转换 @Schema(description = "商品单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "") // SPU unit 读取然后转换
private String unitName; private String unitName;
@Schema(description = "砍价最低金额,单位:分", required = true, example = "100") // 从砍价商品里取最低价 @Schema(description = "砍价最低金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") // 从砍价商品里取最低价
private Integer bargainPrice; private Integer bargainPrice;
@Schema(description = "砍价成功数量", required = true, example = "100") @Schema(description = "砍价成功数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
private Integer successCount; private Integer successCount;
} }

View File

@ -9,34 +9,34 @@ import java.time.LocalDateTime;
@Data @Data
public class AppBargainActivityRespVO { public class AppBargainActivityRespVO {
@Schema(description = "砍价活动编号", required = true, example = "1024") @Schema(description = "砍价活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "砍价活动名称", required = true, example = "618 大砍价") @Schema(description = "砍价活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大砍价")
private String name; private String name;
@Schema(description = "活动开始时间", required = true) @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime startTime; private LocalDateTime startTime;
@Schema(description = "活动结束时间", required = true) @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime; private LocalDateTime endTime;
@Schema(description = "商品 SPU 编号", required = true, example = "2048") @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private Long spuId; private Long spuId;
@Schema(description = "商品 SKU 编号", required = true, example = "1024") @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long skuId; private Long skuId;
@Schema(description = "砍价库存", required = true, example = "512") @Schema(description = "砍价库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "512")
private Integer stock; private Integer stock;
@Schema(description = "商品图片", required = true, example = "4096") // SPU picUrl 读取 @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") // SPU picUrl 读取
private String picUrl; private String picUrl;
@Schema(description = "商品市场价,单位:分", required = true, example = "50") // SPU marketPrice 读取 @Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") // SPU marketPrice 读取
private Integer marketPrice; private Integer marketPrice;
@Schema(description = "砍价最低金额,单位:分", required = true, example = "100") // 从砍价商品里取最低价 @Schema(description = "砍价最低金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") // 从砍价商品里取最低价
private Integer bargainPrice; private Integer bargainPrice;
} }

View File

@ -9,7 +9,7 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class AppBargainHelpCreateReqVO { public class AppBargainHelpCreateReqVO {
@Schema(description = "砍价记录编号", required = true, example = "1024") @Schema(description = "砍价记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "砍价记录编号不能为空") @NotNull(message = "砍价记录编号不能为空")
private Long recordId; private Long recordId;

View File

@ -9,16 +9,16 @@ import java.time.LocalDateTime;
@Data @Data
public class AppBargainHelpRespVO { public class AppBargainHelpRespVO {
@Schema(description = "助力用户的昵称", required = true, example = "1024") @Schema(description = "助力用户的昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String nickname; private String nickname;
@Schema(description = "助力用户的头像", required = true, example = "1024") @Schema(description = "助力用户的头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String avatar; private String avatar;
@Schema(description = "助力用户的砍价金额", required = true, example = "1024") @Schema(description = "助力用户的砍价金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer reducePrice; private Integer reducePrice;
@Schema(description = "创建时间", required = true, example = "1024") @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -9,7 +9,7 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class AppBargainRecordCreateReqVO { public class AppBargainRecordCreateReqVO {
@Schema(description = "砍价活动编号", required = true, example = "1024") @Schema(description = "砍价活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "砍价活动编号不能为空") @NotNull(message = "砍价活动编号不能为空")
private Long activityId; private Long activityId;

View File

@ -9,23 +9,23 @@ import java.util.List;
@Data @Data
public class AppBargainRecordSummaryRespVO { public class AppBargainRecordSummaryRespVO {
@Schema(description = "砍价用户数量", required = true, example = "1024") @Schema(description = "砍价用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer userCount; private Integer userCount;
@Schema(description = "成功砍价的记录", required = true) // 只返回最近的 7 @Schema(description = "成功砍价的记录", requiredMode = Schema.RequiredMode.REQUIRED) // 只返回最近的 7
private List<Record> successRecords; private List<Record> successRecords;
@Schema(description = "成功砍价记录") @Schema(description = "成功砍价记录")
@Data @Data
public static class Record { public static class Record {
@Schema(description = "用户昵称", required = true, example = "王**") @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王**")
private String nickname; private String nickname;
@Schema(description = "用户头像", required = true, example = "https://www.iocoder.cn/xxx.jpg") @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xxx.jpg")
private String avatar; private String avatar;
@Schema(description = "活动名称", required = true, example = "天蚕土豆") @Schema(description = "活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "天蚕土豆")
private String activityName; private String activityName;
} }

View File

@ -15,15 +15,15 @@ public class AppCouponMatchReqVO {
@NotNull(message = "商品金额不能为空") @NotNull(message = "商品金额不能为空")
private Integer price; private Integer price;
@Schema(description = "商品 SPU 编号的数组", required = true, example = "[1, 2]") @Schema(description = "商品 SPU 编号的数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2]")
@NotEmpty(message = "商品 SPU 编号不能为空") @NotEmpty(message = "商品 SPU 编号不能为空")
private List<Long> spuIds; private List<Long> spuIds;
@Schema(description = "商品 SKU 编号的数组", required = true, example = "[1, 2]") @Schema(description = "商品 SKU 编号的数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2]")
@NotEmpty(message = "商品 SKU 编号不能为空") @NotEmpty(message = "商品 SKU 编号不能为空")
private List<Long> skuIds; private List<Long> skuIds;
@Schema(description = "分类编号的数组", required = true, example = "[10, 20]") @Schema(description = "分类编号的数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[10, 20]")
@NotEmpty(message = "分类编号不能为空") @NotEmpty(message = "分类编号不能为空")
private List<Long> categoryIds; private List<Long> categoryIds;

View File

@ -8,10 +8,10 @@ import lombok.Data;
@Data @Data
public class AppDeliveryConfigRespVO { public class AppDeliveryConfigRespVO {
@Schema(description = "腾讯地图 KEY", required = true, example = "123456") @Schema(description = "腾讯地图 KEY", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
private String tencentLbsKey; private String tencentLbsKey;
@Schema(description = "是否开启自提", required = true, example = "true") @Schema(description = "是否开启自提", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
private Boolean pickUpEnable; private Boolean pickUpEnable;
} }

View File

@ -7,10 +7,10 @@ import lombok.Data;
@Data @Data
public class AppDeliveryExpressRespVO { public class AppDeliveryExpressRespVO {
@Schema(description = "编号", required = true, example = "1") @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id; private Long id;
@Schema(description = "门店名称", required = true, example = "顺丰") @Schema(description = "门店名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "顺丰")
private String name; private String name;
} }

View File

@ -25,12 +25,12 @@ public class AppTradeOrderSettlementReqVO {
@Schema(description = "优惠劵编号", example = "1024") @Schema(description = "优惠劵编号", example = "1024")
private Long couponId; private Long couponId;
@Schema(description = "是否使用积分", required = true, example = "true") @Schema(description = "是否使用积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否使用积分不能为空") @NotNull(message = "是否使用积分不能为空")
private Boolean pointStatus; private Boolean pointStatus;
// ========== 配送相关相关字段 ========== // ========== 配送相关相关字段 ==========
@Schema(description = "配送方式", required = true, example = "1") @Schema(description = "配送方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@InEnum(value = DeliveryTypeEnum.class, message = "配送方式不正确") @InEnum(value = DeliveryTypeEnum.class, message = "配送方式不正确")
private Integer deliveryType; private Integer deliveryType;

View File

@ -13,7 +13,7 @@ import java.util.List;
@Data @Data
public class AppTradeOrderSettlementRespVO { public class AppTradeOrderSettlementRespVO {
@Schema(description = "交易类型", required = true, example = "1") // 对应 TradeOrderTypeEnum 枚举 @Schema(description = "交易类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") // 对应 TradeOrderTypeEnum 枚举
private Integer type = 1; // TODO 芋艿改成计算 private Integer type = 1; // TODO 芋艿改成计算
@Schema(description = "购物项数组", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "购物项数组", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -13,16 +13,16 @@ import java.time.LocalDateTime;
@ToString(callSuper = true) @ToString(callSuper = true)
public class PayOrderDetailsRespVO extends PayOrderBaseVO { public class PayOrderDetailsRespVO extends PayOrderBaseVO {
@Schema(description = "支付订单编号", required = true, example = "1024") @Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id; private Long id;
@Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") @Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
private String appName; private String appName;
@Schema(description = "创建时间", required = true) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
@Schema(description = "更新时间", required = true) @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime updateTime; private LocalDateTime updateTime;
/** /**
@ -34,7 +34,7 @@ public class PayOrderDetailsRespVO extends PayOrderBaseVO {
@Schema(description = "支付订单扩展") @Schema(description = "支付订单扩展")
public static class PayOrderExtension { public static class PayOrderExtension {
@Schema(description = "支付订单号", required = true, example = "1024") @Schema(description = "支付订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String no; private String no;
@Schema(description = "支付异步通知的内容") @Schema(description = "支付异步通知的内容")

View File

@ -55,7 +55,7 @@ public class DictDataDO extends BaseDO {
/** /**
* css 样式 * css 样式
*/ */
@TableField(updateStrategy = FieldStrategy.IGNORED) @TableField(updateStrategy = FieldStrategy.ALWAYS)
private String cssClass; private String cssClass;
/** /**
* 备注 * 备注