**Mapper.xml配置文件(不同情况不同配置)

落花踏尽游何处,笑入胡姬酒肆中。这篇文章主要讲述**Mapper.xml配置文件(不同情况不同配置)相关的知识,希望能为你提供帮助。
【**Mapper.xml配置文件(不同情况不同配置)】< ?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="dao.StandardDao">
< select id="findAll" resultType="entity.Standard">
SELECT * FROM `standard` WHERE (std_num LIKE CONCAT(‘%‘,#{name},‘%‘)
or zhname like CONCAT(‘%‘,#{name},‘%‘) )
and bdelete=‘0‘
GROUP BY std_num ASC LIMIT #{pageno},3
< /select>

< select id="getCount" resultType="int">
SELECT count(*) FROM `standard` WHERE std_num LIKE CONCAT(‘%‘,#{name},‘%‘)
or zhname like CONCAT(‘%‘,#{name},‘%‘)
< /select>

< update id="bdelete" >
update `standard` set bdelete=1 where id in
< foreach collection="array" open="(" close=")" item="id" separator=",">
#{id}
< /foreach>

< /update>
< /mapper>









































    推荐阅读