puzhibing
2023-08-14 1882d607549762a84b1a5326f7262eba01363b85
cloud-server-course/src/main/resources/mapper/TCoursePackageMapper.xml
@@ -68,7 +68,7 @@
        a.state
        from t_course_package a
        left join t_course_package_type b on (a.coursePackageTypeId = b.id)
        where a.state != 3
        where a.state != 3 and a.auditStatus = 2
        <if test="null != item.provinceCode and '' != item.provinceCode">
            and a.provinceCode = #{item.provinceCode}
        </if>
@@ -92,4 +92,37 @@
        </if>
        order by a.insertTime desc
    </select>
    <select id="queryExamineCoursePackageLists" resultType="map">
        select
        a.id,
        CONCAT(a.province, a.city) as city,
        a.storeId,
        b.`name` as coursePackageType,
        a.`name`,
        a.maxSubscribeNumber,
        CONCAT('购买后', a.validDays, '天内有效') as validDays,
        a.sort,
        a.auditStatus
        from t_course_package a
        left join t_course_package_type b on (a.coursePackageTypeId = b.id)
        where a.state = 1 and a.auditStatus != 2
        <if test="null != item.provinceCode and '' != item.provinceCode">
            and a.provinceCode = #{item.provinceCode}
        </if>
        <if test="null != item.cityCode and '' != item.cityCode">
            and a.cityCode = #{item.cityCode}
        </if>
        <if test="null != item.coursePackageTypeId">
            and a.coursePackageTypeId = #{item.coursePackageTypeId}
        </if>
        <if test="null != item.name and '' != item.name">
            and a.name line CONCAT('%', #{item.name}, '%')
        </if>
        <if test="null != item.auditStatus">
            and a.auditStatus = #{item.auditStatus}
        </if>
        order by a.insertTime desc
    </select>
</mapper>