保存进度!

This commit is contained in:
Kane Wang 2022-12-16 22:07:53 +08:00
parent 3279363409
commit 6b0879721f
2 changed files with 25 additions and 5 deletions

View File

@ -2,7 +2,7 @@
* @Author: Kane * @Author: Kane
* @Date: 2022-12-15 11:11:21 * @Date: 2022-12-15 11:11:21
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2022-12-16 21:38:32 * @LastEditTime: 2022-12-16 22:02:03
* @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckController.java * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckController.java
* @Description: P13账号验证用Controller * @Description: P13账号验证用Controller
* *
@ -51,18 +51,24 @@ public class P13AccountCheckController
} }
catch ( SQLException error ) catch ( SQLException error )
{ {
staff = null;
result.setMessage( "人员工号或P13账号不存在" ); result.setMessage( "人员工号或P13账号不存在" );
result.setSuccess( false ); result.setSuccess( false );
} }
catch ( ClassNotFoundException error ) catch ( ClassNotFoundException error )
{ {
staff = null;
result.setMessage( "加载Oracle驱动失败" ); result.setMessage( "加载Oracle驱动失败" );
result.setSuccess( false ); result.setSuccess( false );
} }
// 查询结果是null说明工号或p13账号不存在返回结果 // 查询结果是null说明没有查询到结果工号或p13账号不存在返回结果
if ( staff == null) if ( staff == null)
{ {
result.setMessage( "人员工号或P13账号不存在" );
result.setSuccess( false );
return result; return result;
} }
@ -83,6 +89,7 @@ public class P13AccountCheckController
{ {
result.setSuccess( true ); result.setSuccess( true );
result.setMessage( "验证成功!" ); result.setMessage( "验证成功!" );
result.setStaffInfo( staff );
// 将获取到的人员信息保存到会话中 // 将获取到的人员信息保存到会话中
HttpSession session = request.getSession(); HttpSession session = request.getSession();
@ -91,7 +98,7 @@ public class P13AccountCheckController
} else } else
{ {
result.setSuccess( false ); result.setSuccess( false );
result.setMessage( "验证失败" ); result.setMessage( "验证失败,密码错误" );
} }
return result; return result;

View File

@ -2,8 +2,8 @@
* @Author: Kane * @Author: Kane
* @Date: 2022-12-15 11:17:26 * @Date: 2022-12-15 11:17:26
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2022-12-15 11:17:38 * @LastEditTime: 2022-12-16 21:53:30
* @FilePath: \AdminSys\src\main\java\com\cpicxim\web\controllers\account\CheckResult.java * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckResult.java
* @Description: * @Description:
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
@ -11,6 +11,7 @@
package com.cpic.xim.web.controllers.account; package com.cpic.xim.web.controllers.account;
import com.cpic.xim.myutils.account.CpicXIMStaffInfo;
import com.fasterxml.jackson.annotation.*;; import com.fasterxml.jackson.annotation.*;;
public class P13AccountCheckResult public class P13AccountCheckResult
@ -38,6 +39,15 @@ public class P13AccountCheckResult
this.message = message; this.message = message;
} }
public CpicXIMStaffInfo getStaffInfo()
{
return staffInfo;
}
public void setStaffInfo( CpicXIMStaffInfo staffInfo )
{
this.staffInfo = staffInfo;
}
@Override @Override
public int hashCode() public int hashCode()
@ -75,4 +85,7 @@ public class P13AccountCheckResult
@JsonProperty( "message") @JsonProperty( "message")
private String message; private String message;
@JsonProperty( "staff_info")
CpicXIMStaffInfo staffInfo;
} }