Просмотр исходного кода

상품뷰이력 생성 Exception 발생 시 skip 처리

gagamel 4 лет назад
Родитель
Сommit
bac877aba1

+ 9 - 5
src/main/java/com/style24/front/support/interceptor/TsfGoodsViewInterceptor.java

@@ -43,11 +43,15 @@ public class TsfGoodsViewInterceptor extends HandlerInterceptorAdapter {
 		// Parameter
 		GagaMap params = GagaParameterUtil.getParameterMap(request);
 
-		// 상품뷰이력 생성
-		goodsService.createGoodsViewHst(params.getString("goodsCd"), params.getString("ithrCd"));
-
-		// 최근본상품 생성
-		recentlyGoodsService.createRecentlyGoods(params.getString("goodsCd"));
+		try {
+			// 상품뷰이력 생성
+			goodsService.createGoodsViewHst(params.getString("goodsCd"), params.getString("ithrCd"));
+
+			// 최근본상품 생성
+			recentlyGoodsService.createRecentlyGoods(params.getString("goodsCd"));
+		} catch (Exception e) {
+			// Do nothing
+		}
 
 		// SSL Server
 		boolean isSslServer = Boolean.parseBoolean(hasSsl);