2021与蓝度共同重构项目,服务端
liuhaonan
2022-07-01 532f9b705c74b7eded523f900965dc81c1dd7893
dao/src/main/resources/mapper/C3mOrderMapper.xml
@@ -50,8 +50,20 @@
        FROM
        c3_order t1
        LEFT JOIN pole t2 ON t1.pole_id = t2.id
        <if test="userId != null">
            WHERE (t1.userId = #{userId} OR t1.client_id= #{userId})
        </if>
        <where>
            1=1
            <if test="userId != null">
                AND (t1.userId = #{userId} OR t1.client_id= #{userId})
            </if>
            <if test="orderStatus != null">
                AND t1.order_status = #{orderStatus}
            </if>
            <if test="startTimeStamp != null">
                AND create_timestamp BETWEEN #{startTimeStamp} AND #{nowTimeStamp}
            </if>
            <if test="keyword != null and keyword != ''">
                AND t1.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
            </if>
        </where>
    </select>
</mapper>