mirror of https://gitee.com/stylefeng/roses
【8.0.3】【file】更新文件详情的信息渲染
parent
bf109a0014
commit
4b6c5fb69e
|
@ -0,0 +1,27 @@
|
|||
package cn.stylefeng.roses.kernel.file.api.format;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import cn.stylefeng.roses.kernel.file.api.FileInfoApi;
|
||||
import cn.stylefeng.roses.kernel.rule.format.BaseSimpleFieldFormatProcess;
|
||||
|
||||
/**
|
||||
* 针对文件id的包装处理,返回文件可以访问的地址和文件的名称
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2023/11/13 17:49
|
||||
*/
|
||||
public class FileInfoFormatProcess extends BaseSimpleFieldFormatProcess {
|
||||
|
||||
@Override
|
||||
public Class<?> getItemClass() {
|
||||
return Long.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object simpleItemFormat(Object businessId) {
|
||||
FileInfoApi fileInfoApi = SpringUtil.getBean(FileInfoApi.class);
|
||||
return fileInfoApi.buildAntdvFileInfo(Convert.toLong(businessId));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue