|
@ -38,20 +38,20 @@ |
|
|
<if test='null != guideTitle and "" != guideTitle'> |
|
|
<if test='null != guideTitle and "" != guideTitle'> |
|
|
AND g.TITLE LIKE CONCAT( '%', #{guideTitle}, '%' ) |
|
|
AND g.TITLE LIKE CONCAT( '%', #{guideTitle}, '%' ) |
|
|
</if> |
|
|
</if> |
|
|
<if test='null != categoryId and "" != categoryId'> |
|
|
<if test='null != categoryCode and "" != categoryCode'> |
|
|
AND g.CATEGORY_ID = #{categoryId} |
|
|
AND g.CATEGORY_CODE = #{categoryCode} |
|
|
</if> |
|
|
</if> |
|
|
ORDER BY g.CREATED_TIME DESC |
|
|
ORDER BY g.CREATED_TIME DESC |
|
|
</select> |
|
|
</select> |
|
|
<select id="getGuideDetail" resultType="com.epmet.dto.result.GuideDetailResultDTO"> |
|
|
<select id="getGuideDetail" resultType="com.epmet.dto.result.GuideDetailResultDTO"> |
|
|
SELECT |
|
|
SELECT |
|
|
g.ID AS "guideId", |
|
|
g.ID AS "guideId", |
|
|
ORG_TYPE, |
|
|
g.ORG_TYPE, |
|
|
ORG_ID, |
|
|
g.ORG_ID, |
|
|
ORG_NAME, |
|
|
g.ORG_NAME, |
|
|
TITLE, |
|
|
g.TITLE, |
|
|
CATEGORY_CODE, |
|
|
g.CATEGORY_CODE, |
|
|
CATEGORY_NAME |
|
|
gc.CATEGORY_NAME |
|
|
FROM |
|
|
FROM |
|
|
guide g |
|
|
guide g |
|
|
INNER JOIN guide_category gc ON g.CATEGORY_CODE = gc.CATEGORY_CODE |
|
|
INNER JOIN guide_category gc ON g.CATEGORY_CODE = gc.CATEGORY_CODE |
|
@ -67,7 +67,7 @@ |
|
|
g.UPDATED_TIME AS updatedTime, |
|
|
g.UPDATED_TIME AS updatedTime, |
|
|
FROM |
|
|
FROM |
|
|
guide g |
|
|
guide g |
|
|
INNER JOIN guide_category gc ON g.CATEGORY_ID = gc.ID AND gc.DEL_FLAG = 0 AND gc.CUSTOMER_ID = #{customerId} |
|
|
INNER JOIN guide_category gc ON g.CATEGORY_CODE = gc.CATEGORY_CODE AND gc.DEL_FLAG = 0 AND gc.CUSTOMER_ID = #{customerId} |
|
|
INNER JOIN guide_collection gco ON g.ID = gco.GUIDE_ID AND gco.USER_ID = #{userId} AND gco.APP = #{app} AND gco.DEL_FLAG = 0 |
|
|
INNER JOIN guide_collection gco ON g.ID = gco.GUIDE_ID AND gco.USER_ID = #{userId} AND gco.APP = #{app} AND gco.DEL_FLAG = 0 |
|
|
WHERE g.DEL_FLAG = 0 |
|
|
WHERE g.DEL_FLAG = 0 |
|
|
AND g.CUSTOMER_ID = #{customerId} |
|
|
AND g.CUSTOMER_ID = #{customerId} |
|
|