update会员计费模板

This commit is contained in:
2024-02-01 15:16:01 +08:00
parent 4e2ac44d40
commit 09369fe5b5
8 changed files with 200 additions and 8 deletions

View File

@@ -170,4 +170,48 @@
where del_flag = '0'
and group_code = #{groupCode,jdbcType=VARCHAR}
</select>
<select id="queryByStationId" resultType="com.jsowell.pile.vo.web.MemberGroupVO">
select
t1.id as id,
t1.group_code as groupCode,
t1.merchant_id as merchantId,
t1.station_id as stationId,
t1.group_level as groupLevel,
t1.group_type as groupType,
t1.discount as discount
from member_group t1
where t1.del_flag = '0'
and find_in_set(#{stationId,jdbcType=VARCHAR}, t1.station_id)
</select>
<select id="queryByMerchantId" resultType="com.jsowell.pile.vo.web.MemberGroupVO">
select
t1.id as id,
t1.group_code as groupCode,
t1.merchant_id as merchantId,
t1.station_id as stationId,
t1.group_level as groupLevel,
t1.group_type as groupType,
t1.discount as discount
from member_group t1
where t1.del_flag = '0'
and t1.merchant_id = #{merchantId,jdbcType=VARCHAR}
</select>
<select id="queryMemberDiscountV2" resultType="com.jsowell.pile.vo.web.MemberDiscountVO">
SELECT
t1.group_code AS groupCode,
t1.group_type AS groupType,
t1.discount AS discount,
t1.merchant_id AS merchantId,
t1.station_id AS stationId
FROM
member_group t1
JOIN member_group_relation t2 ON t2.group_code = t1.group_code AND t2.del_flag = '0'
WHERE
t1.del_flag = '0'
and t1.group_code = #{groupCode,jdbcType=VARCHAR}
and t2.member_id = #{memberId,jdbcType=VARCHAR}
</select>
</mapper>