后端用户登录接口完成
This commit is contained in:
@@ -2,55 +2,16 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cxyxiaomo.epp.dao.UserDao">
|
||||
|
||||
<insert id="addUser" parameterType="com.cxyxiaomo.epp.pojo.User">
|
||||
<mapper namespace="com.cxyxiaomo.epp.user.dao.UserDao">
|
||||
<insert id="addUser" parameterType="com.cxyxiaomo.epp.common.pojo.User">
|
||||
INSERT INTO user (username, password)
|
||||
VALUES (#{username}, #{password})
|
||||
</insert>
|
||||
|
||||
<select id="getUserById" parameterType="java.lang.Long" resultType="com.cxyxiaomo.epp.pojo.User">
|
||||
<select id="getUserById" parameterType="java.lang.Long" resultType="com.cxyxiaomo.epp.common.pojo.User">
|
||||
SELECT * FROM user
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getUserList" resultType="com.cxyxiaomo.epp.pojo.User">
|
||||
SELECT * FROM user
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<insert id="addUser2">
|
||||
insert into user
|
||||
(username, name, password, role, stu_id) values
|
||||
(#{username},#{name},#{password},#{role},#{stu_id})
|
||||
</insert>
|
||||
<update id="updateImg">
|
||||
update user set img = #{img}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updPwd">
|
||||
update user set password = #{pwd2}
|
||||
where username = #{username}
|
||||
</update>
|
||||
<update id="updState">
|
||||
update user set state = #{date}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<select id="selectAll" resultType="com.cxyxiaomo.epp.pojo.User">
|
||||
select * from `user`
|
||||
</select>
|
||||
<select id="getUserByUsername" resultType="com.cxyxiaomo.epp.pojo.User">
|
||||
<select id="getUserByUsername" resultType="com.cxyxiaomo.epp.common.pojo.User">
|
||||
select * from user where username = #{username}
|
||||
</select>
|
||||
<select id="getUser" resultType="com.cxyxiaomo.epp.pojo.User">
|
||||
select * from user where username = #{username} and role_id = #{role}
|
||||
</select>
|
||||
<select id="redCodeList" resultType="com.cxyxiaomo.epp.pojo.User">
|
||||
select name,stu_id from user where TO_DAYS(NOW( )) != TO_DAYS(state) and role = 2
|
||||
</select>
|
||||
|
||||
<select id="redCodeList2" resultType="com.cxyxiaomo.epp.pojo.User">
|
||||
select name,stu_id from user where state = "1999-01-01"
|
||||
</select>
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user