build/classes/dao/AdminDao.xml
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?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.AdminDao" >
<!--登陆查询-->
<select id="findAdmin" parameterType="Admin" resultType="Admin">
select * from d_admin
where
<if test="a_username!=null and a_username!='' ">
a_username = #{a_username}
</if>
<if test="a_password!=null and a_password!='' ">
and a_password = #{a_password}
</if>
</select>
<!--分页查询-->
<select id="getAdminList" parameterType="Admin" resultType="Admin">
select * from d_admin
<where>
<if test="a_username!=null and a_username!='' ">
and a_username like '%${a_username}%'
</if>
<if test="a_describe!=null and a_describe!=''">
and a_describe like '%${a_describe}%'
</if>
<if test="a_id!=null and a_id!=0">
and a_id like '%${a_id}%'
</if>
</where>
ORDER BY a_id asc
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
select count(a_id) from d_admin
<where>
<if test="a_username!=null and a_username!='' ">
and a_username like '%${a_username}%'
</if>
<if test="a_describe!=null and a_describe!=''">
and a_describe like '%${a_describe}%'
</if>
<if test="a_id!=null and a_id!=0">
and a_id like '%${a_id}%'
</if>
</where>
</select>
<!--添加管理员信息-->
<insert id="addAdmin" parameterType="Admin" keyProperty="a_id" useGeneratedKeys="true">
insert into d_admin (a_username,a_password,a_name,a_phone,a_power,a_describe)
values(#{a_username},#{a_password},#{a_name},#{a_phone},#{a_power},#{a_describe})
</insert>
<!--通过id删除管理员信息-->
<delete id="deleteAdmin" parameterType="Integer" >
delete from d_admin where a_id=#{a_id}
</delete>
后面还有 35 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
