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.
29 lines
1006 B
29 lines
1006 B
<?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.example.demo.mapper.AdminMapper">
|
|
|
|
<select id="getAdmin" resultType="com.example.demo.domain.entity.Admin">
|
|
select * from admin
|
|
where account=#{account}
|
|
</select>
|
|
<select id="selectByName" resultType="com.example.demo.domain.entity.Admin">
|
|
select * from admin
|
|
where account= #{account}
|
|
</select>
|
|
<select id="getId" resultType="java.lang.Integer">
|
|
select id from admin
|
|
where account=#{account}
|
|
</select>
|
|
|
|
<!--更新用户密码-->
|
|
<update id="updatePassword">
|
|
update admin
|
|
set password = #{password},
|
|
update_time = #{updateTime}
|
|
where account = #{account}
|
|
</update>
|
|
<select id="getName" resultType="java.lang.String">
|
|
select admin_name from admin
|
|
where account= #{account}
|
|
</select>
|
|
</mapper>
|