release- 异常处理

release-2024-08-08
pikaqiudeshujia 6 months ago
parent cabed10760
commit df964ac563

@ -79,9 +79,12 @@ public class ArtistRepresentativeService {
artistRepresentative.setSongInfo(songInfo); artistRepresentative.setSongInfo(songInfo);
case 3: case 3:
// 商品 // 商品
try {
PmsProduct pmsProduct = restTemplate.getForObject(mallConfig.getProductUrl().replace("{id}", representative.getRepresentativeId()), PmsProduct.class); PmsProduct pmsProduct = restTemplate.getForObject(mallConfig.getProductUrl().replace("{id}", representative.getRepresentativeId()), PmsProduct.class);
artistRepresentative.setPmsProduct(pmsProduct); artistRepresentative.setPmsProduct(pmsProduct);
} catch (Exception e) {
e.printStackTrace();
}
break; break;
default: default:
break; break;
@ -105,7 +108,7 @@ public class ArtistRepresentativeService {
if (map.containsKey(pName)) { if (map.containsKey(pName)) {
try { try {
if (pd.getPropertyType().getName().equals("java.lang.Long")) { if (pd.getPropertyType().getName().equals("java.lang.Long")) {
if(StringUtils.isNotEmpty(map.get(pName).toString())){ if (StringUtils.isNotEmpty(map.get(pName).toString())) {
pd.getWriteMethod().invoke(obj, Long.parseLong(map.get(pName).toString())); pd.getWriteMethod().invoke(obj, Long.parseLong(map.get(pName).toString()));
} }
// else{ // else{

Loading…
Cancel
Save