Prechádzať zdrojové kódy

Merge branch 'style' into gagamel_onetoone

card007 4 rokov pred
rodič
commit
a9a4664442

+ 10 - 0
src/main/java/com/style24/core/biz/dao/TscOrderChangeDao.java

@@ -1107,4 +1107,14 @@ public interface TscOrderChangeDao {
 	 * @since 2021. 09. 07
 	 */
 	Collection<Order> getReturnOrderInfo(Order order);
+	
+	/**
+	 * 2021.11.15 회수컨펌 변경요청사유 변경
+	 *
+	 * @param OrderChange
+	 * @return int
+	 * @author moon
+	 * @since 2021. 05. 31
+	 */
+	int updateOrderChangeChgReason(OrderChange orderChange);
 }

+ 2 - 2
src/main/java/com/style24/core/biz/service/TscOrderChangeService.java

@@ -3169,7 +3169,7 @@ public class TscOrderChangeService {
 					chgRefund.setRfDeliveryFee(codFee*-1);
 					chgRefund.setCodFeeYn(codFeeYn);
 					chgRefund.setRfRealCnclAmt(chgRefund.getRfRealCnclAmt() + codFee);
-					orderChangeDao.updateRefundChange(chgRefund);
+					//orderChangeDao.updateRefundChange(chgRefund);
 				}
 
 				// 동봉비 처리 
@@ -4183,7 +4183,7 @@ public class TscOrderChangeService {
 			chgRefund.setRfDeliveryFee(codFee*-1);
 			chgRefund.setCodFeeYn(codFeeYn);
 			chgRefund.setRfRealCnclAmt(refundAmt - (codFee*-1));
-			orderChangeDao.updateRefundChange(chgRefund);
+			//orderChangeDao.updateRefundChange(chgRefund);
 		}
 		
 		// 18. 동봉비 처리 

+ 19 - 4
src/main/java/com/style24/core/support/controller/TscBaseController.java

@@ -24,15 +24,14 @@ import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 import com.fasterxml.jackson.databind.JsonMappingException;
+import com.gagaframework.web.rest.exception.GagaRestException;
+import com.gagaframework.web.rest.server.GagaResponse;
+import com.gagaframework.web.rest.server.GagaResponseStatus;
 import com.style24.core.biz.thirdparty.KollusApi;
 import com.style24.core.support.message.TscMessageByLocale;
 
 import lombok.extern.slf4j.Slf4j;
 
-import com.gagaframework.web.rest.exception.GagaRestException;
-import com.gagaframework.web.rest.server.GagaResponse;
-import com.gagaframework.web.rest.server.GagaResponseStatus;
-
 /**
  * Controller Advice
  * 
@@ -129,6 +128,22 @@ public class TscBaseController {
 			throwable = rootCause;
 		}
 
+		// Ajax 호출인지 여부를 체크. 2021.11.16. gagamel
+		// HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+		// String reqWith = request.getHeader("x-requested-with");
+		//
+		// if (StringUtils.isBlank(reqWith) || !"XMLHttpRequest".equals(reqWith)) {
+		// 	HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
+		//
+		// 	try {
+		// 		// 에러 페이지로 forwarding
+		// 		request.getRequestDispatcher("/error").forward(request, response);
+		// 	} catch (Exception e) {
+		// 		// Do nothing
+		// 	}
+		// }
+		// Ajax 호출인지 여부를 체크. 2021.11.16. gagamel
+
 		if (throwable instanceof SQLException || throwable instanceof BindingException
 			|| throwable instanceof JsonMappingException
 			|| throwable instanceof UndeclaredThrowableException) {

+ 14 - 1
src/main/java/com/style24/persistence/mybatis/shop/TscOrderChange.xml

@@ -5032,7 +5032,8 @@
 	<update id="updateReturnDeliveryFee" parameterType="OrderChange">
 		/* TscOrderChange.updateReturnDeliveryFee */
 		UPDATE TB_DELIVERY_FEE
-		   SET DELV_GFCD_USE_AMT = #{delvGfcdUseAmt}
+		   SET DELV_FEE = #{delvGfcdUseAmt} + #{realDelvAmt}
+		     , DELV_GFCD_USE_AMT = #{delvGfcdUseAmt}
 		     , REAL_DELV_AMT = #{realDelvAmt}
 		     , UPD_NO = #{updNo}
 		     , UPD_DT = NOW()
@@ -5227,6 +5228,18 @@
 		 WHERE O.ORD_NO = #{ordNo}
 		   AND OD.DELV_FEE_CD = #{delvFeeCd}
 	</select>
+	
+	<!-- 2021.11.15 회수컨펌 변경요청사유 변경 -->
+	<update id="updateOrderChangeChgReason" parameterType="OrderChange">
+		/* TscOrderChange.updateOrderChangeChgReason */
+		UPDATE TB_ORDER_CHANGE
+		   SET CHG_REASON     = #{chgReason}
+		     , UPD_NO         = #{updNo}
+		     , UPD_DT         = NOW()
+		 WHERE 1 = 1
+		   AND ORD_CHG_SQ = #{ordChgSq}
+	</update>
+	
 </mapper>