【同步】BOOT 和 CLOUD 的功能
This commit is contained in:
@@ -19,10 +19,18 @@ public abstract class AbstractFileClient<Config extends FileClientConfig> implem
|
||||
* 文件配置
|
||||
*/
|
||||
protected Config config;
|
||||
/**
|
||||
* 原始的文件配置
|
||||
*
|
||||
* 原因:{@link #config} 可能被子类所修改,无法用于判断配置是否变更
|
||||
* @link <a href="https://t.zsxq.com/29wkW">相关案例</a>
|
||||
*/
|
||||
private Config originalConfig;
|
||||
|
||||
public AbstractFileClient(Long id, Config config) {
|
||||
this.id = id;
|
||||
this.config = config;
|
||||
this.originalConfig = config;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,11 +48,12 @@ public abstract class AbstractFileClient<Config extends FileClientConfig> implem
|
||||
|
||||
public final void refresh(Config config) {
|
||||
// 判断是否更新
|
||||
if (config.equals(this.config)) {
|
||||
if (config.equals(this.originalConfig)) {
|
||||
return;
|
||||
}
|
||||
log.info("[refresh][配置({})发生变化,重新初始化]", config);
|
||||
this.config = config;
|
||||
this.originalConfig = config;
|
||||
// 初始化
|
||||
this.init();
|
||||
}
|
||||
|
||||
@@ -353,7 +353,9 @@ const handleDelete = async (id: number) => {
|
||||
// 发起删除
|
||||
await ${simpleClassName}Api.delete${simpleClassName}(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
#if ( $table.templateType == 11 )
|
||||
currentRow.value = {}
|
||||
#end
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
|
||||
@@ -114,6 +114,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'x',
|
||||
class: '!w-full',
|
||||
},
|
||||
#elseif($column.htmlType == "textarea")## 文本域
|
||||
component: 'Textarea',
|
||||
@@ -317,6 +318,7 @@ export function use${subSimpleClassName}FormSchema(): VbenFormSchema[] {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'x',
|
||||
class: '!w-full',
|
||||
},
|
||||
#elseif($column.htmlType == "textarea")## 文本域
|
||||
component: 'Textarea',
|
||||
@@ -552,6 +554,7 @@ export function use${subSimpleClassName}GridColumns(): VxeTableGridOptions<${api
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'x',
|
||||
class: '!w-full',
|
||||
},
|
||||
#elseif($column.htmlType == "textarea")## 文本域
|
||||
component: 'Textarea',
|
||||
|
||||
Reference in New Issue
Block a user