44323
2023-10-11 f7e51fc7c91e474e5c0bcc79c47f074c0a59b5c3
cloud-server-course/src/main/resources/mapper/CoursePackagePaymentConfigMapper.xml
@@ -12,11 +12,11 @@
        <result column="playPaiCoin" property="playPaiCoin" />
    </resultMap>
    <update id="changeState">
            update t_course_package_payment2 set
            update t_course_package_payment set
            payStatus = 2,payUserName = #{payUserName},payType = 7,payUserId=#{payUserId}
            <where>
                <if test="ids != null and ids.size()>0">
                    AND t_course_package_payment2.id IN
                    AND t_course_package_payment.id IN
                    <foreach collection="ids" separator="," item="id" open="(" close=")">
                        #{id}
                    </foreach>
@@ -29,7 +29,7 @@
        t1.payUserName as buyTypeName,
               CONCAT(t2.province,t2.city) as provinceAndCity,t2.coursePackageTypeId,t2.storeId,t2.name as coursePackage,
               t3.name as coursePackageType
        from t_course_package_payment2 t1
        from t_course_package_payment t1
        left join t_course_package t2 on t1.coursePackageId = t2.id
        left join t_course_package_type t3 on t2.coursePackageTypeId = t3.id
        <where>
@@ -53,5 +53,59 @@
            </if>
        </where>
    </select>
    <select id="listAllRegister" resultType="com.dsh.course.model.RegisterOrderVO">
        select t1.id,t1.studentId,t1.payUserType,t1.payStatus,t1.payType,t1.originalPrice,t1.userCouponId,t1.payUserId,t1.giftClassHours,t1.appUserId,t1.cashPayment as money,t1.playPaiCoin,
        t1.insertTime,
        CONCAT(t2.province,t2.city) as provinceAndCity,t2.coursePackageTypeId,t2.storeId,t2.name as coursePackageName
        from t_course_package_payment t1
        left join t_course_package t2 on t1.coursePackageId = t2.id
        <where>
            <if test="query.amount!=null and query.amount!= ''">
                and t1.cashPayment &lt;= #{query.amount}
            </if>
            <if test="query.province!=null and query.province!= ''">
                and t2.provinceCode = #{query.province}
            </if>
            <if test="query.city!=null and query.city!= ''">
                and t2.cityCode = #{query.city}
            </if>
            <if test="query.storeId!=null and query.storeId!= ''">
                and t2.storeId = #{query.storeId}
            </if>
            <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
                and t1.insertTime between #{sTime} and #{eTime}
            </if>
            <if test="query.storesIds != null and query.storesIds.size()>0">
                AND t2.storeId IN
                <foreach collection="query.storesIds" separator="," item="id" open="(" close=")">
                    #{id}
                </foreach>
            </if>
            <if test="query.userIds != null and query.userIds.size()>0">
                AND t1.appUserId IN
                <foreach collection="query.userIds" separator="," item="id" open="(" close=")">
                    #{id}
                </foreach>
            </if>
            <if test="query.studentIds != null and query.studentIds.size()>0">
                AND t1.studentId IN
                <foreach collection="query.studentIds" separator="," item="id" open="(" close=")">
                    #{id}
                </foreach>
            </if>
            <if test="query.coursePackageName!=null and query.coursePackageName!= ''">
                AND t2.name LIKE concat('%',#{query.coursePackageName},'%')
            </if>
            <if test="query.salesName!=null and query.salesName!= ''">
                AND t1.salesName LIKE concat('%',#{query.salesName},'%')
            </if>
            <if test="query.orderSource!=null and query.orderSource!= ''">
                and t1.payUserType = #{query.orderSource}
            </if>
            and t1.payStatus = 2
        </where>
    </select>
</mapper>