|
@@ -53,6 +53,38 @@
|
|
|
FROM
|
|
|
mk_center_menu a
|
|
|
</select>
|
|
|
+ <select id="queryCenterByList" resultType="com.kmall.admin.entity.mk.MkCenterMenuEntity">
|
|
|
+ SELECT
|
|
|
+ a.`id`,
|
|
|
+ a.`menu_name`,
|
|
|
+ a.`menu_detail`,
|
|
|
+ a.`pic_url`,
|
|
|
+ a.`menu_url`,
|
|
|
+ a.`is_valid`
|
|
|
+ FROM
|
|
|
+ mk_center_menu a
|
|
|
+ WHERE
|
|
|
+ 1 = 1
|
|
|
+ <if test="(thirdPartyMerchCode != null and thirdPartyMerchCode != '') or (storeId != null and storeId != '') or (thirdMerchSn != null and thirdMerchSn != '') ">
|
|
|
+ AND id IN (
|
|
|
+ SELECT
|
|
|
+ r.center_menu_id
|
|
|
+ FROM
|
|
|
+ mk_center_menu_store_real r
|
|
|
+ LEFT JOIN mall_store s ON r.store_id = s.id
|
|
|
+ LEFT JOIN third_merchant_biz t ON r.third_merch_sn = t.third_merch_sn
|
|
|
+ WHERE 1=1
|
|
|
+ <if test="thirdPartyMerchCode != null and thirdPartyMerchCode != ''">
|
|
|
+ AND t.third_party_merch_code = #{thirdPartyMerchCode}
|
|
|
+ </if>
|
|
|
+ <if test="thirdMerchSn != null and thirdMerchSn != ''">
|
|
|
+ AND r.third_merch_sn = #{thirdMerchSn}
|
|
|
+ </if>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ ORDER BY
|
|
|
+ a.id DESC
|
|
|
+ </select>
|
|
|
|
|
|
<select id="queryListByStore" resultType="com.kmall.admin.entity.mk.MkCenterMenuEntity">
|
|
|
SELECT
|
|
@@ -82,12 +114,12 @@
|
|
|
<if test="menuName != null and menuName.trim() != ''">
|
|
|
AND menu_name LIKE concat('%',#{menuName},'%')
|
|
|
</if>
|
|
|
- <if test="storeId != null and storeId != ''">
|
|
|
- AND r.store_id = #{storeId}
|
|
|
- </if>
|
|
|
<if test="thirdMerchSn != null and thirdMerchSn != ''">
|
|
|
AND r.third_merch_sn = #{thirdMerchSn}
|
|
|
</if>
|
|
|
+ <if test="thirdPartyMerchCode != null and thirdPartyMerchCode != ''">
|
|
|
+ AND t.third_party_merch_code = #{thirdPartyMerchCode}
|
|
|
+ </if>
|
|
|
<choose>
|
|
|
<when test="sidx != null and sidx.trim() != ''">
|
|
|
order by ${sidx} ${order}
|
|
@@ -111,12 +143,12 @@
|
|
|
<if test="menuName != null and menuName.trim() != ''">
|
|
|
AND menu_name LIKE concat('%',#{menuName},'%')
|
|
|
</if>
|
|
|
- <if test="storeId != null and storeId != ''">
|
|
|
- AND r.store_id = #{storeId}
|
|
|
- </if>
|
|
|
<if test="thirdMerchSn != null and thirdMerchSn != ''">
|
|
|
AND r.third_merch_sn = #{thirdMerchSn}
|
|
|
</if>
|
|
|
+ <if test="thirdPartyMerchCode != null and thirdPartyMerchCode != ''">
|
|
|
+ AND t.third_party_merch_code = #{thirdPartyMerchCode}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<insert id="save" parameterType="com.kmall.admin.entity.mk.MkCenterMenuEntity" useGeneratedKeys="true" keyProperty="id">
|