Commit 9630f236f8aeebb4937b284d752c0e2cd6f7448c

Authored by YunaiV
2 parents edfa7bce 6c80ef38

Merge branch 'feature/auth' of https://gitee.com/zhijiantianya/ruoyi-vue-pro

 Conflicts:
	README.md
Showing 25 changed files with 176 additions and 157 deletions
README.md
... ... @@ -256,9 +256,9 @@ _前端基于 crmeb uniapp 经过授权重构,优化代码实现,接入芋
256 256  
257 257 | 框架 | 说明 | 版本 | 学习指南 |
258 258 |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------|
259   -| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.14 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
  259 +| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.15 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
260 260 | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | |
261   -| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.18 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
  261 +| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.19 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
262 262 | [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) |
263 263 | [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.6.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
264 264 | [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 | |
... ...
... ... @@ -40,7 +40,7 @@
40 40 <flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
41 41 <!-- 看看咋放到 bom 里 -->
42 42 <lombok.version>1.18.28</lombok.version>
43   - <spring.boot.version>2.7.14</spring.boot.version>
  43 + <spring.boot.version>2.7.15</spring.boot.version>
44 44 <mapstruct.version>1.5.5.Final</mapstruct.version>
45 45 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
46 46 </properties>
... ...
yudao-dependencies/pom.xml
... ... @@ -17,13 +17,13 @@
17 17 <revision>1.8.1-snapshot</revision>
18 18 <flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
19 19 <!-- 统一依赖管理 -->
20   - <spring.boot.version>2.7.14</spring.boot.version>
  20 + <spring.boot.version>2.7.15</spring.boot.version>
21 21 <!-- Web 相关 -->
22 22 <springdoc.version>1.7.0</springdoc.version>
23 23 <knife4j.version>4.3.0</knife4j.version>
24 24 <servlet.versoin>2.5</servlet.versoin>
25 25 <!-- DB 相关 -->
26   - <druid.version>1.2.18</druid.version>
  26 + <druid.version>1.2.19</druid.version>
27 27 <mybatis-plus.version>3.5.3.2</mybatis-plus.version>
28 28 <mybatis-plus-generator.version>3.5.3.2</mybatis-plus-generator.version>
29 29 <dynamic-datasource.version>3.6.1</dynamic-datasource.version>
... ... @@ -44,11 +44,11 @@
44 44 <!-- Bpm 工作流相关 -->
45 45 <flowable.version>6.8.0</flowable.version>
46 46 <!-- 工具类相关 -->
47   - <captcha-plus.version>1.0.6</captcha-plus.version>
  47 + <captcha-plus.version>1.0.7</captcha-plus.version>
48 48 <jsoup.version>1.15.4</jsoup.version>
49 49 <lombok.version>1.18.28</lombok.version>
50 50 <mapstruct.version>1.5.5.Final</mapstruct.version>
51   - <hutool.version>5.8.20</hutool.version>
  51 + <hutool.version>5.8.21</hutool.version>
52 52 <easyexcel.verion>3.3.2</easyexcel.verion>
53 53 <velocity.version>2.3</velocity.version>
54 54 <screw.version>1.0.5</screw.version>
... ... @@ -64,12 +64,12 @@
64 64 <okio.version>3.0.0</okio.version>
65 65 <okhttp3.version>4.10.0</okhttp3.version>
66 66 <commons-io.version>2.11.0</commons-io.version>
67   - <minio.version>8.5.4</minio.version>
  67 + <minio.version>8.5.5</minio.version>
68 68 <aliyun-java-sdk-core.version>4.6.3</aliyun-java-sdk-core.version>
69 69 <aliyun-java-sdk-dysmsapi.version>2.2.1</aliyun-java-sdk-dysmsapi.version>
70 70 <tencentcloud-sdk-java.version>3.1.758</tencentcloud-sdk-java.version>
71   - <justauth.version>1.0.3</justauth.version>
72   - <jimureport.version>1.5.8</jimureport.version>
  71 + <justauth.version>1.0.4</justauth.version>
  72 + <jimureport.version>1.6.1</jimureport.version>
73 73 <xercesImpl.version>2.12.2</xercesImpl.version>
74 74 <weixin-java.version>4.5.0</weixin-java.version>
75 75 </properties>
... ...
yudao-example/yudao-sso-demo-by-code/pom.xml
... ... @@ -21,7 +21,7 @@
21 21 <maven.compiler.target>8</maven.compiler.target>
22 22 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23 23 <!-- 统一依赖管理 -->
24   - <spring.boot.version>2.7.14</spring.boot.version>
  24 + <spring.boot.version>2.7.15</spring.boot.version>
25 25 </properties>
26 26  
27 27 <dependencyManagement>
... ... @@ -52,7 +52,7 @@
52 52 <dependency>
53 53 <groupId>cn.hutool</groupId>
54 54 <artifactId>hutool-all</artifactId>
55   - <version>5.8.20</version>
  55 + <version>5.8.21</version>
56 56 </dependency>
57 57  
58 58 <dependency>
... ...
yudao-example/yudao-sso-demo-by-password/pom.xml
... ... @@ -21,7 +21,7 @@
21 21 <maven.compiler.target>8</maven.compiler.target>
22 22 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23 23 <!-- 统一依赖管理 -->
24   - <spring.boot.version>2.7.14</spring.boot.version>
  24 + <spring.boot.version>2.7.15</spring.boot.version>
25 25 </properties>
26 26  
27 27 <dependencyManagement>
... ... @@ -52,7 +52,7 @@
52 52 <dependency>
53 53 <groupId>cn.hutool</groupId>
54 54 <artifactId>hutool-all</artifactId>
55   - <version>5.8.20</version>
  55 + <version>5.8.21</version>
56 56 </dependency>
57 57  
58 58 <dependency>
... ...
yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java
1   -package cn.iocoder.yudao.framework.social.config;
2   -
3   -import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory;
4   -import com.xingyuv.http.HttpUtil;
5   -import com.xingyuv.http.support.hutool.HutoolImpl;
6   -import com.xingyuv.jushauth.cache.AuthStateCache;
7   -import com.xingyuv.justauth.autoconfigure.JustAuthProperties;
8   -import lombok.extern.slf4j.Slf4j;
9   -import org.springframework.boot.autoconfigure.AutoConfiguration;
10   -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
11   -import org.springframework.boot.context.properties.EnableConfigurationProperties;
12   -import org.springframework.context.annotation.Bean;
13   -import org.springframework.context.annotation.Primary;
14   -
15   -/**
16   - * 社交自动装配类
17   - *
18   - * @author timfruit
19   - * @date 2021-10-30
20   - */
21   -@Slf4j
22   -@AutoConfiguration
23   -@EnableConfigurationProperties(JustAuthProperties.class)
24   -public class YudaoSocialAutoConfiguration {
25   -
26   - @Bean
27   - @Primary
28   - @ConditionalOnProperty(prefix = "justauth", value = "enabled", havingValue = "true", matchIfMissing = true)
29   - public YudaoAuthRequestFactory yudaoAuthRequestFactory(JustAuthProperties properties, AuthStateCache authStateCache) {
30   - // 需要修改 HttpUtil 使用的实现,避免类报错
31   - HttpUtil.setHttp(new HutoolImpl());
32   - // 创建 YudaoAuthRequestFactory
33   - return new YudaoAuthRequestFactory(properties, authStateCache);
34   - }
35   -
36   -}
  1 +package cn.iocoder.yudao.framework.social.config;
  2 +
  3 +import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory;
  4 +import com.xingyuv.http.HttpUtil;
  5 +import com.xingyuv.http.support.hutool.HutoolImpl;
  6 +import com.xingyuv.jushauth.cache.AuthStateCache;
  7 +import com.xingyuv.justauth.autoconfigure.JustAuthProperties;
  8 +import lombok.extern.slf4j.Slf4j;
  9 +import org.springframework.boot.autoconfigure.AutoConfiguration;
  10 +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
  11 +import org.springframework.boot.context.properties.EnableConfigurationProperties;
  12 +import org.springframework.context.annotation.Bean;
  13 +import org.springframework.context.annotation.Primary;
  14 +
  15 +/**
  16 + * 社交自动装配类
  17 + *
  18 + * @author timfruit
  19 + * @date 2021-10-30
  20 + */
  21 +@Slf4j
  22 +@AutoConfiguration
  23 +@EnableConfigurationProperties(JustAuthProperties.class)
  24 +public class YudaoSocialAutoConfiguration {
  25 +
  26 + @Bean
  27 + @Primary
  28 + @ConditionalOnProperty(prefix = "justauth", value = "enabled", havingValue = "true", matchIfMissing = true)
  29 + public YudaoAuthRequestFactory yudaoAuthRequestFactory(JustAuthProperties properties, AuthStateCache authStateCache) {
  30 + // 需要修改 HttpUtil 使用的实现,避免类报错
  31 + HttpUtil.setHttp(new HutoolImpl());
  32 + // 创建 YudaoAuthRequestFactory
  33 + return new YudaoAuthRequestFactory(properties, authStateCache);
  34 + }
  35 +
  36 +}
... ...
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/api/api.ts.vm
... ... @@ -3,27 +3,27 @@ import { defHttp } from &#39;@/utils/http/axios&#39;
3 3  
4 4 // 查询${table.classComment}列表
5 5 export function get${simpleClassName}Page(params) {
6   - return defHttp.get({ url: '${baseURL}/page', params })
  6 + return defHttp.get({ url: '${baseURL}/page', params })
7 7 }
8 8  
9 9 // 查询${table.classComment}详情
10 10 export function get${simpleClassName}(id: number) {
11   - return defHttp.get({ url: '${baseURL}/get?id=' + id })
  11 + return defHttp.get({ url: `${baseURL}/get?id=${id}` })
12 12 }
13 13  
14 14 // 新增${table.classComment}
15 15 export function create${simpleClassName}(data) {
16   - return defHttp.post({ url: '${baseURL}/create', data })
  16 + return defHttp.post({ url: '${baseURL}/create', data })
17 17 }
18 18  
19 19 // 修改${table.classComment}
20 20 export function update${simpleClassName}(data) {
21   - return defHttp.put({ url: '${baseURL}/update', data })
  21 + return defHttp.put({ url: '${baseURL}/update', data })
22 22 }
23 23  
24 24 // 删除${table.classComment}
25 25 export function delete${simpleClassName}(id: number) {
26   - return defHttp.delete({ url: '${baseURL}/delete?id=' + id })
  26 + return defHttp.delete({ url: `${baseURL}/delete?id=${id}` })
27 27 }
28 28  
29 29 // 导出${table.classComment} Excel
... ...
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm
1   -import { BasicColumn, FormSchema, useRender } from '@/components/Table'
  1 +import type { BasicColumn, FormSchema } from '@/components/Table'
  2 +import { useRender } from '@/components/Table'
2 3 import { DICT_TYPE, getDictOptions } from '@/utils/dict'
3 4  
4 5 export const columns: BasicColumn[] = [
... ... @@ -92,13 +93,13 @@ export const createFormSchema: FormSchema[] = [
92 93 #elseif($column.htmlType == "imageUpload")## 图片上传
93 94 component: 'FileUpload',
94 95 componentProps: {
95   - fileType: 'file',
  96 + fileType: 'image',
96 97 maxCount: 1,
97 98 },
98 99 #elseif($column.htmlType == "fileUpload")## 文件上传
99 100 component: 'FileUpload',
100 101 componentProps: {
101   - fileType: 'image',
  102 + fileType: 'file',
102 103 maxCount: 1,
103 104 },
104 105 #elseif($column.htmlType == "editor")## 文本编辑器
... ... @@ -132,6 +133,11 @@ export const createFormSchema: FormSchema[] = [
132 133 },
133 134 #elseif($column.htmlType == "datetime")## 时间框
134 135 component: 'DatePicker',
  136 + componentProps: {
  137 + showTime: true,
  138 + format: 'YYYY-MM-DD HH:mm:ss',
  139 + valueFormat: 'x',
  140 + },
135 141 #elseif($column.htmlType == "textarea")## 文本域
136 142 component: 'InputTextArea',
137 143 #end
... ... @@ -154,7 +160,7 @@ export const updateFormSchema: FormSchema[] = [
154 160 #set ($javaField = $column.javaField)
155 161 #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
156 162 #set ($comment = $column.columnComment)
157   -#if (!$column.primaryKey)## 忽略主键,不用在表单里
  163 + #if (!$column.primaryKey)## 忽略主键,不用在表单里
158 164 {
159 165 label: '${comment}',
160 166 field: '${javaField}',
... ... @@ -164,45 +170,57 @@ export const updateFormSchema: FormSchema[] = [
164 170 #if ($column.htmlType == "input")
165 171 component: 'Input',
166 172 #elseif($column.htmlType == "imageUpload")## 图片上传
167   - component: 'Upload',
  173 + component: 'FileUpload',
  174 + componentProps: {
  175 + fileType: 'image',
  176 + maxCount: 1,
  177 + },
168 178 #elseif($column.htmlType == "fileUpload")## 文件上传
169   - component: 'Upload',
170   - #elseif($column.htmlType == "editor")## 文本编辑器
171   - component: 'Editor',
  179 + component: 'FileUpload',
  180 + componentProps: {
  181 + fileType: 'file',
  182 + maxCount: 1,
  183 + },
  184 + #elseif($column.htmlType == "editor")## 文本编辑器component: 'Editor',
172 185 #elseif($column.htmlType == "select")## 下拉框
173 186 component: 'Select',
174 187 componentProps: {
175 188 #if ("" != $dictType)## 有数据字典
176   - options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
  189 + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
177 190 #else##没数据字典
178   - options:[],
  191 + options:[],
179 192 #end
180 193 },
181 194 #elseif($column.htmlType == "checkbox")## 多选框
182 195 component: 'Checkbox',
183 196 componentProps: {
184 197 #if ("" != $dictType)## 有数据字典
185   - options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
  198 + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
186 199 #else##没数据字典
187   - options:[],
  200 + options:[],
188 201 #end
189 202 },
190 203 #elseif($column.htmlType == "radio")## 单选框
191 204 component: 'RadioButtonGroup',
192 205 componentProps: {
193 206 #if ("" != $dictType)## 有数据字典
194   - options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
  207 + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'),
195 208 #else##没数据字典
196   - options:[],
  209 + options:[],
197 210 #end
198 211 },
199 212 #elseif($column.htmlType == "datetime")## 时间框
200 213 component: 'DatePicker',
  214 + componentProps: {
  215 + showTime: true,
  216 + format: 'YYYY-MM-DD HH:mm:ss',
  217 + valueFormat: 'x',
  218 + },
201 219 #elseif($column.htmlType == "textarea")## 文本域
202 220 component: 'InputTextArea',
203 221 #end
204 222 },
205   -#end
  223 + #end
206 224 #end
207 225 #end
208 226 ]
209 227 \ No newline at end of file
... ...
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/form.vue.vm
... ... @@ -9,9 +9,10 @@ import { create${simpleClassName}, get${simpleClassName}, update${simpleClassNam
9 9  
10 10 defineOptions({ name: '${table.className}Modal' })
11 11  
  12 +const emit = defineEmits(['success', 'register'])
  13 +
12 14 const { t } = useI18n()
13 15 const { createMessage } = useMessage()
14   -const emit = defineEmits(['success', 'register'])
15 16 const isUpdate = ref(true)
16 17  
17 18 const [registerForm, { setFieldsValue, resetFields, resetSchema, validate }] = useForm({
... ... @@ -37,11 +38,11 @@ async function handleSubmit() {
37 38 try {
38 39 const values = await validate()
39 40 setModalProps({ confirmLoading: true })
40   - if (unref(isUpdate)) {
  41 + if (unref(isUpdate))
41 42 await update${simpleClassName}(values)
42   - } else {
  43 + else
43 44 await create${simpleClassName}(values)
44   - }
  45 +
45 46 closeModal()
46 47 emit('success')
47 48 createMessage.success(t('common.saveSuccessText'))
... ... @@ -51,7 +52,7 @@ async function handleSubmit() {
51 52 }
52 53 </script>
53 54 <template>
54   - <BasicModal v-bind="$attrs" @register="registerModal" :title="isUpdate ? t('action.edit') : t('action.create')" @ok="handleSubmit">
  55 + <BasicModal v-bind="$attrs" :title="isUpdate ? t('action.edit') : t('action.create')" @register="registerModal" @ok="handleSubmit">
55 56 <BasicForm @register="registerForm" />
56 57 </BasicModal>
57 58 </template>
58 59 \ No newline at end of file
... ...
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm
1 1 <script lang="ts" setup>
2   -import ${simpleClassName}Modal from './${simpleClassName}Modal.vue'
  2 +import ${ simpleClassName }Modal from './${simpleClassName}Modal.vue'
3 3 import { columns, searchFormSchema } from './${classNameVar}.data'
4 4 import { useI18n } from '@/hooks/web/useI18n'
5 5 import { useMessage } from '@/hooks/web/useMessage'
6 6 import { useModal } from '@/components/Modal'
7 7 import { IconEnum } from '@/enums/appEnum'
8 8 import { BasicTable, useTable, TableAction } from '@/components/Table'
9   -import { delete${simpleClassName}, export${simpleClassName}, get${simpleClassName}Page } from '@/api/${table.moduleName}/${classNameVar}'
  9 +import { delete${ simpleClassName }, export${ simpleClassName }, get${ simpleClassName } Page } from '@/api/${table.moduleName}/${classNameVar}'
10 10  
11 11 defineOptions({ name: '${table.className}' })
12 12  
... ... @@ -16,17 +16,17 @@ const [registerModal, { openModal }] = useModal()
16 16  
17 17 const [registerTable, { getForm, reload }] = useTable({
18 18 title: '${table.classComment}列表',
19   - api: get${simpleClassName}Page,
20   - columns,
21   - formConfig: { labelWidth: 120, schemas: searchFormSchema },
22   - useSearchForm: true,
23   - showTableSetting: true,
24   - actionColumn: {
25   - width: 140,
26   - title: t('common.action'),
27   - dataIndex: 'action',
28   - fixed: 'right',
29   - },
  19 + api: get${ simpleClassName }Page,
  20 + columns,
  21 + formConfig: { labelWidth: 120, schemas: searchFormSchema },
  22 + useSearchForm: true,
  23 + showTableSetting: true,
  24 + actionColumn: {
  25 + width: 140,
  26 + title: t('common.action'),
  27 + dataIndex: 'action',
  28 + fixed: 'right',
  29 + },
30 30 })
31 31  
32 32 function handleCreate() {
... ... @@ -43,14 +43,14 @@ async function handleExport() {
43 43 iconType: 'warning',
44 44 content: t('common.exportMessage'),
45 45 async onOk() {
46   - await export${simpleClassName}(getForm().getFieldsValue())
  46 + await export${ simpleClassName } (getForm().getFieldsValue())
47 47 createMessage.success(t('common.exportSuccessText'))
48 48 },
49 49 })
50 50 }
51 51  
52 52 async function handleDelete(record: Recordable) {
53   - await delete${simpleClassName}(record.id)
  53 + await delete${ simpleClassName } (record.id)
54 54 createMessage.success(t('common.delSuccessText'))
55 55 reload()
56 56 }
... ... @@ -89,4 +89,4 @@ async function handleDelete(record: Recordable) {
89 89 </BasicTable>
90 90 <${simpleClassName}Modal @register="registerModal" @success="reload()" />
91 91 </div>
92   -</template>
93 92 \ No newline at end of file
  93 +</template>
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/article/vo/article/AppArticleRespVO.java
... ... @@ -9,41 +9,41 @@ import java.time.LocalDateTime;
9 9 @Data
10 10 public class AppArticleRespVO {
11 11  
12   - @Schema(description = "文章编号", required = true, example = "1")
  12 + @Schema(description = "文章编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
13 13 private Long id;
14 14  
15   - @Schema(description = "文章标题", required = true, example = "芋道源码 - 促销模块")
  15 + @Schema(description = "文章标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码 - 促销模块")
16 16 private String title;
17 17  
18   - @Schema(description = "文章作者", required = true, example = "芋道源码")
  18 + @Schema(description = "文章作者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
19 19 private String author;
20 20  
21   - @Schema(description = "分类编号", required = true, example = "2048")
  21 + @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
22 22 private Long categoryId;
23 23  
24   - @Schema(description = "图文封面", required = true, example = "https://www.iocoder.cn/1.png")
  24 + @Schema(description = "图文封面", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png")
25 25 private String picUrl;
26 26  
27   - @Schema(description = "文章简介", required = true, example = "我是简介")
  27 + @Schema(description = "文章简介", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是简介")
28 28 private String introduction;
29 29  
30   - @Schema(description = "文章内容", required = true, example = "我是详细")
  30 + @Schema(description = "文章内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是详细")
31 31 private String description;
32 32  
33   - @Schema(description = "发布时间", required = true)
  33 + @Schema(description = "发布时间", requiredMode = Schema.RequiredMode.REQUIRED)
34 34 private LocalDateTime createTime;
35 35  
36   - @Schema(description = "浏览量", required = true, example = "1024")
  36 + @Schema(description = "浏览量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
37 37 private Integer browseCount;
38 38  
39 39 @Schema(description = "关联的商品 SPU 编号", example = "1024")
40 40 private Long spuId;
41 41  
42 42 // TODO 芋艿:下面 2 个字段,后端要存储,前端不用返回;
43   -// @Schema(description = "是否热卖推荐", required = true, example = "true")
  43 +// @Schema(description = "是否热卖推荐", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
44 44 // private Boolean recommendHot;
45 45 //
46   -// @Schema(description = "是否 Banner 推荐", required = true, example = "true")
  46 +// @Schema(description = "是否 Banner 推荐", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
47 47 // private Boolean recommendBanner;
48 48  
49 49 }
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/article/vo/category/AppArticleCategoryRespVO.java
... ... @@ -7,20 +7,20 @@ import lombok.Data;
7 7 @Data
8 8 public class AppArticleCategoryRespVO {
9 9  
10   - @Schema(description = "分类编号", required = true, example = "1")
  10 + @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
11 11 private Long id;
12 12  
13   - @Schema(description = "分类名称", required = true, example = "技术")
  13 + @Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "技术")
14 14 private String name;
15 15  
16   - @Schema(description = "分类图标", required = true, example = "https://www.iocoder.cn/1.png")
  16 + @Schema(description = "分类图标", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png")
17 17 private String picUrl;
18 18  
19 19 // TODO 芋艿:下面 2 个字段,后端要存储,前端不用返回;
20   -// @Schema(description = "状态", required = true, example = "1")
  20 +// @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
21 21 // private Integer status;
22 22 //
23   -// @Schema(description = "排序", required = true, example = "1024")
  23 +// @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
24 24 // private Integer sort;
25 25  
26 26 }
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/bargain/vo/activity/AppBargainActivityDetailRespVO.java
... ... @@ -9,46 +9,46 @@ import java.time.LocalDateTime;
9 9 @Data
10 10 public class AppBargainActivityDetailRespVO {
11 11  
12   - @Schema(description = "砍价活动编号", required = true, example = "1024")
  12 + @Schema(description = "砍价活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
13 13 private Long id;
14 14  
15   - @Schema(description = "砍价活动名称", required = true, example = "618 大砍价")
  15 + @Schema(description = "砍价活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大砍价")
16 16 private String name;
17 17  
18   - @Schema(description = "活动开始时间", required = true)
  18 + @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
19 19 private LocalDateTime startTime;
20 20  
21   - @Schema(description = "活动结束时间", required = true)
  21 + @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
22 22 private LocalDateTime endTime;
23 23  
24   - @Schema(description = "商品 SPU 编号", required = true, example = "2048")
  24 + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
25 25 private Long spuId;
26 26  
27   - @Schema(description = "商品 SKU 编号", required = true, example = "1024")
  27 + @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
28 28 private Long skuId;
29 29  
30   - @Schema(description = "商品价格,单位:分", required = true, example = "100")
  30 + @Schema(description = "商品价格,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
31 31 private Integer price;
32 32  
33   - @Schema(description = "商品描述", required = true, example = "我要吃西红柿")
  33 + @Schema(description = "商品描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "我要吃西红柿")
34 34 private String description;
35 35  
36   - @Schema(description = "砍价库存", required = true, example = "512")
  36 + @Schema(description = "砍价库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "512")
37 37 private Integer stock;
38 38  
39   - @Schema(description = "商品图片", required = true, example = "4096") // 从 SPU 的 picUrl 读取
  39 + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") // 从 SPU 的 picUrl 读取
40 40 private String picUrl;
41 41  
42   - @Schema(description = "商品市场价,单位:分", required = true, example = "50") // 从 SPU 的 marketPrice 读取
  42 + @Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") // 从 SPU 的 marketPrice 读取
43 43 private Integer marketPrice;
44 44  
45   - @Schema(description = "商品单位", required = true, example = "个") // 从 SPU 的 unit 读取,然后转换
  45 + @Schema(description = "商品单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "个") // 从 SPU 的 unit 读取,然后转换
46 46 private String unitName;
47 47  
48   - @Schema(description = "砍价最低金额,单位:分", required = true, example = "100") // 从砍价商品里取最低价
  48 + @Schema(description = "砍价最低金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") // 从砍价商品里取最低价
49 49 private Integer bargainPrice;
50 50  
51   - @Schema(description = "砍价成功数量", required = true, example = "100")
  51 + @Schema(description = "砍价成功数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
52 52 private Integer successCount;
53 53  
54 54 }
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/bargain/vo/activity/AppBargainActivityRespVO.java
... ... @@ -9,34 +9,34 @@ import java.time.LocalDateTime;
9 9 @Data
10 10 public class AppBargainActivityRespVO {
11 11  
12   - @Schema(description = "砍价活动编号", required = true, example = "1024")
  12 + @Schema(description = "砍价活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
13 13 private Long id;
14 14  
15   - @Schema(description = "砍价活动名称", required = true, example = "618 大砍价")
  15 + @Schema(description = "砍价活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大砍价")
16 16 private String name;
17 17  
18   - @Schema(description = "活动开始时间", required = true)
  18 + @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
19 19 private LocalDateTime startTime;
20 20  
21   - @Schema(description = "活动结束时间", required = true)
  21 + @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
22 22 private LocalDateTime endTime;
23 23  
24   - @Schema(description = "商品 SPU 编号", required = true, example = "2048")
  24 + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
25 25 private Long spuId;
26 26  
27   - @Schema(description = "商品 SKU 编号", required = true, example = "1024")
  27 + @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
28 28 private Long skuId;
29 29  
30   - @Schema(description = "砍价库存", required = true, example = "512")
  30 + @Schema(description = "砍价库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "512")
31 31 private Integer stock;
32 32  
33   - @Schema(description = "商品图片", required = true, example = "4096") // 从 SPU 的 picUrl 读取
  33 + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") // 从 SPU 的 picUrl 读取
34 34 private String picUrl;
35 35  
36   - @Schema(description = "商品市场价,单位:分", required = true, example = "50") // 从 SPU 的 marketPrice 读取
  36 + @Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") // 从 SPU 的 marketPrice 读取
37 37 private Integer marketPrice;
38 38  
39   - @Schema(description = "砍价最低金额,单位:分", required = true, example = "100") // 从砍价商品里取最低价
  39 + @Schema(description = "砍价最低金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") // 从砍价商品里取最低价
40 40 private Integer bargainPrice;
41 41  
42 42 }
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/bargain/vo/help/AppBargainHelpCreateReqVO.java
... ... @@ -9,7 +9,7 @@ import javax.validation.constraints.NotNull;
9 9 @Data
10 10 public class AppBargainHelpCreateReqVO {
11 11  
12   - @Schema(description = "砍价记录编号", required = true, example = "1024")
  12 + @Schema(description = "砍价记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
13 13 @NotNull(message = "砍价记录编号不能为空")
14 14 private Long recordId;
15 15  
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/bargain/vo/help/AppBargainHelpRespVO.java
... ... @@ -9,16 +9,16 @@ import java.time.LocalDateTime;
9 9 @Data
10 10 public class AppBargainHelpRespVO {
11 11  
12   - @Schema(description = "助力用户的昵称", required = true, example = "1024")
  12 + @Schema(description = "助力用户的昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
13 13 private String nickname;
14 14  
15   - @Schema(description = "助力用户的头像", required = true, example = "1024")
  15 + @Schema(description = "助力用户的头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
16 16 private String avatar;
17 17  
18   - @Schema(description = "助力用户的砍价金额", required = true, example = "1024")
  18 + @Schema(description = "助力用户的砍价金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
19 19 private Integer reducePrice;
20 20  
21   - @Schema(description = "创建时间", required = true, example = "1024")
  21 + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
22 22 private LocalDateTime createTime;
23 23  
24 24 }
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/bargain/vo/record/AppBargainRecordCreateReqVO.java
... ... @@ -9,7 +9,7 @@ import javax.validation.constraints.NotNull;
9 9 @Data
10 10 public class AppBargainRecordCreateReqVO {
11 11  
12   - @Schema(description = "砍价活动编号", required = true, example = "1024")
  12 + @Schema(description = "砍价活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
13 13 @NotNull(message = "砍价活动编号不能为空")
14 14 private Long activityId;
15 15  
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/bargain/vo/record/AppBargainRecordSummaryRespVO.java
... ... @@ -9,23 +9,23 @@ import java.util.List;
9 9 @Data
10 10 public class AppBargainRecordSummaryRespVO {
11 11  
12   - @Schema(description = "砍价用户数量", required = true, example = "1024")
  12 + @Schema(description = "砍价用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
13 13 private Integer userCount;
14 14  
15   - @Schema(description = "成功砍价的记录", required = true) // 只返回最近的 7 个
  15 + @Schema(description = "成功砍价的记录", requiredMode = Schema.RequiredMode.REQUIRED) // 只返回最近的 7 个
16 16 private List<Record> successRecords;
17 17  
18 18 @Schema(description = "成功砍价记录")
19 19 @Data
20 20 public static class Record {
21 21  
22   - @Schema(description = "用户昵称", required = true, example = "王**")
  22 + @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王**")
23 23 private String nickname;
24 24  
25   - @Schema(description = "用户头像", required = true, example = "https://www.iocoder.cn/xxx.jpg")
  25 + @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xxx.jpg")
26 26 private String avatar;
27 27  
28   - @Schema(description = "活动名称", required = true, example = "天蚕土豆")
  28 + @Schema(description = "活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "天蚕土豆")
29 29 private String activityName;
30 30  
31 31 }
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/coupon/vo/coupon/AppCouponMatchReqVO.java
... ... @@ -15,15 +15,15 @@ public class AppCouponMatchReqVO {
15 15 @NotNull(message = "商品金额不能为空")
16 16 private Integer price;
17 17  
18   - @Schema(description = "商品 SPU 编号的数组", required = true, example = "[1, 2]")
  18 + @Schema(description = "商品 SPU 编号的数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2]")
19 19 @NotEmpty(message = "商品 SPU 编号不能为空")
20 20 private List<Long> spuIds;
21 21  
22   - @Schema(description = "商品 SKU 编号的数组", required = true, example = "[1, 2]")
  22 + @Schema(description = "商品 SKU 编号的数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2]")
23 23 @NotEmpty(message = "商品 SKU 编号不能为空")
24 24 private List<Long> skuIds;
25 25  
26   - @Schema(description = "分类编号的数组", required = true, example = "[10, 20]")
  26 + @Schema(description = "分类编号的数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[10, 20]")
27 27 @NotEmpty(message = "分类编号不能为空")
28 28 private List<Long> categoryIds;
29 29  
... ...
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/config/AppDeliveryConfigRespVO.java
... ... @@ -8,10 +8,10 @@ import lombok.Data;
8 8 @Data
9 9 public class AppDeliveryConfigRespVO {
10 10  
11   - @Schema(description = "腾讯地图 KEY", required = true, example = "123456")
  11 + @Schema(description = "腾讯地图 KEY", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
12 12 private String tencentLbsKey;
13 13  
14   - @Schema(description = "是否开启自提", required = true, example = "true")
  14 + @Schema(description = "是否开启自提", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
15 15 private Boolean pickUpEnable;
16 16  
17 17 }
... ...
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/AppDeliveryExpressRespVO.java
... ... @@ -7,10 +7,10 @@ import lombok.Data;
7 7 @Data
8 8 public class AppDeliveryExpressRespVO {
9 9  
10   - @Schema(description = "编号", required = true, example = "1")
  10 + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
11 11 private Long id;
12 12  
13   - @Schema(description = "门店名称", required = true, example = "顺丰")
  13 + @Schema(description = "门店名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "顺丰")
14 14 private String name;
15 15  
16 16 }
... ...
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderSettlementReqVO.java
... ... @@ -25,12 +25,12 @@ public class AppTradeOrderSettlementReqVO {
25 25 @Schema(description = "优惠劵编号", example = "1024")
26 26 private Long couponId;
27 27  
28   - @Schema(description = "是否使用积分", required = true, example = "true")
  28 + @Schema(description = "是否使用积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
29 29 @NotNull(message = "是否使用积分不能为空")
30 30 private Boolean pointStatus;
31 31  
32 32 // ========== 配送相关相关字段 ==========
33   - @Schema(description = "配送方式", required = true, example = "1")
  33 + @Schema(description = "配送方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
34 34 @InEnum(value = DeliveryTypeEnum.class, message = "配送方式不正确")
35 35 private Integer deliveryType;
36 36  
... ...
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderSettlementRespVO.java
... ... @@ -13,7 +13,7 @@ import java.util.List;
13 13 @Data
14 14 public class AppTradeOrderSettlementRespVO {
15 15  
16   - @Schema(description = "交易类型", required = true, example = "1") // 对应 TradeOrderTypeEnum 枚举
  16 + @Schema(description = "交易类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") // 对应 TradeOrderTypeEnum 枚举
17 17 private Integer type = 1; // TODO 芋艿:改成计算
18 18  
19 19 @Schema(description = "购物项数组", requiredMode = Schema.RequiredMode.REQUIRED)
... ...
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java
... ... @@ -13,16 +13,16 @@ import java.time.LocalDateTime;
13 13 @ToString(callSuper = true)
14 14 public class PayOrderDetailsRespVO extends PayOrderBaseVO {
15 15  
16   - @Schema(description = "支付订单编号", required = true, example = "1024")
  16 + @Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
17 17 private Long id;
18 18  
19 19 @Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
20 20 private String appName;
21 21  
22   - @Schema(description = "创建时间", required = true)
  22 + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
23 23 private LocalDateTime createTime;
24 24  
25   - @Schema(description = "更新时间", required = true)
  25 + @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
26 26 private LocalDateTime updateTime;
27 27  
28 28 /**
... ... @@ -34,7 +34,7 @@ public class PayOrderDetailsRespVO extends PayOrderBaseVO {
34 34 @Schema(description = "支付订单扩展")
35 35 public static class PayOrderExtension {
36 36  
37   - @Schema(description = "支付订单号", required = true, example = "1024")
  37 + @Schema(description = "支付订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
38 38 private String no;
39 39  
40 40 @Schema(description = "支付异步通知的内容")
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dict/DictDataDO.java
... ... @@ -55,7 +55,7 @@ public class DictDataDO extends BaseDO {
55 55 /**
56 56 * css 样式
57 57 */
58   - @TableField(updateStrategy = FieldStrategy.IGNORED)
  58 + @TableField(updateStrategy = FieldStrategy.ALWAYS)
59 59 private String cssClass;
60 60 /**
61 61 * 备注
... ...