foreach

  <select id="getStatDetail" parameterType="com.huaxia.cai.center.collection.api.stub.dto.QueueStatDto" resultType="com.huaxia.cai.center.collection.api.stub.vo.QueueStatDetailVo">
    select
      c.queue_no queueNo,  c.business_category businessCategory, c.input_orgid inputOrgid, 
      c.user_id userId,c.user_name userName, c.follow_up_time followUpTime,
      c.contract_no contractNo
    from clt_collection_info c 
    where c.status = 0 and c.queue_no is not null and c.queue_no != ''
    <foreach collection="mainList" separator="or" item="item" open="and (" close=")">
      <trim prefix="(" suffix=")" prefixOverrides="and">
        <if test="item.inputOrgid != null and item.inputOrgid != ''">
          and c.input_orgid = #{item.inputOrgid,jdbcType=VARCHAR}
        </if>
        <if test="item.userId != null and item.userId != ''">
          and c.user_id = #{item.userId,jdbcType=VARCHAR}
        </if>
        <if test="item.queueNo != null and item.queueNo != ''">
          and c.queue_no = #{item.queueNo,jdbcType=VARCHAR}
        </if>
        <if test="item.businessCategory != null and item.businessCategory != ''">
          and c.business_category = #{item.businessCategory,jdbcType=VARCHAR}
        </if>
      </trim>
    </foreach>
  </select>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值