puzhibing
2024-10-26 5f3a09f3d4e5fdfc33bd89437c334e6b386c53ed
Merge remote-tracking branch 'origin/master'
1个文件已修改
34 ■■■■■ 已修改文件
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TShoppingOrderMapper.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TShoppingOrderMapper.xml
@@ -97,6 +97,7 @@
            AND t1.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()}
        </if>
        </if>
        <if test="req.siteId == null">
        <if test="req.orderType == null or req.orderType == 2">
        <if test="req.type == null or req.type == 1 or req.type == 2">
            union all
@@ -169,38 +170,6 @@
        <if test="req.orderType == null or req.orderType == 4">
            <if test="req.type == null or req.type == 4">
                union all
                select t4.code ,t4.order_amount as orderAmount,
                0 as couponDiscountAmount,
                t4.discount_amount as vipDiscountAmount,
                t4.payment_amount as paymentAmount,
                t4.create_time as createTime,
                t4.app_user_id as appUserId,
                4 as orderType
                from t_vip_order t4
                where 1 = 1
                and t4.type =2
                <if test="null != req.code and req.code!=''">
                    and t4.code  LIKE CONCAT('%',#{req.code},'%')
                </if>
                <if test="req.type == null ">
                    and t4.discount_amount  > 0
                </if>
                <if test="null != req.userIds and req.userIds.size()>0" >
                    and t4.app_user_id in
                    <foreach collection="req.userIds" item="item" index="index" separator="," open="(" close=")">
                        #{item}
                    </foreach>
                </if>
                <if test="req.endTime != null and req.endTime != '' and req.startTime != null and req.startTime != ''">
                    AND (t4.create_time between CONCAT(#{req.startTime},':00') and CONCAT(#{req.endTime},':59'))
                </if>
                and t4.payment_status =2
                AND t4.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()}
            </if>
        </if>
        <if test="req.orderType == null or req.orderType == 4">
            <if test="req.type == null or req.type == 4">
                union all
                select t5.code ,t5.order_amount as orderAmount,
                0 as couponDiscountAmount,
                0 as vipDiscountAmount,
@@ -226,6 +195,7 @@
            </if>
        </if>
        </if>
    </select>