Merge branch 'dev' of https://git.jetbrains.space/nalpari/q-cast-iii/qcast-api into dev
This commit is contained in:
commit
abe35e03a7
@ -173,6 +173,11 @@ public class ObjectService {
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<ObjectResponse> selectObjectList(ObjectRequest objectRequest) throws Exception {
|
||||
|
||||
if (!"T01".equals(objectRequest.getSaleStoreId())) {
|
||||
objectRequest.setSchSelSaleStoreId("");
|
||||
}
|
||||
|
||||
return objectMapper.selectObjectList(objectRequest);
|
||||
}
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@
|
||||
<select id="selectObjectList" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="com.interplug.qcast.biz.object.dto.ObjectResponse">
|
||||
/* sqlid : com.interplug.qcast.biz.object.selectObjectList */
|
||||
|
||||
<if test='saleStoreId != null and saleStoreId != "T01"'>
|
||||
<if test='(saleStoreId != null and saleStoreId != "T01") or (schSelSaleStoreId != null and schSelSaleStoreId != "")'>
|
||||
/* 계층형 구조에 맞는 SALE_STORE_ID 축출 - 재귀함수 */
|
||||
WITH SALES_STORE_CTE AS (
|
||||
SELECT
|
||||
@ -151,7 +151,14 @@
|
||||
FROM M_SALES_STORE WITH(NOLOCK)
|
||||
WHERE APPROVE_FLG = '2'
|
||||
AND DEL_FLG = '0'
|
||||
<choose>
|
||||
<when test='schSelSaleStoreId != null and schSelSaleStoreId != ""'>
|
||||
AND SALE_STORE_ID = #{schSelSaleStoreId}
|
||||
</when>
|
||||
<otherwise>
|
||||
AND SALE_STORE_ID = #{saleStoreId}
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
UNION ALL
|
||||
SELECT
|
||||
@ -209,7 +216,7 @@
|
||||
FROM T_OBJECT O WITH (NOLOCK)
|
||||
INNER JOIN M_SALES_STORE S WITH (NOLOCK)
|
||||
ON O.SALE_STORE_ID = S.SALE_STORE_ID
|
||||
<if test='saleStoreId != null and saleStoreId != "T01"'>
|
||||
<if test='(saleStoreId != null and saleStoreId != "T01") or (schSelSaleStoreId != null and schSelSaleStoreId != "")'>
|
||||
INNER JOIN SALES_STORE_CTE T
|
||||
ON S.SALE_STORE_ID = T.SALE_STORE_ID
|
||||
</if>
|
||||
@ -220,18 +227,12 @@
|
||||
AND O.TEMP_FLG = '0'
|
||||
</if>
|
||||
<if test='schSaleStoreId != null and schSaleStoreId != ""'>
|
||||
AND O.SALE_STORE_ID LIKE '%' + #{schSaleStoreId} + '%'
|
||||
AND O.SALE_STORE_ID = #{schSaleStoreId}
|
||||
</if>
|
||||
<choose>
|
||||
<when test='schOtherSelSaleStoreId != null and schOtherSelSaleStoreId != ""'>
|
||||
<if test='schOtherSelSaleStoreId != null and schOtherSelSaleStoreId != ""'>
|
||||
/* 2차점까지 고름 */
|
||||
AND O.SALE_STORE_ID = #{schOtherSelSaleStoreId}
|
||||
</when>
|
||||
<when test='schSelSaleStoreId != null and schSelSaleStoreId != ""'>
|
||||
/* 1차점까지만 고름 */
|
||||
AND O.SALE_STORE_ID = #{schSelSaleStoreId}
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test='schAddress != null and schAddress != ""'>
|
||||
AND O.ADDRESS LIKE '%' + #{schAddress} + '%'
|
||||
</if>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user