**mapper.xml configuration files (different configurations, different scenarios)

Source: Internet
Author: User

<?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>








**mapper.xml configuration files (different configurations, different scenarios)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.