修复枚举类bug

This commit is contained in:
wans 2021-05-31 17:56:14 +08:00
parent 1863a664c1
commit ce070cdf37

View File

@ -123,7 +123,7 @@ public class ColumnMngServiceImpl extends DefaultBaseService implements IColumnM
List<ColumnMngDTO> list = columnMngDao.list(params); List<ColumnMngDTO> list = columnMngDao.list(params);
for (ColumnMngDTO item : list){ for (ColumnMngDTO item : list){
String[] resourceTypeList = item.getResourceType().split(","); String[] resourceTypeList = item.getResourceType().split(",");
if(resourceTypeList != null || !"".equals(resourceTypeList[0])){ if(resourceTypeList != null && !"".equals(resourceTypeList[0])){
String resourceTypeName = ""; String resourceTypeName = "";
for(int i = 0; i < resourceTypeList.length; i++){ for(int i = 0; i < resourceTypeList.length; i++){
resourceTypeName += MaterialTypeEnum.valueOf(resourceTypeList[i]).getTypeName() + ","; resourceTypeName += MaterialTypeEnum.valueOf(resourceTypeList[i]).getTypeName() + ",";