<?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.smartearth.poiexcel.mapper.QiYeMapper">
|
<select id="selectByName" resultType="com.smartearth.poiexcel.entity.EntEntity">
|
select *
|
from smart_earth.yz_qiyexinxi
|
<where>
|
<if test="name != null">
|
upper(entName) like #{name} or upper(address) like #{name}
|
</if>
|
</where>
|
order by entName
|
limit 10;
|
</select>
|
|
<select id="selectCount" resultType="java.lang.Integer">
|
select count(*)
|
from smart_earth.yz_qiyexinxi
|
where x is null or y is null;
|
</select>
|
|
<select id="selectByPage" resultType="com.smartearth.poiexcel.entity.EntEntity">
|
select *
|
from smart_earth.yz_qiyexinxi
|
where x is null or y
|
order by id
|
limit #{limit} offset #{offset};
|
</select>
|
|
<update id="update">
|
update smart_earth.yz_qiyexinxi
|
set x=#{x},y=#{y}
|
where id=#{id};
|
</update>
|
|
<update id="updates">
|
<foreach collection="list" item="item" index="index">
|
update smart_earth.yz_qiyexinxi set x=#{item.x},y=#{item.y} where id=#{item.id};
|
</foreach>
|
</update>
|
</mapper>
|