<select id="listMmbPointExchSchema" resultType="com.zbw.saas.middle.member.member.vo.MmbPointExchSchemaVO">
select * from mmb_point_exch_schema
where corp_id = #{vo.corpId} and is_deleted = 1
<choose>
<when test="vo.name!=null and vo.name!=''">
and (name like CONCAT('%',#{vo.name},'%') or schema_no like CONCAT('%',#{vo.schemaNo},'%'))
</when>
<otherwise>
<if test=" vo.startCreateTime!=null">
and (create_dtm between #{vo.startCreateTime} AND #{vo.endCreateTime} )
</if>
<if test="vo.statusDic!=null">
and status_dic = #{vo.statusDic}
</if>
<if test="vo.creatorId!=null">
and creator_id = #{vo.creatorId}
</if>
<if test="vo.id!=null">
and id = #{vo.id}
</if>
<if test="vo.startDtm!=null">
and (start_dtm <![CDATA[ <= ]]> #{vo.endDtm} and end_dtm <![CDATA[ >= ]]> #{vo.startDtm})
</if>
</otherwise>
</choose>
</select>