<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.web.work.mapper.WardInfoMapper"> <select id="selectList" resultType="com.ruoyi.web.work.domain.WardInfo"> select * from tb_ward_info <where> <if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> <if test="wardCode != null and wardCode != ''"> and ward_code = #{wardCode}</if> <if test="wardName != null and wardName != ''"> and ward_name like concat('%', #{wardName}, '%')</if> <if test="py != null and py != ''"> and py = #{py}</if> <if test="wb != null and wb != ''"> and wb = #{wb}</if> <if test="inputCode != null and inputCode != ''"> and input_code = #{inputCode}</if> <if test="validEndDTime != null and validEndDTime != ''"> and valid_end_d_time = #{validEndDTime}</if> <if test="activeSign != null and activeSign != ''"> and active_sign = #{activeSign}</if> <if test="verNo != null and verNo != ''"> and ver_no = #{verNo}</if> <if test="orderno != null and orderno != ''"> and orderno = #{orderno}</if> </where> </select> </mapper>