mirror of
https://github.com/FreeeBird/hotel.git
synced 2025-09-14 11:19:45 +08:00
test
This commit is contained in:
@@ -23,7 +23,7 @@ public class AdminController {
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/login")
|
||||
public int Login(String userName, String password){
|
||||
public int login(String userName, String password){
|
||||
Admin admin = new Admin();
|
||||
admin.setUserName(userName);
|
||||
admin.setPassword(password);
|
||||
@@ -47,6 +47,12 @@ public class AdminController {
|
||||
return adminService.register(admin);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新资料
|
||||
* @param userName
|
||||
* @param password
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/updateProfile")
|
||||
public int updateProfile(String userName, String password){
|
||||
Admin admin = new Admin();
|
||||
|
@@ -15,7 +15,7 @@ public interface AdminMapper {
|
||||
int updateByPrimaryKeySelective(Admin record);
|
||||
int updateByPrimaryKey(Admin record);
|
||||
Admin selectByUserName(String userName);
|
||||
Admin selectByUserNameAndPassword(Admin admin);
|
||||
Admin selectByUserNameAndPassword(Admin record);
|
||||
int updateByUserNameSelective(Admin record);
|
||||
List<Admin> findAll();
|
||||
}
|
@@ -86,7 +86,7 @@
|
||||
select * from admin
|
||||
where user_name = #{userName,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<select id="selectByUserNameAndPassword" parameterType="cn.mafangui.hotel.entity.Admin">
|
||||
<select id="selectByUserNameAndPassword" parameterType="cn.mafangui.hotel.entity.Admin" resultMap="BaseResultMap">
|
||||
select * from admin
|
||||
where user_name = #{userName,jdbcType=VARCHAR} and password = #{password,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
Reference in New Issue
Block a user