|
@@ -44,14 +44,7 @@ public class BasicSchoolServiceImpl extends ServiceImpl<BasicSchoolMapper, Basic
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<SchoolDto> listSchool() {
|
|
public List<SchoolDto> listSchool() {
|
|
- List<SchoolDto> schoolDtos = this.baseMapper.listSchool();
|
|
|
|
- for (SchoolDto schoolDto : schoolDtos) {
|
|
|
|
- String logo = schoolDto.getLogo();
|
|
|
|
- if(StringUtils.isNotBlank(logo) && logo.startsWith("file")){
|
|
|
|
- schoolDto.setLogo(Base64Util.imageToBase64(new File(logo)));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return schoolDtos;
|
|
|
|
|
|
+ return this.baseMapper.listSchool();
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -63,8 +56,8 @@ public class BasicSchoolServiceImpl extends ServiceImpl<BasicSchoolMapper, Basic
|
|
if (logo != null) {
|
|
if (logo != null) {
|
|
boolean oss = dictionaryConfig.sysDomain().isOss();
|
|
boolean oss = dictionaryConfig.sysDomain().isOss();
|
|
StringJoiner stringJoiner = new StringJoiner("");
|
|
StringJoiner stringJoiner = new StringJoiner("");
|
|
- if (!oss && Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getConfig())) {
|
|
|
|
- stringJoiner.add(dictionaryConfig.fssLocalFileDomain().getConfig());
|
|
|
|
|
|
+ if (!oss && Objects.nonNull(dictionaryConfig.fssPublicDomain()) && !StringUtils.isBlank(dictionaryConfig.fssPublicDomain().getConfig())) {
|
|
|
|
+ stringJoiner.add(dictionaryConfig.fssPublicDomain().getConfig());
|
|
}
|
|
}
|
|
stringJoiner = SystemConstant.getDirName(stringJoiner, UploadFileEnum.FILE, true);
|
|
stringJoiner = SystemConstant.getDirName(stringJoiner, UploadFileEnum.FILE, true);
|
|
|
|
|
|
@@ -76,7 +69,7 @@ public class BasicSchoolServiceImpl extends ServiceImpl<BasicSchoolMapper, Basic
|
|
|
|
|
|
dirName = stringJoiner + SystemConstant.getNanoId() + "." + FilenameUtils.getExtension(fileTemp.getPath());
|
|
dirName = stringJoiner + SystemConstant.getNanoId() + "." + FilenameUtils.getExtension(fileTemp.getPath());
|
|
String jpgFileMd5 = DigestUtils.md5Hex(new FileInputStream(fileTemp));
|
|
String jpgFileMd5 = DigestUtils.md5Hex(new FileInputStream(fileTemp));
|
|
- if (!oss && Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getServer())) {
|
|
|
|
|
|
+ if (!oss && Objects.nonNull(dictionaryConfig.fssPublicDomain()) && !StringUtils.isBlank(dictionaryConfig.fssPublicDomain().getServer())) {
|
|
// File file = new File(dirName);
|
|
// File file = new File(dirName);
|
|
// if(!file.exists()){
|
|
// if(!file.exists()){
|
|
// file.getParentFile().mkdirs();
|
|
// file.getParentFile().mkdirs();
|