无关风月
2024-08-31 5ed829e38c34659c9fc9dc6eeb11d72aa19e2403
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
@@ -233,4 +233,78 @@
    </select>
    <select id="chargingList" resultType="com.ruoyi.order.api.vo.ChargingOrderListVO">
        select t1.* from t_charging_order t1
        where 1=1
        <if test="null != req.code and req.code!=''">
            and t1.code  LIKE CONCAT('%',#{req.code},'%')
        </if>
        <if test="null != req.carIds and req.carIds.size()>0" >
            and t1.app_user_car_id in
            <foreach collection="req.carIds" item="item" index="index" separator="," open="(" close=")">
                #{item}
            </foreach>
        </if>
        <if test="null != req.userIds and req.userIds.size()>0" >
            and t1.app_user_id in
            <foreach collection="req.userIds" item="item" index="index" separator="," open="(" close=")">
                #{item}
            </foreach>
        </if>
        <if test="req.orderType != null ">
            and t1.order_type = #{req.orderType}
        </if>
        <if test="req.status != null ">
            and t1.status = #{status}
        </if>
        <if test="req.status != null ">
            and t1.status = #{req.status}
        </if>
        <if test="req.siteId != null ">
            and t1.site_id = #{req.siteId}
        </if>
        <if test="startTime1 != null and startTime1!=''">
            and (t1.start_time between #{startTime1} and #{startTime2})
        </if>
        <if test="endTime1 != null and endTime1!=''">
            and (t1.end_time between #{endTime1} and #{endTime2})
        </if>
    </select>
    <select id="chargingList1" resultType="com.ruoyi.order.api.vo.ChargingOrderListVO">
        select t1.* from t_charging_order t1
        where 1=1
        <if test="null != req.code and req.code!=''">
            and t1.code  LIKE CONCAT('%',#{req.code},'%')
        </if>
        <if test="null != req.carIds and req.carIds.size()>0" >
            and t1.app_user_car_id in
            <foreach collection="req.carIds" item="item" index="index" separator="," open="(" close=")">
                #{item}
            </foreach>
        </if>
        <if test="null != req.userIds and req.userIds.size()>0" >
            and t1.app_user_id in
            <foreach collection="req.userIds" item="item" index="index" separator="," open="(" close=")">
                #{item}
            </foreach>
        </if>
        <if test="req.orderType != null ">
            and t1.order_type = #{req.orderType}
        </if>
        <if test="req.status != null ">
            and t1.status = #{status}
        </if>
        <if test="req.status != null ">
            and t1.status = #{req.status}
        </if>
        <if test="req.siteId != null ">
            and t1.site_id = #{req.siteId}
        </if>
        <if test="startTime1 != null and startTime1!=''">
            and (t1.start_time between #{startTime1} and #{startTime2})
        </if>
        <if test="endTime1 != null and endTime1!=''">
            and (t1.end_time between #{endTime1} and #{endTime2})
        </if>
    </select>
</mapper>