Pu Zhibing
2024-12-13 73b750200f25df08aa64124da49e7461f9de6653
ManagementNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TActivityGeneralizationMapper.xml
@@ -25,7 +25,16 @@
               a.qrCode,
        a.participateCount,a.state,IFNULL(b.count, 0) AS `count`
        from t_activity_generalization a
        LEFT join (SELECT userId,couponActivityId, activityType,COUNT(*) AS `count` FROM t_user_coupon_record where activityType = 5 GROUP BY couponActivityId) b
        LEFT join (SELECT
        couponActivityId,
        activityType,
        COUNT(DISTINCT userId) AS count
        FROM
        t_user_coupon_record
        WHERE
        activityType = 5
        GROUP BY
        couponActivityId ) b
        ON a.id = b.couponActivityId
        WHERE a.isDelete = 1
        <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''">
@@ -37,6 +46,7 @@
        <if test="state != null">
            and a.state=#{state}
        </if>
        order by a.insertTime desc
    </select>
</mapper>