add CutEnum 重命名为 LanguageEnum
This commit is contained in:
+10
-10
@@ -2,7 +2,7 @@ package com.jero.modules.oss.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.CommonUtils;
|
||||
@@ -104,7 +104,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
// long fileSize = mf.getSize() / 1024 / 1024;
|
||||
// String originalFilename = mf.getOriginalFilename();
|
||||
// if (fileSize >= 100) {
|
||||
// if (cut.equals(CutEnum.CN.getValue())) {
|
||||
// if (cut.equals(LanguageEnum.CN.getValue())) {
|
||||
// throw new JeroBootException(originalFilename + "文件大小超出100MB, 请压缩或降低文件质量!");
|
||||
// } else {
|
||||
// throw new JeroBootException(originalFilename + "File size out 100MB, Please compress or reduce file quality!");
|
||||
@@ -131,7 +131,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
if ("1".equals(state)) {
|
||||
//固定文件
|
||||
if (!fileTypeStr.contains(fileType)) {
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
if (cut.equals(LanguageEnum.CN.getValue())) {
|
||||
throw new JeroBootException("只能够上传pdf,word,excel类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Only upload pdf,word,excel type of file Please select the file again!");
|
||||
@@ -139,7 +139,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
}
|
||||
} else {
|
||||
if (CommonUtils.limitFileSuffix(orgName, fileSuffixLimits)) {
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
if (cut.equals(LanguageEnum.CN.getValue())) {
|
||||
throw new JeroBootException("不能上传" + StringUtils.join(fileSuffixLimits, ",") + "类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Can't upload" + StringUtils.join(fileSuffixLimits, ",") + "type of file Please select the file again!");
|
||||
@@ -159,7 +159,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
if (cut.equals(LanguageEnum.CN.getValue())) {
|
||||
throw new JeroBootException("只能够上传pdf/word/excel/csv/ppt/txt/zip/rar/静态图片类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/Static image type file. Please re select the file!");
|
||||
@@ -237,7 +237,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
// long fileSize = mf.getSize() / 1024 / 1024;
|
||||
// String originalFilename = mf.getOriginalFilename();
|
||||
// if (fileSize >= 100) {
|
||||
// if (cut.equals(CutEnum.CN.getValue())) {
|
||||
// if (cut.equals(LanguageEnum.CN.getValue())) {
|
||||
// throw new JeroBootException(originalFilename + "文件大小超出100MB, 请压缩或降低文件质量!");
|
||||
// } else {
|
||||
// throw new JeroBootException(originalFilename + "File size out 100MB, Please compress or reduce file quality!");
|
||||
@@ -267,7 +267,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
if ("1".equals(state)) {
|
||||
//固定文件
|
||||
if (!fileTypeStr.contains(fileType)) {
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
if (cut.equals(LanguageEnum.CN.getValue())) {
|
||||
throw new JeroBootException("只能够上传pdf,word,excel类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Only upload pdf,word,excel type of file Please select the file again!");
|
||||
@@ -278,7 +278,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
List<String> fileTypeStrTwoList = Arrays.asList(fileTypeStrTwo.split(","));
|
||||
//固定文件
|
||||
if (!fileTypeStrTwoList.contains(fileType)) {
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
if (cut.equals(LanguageEnum.CN.getValue())) {
|
||||
throw new JeroBootException("只能够上传.docx,.DOCX,.xlsx,.XLSX后缀类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Only upload .docx,.DOCX,.xlsx,.XLSX suffix type of file Please select the file again!");
|
||||
@@ -286,7 +286,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
}
|
||||
} else {
|
||||
if (CommonUtils.limitFileSuffix(orgName, fileSuffixLimits)) {
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
if (cut.equals(LanguageEnum.CN.getValue())) {
|
||||
throw new JeroBootException("不能上传" + StringUtils.join(fileSuffixLimits, ",") + "类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Can't upload" + StringUtils.join(fileSuffixLimits, ",") + "type of file Please select the file again!");
|
||||
@@ -308,7 +308,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
if (cut.equals(LanguageEnum.CN.getValue())) {
|
||||
throw new JeroBootException("只能够上传pdf/word/excel/csv/ppt/txt/zip/rar/msg/gif/静态图片类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/msg/gif/Static image type file. Please re select the file!");
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.FillRuleConstant;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.util.FillRuleUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
@@ -257,9 +257,9 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
||||
|
||||
@Override
|
||||
public List<SysCategoryTreeVO> getSysCategoryTree(String flag, Map<String, Object> params) {
|
||||
String cut = CutEnum.CN.getValue();
|
||||
String cut = LanguageEnum.CN.getValue();
|
||||
if(params != null){
|
||||
cut = ObjectUtil.isNotEmpty(params.get("cut")) ? (String) params.get("cut") : CutEnum.CN.getValue();
|
||||
cut = ObjectUtil.isNotEmpty(params.get("cut")) ? (String) params.get("cut") : LanguageEnum.CN.getValue();
|
||||
}
|
||||
try {
|
||||
//只查询技术领域的technology_territory
|
||||
|
||||
+5
-5
@@ -2,7 +2,7 @@ package com.jero.modules.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.mapper.SysDictItemMapper;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
@@ -189,7 +189,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
|
||||
return flag;
|
||||
}).distinct().collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(sysDictItemList)){
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
if(StringUtils.equals(cut, LanguageEnum.CN.getValue())){
|
||||
result = sysDictItemList.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
List<String> fieldValueStrList = Arrays.asList(fieldValues.split(","));
|
||||
@@ -201,7 +201,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
|
||||
}
|
||||
return flag;
|
||||
}).map(SysDictItem::getItemText).collect(Collectors.joining(","));
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
}else if(StringUtils.equals(cut, LanguageEnum.EN.getValue())){
|
||||
result = sysDictItemList.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
List<String> fieldValueStrList = Arrays.asList(fieldValues.split(","));
|
||||
@@ -237,7 +237,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
|
||||
return flag;
|
||||
}).distinct().collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(sysDictItemList)){
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
if(StringUtils.equals(cut, LanguageEnum.CN.getValue())){
|
||||
result = sysDictItemList.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
List<String> fieldTextStrList = Arrays.asList(fieldTexts.split(","));
|
||||
@@ -249,7 +249,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
|
||||
}
|
||||
return flag;
|
||||
}).map(SysDictItem::getItemValue).collect(Collectors.joining(","));
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
}else if(StringUtils.equals(cut, LanguageEnum.EN.getValue())){
|
||||
result = sysDictItemList.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
List<String> fieldTextStrList = Arrays.asList(fieldTexts.split(","));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.jero.modules.system.util;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysCategoryTreeVO;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -30,9 +30,9 @@ public class TreeUtils {
|
||||
sysCategoryTreeVO.setValue(sysCategory.getId());
|
||||
sysCategoryTreeVO.setDictId(sysCategory.getSysDictId());
|
||||
String title = "";
|
||||
if(MyStringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
if(MyStringUtils.equals(cut, LanguageEnum.CN.getValue())){
|
||||
title = sysCategory.getName();
|
||||
}else if(MyStringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
}else if(MyStringUtils.equals(cut, LanguageEnum.EN.getValue())){
|
||||
title = sysCategory.getEnName();
|
||||
}
|
||||
sysCategoryTreeVO.setTitle(title);
|
||||
@@ -53,9 +53,9 @@ public class TreeUtils {
|
||||
sysCategoryTreeVO.setKey(sysCategory.getId());
|
||||
sysCategoryTreeVO.setValue(sysCategory.getId());
|
||||
sysCategoryTreeVO.setDictId(sysCategory.getSysDictId());
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
if(LanguageEnum.CN.getValue().equals(cut)) {
|
||||
sysCategoryTreeVO.setTitle(sysCategory.getName());
|
||||
} else if (CutEnum.EN.getValue().equals(cut)) {
|
||||
} else if (LanguageEnum.EN.getValue().equals(cut)) {
|
||||
sysCategoryTreeVO.setTitle(sysCategory.getEnName());
|
||||
}
|
||||
sysCategoryTreeVO.setParentId(sysCategory.getPid());
|
||||
@@ -76,9 +76,9 @@ public class TreeUtils {
|
||||
sysCategoryTreeVO.setKey(sysCategory.getId());
|
||||
sysCategoryTreeVO.setValue(sysCategory.getId());
|
||||
String title = "";
|
||||
if(MyStringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
if(MyStringUtils.equals(cut, LanguageEnum.CN.getValue())){
|
||||
title = sysCategory.getName();
|
||||
}else if(MyStringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
}else if(MyStringUtils.equals(cut, LanguageEnum.EN.getValue())){
|
||||
title = sysCategory.getEnName();
|
||||
}
|
||||
sysCategoryTreeVO.setTitle(title);
|
||||
|
||||
Reference in New Issue
Block a user