<select id="getShopIdList" resultType="java.lang.String" parameterType="java.lang.String">
<choose>
<when test="shopTypeFlag != null and shopTypeFlag != ''">
<choose>
<when test="shopTypeFlag == '0'.toString()">
SELECT DISTINCT CS_DBID FROM GOODS_INFO_APPROVE_RECORDER
</when>
<when test="shopTypeFlag == '1'.toString()">
SELECT DISTINCT CS_DBID FROM FOUR_NEW_GOODS_APPROVE_RECORDER
</when>
<when test="shopTypeFlag != '0'.toString() and shopTypeFlag != '1'.toString()">
SELECT DISTINCT CS_DBID FROM SERVICE_SHELF_APPROVE_RECORDER
WHERE SS_SERVICE_TYPE_DBID = #{shopTypeFlag}
</when>
</choose>
</when>
<when test="shopTypeFlag = null or shopTypeFlag = ''">
SELECT CS_DBID FROM GOODS_INFO_APPROVE_RECORDER
UNION
SELECT CS_DBID FROM FOUR_NEW_GOODS_APPROVE_RECORDER
UNION
SELECT CS_DBID FROM SERVICE_SHELF_APPROVE_RECORDER
</when>
</choose>
</select>