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.

54 lines
1.8 KiB

<?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.coin.AdminMapper">
<select id="getAdmin" resultType="com.example.demo.domain.entity.Admin">
select
id as id,
admin_name as adminName,
account as account,
password as password,
machine_id as machineId,
admin_status as adminStatus,
market as markets,
postiton as postiton,
remark as remark,
create_time as createTime,
update_time as updateTime,
role_id as roleId
from admin
where account=#{account}
</select>
<select id="selectByName" resultType="com.example.demo.domain.entity.Admin">
select id as id,
admin_name as adminName,
account as account,
password as password,
machine_id as machineId,
admin_status as adminStatus,
market as markets,
postiton as postiton,
remark as remark,
create_time as createTime,
update_time as updateTime,
role_id as roleId
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>