记得上下班打卡 | git大法好,push需谨慎

Commit 82cc1a64 authored by 胡佳晨's avatar 胡佳晨

try catch 改为 if contains

parent 2e7bc74d
...@@ -175,17 +175,15 @@ public class SweetAppletController { ...@@ -175,17 +175,15 @@ public class SweetAppletController {
} }
} }
} }
try { if(item.getTitle().contains("&")){
item.setTitle(item.getTitle().split("&")[0]); item.setTitle(item.getTitle().split("&")[0]);
}catch (Exception e){
} }
returnArtist.add(item); returnArtist.add(item);
} }
} }
data.getStage().forEach(t->{ data.getStage().forEach(t->{
try { if(t.getTitle().contains("&")){
t.setTitle(t.getTitle().split("&")[0]); t.setTitle(t.getTitle().split("&")[0]);
}catch (Exception e){
} }
}); });
...@@ -320,9 +318,8 @@ public class SweetAppletController { ...@@ -320,9 +318,8 @@ public class SweetAppletController {
} }
} }
} }
try { if(item.getTitle().contains("&")){
item.setTitle(item.getTitle().split("&")[0]); item.setTitle(item.getTitle().split("&")[0]);
}catch (Exception e){
} }
vo = item; vo = item;
break; break;
......
...@@ -166,18 +166,16 @@ public class SweetAppletMdskController { ...@@ -166,18 +166,16 @@ public class SweetAppletMdskController {
} }
} }
} }
try { if(item.getTitle().contains("&")){
item.setTitle(item.getTitle().split("&")[0]); item.setTitle(item.getTitle().split("&")[0]);
}catch (Exception e){
} }
returnArtist.add(item); returnArtist.add(item);
} }
} }
data.getStage().forEach(t->{ data.getStage().forEach(t->{
try { if(t.getTitle().contains("&")){
t.setTitle(t.getTitle().split("&")[0]); t.setTitle(t.getTitle().split("&")[0]);
}catch (Exception e){
} }
}); });
...@@ -295,9 +293,8 @@ public class SweetAppletMdskController { ...@@ -295,9 +293,8 @@ public class SweetAppletMdskController {
} }
} }
} }
try { if(item.getTitle().contains("&")){
item.setTitle(item.getTitle().split("&")[0]); item.setTitle(item.getTitle().split("&")[0]);
}catch (Exception e){
} }
vo = item; vo = item;
break; break;
......
...@@ -163,18 +163,16 @@ public class SweetAppletTFCController { ...@@ -163,18 +163,16 @@ public class SweetAppletTFCController {
} }
} }
} }
try { if(item.getTitle().contains("&")){
item.setTitle(item.getTitle().split("&")[0]); item.setTitle(item.getTitle().split("&")[0]);
}catch (Exception e){
} }
returnArtist.add(item); returnArtist.add(item);
} }
} }
data.getStage().forEach(t->{ data.getStage().forEach(t->{
try { if(t.getTitle().contains("&")){
t.setTitle(t.getTitle().split("&")[0]); t.setTitle(t.getTitle().split("&")[0]);
}catch (Exception e){
} }
}); });
...@@ -292,9 +290,8 @@ public class SweetAppletTFCController { ...@@ -292,9 +290,8 @@ public class SweetAppletTFCController {
} }
} }
} }
try { if(item.getTitle().contains("&")){
item.setTitle(item.getTitle().split("&")[0]); item.setTitle(item.getTitle().split("&")[0]);
}catch (Exception e){
} }
vo = item; vo = item;
break; break;
......
...@@ -71,20 +71,17 @@ public class RedisArDataUtils { ...@@ -71,20 +71,17 @@ public class RedisArDataUtils {
artist.setResourceUrl(urlList); artist.setResourceUrl(urlList);
} }
for (SweetManualArtistStageListArDto stage : stageList) { for (SweetManualArtistStageListArDto stage : stageList) {
try { if(stage.getTitle().contains("&")){
stage.setEnTitle(stage.getTitle().split("&")[1]); stage.setEnTitle(stage.getTitle().split("&")[1]);
stage.setTitle(stage.getTitle().split("&")[0]); stage.setTitle(stage.getTitle().split("&")[0]);
} catch (Exception e) { } else {
// e.printStackTrace();
stage.setEnTitle(""); stage.setEnTitle("");
} }
List<SweetManualArtistListArDto> artistListArList = new ArrayList<>(); List<SweetManualArtistListArDto> artistListArList = new ArrayList<>();
for (SweetManualArtistListArDto artist : artistList) { for (SweetManualArtistListArDto artist : artistList) {
if (artist.getPerformanceStart().contains(time) && stage.getStageId().equals(artist.getStageId())) { if (artist.getPerformanceStart().contains(time) && stage.getStageId().equals(artist.getStageId())) {
try { if(artist.getTitle().contains("&")){
artist.setTitle(artist.getTitle().split("&")[0]); artist.setTitle(artist.getTitle().split("&")[0]);
}catch (Exception e){
} }
artistListArList.add(artist); artistListArList.add(artist);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment