lisy
2023-06-30 add48c8930d02d58046e89e78b0530c2d5fce32d
cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
@@ -2,7 +2,15 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsh.activity.mapper.CouponMapper">
    <!-- 开启二级缓存 -->
    <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>
    <select id="queryConponRuleOfJson" resultType="java.util.Map">
        SELECT JSON_EXTRACT(content, "$.conditionalAmount") as conditionalAmount,
               JSON_EXTRACT(content, "$.deductionAmount")   as deductionAmount,
               JSON_EXTRACT(content, "$.experienceName")   as experienceName
        FROM t_coupon
        where 1=1
        <if test="id != null">
            and  `id` = #{id}
        </if>
    </select>
</mapper>