change 4 lat temu
rodzic
commit
0bf139d219

+ 4 - 4
zhongzheng-system/src/main/resources/mapper/modules/order/CouponMapper.xml

@@ -16,14 +16,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectCountCon" parameterType="Long" resultType="integer">
         SELECT
-        COUNT(a.id)
+        COUNT(a.coupon_id)
         FROM
-        activity_configuration a
-        LEFT JOIN activity_configuration_course t ON a.id = t.configuration_id
+        coupon a
+        LEFT JOIN activity_configuration_course t ON a.configuration_id = t.configuration_id
         WHERE
         1 = 1
         <if test="couponId != null and couponId != ''" >
-            AND a.id = #{couponId}
+            AND a.coupon_id = #{couponId}
         </if>
         <if test="goodsId != null and goodsId != ''" >
             AND t.course_id =#{goodsId}