You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RollCall/target/classes/mapper/AdminMapper.xml

32 lines
1.1 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTO Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wbq.mapper.AdminMapper">
<update id="update" parameterType="com.wbq.dto.AdminDTO">
update admin
<set>
<if test="name != null">
name = #{name},
</if>
<if test="password != null">
password = #{password}
</if>
</set>
where admin_id = #{adminId}
</update>
<select id="getByAdminLoginDTO" parameterType="com.wbq.dto.AdminLoginDTO" resultType="com.wbq.entity.Admin">
select * from admin
where admin_id = #{adminId} and password = #{password}
</select>
<select id="getPasswordByAdminId" resultType="java.lang.String" parameterType="java.lang.Integer">
select password from admin
where admin_id = #{adminId}
</select>
<select id="getByAdminId" resultType="com.wbq.entity.Admin" parameterType="java.lang.Integer">
select * from admin
where admin_id = #{adminId}
</select>
</mapper>