Project

General

Profile

Non-Function #78

Updated by Deca Park about 1 year ago

<p>1.ADMIN</p> 

 <p>&nbsp; 1)&nbsp;온라인몰 관리 &gt; 상품 등록 관리 (/onlineProduct) &gt; 상세 (Modify)</p> 

 <ul> 
	 <li>Spec: p2 (attach ppt)</li> 
 </ul> 

 <p>2.API</p> 

 <p>&nbsp; 1) [API] 쇼핑몰 상품 리스트 (GET /api/mall_product_list), 상품정보 (GET /api/mall_product)</p> 

 <p>&nbsp; &nbsp; 1-1)&nbsp;Response &gt;&nbsp;<strong>sold_out_yn</strong> (logic change)<br /> 
 &nbsp; &nbsp; &nbsp; a) if st_product.sold_out_yn = &#39;Y&#39;, set &#39;Y&#39;<br /> 
 &nbsp; &nbsp; &nbsp; b) else<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; b-1) if <strong>stock_count is NOT NULL AND stock_count &lt;= 0</strong>, set &#39;Y&#39;<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>(*&nbsp;if stock_count is NULL(empty),&nbsp;sold_out_yn is set by &#39;N&#39; - because it means that the product stock is not managed)</strong><br /> 
 &nbsp; &nbsp; &nbsp; c) if NOT a) or&nbsp;b), set &#39;N&#39;&nbsp;</p> 

 <p>&nbsp; 2)&nbsp;[API] PG 결제 컨펌 (POST /api/pay_confirm)</p> 

 <p>&nbsp; &nbsp; a) if PG pay confirm API is success<br /> 
 &nbsp; &nbsp; &nbsp; - append common order&#39;s product stock count process</p> 

 <p>&nbsp; 3) [Common]&nbsp;order&#39;s product stock count process<br /> 
 &nbsp; &nbsp; -&nbsp;make common service(function)&nbsp;(it&#39;s called on other process)</p> 

 <p>&nbsp; &nbsp; [Logic]<br /> 
 &nbsp; &nbsp; <span style="color:#e74c3c;"><s>a)&nbsp;if&nbsp;st_mall.mall_type a)&nbsp;if&nbsp;st_mall.mall_type is NOT&nbsp;&nbsp;&#39;online&#39; (with st_order.mall_code), SKIP<br /> 
 &nbsp; &nbsp; b)&nbsp;if&nbsp;st_mall.mall_type = &#39;online&#39;</s></span><br &#39;online&#39;<br /> 
 &nbsp; &nbsp; &nbsp; b-1) SELECT DB (st_order_product)<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - select: order_count<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - condition: order_no = {order_no param}<br /> 
 &nbsp; &nbsp; &nbsp; b-2) decrease product&#39;s stock_count of b-1) selected product list<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; UPDATE DB (st_product)<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - <strong>stock_count = stock_count - order_count<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (if stock_count is minus, set by 0)</strong></p> 

Back