<?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.yunniu.farming.webadmin.dao.GroupAreaDao"> <select id="findPageList" resultType="com.yunniu.farming.webadmin.model.GroupArea"> select * from group_area <where> area_status = 0 <if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName,jdbcType=VARCHAR}, '%') </if> <if test="areaAddress != null and areaAddress != ''"> and area_address like concat('%', #{areaAddress,jdbcType=VARCHAR}, '%') </if> <if test="areaIds != null and areaIds.size > 0"> and id in <foreach collection="areaIds" separator="," open="(" item="item" index="index" close=")" nullable="true"> #{areaIds[${index}]} </foreach> </if> </where> order by create_time desc </select> <delete id="deleteArea"> update group_area set area_status =1 where id = #{id,jdbcType=INTEGER} </delete> </mapper>