保存进度!

This commit is contained in:
Kane 2023-01-10 23:32:19 +08:00
parent 9a82496769
commit 4ecbc2e630
2 changed files with 13 additions and 10 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-23 19:47:33 * @LastEditTime: 2023-01-10 20:49:35
* @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
* *
@ -25,15 +25,15 @@ import com.cpic.xim.myutils.account.CpicXIMStaffInfo;
import com.cpic.xim.myutils.account.LdapAccountCheck; import com.cpic.xim.myutils.account.LdapAccountCheck;
@Controller @Controller
@RequestMapping( path = "/account") @RequestMapping( path = "/account" )
@SuppressWarnings( "unused") @SuppressWarnings( "unused" )
public class P13AccountCheckController public class P13AccountCheckController
{ {
/***************************************************** /*****************************************************
* *
*****************************************************/ *****************************************************/
@ResponseBody @ResponseBody
@RequestMapping( path = "/p13_account_check.do") @RequestMapping( path = "/p13_account_check.do" )
public P13AccountCheckResult checkP13Account( @RequestBody P13AccountCheckRequest param, public P13AccountCheckResult checkP13Account( @RequestBody P13AccountCheckRequest param,
HttpServletRequest request, HttpServletResponse response ) HttpServletRequest request, HttpServletResponse response )
throws IllegalSelectorException, IOException throws IllegalSelectorException, IOException
@ -64,7 +64,7 @@ public class P13AccountCheckController
} }
// 查询结果是null说明没有查询到结果工号或p13账号不存在返回结果 // 查询结果是null说明没有查询到结果工号或p13账号不存在返回结果
if ( staff == null) if ( staff == null )
{ {
result.setMessage( "人员工号或P13账号不存在" ); result.setMessage( "人员工号或P13账号不存在" );
result.setSuccess( false ); result.setSuccess( false );
@ -73,7 +73,7 @@ public class P13AccountCheckController
} }
// 判断一下p13是否存在如果不存在就结束过程 // 判断一下p13是否存在如果不存在就结束过程
if ( staff.getP13UID().isEmpty() == true) if ( staff.getP13UID().isEmpty() == true )
{ {
result.setMessage( "P13账号不存在请联系信息技术部申请账号" ); result.setMessage( "P13账号不存在请联系信息技术部申请账号" );
result.setSuccess( false ); result.setSuccess( false );
@ -85,7 +85,7 @@ public class P13AccountCheckController
boolean ldapCheckResult = boolean ldapCheckResult =
LdapAccountCheck.ldapLogin( staff.getP13UID(), param.getPassword() ); LdapAccountCheck.ldapLogin( staff.getP13UID(), param.getPassword() );
if ( ldapCheckResult == true) if ( ldapCheckResult == true )
{ {
result.setSuccess( true ); result.setSuccess( true );
result.setMessage( "验证成功!" ); result.setMessage( "验证成功!" );
@ -95,12 +95,15 @@ public class P13AccountCheckController
HttpSession session = request.getSession(); HttpSession session = request.getSession();
session.setAttribute( "staff_info", staff ); session.setAttribute( "staff_info", staff );
} else }
else
{ {
result.setSuccess( false ); result.setSuccess( false );
result.setMessage( "密码错误!" ); result.setMessage( "密码错误!" );
} }
result.setToken( param.getP13Account() );
return result; return result;
} }
} }

View File

@ -3,7 +3,7 @@
* @Author: Kane * @Author: Kane
* @Date: 2022-12-14 15:23:54 * @Date: 2022-12-14 15:23:54
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2022-12-26 16:50:02 * @LastEditTime: 2023-01-10 21:12:02
* @FilePath: \admin_system\src\views\account\Login.vue * @FilePath: \admin_system\src\views\account\Login.vue
* @Description: * @Description:
* *
@ -99,7 +99,7 @@ export default {
const userInfo = { const userInfo = {
p13account: "588", p13account: "588",
password: "Kane@19831", password: "Kane@1983",
}; };
Login(userInfo) Login(userInfo)