<sql id = "Condition_List">

        <!-- 根据资源商类型查询 -->
        <if test="query.partnerType != null" >
            and a.type = #{query.partnerType}
        </if>
        <!-- 根据所在地查询 -->
        <if test="query.areaCode != null" >
            and a.area_code = #{query.areaCode}
        </if>
        <!-- 根据主营品牌ID查询 -->
        <if test="query.brandIds != null" >
            and LOCATE(#{query.brandIds},a.car_brand_id)>0
        </if>
        <!-- 根据关键字查询  合作商名称 -->
        <if test="query.key != null" >
            and a.name like concat('%',#{query.key},'%')
        </if>
        <!-- 根据创建时间查询 -->
        <if test="query.createTime != null" >
            and a.create_time between #{query.createTime[0]} and #{query.createTime[1]}
        </if>

    </sql>
 <include refid="Condition_List" />

 

相关文章:

  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
猜你喜欢
  • 2021-06-11
  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案