getSystemUserLoginInfo.jsp
1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<%--
Created by IntelliJ IDEA.
User: zhaiyaqi
Date: 2020/3/15
Time: 7:34 PM
To change this template use File | Settings | File Templates.
--%>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="org.apache.commons.logging.Log" %>
<%@ page import="org.apache.commons.logging.LogFactory" %>
<%@ page import="weaver.hrm.HrmUserVarify" %>
<%@ page import="weaver.hrm.User" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="com.cntytz.HttpUtils" %>
<%@ page import="org.springframework.web.servlet.ModelAndView" %>
<%@ page import="org.springframework.web.servlet.view.RedirectView" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
response.setContentType("application/json;charset=utf-8");
out.clear();
JSONObject result = new JSONObject(true);
writeLog("【开始调用test ------ user接口】:");
String userId = request.getParameter("userId");
writeLog("【============== ------ useruseruseruser】:"+userId);
if ("" == userId || null == userId){
User user = HrmUserVarify.getUser(request,response);
String loginid = user.getLoginid();
result.put("loginName",loginid);
out.print(result.toJSONString());
}else{
RecordSet rs = new RecordSet();
String sql= "";
sql = "select LOGINID as userLoginName from hrmresource where ID = '"+userId+"'";
writeLog(sql);
rs.execute(sql);
rs.next();
String userLoginName = rs.getString("userLoginName");
writeLog("userLoginName+{}"+userLoginName);
result.put("loginName",userLoginName);
out.print(result.toJSONString());
}
%>
<%!
private void writeLog(Object o) {
Log var3 = LogFactory.getLog(this.getClass().getName());
if(o instanceof Exception) {
var3.info(this.getClass().getName(), (Exception)o);
} else {
var3.info(o);
}
}
%>