Merge branch 'master' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into feature/sub-table

This commit is contained in:
YunaiV
2023-11-08 22:29:31 +08:00
1542 changed files with 11317 additions and 124341 deletions

View File

@ -147,7 +147,7 @@ public class DatabaseDocController {
*/
private static ProcessConfig buildProcessConfig() {
return ProcessConfig.builder()
.ignoreTablePrefix(Arrays.asList("QRTZ_", "ACT_")) // 忽略表前缀
.ignoreTablePrefix(Arrays.asList("QRTZ_", "ACT_", "FLW_")) // 忽略表前缀
.build();
}

View File

@ -29,8 +29,6 @@ public class SecurityConfiguration {
.antMatchers("/swagger-resources/**").anonymous()
.antMatchers("/webjars/**").anonymous()
.antMatchers("/*/api-docs").anonymous();
// 积木报表
registry.antMatchers("/jmreport/**").permitAll();
// Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous();

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.infra.job.logger;
package cn.iocoder.yudao.module.infra.job.job;
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
@ -33,7 +33,7 @@ public class JobLogCleanJob implements JobHandler {
@TenantIgnore
public String execute(String param) {
Integer count = jobLogService.cleanJobLog(JOB_CLEAN_RETAIN_DAY, DELETE_LIMIT);
log.info("[count][定时执行清理定时任务日志数量 ({}) 个]", count);
log.info("[execute][定时执行清理定时任务日志数量 ({}) 个]", count);
return String.format("定时执行清理定时任务日志数量 %s 个", count);
}

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.infra.job.job;
package cn.iocoder.yudao.module.infra.job.logger;
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
@ -34,7 +34,7 @@ public class AccessLogCleanJob implements JobHandler {
@TenantIgnore
public String execute(String param) {
Integer count = apiAccessLogService.cleanAccessLog(JOB_CLEAN_RETAIN_DAY, DELETE_LIMIT);
log.info("[count][定时执行清理访问日志数量 ({}) 个]", count);
log.info("[execute][定时执行清理访问日志数量 ({}) 个]", count);
return String.format("定时执行清理错误日志数量 %s 个", count);
}

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.infra.job.job;
package cn.iocoder.yudao.module.infra.job.logger;
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
@ -34,7 +34,7 @@ public class ErrorLogCleanJob implements JobHandler {
@TenantIgnore
public String execute(String param) {
Integer count = apiErrorLogService.cleanErrorLog(JOB_CLEAN_RETAIN_DAY,DELETE_LIMIT);
log.info("[count][定时执行清理错误日志数量 ({}) 个]", count);
log.info("[execute][定时执行清理错误日志数量 ({}) 个]", count);
return String.format("定时执行清理错误日志数量 %s 个", count);
}

View File

@ -58,9 +58,9 @@ public class FileConfigServiceImpl implements FileConfigService {
FileConfigDO config = Objects.equals(CACHE_MASTER_ID, id) ?
fileConfigMapper.selectByMaster() : fileConfigMapper.selectById(id);
if (config != null) {
fileClientFactory.createOrUpdateFileClient(id, config.getStorage(), config.getConfig());
fileClientFactory.createOrUpdateFileClient(config.getId(), config.getStorage(), config.getConfig());
}
return fileClientFactory.getFileClient(id);
return fileClientFactory.getFileClient(null == config ? id : config.getId());
}
});

View File

@ -28,5 +28,5 @@ export function delete${simpleClassName}(id: number) {
// 导出${table.classComment} Excel
export function export${simpleClassName}(params) {
return defHttp.download({ url: '${baseURL}/export-excel', params }, '${table.classComment}.xls')
return defHttp.download({ url: '${baseURL}/export-excel', params }, '${table.classComment}.xls')
}

View File

@ -1,6 +1,6 @@
import type { BasicColumn, FormSchema } from '@/components/Table'
import { useRender } from '@/components/Table'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import type {BasicColumn, FormSchema} from '@/components/Table'
import {useRender} from '@/components/Table'
import {DICT_TYPE, getDictOptions} from '@/utils/dict'
export const columns: BasicColumn[] = [
#foreach($column in $columns)
@ -50,7 +50,7 @@ export const searchFormSchema: FormSchema[] = [
field: '${javaField}',
#if ($column.htmlType == "input")
component: 'Input',
#elseif ($column.htmlType == "select" || $column.htmlType == "radio")
#elseif ($column.htmlType == "select")
component: 'Select',
componentProps: {
#if ("" != $dictType)## 设置了 dictType 数据字典的情况
@ -59,6 +59,15 @@ export const searchFormSchema: FormSchema[] = [
options: [],
#end
},
#elseif ($column.htmlType == "radio")
component: 'Radio',
componentProps: {
#if ("" != $dictType)## 设置了 dictType 数据字典的情况
options: getDictOptions(DICT_TYPE.$dictType.toUpperCase()),
#else## 未设置 dictType 数据字典的情况
options: [],
#end
},
#elseif($column.htmlType == "datetime")
component: 'RangePicker',
#end
@ -181,7 +190,8 @@ export const updateFormSchema: FormSchema[] = [
fileType: 'file',
maxCount: 1,
},
#elseif($column.htmlType == "editor")## 文本编辑器component: 'Editor',
#elseif($column.htmlType == "editor")## 文本编辑器
component: 'Editor',
#elseif($column.htmlType == "select")## 下拉框
component: 'Select',
componentProps: {

View File

@ -1,12 +1,11 @@
<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 { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useModal } from '@/components/Modal'
import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table'
import { delete${ simpleClassName }, export${ simpleClassName }, get${ simpleClassName } Page } from '@/api/${table.moduleName}/${classNameVar}'
import { useTable } from '@/components/Table'
import { delete${simpleClassName}, export${simpleClassName}, get${simpleClassName}Page } from '@/api/${table.moduleName}/${classNameVar}'
defineOptions({ name: '${table.className}' })
@ -16,7 +15,7 @@ const [registerModal, { openModal }] = useModal()
const [registerTable, { getForm, reload }] = useTable({
title: '${table.classComment}列表',
api: get${ simpleClassName }Page,
api: get${simpleClassName}Page,
columns,
formConfig: { labelWidth: 120, schemas: searchFormSchema },
useSearchForm: true,
@ -43,14 +42,14 @@ async function handleExport() {
iconType: 'warning',
content: t('common.exportMessage'),
async onOk() {
await export${ simpleClassName } (getForm().getFieldsValue())
await export${simpleClassName}(getForm().getFieldsValue())
createMessage.success(t('common.exportSuccessText'))
},
})
}
async function handleDelete(record: Recordable) {
await delete${ simpleClassName } (record.id)
await delete${simpleClassName}(record.id)
createMessage.success(t('common.delSuccessText'))
reload()
}
@ -62,7 +61,7 @@ async function handleDelete(record: Recordable) {
<a-button type="primary" v-auth="['${permissionPrefix}:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
{{ t('action.create') }}
</a-button>
<a-button type="warning" v-auth="['${permissionPrefix}:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
<a-button v-auth="['${permissionPrefix}:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
{{ t('action.export') }}
</a-button>
</template>

View File

@ -258,12 +258,12 @@ public class FileConfigServiceImplTest extends BaseDbUnitTest {
Long id = fileConfig.getId();
// mock 获得 Client
FileClient fileClient = new LocalFileClient(id, new LocalFileClientConfig());
when(fileClientFactory.getFileClient(eq(0L))).thenReturn(fileClient);
when(fileClientFactory.getFileClient(eq(fileConfig.getId()))).thenReturn(fileClient);
// 调用,并断言
assertSame(fileClient, fileConfigService.getMasterFileClient());
// 断言缓存
verify(fileClientFactory).createOrUpdateFileClient(eq(0L), eq(fileConfig.getStorage()),
verify(fileClientFactory).createOrUpdateFileClient(eq(fileConfig.getId()), eq(fileConfig.getStorage()),
eq(fileConfig.getConfig()));
}