Bladeren bron

日志功能改造

fanxw 5 jaren geleden
bovenliggende
commit
af6c4eafcc
20 gewijzigde bestanden met toevoegingen van 4913 en 446 verwijderingen
  1. 5 0
      pom.xml
  2. 2 0
      src/main/java/com/chinaitop/depot/DepotSystemApplication.java
  3. 0 27
      src/main/java/com/chinaitop/depot/InterceptorConfig.java
  4. 0 372
      src/main/java/com/chinaitop/depot/LogercostInterceptor.java
  5. 12 42
      src/main/java/com/chinaitop/depot/system/controller/SystemLogController.java
  6. 31 0
      src/main/java/com/chinaitop/depot/system/controller/UserInfoController.java
  7. 20 0
      src/main/java/com/chinaitop/depot/system/feignService/BasicFeignService.java
  8. 22 0
      src/main/java/com/chinaitop/depot/system/feignService/SystemFeignService.java
  9. 7 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogMapper.java
  10. 25 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogMapper.xml
  11. 22 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogThreeMapper.java
  12. 365 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogThreeMapper.xml
  13. 22 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogTwoMapper.java
  14. 365 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogTwoMapper.xml
  15. 383 0
      src/main/java/com/chinaitop/depot/system/model/SystemLogThree.java
  16. 1619 0
      src/main/java/com/chinaitop/depot/system/model/SystemLogThreeExample.java
  17. 383 0
      src/main/java/com/chinaitop/depot/system/model/SystemLogTwo.java
  18. 1619 0
      src/main/java/com/chinaitop/depot/system/model/SystemLogTwoExample.java
  19. 3 2
      src/main/java/com/chinaitop/depot/system/service/UserOperationlogService.java
  20. 8 3
      src/main/java/com/chinaitop/depot/system/service/impl/UserOperationlogServiceImpl.java

+ 5 - 0
pom.xml

@@ -131,6 +131,11 @@
131 131
 		    <!-- 注意版本.这里我使用的是1.3.2 -->
132 132
 		    <version>1.3.2</version>
133 133
 		</dependency>
134
+		<!-- feign -->
135
+		<dependency>
136
+			<groupId>org.springframework.cloud</groupId>
137
+			<artifactId>spring-cloud-starter-openfeign</artifactId>
138
+		</dependency>
134 139
     </dependencies>
135 140
 
136 141
     <dependencyManagement>

+ 2 - 0
src/main/java/com/chinaitop/depot/DepotSystemApplication.java

@@ -5,10 +5,12 @@ import org.springframework.boot.SpringApplication;
5 5
 import org.springframework.boot.autoconfigure.SpringBootApplication;
6 6
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
7 7
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
8
+import org.springframework.cloud.openfeign.EnableFeignClients;
8 9
 
9 10
 @EnableEurekaClient
10 11
 @EnableDiscoveryClient
11 12
 @SpringBootApplication
13
+@EnableFeignClients
12 14
 @MapperScan(basePackages = {"com.chinaitop.depot.system.mapper"})
13 15
 public class DepotSystemApplication {
14 16
 

+ 0 - 27
src/main/java/com/chinaitop/depot/InterceptorConfig.java

@@ -1,27 +0,0 @@
1
-package com.chinaitop.depot;
2
-
3
-import org.springframework.context.annotation.Bean;
4
-import org.springframework.context.annotation.Configuration;
5
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
6
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
7
-
8
-@Configuration
9
-public class InterceptorConfig extends WebMvcConfigurationSupport {
10
-
11
-	@Bean
12
-	public LogercostInterceptor getInterceptor() {
13
-		return new LogercostInterceptor();
14
-	}
15
-	/**
16
-     * interceptor配置
17
-     */
18
-    @Override
19
-    public void addInterceptors(InterceptorRegistry registry) {
20
-
21
-    	//添加需要验证登录用户操作权限的请求
22
-        registry.addInterceptor(getInterceptor()).addPathPatterns("/**");
23
-
24
-        //这里可以用registry.addInterceptor添加多个拦截器实例,后面加上匹配模式
25
-        //super.addInterceptors(registry);//最后将register往这里塞进去就可以了
26
-    }
27
-}

+ 0 - 372
src/main/java/com/chinaitop/depot/LogercostInterceptor.java

@@ -1,372 +0,0 @@
1
-package com.chinaitop.depot;
2
-
3
-import java.io.IOException;
4
-import java.util.Date;
5
-import java.util.HashMap;
6
-import java.util.Iterator;
7
-import java.util.List;
8
-import java.util.Map;
9
-import java.util.Set;
10
-import java.util.UUID;
11
-
12
-import javax.servlet.http.HttpServletRequest;
13
-import javax.servlet.http.HttpServletResponse;
14
-
15
-import org.apache.commons.lang.ObjectUtils;
16
-import org.apache.http.HttpResponse;
17
-import org.apache.http.HttpStatus;
18
-import org.apache.http.client.HttpClient;
19
-import org.apache.http.client.methods.HttpGet;
20
-import org.apache.http.impl.client.DefaultHttpClient;
21
-import org.apache.http.util.EntityUtils;
22
-import org.springframework.beans.factory.annotation.Autowired;
23
-import org.springframework.lang.Nullable;
24
-import org.springframework.web.method.HandlerMethod;
25
-import org.springframework.web.servlet.HandlerInterceptor;
26
-import org.springframework.web.servlet.ModelAndView;
27
-
28
-import com.alibaba.fastjson.JSONArray;
29
-import com.alibaba.fastjson.JSONObject;
30
-import com.chinaitop.depot.system.mapper.SystemLogMapper;
31
-import com.chinaitop.depot.system.model.SystemLog;
32
-import com.chinaitop.depot.system.model.SystemLogExample;
33
-import com.chinaitop.depot.utils.RedisUtil;
34
-
35
-/**
36
- * 功能日志拦截器
37
- * 
38
- * @author fanxiongwei
39
- *
40
- */
41
-public class LogercostInterceptor implements HandlerInterceptor {
42
-
43
-	private static String system_index = "库级系统";
44
-
45
-	@Autowired
46
-	private RedisUtil redisUtil;
47
-	
48
-	@Autowired
49
-	private SystemLogMapper systemLogMapper;
50
-
51
-	/**
52
-     * preHandle是在请求执行前执行的
53
-     */
54
-    @Override
55
-    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
56
-
57
-    	//获取URL
58
-        String url = request.getRequestURI();
59
-    	//注销日志
60
-    	if ("/userInfo/exitLogin".equals(url)) {
61
-    		loginLogger(request, response, url);
62
-    	}
63
-
64
-        return true;//返回true,postHandler和afterCompletion方法才能执行,否则false为拒绝执行,起到拦截器控制作用
65
-    }
66
-
67
-    /**
68
-     * postHandler是在请求结束之后,视图渲染之前执行的,但只有preHandle方法返回true的时候才会执行
69
-     */
70
-    @Override
71
-    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, @Nullable ModelAndView modelAndView) throws Exception {
72
-    	//获取URL
73
-        String url = request.getRequestURI();
74
-        //获取用户信息和单位信息
75
-        String userJson = ObjectUtils.toString(request.getSession().getAttribute("userInfo"),"");
76
-        String orgInfoJson = ObjectUtils.toString(request.getSession().getAttribute("orgInfo"),"");
77
-        //登录日志
78
-    	if (("/userInfo/login".equals(url) || "/userInfo/exitLogin".equals(url))
79
-    			&& !"".equals(userJson) && !"".equals(orgInfoJson)
80
-    			&& null != userJson && null != orgInfoJson) {
81
-    		loginLogger(request, response, url);
82
-    	}
83
-    	//功能操作和访问日志
84
-    	if (!"/userInfo/login".equals(url) && !"/userInfo/exitLogin".equals(url)
85
-    			&& !"".equals(userJson) && !"".equals(orgInfoJson)
86
-    			&& null != userJson && null != orgInfoJson) {
87
-    		operationLogger(request, response, url, handler);
88
-    	}
89
-    }
90
-
91
-    /**
92
-     * 封装登录信息
93
-     * 
94
-     * @param userJson
95
-     * @param orgInfoJson
96
-     * @return
97
-     */
98
-    private Map<String, String> getUserOrgInfo(String userJson, String orgInfoJson) {
99
-    	Map<String, String> user_map = new HashMap<String, String>();
100
-    	JSONObject userinfo = JSONObject.parseObject(userJson);
101
-    	JSONObject orginfo = JSONObject.parseObject(orgInfoJson);
102
-    	user_map.put("userId", userinfo == null ? "" : userinfo.get("userId")+"");
103
-    	user_map.put("username", userinfo == null ? "" : userinfo.get("username")+"");
104
-    	user_map.put("realName", userinfo == null ? "" : userinfo.get("realName")+"");
105
-    	user_map.put("orgId", userinfo == null ? "" : userinfo.get("orgId")+"");
106
-    	user_map.put("roleName", userinfo == null ? "" : userinfo.get("roleNames")+"");
107
-    	user_map.put("areaCode", orginfo == null ? "":ObjectUtils.toString(orginfo.get("areaCode")+"",""));
108
-    	user_map.put("areaName", orginfo == null ? "":ObjectUtils.toString(orginfo.get("areaName")+"",""));
109
-    	user_map.put("orgName", orginfo == null ? "":ObjectUtils.toString(orginfo.get("orgName")+"",""));
110
-		return user_map;
111
-	}
112
-
113
-    /**
114
-     * 登录日志(包含登录与注销)
115
-     * @param request
116
-     * @param response
117
-     */
118
-    private void loginLogger(HttpServletRequest request, HttpServletResponse response, String url) {
119
-    	//获取用户信息和单位信息
120
-        String userJson = ObjectUtils.toString(request.getSession().getAttribute("userInfo"),"");
121
-        String orgInfoJson = ObjectUtils.toString(request.getSession().getAttribute("orgInfo"),"");
122
-    	//登录
123
-        if ("/userInfo/login".equals(url)) {
124
-	    	SystemLog log = new SystemLog();
125
-	    	Map<String, String> user_map = getUserOrgInfo(userJson, orgInfoJson);
126
-			log.setSystemIdentify(system_index);
127
-			log.setUserZh(ObjectUtils.toString(user_map.get("username"),""));//账号
128
-			log.setUserName(ObjectUtils.toString(user_map.get("realName"),""));//名称
129
-			String device_ip = getClientIpAddress(request);
130
-			log.setDeviceIp(device_ip);
131
-			log.setDlTime(new Date());
132
-			log.setUserRole(ObjectUtils.toString(user_map.get("roleName"),""));//角色
133
-			log.setOrgId(Integer.parseInt(user_map.get("orgId")));//单位
134
-			String enumid = ObjectUtils.toString(user_map.get("areaCode"), "0");
135
-			if (!"0".equals(enumid)) {
136
-				String httpurl = "http://localhost:9022/Enum/findByEnum?id="+Integer.parseInt(enumid);
137
-				String strResult = doGet(httpurl);
138
-				if (!"".equals(strResult)) {
139
-					JSONObject enum_obj = JSONObject.parseObject(strResult);
140
-					log.setUserAddress(ObjectUtils.toString(enum_obj.get("gbcode"), ""));//行政区划
141
-				}
142
-			}
143
-			log.setId(UUID.randomUUID().toString().replace("-", ""));
144
-			log.setUserId(Integer.parseInt(user_map.get("userId")));
145
-			log.setOperationTime(new Date());//操作时间
146
-			log.setType("1");
147
-
148
-			//添加保存日志
149
-			systemLogMapper.insert(log);
150
-    	}
151
-
152
-        //注销
153
-        if ("/userInfo/exitLogin".equals(url)) {
154
-        	if (null != userJson && null != orgInfoJson
155
-        			&& !"".equals(userJson) && !"".equals(orgInfoJson)) {
156
-        		Map<String, String> user_map = getUserOrgInfo(userJson, orgInfoJson);
157
-        		//修改条件
158
-        		SystemLogExample example = new SystemLogExample();
159
-        		SystemLogExample.Criteria criteria = example.createCriteria();
160
-        		criteria.andUserZhEqualTo(ObjectUtils.toString(user_map.get("username"),""));
161
-        		criteria.andOrgIdEqualTo(Integer.parseInt(user_map.get("orgId")));
162
-        		criteria.andTypeEqualTo("1");
163
-        		example.setOrderByClause(" dl_time desc");
164
-        		List<SystemLog> list = systemLogMapper.selectByExample(example);
165
-
166
-        		if (null != list && list.size() > 0) {
167
-        			//注销时间
168
-        			list.get(0).setZxTime(new Date());
169
-        			list.get(0).setOperationTime(new Date());//操作时间
170
-
171
-        			//修改登录日志信息
172
-        			systemLogMapper.updateByPrimaryKey(list.get(0));
173
-        		}
174
-        	}
175
-    		
176
-    	}
177
-    }
178
-    
179
-    /**
180
-     * get请求
181
-     * @return
182
-     */
183
-    public static String doGet(String url) {
184
-        try {
185
-            HttpClient client = new DefaultHttpClient();
186
-            //发送get请求
187
-            HttpGet request = new HttpGet(url);
188
-            HttpResponse response = client.execute(request);
189
-
190
-            /**请求发送成功,并得到响应**/
191
-            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
192
-                /**读取服务器返回过来的json字符串数据**/
193
-                String strResult = EntityUtils.toString(response.getEntity());
194
-
195
-                return strResult;
196
-            }
197
-        }
198
-        catch (IOException e) {
199
-            e.printStackTrace();
200
-        }
201
-
202
-        return null;
203
-    }
204
-    
205
-    /**
206
-     * 操作日志实现思路:
207
-     * 1、URL要是可以在菜单里面找到对应菜单,那么当前这个操作属于功能操作日志
208
-     * 2、如果没在菜单里面找到对应菜单,却在按钮中找到了,那么就是功能访问日志
209
-     * 3、如果菜单和按钮中都没有找到对应的URL,那么说明当前这个方位没在功能管理里面配置正确,或者没有加入到功能管理中
210
-     * 
211
-     * @param request
212
-     * @param response
213
-     * @param url
214
-     */
215
-    @SuppressWarnings("all")
216
-	private void operationLogger(HttpServletRequest request, HttpServletResponse response, String url, Object handler) {
217
-    	//获取用户信息和单位信息
218
-        String userJson = ObjectUtils.toString(request.getSession().getAttribute("userInfo"),"");
219
-        String orgInfoJson = ObjectUtils.toString(request.getSession().getAttribute("orgInfo"),"");
220
-        Map<String, String> user_map = getUserOrgInfo(userJson, orgInfoJson);
221
-
222
-        //是否还需要继续往下执行
223
-        boolean flag = false;
224
-
225
-    	//获取菜单权限并且组装功能日志
226
-    	String func_list = (String) redisUtil.get("hasFuncList");
227
-    	JSONArray array = JSONArray.parseArray(func_list);
228
-    	if (null != array && array.size() > 4) {
229
-    		JSONObject object = null;
230
-    		SystemLog log = new SystemLog();
231
-    		for (Iterator iterator = array.iterator(); iterator.hasNext();) {
232
-    			object = (JSONObject) iterator.next();
233
-    			String func_url = ObjectUtils.toString(object.get("funcUrl"));
234
-    			if (url.equals(func_url)) {
235
-    				log.setId(UUID.randomUUID().toString().replace("-", ""));
236
-    				log.setType("3");//功能访问日志
237
-    				log.setSystemIdentify(system_index);//标识
238
-    				log.setUserId(Integer.parseInt(user_map.get("userId")));//用户ID
239
-    				log.setUserZh(ObjectUtils.toString(user_map.get("username"),""));//账号
240
-    				log.setUserName(ObjectUtils.toString(user_map.get("realName"),""));//名称
241
-    				String device_ip = getClientIpAddress(request);
242
-    				log.setDeviceIp(device_ip);//操作IP
243
-    				log.setFuncId(Integer.parseInt(object.get("funcId").toString()));//功能ID
244
-    				log.setFuncName(ObjectUtils.toString(object.get("funcName")));//功能名称
245
-    				log.setOperationTime(new Date());//操作时间
246
-    				log.setUserRole(ObjectUtils.toString(user_map.get("roleName"),""));//角色
247
-    				log.setOrgId(Integer.parseInt(user_map.get("orgId")));//单位
248
-    				
249
-    				String enumid = ObjectUtils.toString(user_map.get("areaCode"), "0");
250
-    				if (!"0".equals(enumid)) {
251
-    					String httpurl = "http://localhost:9022/Enum/findByEnum?id="+Integer.parseInt(enumid);
252
-    					String strResult = doGet(httpurl);
253
-    					if (!"".equals(strResult)) {
254
-    						JSONObject enum_obj = JSONObject.parseObject(strResult);
255
-    						log.setUserAddress(ObjectUtils.toString(enum_obj.get("gbcode"), ""));//行政区划
256
-    					}
257
-    				}
258
-
259
-    				//添加保存日志
260
-    				systemLogMapper.insert(log);
261
-
262
-    				//已经是操作日志了,那么没必要在遍历按钮了
263
-    				flag = true;
264
-    				//也不用继续当前循环了
265
-    				break;
266
-    			}
267
-    		}
268
-    	}
269
-        //获取按钮权限并且组装访问日志
270
-    	if (!flag) {
271
-    		String perm_list = (String) redisUtil.get("permissionList");
272
-    		JSONArray but_array = JSONArray.parseArray(perm_list);
273
-        	if (null != but_array && but_array.size() > 4) {
274
-        		JSONObject but_object = null;
275
-        		SystemLog log = new SystemLog();
276
-        		for (Iterator iterator = but_array.iterator(); iterator.hasNext();) {
277
-        			but_object = (JSONObject) iterator.next();
278
-        			if (but_object == null) {
279
-        				continue;
280
-        			}
281
-        			String but_url = ObjectUtils.toString(but_object.get("btnUrl"), "");
282
-        			if (url.equals(but_url)) {
283
-        				log.setId(UUID.randomUUID().toString().replace("-", ""));
284
-        				log.setType("2");//功能操作日志
285
-        				log.setSystemIdentify(system_index);//标识
286
-        				log.setUserId(Integer.parseInt(user_map.get("userId")));//用户ID
287
-        				log.setUserZh(ObjectUtils.toString(user_map.get("username"),""));//账号
288
-        				log.setUserName(ObjectUtils.toString(user_map.get("realName"),""));//名称
289
-        				String device_ip = getClientIpAddress(request);
290
-        				log.setDeviceIp(device_ip);//操作IP
291
-        				String f_name = ObjectUtils.toString(but_object.get("funcName"), "");
292
-        				String b_name = ObjectUtils.toString(but_object.get("btnName"), "");
293
-        				String ramark = ObjectUtils.toString(but_object.get("remark"), "");
294
-        				StringBuffer sbf = new StringBuffer();
295
-        				if (!"".equals(ramark)) {
296
-        					sbf.append(f_name).append("功能").append(ramark).append("操作");
297
-        				} else {
298
-        					sbf.append(f_name).append("功能").append(b_name).append("操作");
299
-        				}
300
-        				log.setFuncId(Integer.parseInt(but_object.get("funcId").toString()));//功能ID
301
-        				log.setFuncName(ObjectUtils.toString(sbf.toString(), ""));//菜单名称
302
-        				HandlerMethod h = (HandlerMethod) handler;  
303
-        				log.setMethodName(h.getMethod().getName());//方法名
304
-        				log.setBtnId(Integer.parseInt(but_object.get("btnId").toString()));//按钮ID
305
-        				log.setUserRole(ObjectUtils.toString(user_map.get("roleName"),""));//角色
306
-        				log.setOperationTime(new Date());//操作时间
307
-        				StringBuilder param = new StringBuilder();
308
-                        Map<String,String[]> map = request.getParameterMap();
309
-                        Set<String> key = map.keySet();
310
-                        for (String eachKey: key) {
311
-                            param.append(eachKey+"="+map.get(eachKey)[0]+"; ");
312
-                        }
313
-        				log.setParameter(param.toString());//传入参数
314
-
315
-        				String status = ObjectUtils.toString(response.getStatus(), "");
316
-        				log.setOperResult(status);//操作结果状态
317
-        				if ("200".equals(status)) {
318
-        					log.setRtnParam("请求成功");//返回参数
319
-        				} else {
320
-        					log.setRtnParam("请求失败");//返回参数
321
-        				}
322
-        				log.setOrgId(Integer.parseInt(user_map.get("orgId")));//所属机构
323
-        				String enumid = ObjectUtils.toString(user_map.get("areaCode"), "0");
324
-        				if (!"0".equals(enumid)) {
325
-        					String httpurl = "http://localhost:9022/Enum/findByEnum?id="+Integer.parseInt(enumid);
326
-        					String strResult = doGet(httpurl);
327
-        					if (!"".equals(strResult)) {
328
-        						JSONObject enum_obj = JSONObject.parseObject(strResult);
329
-        						log.setUserAddress(ObjectUtils.toString(enum_obj.get("gbcode"), ""));//行政区划
330
-        					}
331
-        				}
332
-
333
-        				//添加保存日志
334
-        				systemLogMapper.insert(log);
335
-
336
-        				//中断本次循环
337
-        				break;
338
-        			}
339
-        		}
340
-        	}
341
-    	}
342
-    }
343
-
344
-	/**
345
-     * afterCompletion是视图渲染完成之后才执行,同样需要preHandle返回true,
346
-     */
347
-    @Override
348
-    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, @Nullable Exception ex) throws Exception {
349
-        //该方法通常用于清理资源等工作
350
-    }
351
-
352
-    /**
353
-     * 获取客户端IP
354
-     * 
355
-     * @param request
356
-     * @return
357
-     */
358
-    private String getClientIpAddress(HttpServletRequest request) {  
359
-        String clientIp = request.getHeader("x-forwarded-for");  
360
-        if(clientIp == null || clientIp.length() == 0 || "unknown".equalsIgnoreCase(clientIp)) {  
361
-            clientIp = request.getHeader("Proxy-Client-IP");  
362
-        }  
363
-        if(clientIp == null || clientIp.length() == 0 || "unknown".equalsIgnoreCase(clientIp)) {  
364
-            clientIp = request.getHeader("WL-Proxy-Client-IP");  
365
-        }  
366
-        if(clientIp == null || clientIp.length() == 0 || "unknown".equalsIgnoreCase(clientIp)) {  
367
-            clientIp = request.getRemoteAddr();  
368
-        }  
369
-        return "0:0:0:0:0:0:0:1".equals(clientIp) ? "127.0.0.1" : clientIp;  
370
-    }
371
-
372
-}

+ 12 - 42
src/main/java/com/chinaitop/depot/system/controller/SystemLogController.java

@@ -1,6 +1,5 @@
1 1
 package com.chinaitop.depot.system.controller;
2 2
 
3
-import java.io.IOException;
4 3
 import java.util.Date;
5 4
 import java.util.HashMap;
6 5
 import java.util.List;
@@ -11,19 +10,15 @@ import javax.annotation.Resource;
11 10
 import javax.servlet.http.HttpServletRequest;
12 11
 
13 12
 import org.apache.commons.lang.ObjectUtils;
14
-import org.apache.http.HttpResponse;
15
-import org.apache.http.HttpStatus;
16
-import org.apache.http.client.HttpClient;
17
-import org.apache.http.client.methods.HttpGet;
18
-import org.apache.http.impl.client.DefaultHttpClient;
19
-import org.apache.http.util.EntityUtils;
20 13
 import org.springframework.web.bind.annotation.RequestMapping;
21 14
 import org.springframework.web.bind.annotation.RequestMethod;
22 15
 import org.springframework.web.bind.annotation.RestController;
23 16
 
24 17
 import com.alibaba.fastjson.JSONObject;
18
+import com.chinaitop.depot.system.feignService.BasicFeignService;
25 19
 import com.chinaitop.depot.system.model.SystemLog;
26 20
 import com.chinaitop.depot.system.model.SystemLogExample;
21
+import com.chinaitop.depot.system.model.SystemLogTwo;
27 22
 import com.chinaitop.depot.system.service.UserOperationlogService;
28 23
 import com.github.pagehelper.PageHelper;
29 24
 import com.github.pagehelper.PageInfo;
@@ -46,6 +41,9 @@ public class SystemLogController {
46 41
 	@Resource
47 42
 	private UserOperationlogService userOperationlogService;
48 43
 
44
+	@Resource
45
+	private BasicFeignService basicFeignService;
46
+
49 47
 	/**
50 48
 	 * 查找日志信息
51 49
 	 * @param pageNum	页码
@@ -61,7 +59,7 @@ public class SystemLogController {
61 59
 	})
62 60
 	public PageInfo<SystemLog> getSystemLog(HttpServletRequest request, Integer pageNum, 
63 61
 			Integer pageSize, String username) {
64
-		
62
+
65 63
 		if (pageNum!=null && pageSize!=null) {
66 64
 			PageHelper.startPage(pageNum, pageSize);
67 65
 		}
@@ -110,7 +108,7 @@ public class SystemLogController {
110 108
         	JSONObject userinfo = JSONObject.parseObject(userJson);
111 109
         	JSONObject orginfo = JSONObject.parseObject(orgInfoJson);
112 110
 
113
-        	SystemLog log = new SystemLog();
111
+        	SystemLogTwo log = new SystemLogTwo();
114 112
         	log.setId(UUID.randomUUID().toString().replace("-", ""));
115 113
         	log.setType("3");//功能访问日志
116 114
         	log.setSystemIdentify("库级系统");//标识
@@ -127,12 +125,11 @@ public class SystemLogController {
127 125
 
128 126
         	String enumid = ObjectUtils.toString(orginfo.get("areaCode"), "0");
129 127
         	if (!"0".equals(enumid)) {
130
-        		String httpurl = "http://localhost:9022/Enum/findByEnum?id="+Integer.parseInt(enumid);
131
-        		String strResult = doGet(httpurl);
132
-        		if (!"".equals(strResult)) {
133
-        			JSONObject enum_obj = JSONObject.parseObject(strResult);
134
-        			log.setUserAddress(ObjectUtils.toString(enum_obj.get("gbcode"), ""));//行政区划
135
-        		}
128
+        		String strResult = basicFeignService.getEnumData(Integer.parseInt(enumid));
129
+				if (null != strResult && !"".equals(strResult)) {
130
+					JSONObject enum_obj = JSONObject.parseObject(strResult);
131
+					log.setUserAddress(ObjectUtils.toString(enum_obj.get("gbcode"), ""));//行政区划
132
+				}
136 133
         	}
137 134
 
138 135
         	//添加保存日志
@@ -162,31 +159,4 @@ public class SystemLogController {
162 159
         return "0:0:0:0:0:0:0:1".equals(clientIp) ? "127.0.0.1" : clientIp;  
163 160
     }
164 161
 
165
-    /**
166
-     * get请求
167
-     * @return
168
-     */
169
-    @SuppressWarnings("deprecation")
170
-	public static String doGet(String url) {
171
-        try {
172
-            HttpClient client = new DefaultHttpClient();
173
-            //发送get请求
174
-            HttpGet request = new HttpGet(url);
175
-            HttpResponse response = client.execute(request);
176
-
177
-            /**请求发送成功,并得到响应**/
178
-            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
179
-                /**读取服务器返回过来的json字符串数据**/
180
-                String strResult = EntityUtils.toString(response.getEntity());
181
-
182
-                return strResult;
183
-            }
184
-        }
185
-        catch (IOException e) {
186
-            e.printStackTrace();
187
-        }
188
-
189
-        return null;
190
-    }
191
-
192 162
 }

+ 31 - 0
src/main/java/com/chinaitop/depot/system/controller/UserInfoController.java

@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
24 24
 import org.springframework.web.bind.annotation.RequestMethod;
25 25
 import org.springframework.web.bind.annotation.RestController;
26 26
 
27
+import com.alibaba.fastjson.JSONObject;
27 28
 import com.chinaitop.depot.system.model.OrgInfo;
28 29
 import com.chinaitop.depot.system.model.TUrlConfig;
29 30
 import com.chinaitop.depot.system.model.UserInfo;
@@ -813,4 +814,34 @@ public class UserInfoController {
813 814
 		}
814 815
 		return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
815 816
 	}
817
+
818
+	@RequestMapping(value="/getUserData", method = RequestMethod.GET)
819
+	@ApiOperation(value="查询一个用户信息和角色", notes = "查询一个用户信息和角色")
820
+	@ApiImplicitParams({
821
+			@ApiImplicitParam(name = "username", value = "用户名", paramType = "query"),
822
+			@ApiImplicitParam(name = "password", value = "密码", paramType = "query")
823
+	})
824
+	public Map<String, Object> getUserData(String username, String password) {
825
+		Map<String, Object> map = new HashMap<String, Object>();
826
+		//查询用户
827
+		UserInfo userInfo = userInfoService.valid(username, password);
828
+		String user = "";
829
+		if (null != userInfo) {
830
+			user = JSONObject.toJSONString(userInfo);
831
+		} else {
832
+		}
833
+		map.put("user", user);
834
+		//查询单位
835
+		OrgInfo orgInfo = null;
836
+		String org = "";
837
+		if (null != userInfo) {
838
+			int orgId = userInfo.getOrgId();
839
+			orgInfo = orgInfoService.findById(orgId);
840
+			if (null != orgInfo) {
841
+				org = JSONObject.toJSONString(orgInfo);
842
+			}
843
+		} 
844
+		map.put("org", org);
845
+		return map;
846
+	}
816 847
 }

+ 20 - 0
src/main/java/com/chinaitop/depot/system/feignService/BasicFeignService.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.system.feignService;
2
+
3
+import org.springframework.cloud.openfeign.FeignClient;
4
+import org.springframework.http.MediaType;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RequestMethod;
7
+import org.springframework.web.bind.annotation.RequestParam;
8
+
9
+@FeignClient(value = "depot-basic")
10
+public interface BasicFeignService {
11
+
12
+	/**
13
+	 * 获取一条字典数据
14
+	 * @param username
15
+	 * @param password
16
+	 * @return
17
+	 */
18
+	@RequestMapping(value = "/Enum/findByEnum", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
19
+	String getEnumData(@RequestParam("id") Integer id);
20
+}

+ 22 - 0
src/main/java/com/chinaitop/depot/system/feignService/SystemFeignService.java

@@ -0,0 +1,22 @@
1
+package com.chinaitop.depot.system.feignService;
2
+
3
+import java.util.Map;
4
+
5
+import org.springframework.cloud.openfeign.FeignClient;
6
+import org.springframework.http.MediaType;
7
+import org.springframework.web.bind.annotation.RequestMapping;
8
+import org.springframework.web.bind.annotation.RequestMethod;
9
+import org.springframework.web.bind.annotation.RequestParam;
10
+
11
+@FeignClient(value = "depot-system")
12
+public interface SystemFeignService {
13
+
14
+	/**
15
+	 * 获取登录人和登录人的单位信息
16
+	 * @param username
17
+	 * @param password
18
+	 * @return
19
+	 */
20
+	@RequestMapping(value = "/userInfo/getUserData", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
21
+	Map<String, Object> getUserData(@RequestParam("username") String username, @RequestParam("password") String password);
22
+}

+ 7 - 0
src/main/java/com/chinaitop/depot/system/mapper/SystemLogMapper.java

@@ -27,4 +27,11 @@ public interface SystemLogMapper {
27 27
     int updateByPrimaryKeySelective(SystemLog record);
28 28
 
29 29
     int updateByPrimaryKey(SystemLog record);
30
+
31
+    /**
32
+     * 查询三个日志表中数据
33
+     * @param example
34
+     * @return
35
+     */
36
+    List<SystemLog> queryAllLog(SystemLogExample example);
30 37
 }

+ 25 - 0
src/main/java/com/chinaitop/depot/system/mapper/SystemLogMapper.xml

@@ -462,4 +462,29 @@
462 462
       operation_time = #{operationTime,jdbcType=TIMESTAMP}
463 463
     where id = #{id,jdbcType=VARCHAR}
464 464
   </update>
465
+
466
+  <!-- 查询三张日志表集合 -->
467
+  <select id="queryAllLog" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.system.model.SystemLogExample">
468
+  	select
469
+    <include refid="Base_Column_List" />
470
+    from (
471
+	SELECT * FROM system_log
472
+	<if test="_parameter != null" >
473
+      <include refid="Example_Where_Clause" />
474
+    </if>
475
+	UNION ALL
476
+	SELECT * FROM system_log_two
477
+	<if test="_parameter != null" >
478
+      <include refid="Example_Where_Clause" />
479
+    </if>
480
+	UNION ALL
481
+	SELECT * FROM system_log_three
482
+	<if test="_parameter != null" >
483
+      <include refid="Example_Where_Clause" />
484
+    </if>
485
+	) system_log
486
+    <if test="orderByClause != null" >
487
+      order by ${orderByClause}
488
+    </if>
489
+  </select>
465 490
 </mapper>

+ 22 - 0
src/main/java/com/chinaitop/depot/system/mapper/SystemLogThreeMapper.java

@@ -0,0 +1,22 @@
1
+package com.chinaitop.depot.system.mapper;
2
+
3
+import com.chinaitop.depot.system.model.SystemLogThree;
4
+import com.chinaitop.depot.system.model.SystemLogThreeExample;
5
+import java.util.List;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+public interface SystemLogThreeMapper {
9
+    int countByExample(SystemLogThreeExample example);
10
+
11
+    int deleteByExample(SystemLogThreeExample example);
12
+
13
+    int insert(SystemLogThree record);
14
+
15
+    int insertSelective(SystemLogThree record);
16
+
17
+    List<SystemLogThree> selectByExample(SystemLogThreeExample example);
18
+
19
+    int updateByExampleSelective(@Param("record") SystemLogThree record, @Param("example") SystemLogThreeExample example);
20
+
21
+    int updateByExample(@Param("record") SystemLogThree record, @Param("example") SystemLogThreeExample example);
22
+}

+ 365 - 0
src/main/java/com/chinaitop/depot/system/mapper/SystemLogThreeMapper.xml

@@ -0,0 +1,365 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.system.mapper.SystemLogThreeMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.system.model.SystemLogThree" >
5
+    <result column="id" property="id" jdbcType="VARCHAR" />
6
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
7
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
8
+    <result column="user_zh" property="userZh" jdbcType="VARCHAR" />
9
+    <result column="user_name" property="userName" jdbcType="VARCHAR" />
10
+    <result column="user_role" property="userRole" jdbcType="VARCHAR" />
11
+    <result column="user_address" property="userAddress" jdbcType="VARCHAR" />
12
+    <result column="dl_time" property="dlTime" jdbcType="TIMESTAMP" />
13
+    <result column="zx_time" property="zxTime" jdbcType="TIMESTAMP" />
14
+    <result column="func_id" property="funcId" jdbcType="INTEGER" />
15
+    <result column="func_name" property="funcName" jdbcType="VARCHAR" />
16
+    <result column="btn_id" property="btnId" jdbcType="INTEGER" />
17
+    <result column="method_name" property="methodName" jdbcType="VARCHAR" />
18
+    <result column="oper_result" property="operResult" jdbcType="VARCHAR" />
19
+    <result column="parameter" property="parameter" jdbcType="VARCHAR" />
20
+    <result column="rtn_param" property="rtnParam" jdbcType="VARCHAR" />
21
+    <result column="describes" property="describes" jdbcType="VARCHAR" />
22
+    <result column="type" property="type" jdbcType="VARCHAR" />
23
+    <result column="device_ip" property="deviceIp" jdbcType="VARCHAR" />
24
+    <result column="system_identify" property="systemIdentify" jdbcType="VARCHAR" />
25
+    <result column="operation_time" property="operationTime" jdbcType="TIMESTAMP" />
26
+  </resultMap>
27
+  <sql id="Example_Where_Clause" >
28
+    <where >
29
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
30
+        <if test="criteria.valid" >
31
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
32
+            <foreach collection="criteria.criteria" item="criterion" >
33
+              <choose >
34
+                <when test="criterion.noValue" >
35
+                  and ${criterion.condition}
36
+                </when>
37
+                <when test="criterion.singleValue" >
38
+                  and ${criterion.condition} #{criterion.value}
39
+                </when>
40
+                <when test="criterion.betweenValue" >
41
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
42
+                </when>
43
+                <when test="criterion.listValue" >
44
+                  and ${criterion.condition}
45
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
46
+                    #{listItem}
47
+                  </foreach>
48
+                </when>
49
+              </choose>
50
+            </foreach>
51
+          </trim>
52
+        </if>
53
+      </foreach>
54
+    </where>
55
+  </sql>
56
+  <sql id="Update_By_Example_Where_Clause" >
57
+    <where >
58
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
59
+        <if test="criteria.valid" >
60
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
61
+            <foreach collection="criteria.criteria" item="criterion" >
62
+              <choose >
63
+                <when test="criterion.noValue" >
64
+                  and ${criterion.condition}
65
+                </when>
66
+                <when test="criterion.singleValue" >
67
+                  and ${criterion.condition} #{criterion.value}
68
+                </when>
69
+                <when test="criterion.betweenValue" >
70
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
71
+                </when>
72
+                <when test="criterion.listValue" >
73
+                  and ${criterion.condition}
74
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
75
+                    #{listItem}
76
+                  </foreach>
77
+                </when>
78
+              </choose>
79
+            </foreach>
80
+          </trim>
81
+        </if>
82
+      </foreach>
83
+    </where>
84
+  </sql>
85
+  <sql id="Base_Column_List" >
86
+    id, org_id, user_id, user_zh, user_name, user_role, user_address, dl_time, zx_time, 
87
+    func_id, func_name, btn_id, method_name, oper_result, parameter, rtn_param, describes, 
88
+    type, device_ip, system_identify, operation_time
89
+  </sql>
90
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.system.model.SystemLogThreeExample" >
91
+    select
92
+    <if test="distinct" >
93
+      distinct
94
+    </if>
95
+    <include refid="Base_Column_List" />
96
+    from system_log_three
97
+    <if test="_parameter != null" >
98
+      <include refid="Example_Where_Clause" />
99
+    </if>
100
+    <if test="orderByClause != null" >
101
+      order by ${orderByClause}
102
+    </if>
103
+  </select>
104
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.system.model.SystemLogThreeExample" >
105
+    delete from system_log_three
106
+    <if test="_parameter != null" >
107
+      <include refid="Example_Where_Clause" />
108
+    </if>
109
+  </delete>
110
+  <insert id="insert" parameterType="com.chinaitop.depot.system.model.SystemLogThree" >
111
+    insert into system_log_three (id, org_id, user_id, 
112
+      user_zh, user_name, user_role, 
113
+      user_address, dl_time, zx_time, 
114
+      func_id, func_name, btn_id, 
115
+      method_name, oper_result, parameter, 
116
+      rtn_param, describes, type, 
117
+      device_ip, system_identify, operation_time
118
+      )
119
+    values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, 
120
+      #{userZh,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userRole,jdbcType=VARCHAR}, 
121
+      #{userAddress,jdbcType=VARCHAR}, #{dlTime,jdbcType=TIMESTAMP}, #{zxTime,jdbcType=TIMESTAMP}, 
122
+      #{funcId,jdbcType=INTEGER}, #{funcName,jdbcType=VARCHAR}, #{btnId,jdbcType=INTEGER}, 
123
+      #{methodName,jdbcType=VARCHAR}, #{operResult,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR}, 
124
+      #{rtnParam,jdbcType=VARCHAR}, #{describes,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, 
125
+      #{deviceIp,jdbcType=VARCHAR}, #{systemIdentify,jdbcType=VARCHAR}, #{operationTime,jdbcType=TIMESTAMP}
126
+      )
127
+  </insert>
128
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.system.model.SystemLogThree" >
129
+    insert into system_log_three
130
+    <trim prefix="(" suffix=")" suffixOverrides="," >
131
+      <if test="id != null" >
132
+        id,
133
+      </if>
134
+      <if test="orgId != null" >
135
+        org_id,
136
+      </if>
137
+      <if test="userId != null" >
138
+        user_id,
139
+      </if>
140
+      <if test="userZh != null" >
141
+        user_zh,
142
+      </if>
143
+      <if test="userName != null" >
144
+        user_name,
145
+      </if>
146
+      <if test="userRole != null" >
147
+        user_role,
148
+      </if>
149
+      <if test="userAddress != null" >
150
+        user_address,
151
+      </if>
152
+      <if test="dlTime != null" >
153
+        dl_time,
154
+      </if>
155
+      <if test="zxTime != null" >
156
+        zx_time,
157
+      </if>
158
+      <if test="funcId != null" >
159
+        func_id,
160
+      </if>
161
+      <if test="funcName != null" >
162
+        func_name,
163
+      </if>
164
+      <if test="btnId != null" >
165
+        btn_id,
166
+      </if>
167
+      <if test="methodName != null" >
168
+        method_name,
169
+      </if>
170
+      <if test="operResult != null" >
171
+        oper_result,
172
+      </if>
173
+      <if test="parameter != null" >
174
+        parameter,
175
+      </if>
176
+      <if test="rtnParam != null" >
177
+        rtn_param,
178
+      </if>
179
+      <if test="describes != null" >
180
+        describes,
181
+      </if>
182
+      <if test="type != null" >
183
+        type,
184
+      </if>
185
+      <if test="deviceIp != null" >
186
+        device_ip,
187
+      </if>
188
+      <if test="systemIdentify != null" >
189
+        system_identify,
190
+      </if>
191
+      <if test="operationTime != null" >
192
+        operation_time,
193
+      </if>
194
+    </trim>
195
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
196
+      <if test="id != null" >
197
+        #{id,jdbcType=VARCHAR},
198
+      </if>
199
+      <if test="orgId != null" >
200
+        #{orgId,jdbcType=INTEGER},
201
+      </if>
202
+      <if test="userId != null" >
203
+        #{userId,jdbcType=INTEGER},
204
+      </if>
205
+      <if test="userZh != null" >
206
+        #{userZh,jdbcType=VARCHAR},
207
+      </if>
208
+      <if test="userName != null" >
209
+        #{userName,jdbcType=VARCHAR},
210
+      </if>
211
+      <if test="userRole != null" >
212
+        #{userRole,jdbcType=VARCHAR},
213
+      </if>
214
+      <if test="userAddress != null" >
215
+        #{userAddress,jdbcType=VARCHAR},
216
+      </if>
217
+      <if test="dlTime != null" >
218
+        #{dlTime,jdbcType=TIMESTAMP},
219
+      </if>
220
+      <if test="zxTime != null" >
221
+        #{zxTime,jdbcType=TIMESTAMP},
222
+      </if>
223
+      <if test="funcId != null" >
224
+        #{funcId,jdbcType=INTEGER},
225
+      </if>
226
+      <if test="funcName != null" >
227
+        #{funcName,jdbcType=VARCHAR},
228
+      </if>
229
+      <if test="btnId != null" >
230
+        #{btnId,jdbcType=INTEGER},
231
+      </if>
232
+      <if test="methodName != null" >
233
+        #{methodName,jdbcType=VARCHAR},
234
+      </if>
235
+      <if test="operResult != null" >
236
+        #{operResult,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="parameter != null" >
239
+        #{parameter,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="rtnParam != null" >
242
+        #{rtnParam,jdbcType=VARCHAR},
243
+      </if>
244
+      <if test="describes != null" >
245
+        #{describes,jdbcType=VARCHAR},
246
+      </if>
247
+      <if test="type != null" >
248
+        #{type,jdbcType=VARCHAR},
249
+      </if>
250
+      <if test="deviceIp != null" >
251
+        #{deviceIp,jdbcType=VARCHAR},
252
+      </if>
253
+      <if test="systemIdentify != null" >
254
+        #{systemIdentify,jdbcType=VARCHAR},
255
+      </if>
256
+      <if test="operationTime != null" >
257
+        #{operationTime,jdbcType=TIMESTAMP},
258
+      </if>
259
+    </trim>
260
+  </insert>
261
+  <select id="countByExample" parameterType="com.chinaitop.depot.system.model.SystemLogThreeExample" resultType="java.lang.Integer" >
262
+    select count(*) from system_log_three
263
+    <if test="_parameter != null" >
264
+      <include refid="Example_Where_Clause" />
265
+    </if>
266
+  </select>
267
+  <update id="updateByExampleSelective" parameterType="map" >
268
+    update system_log_three
269
+    <set >
270
+      <if test="record.id != null" >
271
+        id = #{record.id,jdbcType=VARCHAR},
272
+      </if>
273
+      <if test="record.orgId != null" >
274
+        org_id = #{record.orgId,jdbcType=INTEGER},
275
+      </if>
276
+      <if test="record.userId != null" >
277
+        user_id = #{record.userId,jdbcType=INTEGER},
278
+      </if>
279
+      <if test="record.userZh != null" >
280
+        user_zh = #{record.userZh,jdbcType=VARCHAR},
281
+      </if>
282
+      <if test="record.userName != null" >
283
+        user_name = #{record.userName,jdbcType=VARCHAR},
284
+      </if>
285
+      <if test="record.userRole != null" >
286
+        user_role = #{record.userRole,jdbcType=VARCHAR},
287
+      </if>
288
+      <if test="record.userAddress != null" >
289
+        user_address = #{record.userAddress,jdbcType=VARCHAR},
290
+      </if>
291
+      <if test="record.dlTime != null" >
292
+        dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
293
+      </if>
294
+      <if test="record.zxTime != null" >
295
+        zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
296
+      </if>
297
+      <if test="record.funcId != null" >
298
+        func_id = #{record.funcId,jdbcType=INTEGER},
299
+      </if>
300
+      <if test="record.funcName != null" >
301
+        func_name = #{record.funcName,jdbcType=VARCHAR},
302
+      </if>
303
+      <if test="record.btnId != null" >
304
+        btn_id = #{record.btnId,jdbcType=INTEGER},
305
+      </if>
306
+      <if test="record.methodName != null" >
307
+        method_name = #{record.methodName,jdbcType=VARCHAR},
308
+      </if>
309
+      <if test="record.operResult != null" >
310
+        oper_result = #{record.operResult,jdbcType=VARCHAR},
311
+      </if>
312
+      <if test="record.parameter != null" >
313
+        parameter = #{record.parameter,jdbcType=VARCHAR},
314
+      </if>
315
+      <if test="record.rtnParam != null" >
316
+        rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
317
+      </if>
318
+      <if test="record.describes != null" >
319
+        describes = #{record.describes,jdbcType=VARCHAR},
320
+      </if>
321
+      <if test="record.type != null" >
322
+        type = #{record.type,jdbcType=VARCHAR},
323
+      </if>
324
+      <if test="record.deviceIp != null" >
325
+        device_ip = #{record.deviceIp,jdbcType=VARCHAR},
326
+      </if>
327
+      <if test="record.systemIdentify != null" >
328
+        system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
329
+      </if>
330
+      <if test="record.operationTime != null" >
331
+        operation_time = #{record.operationTime,jdbcType=TIMESTAMP},
332
+      </if>
333
+    </set>
334
+    <if test="_parameter != null" >
335
+      <include refid="Update_By_Example_Where_Clause" />
336
+    </if>
337
+  </update>
338
+  <update id="updateByExample" parameterType="map" >
339
+    update system_log_three
340
+    set id = #{record.id,jdbcType=VARCHAR},
341
+      org_id = #{record.orgId,jdbcType=INTEGER},
342
+      user_id = #{record.userId,jdbcType=INTEGER},
343
+      user_zh = #{record.userZh,jdbcType=VARCHAR},
344
+      user_name = #{record.userName,jdbcType=VARCHAR},
345
+      user_role = #{record.userRole,jdbcType=VARCHAR},
346
+      user_address = #{record.userAddress,jdbcType=VARCHAR},
347
+      dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
348
+      zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
349
+      func_id = #{record.funcId,jdbcType=INTEGER},
350
+      func_name = #{record.funcName,jdbcType=VARCHAR},
351
+      btn_id = #{record.btnId,jdbcType=INTEGER},
352
+      method_name = #{record.methodName,jdbcType=VARCHAR},
353
+      oper_result = #{record.operResult,jdbcType=VARCHAR},
354
+      parameter = #{record.parameter,jdbcType=VARCHAR},
355
+      rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
356
+      describes = #{record.describes,jdbcType=VARCHAR},
357
+      type = #{record.type,jdbcType=VARCHAR},
358
+      device_ip = #{record.deviceIp,jdbcType=VARCHAR},
359
+      system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
360
+      operation_time = #{record.operationTime,jdbcType=TIMESTAMP}
361
+    <if test="_parameter != null" >
362
+      <include refid="Update_By_Example_Where_Clause" />
363
+    </if>
364
+  </update>
365
+</mapper>

+ 22 - 0
src/main/java/com/chinaitop/depot/system/mapper/SystemLogTwoMapper.java

@@ -0,0 +1,22 @@
1
+package com.chinaitop.depot.system.mapper;
2
+
3
+import com.chinaitop.depot.system.model.SystemLogTwo;
4
+import com.chinaitop.depot.system.model.SystemLogTwoExample;
5
+import java.util.List;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+public interface SystemLogTwoMapper {
9
+    int countByExample(SystemLogTwoExample example);
10
+
11
+    int deleteByExample(SystemLogTwoExample example);
12
+
13
+    int insert(SystemLogTwo record);
14
+
15
+    int insertSelective(SystemLogTwo record);
16
+
17
+    List<SystemLogTwo> selectByExample(SystemLogTwoExample example);
18
+
19
+    int updateByExampleSelective(@Param("record") SystemLogTwo record, @Param("example") SystemLogTwoExample example);
20
+
21
+    int updateByExample(@Param("record") SystemLogTwo record, @Param("example") SystemLogTwoExample example);
22
+}

+ 365 - 0
src/main/java/com/chinaitop/depot/system/mapper/SystemLogTwoMapper.xml

@@ -0,0 +1,365 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.system.mapper.SystemLogTwoMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.system.model.SystemLogTwo" >
5
+    <result column="id" property="id" jdbcType="VARCHAR" />
6
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
7
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
8
+    <result column="user_zh" property="userZh" jdbcType="VARCHAR" />
9
+    <result column="user_name" property="userName" jdbcType="VARCHAR" />
10
+    <result column="user_role" property="userRole" jdbcType="VARCHAR" />
11
+    <result column="user_address" property="userAddress" jdbcType="VARCHAR" />
12
+    <result column="dl_time" property="dlTime" jdbcType="TIMESTAMP" />
13
+    <result column="zx_time" property="zxTime" jdbcType="TIMESTAMP" />
14
+    <result column="func_id" property="funcId" jdbcType="INTEGER" />
15
+    <result column="func_name" property="funcName" jdbcType="VARCHAR" />
16
+    <result column="btn_id" property="btnId" jdbcType="INTEGER" />
17
+    <result column="method_name" property="methodName" jdbcType="VARCHAR" />
18
+    <result column="oper_result" property="operResult" jdbcType="VARCHAR" />
19
+    <result column="parameter" property="parameter" jdbcType="VARCHAR" />
20
+    <result column="rtn_param" property="rtnParam" jdbcType="VARCHAR" />
21
+    <result column="describes" property="describes" jdbcType="VARCHAR" />
22
+    <result column="type" property="type" jdbcType="VARCHAR" />
23
+    <result column="device_ip" property="deviceIp" jdbcType="VARCHAR" />
24
+    <result column="system_identify" property="systemIdentify" jdbcType="VARCHAR" />
25
+    <result column="operation_time" property="operationTime" jdbcType="TIMESTAMP" />
26
+  </resultMap>
27
+  <sql id="Example_Where_Clause" >
28
+    <where >
29
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
30
+        <if test="criteria.valid" >
31
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
32
+            <foreach collection="criteria.criteria" item="criterion" >
33
+              <choose >
34
+                <when test="criterion.noValue" >
35
+                  and ${criterion.condition}
36
+                </when>
37
+                <when test="criterion.singleValue" >
38
+                  and ${criterion.condition} #{criterion.value}
39
+                </when>
40
+                <when test="criterion.betweenValue" >
41
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
42
+                </when>
43
+                <when test="criterion.listValue" >
44
+                  and ${criterion.condition}
45
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
46
+                    #{listItem}
47
+                  </foreach>
48
+                </when>
49
+              </choose>
50
+            </foreach>
51
+          </trim>
52
+        </if>
53
+      </foreach>
54
+    </where>
55
+  </sql>
56
+  <sql id="Update_By_Example_Where_Clause" >
57
+    <where >
58
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
59
+        <if test="criteria.valid" >
60
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
61
+            <foreach collection="criteria.criteria" item="criterion" >
62
+              <choose >
63
+                <when test="criterion.noValue" >
64
+                  and ${criterion.condition}
65
+                </when>
66
+                <when test="criterion.singleValue" >
67
+                  and ${criterion.condition} #{criterion.value}
68
+                </when>
69
+                <when test="criterion.betweenValue" >
70
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
71
+                </when>
72
+                <when test="criterion.listValue" >
73
+                  and ${criterion.condition}
74
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
75
+                    #{listItem}
76
+                  </foreach>
77
+                </when>
78
+              </choose>
79
+            </foreach>
80
+          </trim>
81
+        </if>
82
+      </foreach>
83
+    </where>
84
+  </sql>
85
+  <sql id="Base_Column_List" >
86
+    id, org_id, user_id, user_zh, user_name, user_role, user_address, dl_time, zx_time, 
87
+    func_id, func_name, btn_id, method_name, oper_result, parameter, rtn_param, describes, 
88
+    type, device_ip, system_identify, operation_time
89
+  </sql>
90
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.system.model.SystemLogTwoExample" >
91
+    select
92
+    <if test="distinct" >
93
+      distinct
94
+    </if>
95
+    <include refid="Base_Column_List" />
96
+    from system_log_two
97
+    <if test="_parameter != null" >
98
+      <include refid="Example_Where_Clause" />
99
+    </if>
100
+    <if test="orderByClause != null" >
101
+      order by ${orderByClause}
102
+    </if>
103
+  </select>
104
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.system.model.SystemLogTwoExample" >
105
+    delete from system_log_two
106
+    <if test="_parameter != null" >
107
+      <include refid="Example_Where_Clause" />
108
+    </if>
109
+  </delete>
110
+  <insert id="insert" parameterType="com.chinaitop.depot.system.model.SystemLogTwo" >
111
+    insert into system_log_two (id, org_id, user_id, 
112
+      user_zh, user_name, user_role, 
113
+      user_address, dl_time, zx_time, 
114
+      func_id, func_name, btn_id, 
115
+      method_name, oper_result, parameter, 
116
+      rtn_param, describes, type, 
117
+      device_ip, system_identify, operation_time
118
+      )
119
+    values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, 
120
+      #{userZh,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userRole,jdbcType=VARCHAR}, 
121
+      #{userAddress,jdbcType=VARCHAR}, #{dlTime,jdbcType=TIMESTAMP}, #{zxTime,jdbcType=TIMESTAMP}, 
122
+      #{funcId,jdbcType=INTEGER}, #{funcName,jdbcType=VARCHAR}, #{btnId,jdbcType=INTEGER}, 
123
+      #{methodName,jdbcType=VARCHAR}, #{operResult,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR}, 
124
+      #{rtnParam,jdbcType=VARCHAR}, #{describes,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, 
125
+      #{deviceIp,jdbcType=VARCHAR}, #{systemIdentify,jdbcType=VARCHAR}, #{operationTime,jdbcType=TIMESTAMP}
126
+      )
127
+  </insert>
128
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.system.model.SystemLogTwo" >
129
+    insert into system_log_two
130
+    <trim prefix="(" suffix=")" suffixOverrides="," >
131
+      <if test="id != null" >
132
+        id,
133
+      </if>
134
+      <if test="orgId != null" >
135
+        org_id,
136
+      </if>
137
+      <if test="userId != null" >
138
+        user_id,
139
+      </if>
140
+      <if test="userZh != null" >
141
+        user_zh,
142
+      </if>
143
+      <if test="userName != null" >
144
+        user_name,
145
+      </if>
146
+      <if test="userRole != null" >
147
+        user_role,
148
+      </if>
149
+      <if test="userAddress != null" >
150
+        user_address,
151
+      </if>
152
+      <if test="dlTime != null" >
153
+        dl_time,
154
+      </if>
155
+      <if test="zxTime != null" >
156
+        zx_time,
157
+      </if>
158
+      <if test="funcId != null" >
159
+        func_id,
160
+      </if>
161
+      <if test="funcName != null" >
162
+        func_name,
163
+      </if>
164
+      <if test="btnId != null" >
165
+        btn_id,
166
+      </if>
167
+      <if test="methodName != null" >
168
+        method_name,
169
+      </if>
170
+      <if test="operResult != null" >
171
+        oper_result,
172
+      </if>
173
+      <if test="parameter != null" >
174
+        parameter,
175
+      </if>
176
+      <if test="rtnParam != null" >
177
+        rtn_param,
178
+      </if>
179
+      <if test="describes != null" >
180
+        describes,
181
+      </if>
182
+      <if test="type != null" >
183
+        type,
184
+      </if>
185
+      <if test="deviceIp != null" >
186
+        device_ip,
187
+      </if>
188
+      <if test="systemIdentify != null" >
189
+        system_identify,
190
+      </if>
191
+      <if test="operationTime != null" >
192
+        operation_time,
193
+      </if>
194
+    </trim>
195
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
196
+      <if test="id != null" >
197
+        #{id,jdbcType=VARCHAR},
198
+      </if>
199
+      <if test="orgId != null" >
200
+        #{orgId,jdbcType=INTEGER},
201
+      </if>
202
+      <if test="userId != null" >
203
+        #{userId,jdbcType=INTEGER},
204
+      </if>
205
+      <if test="userZh != null" >
206
+        #{userZh,jdbcType=VARCHAR},
207
+      </if>
208
+      <if test="userName != null" >
209
+        #{userName,jdbcType=VARCHAR},
210
+      </if>
211
+      <if test="userRole != null" >
212
+        #{userRole,jdbcType=VARCHAR},
213
+      </if>
214
+      <if test="userAddress != null" >
215
+        #{userAddress,jdbcType=VARCHAR},
216
+      </if>
217
+      <if test="dlTime != null" >
218
+        #{dlTime,jdbcType=TIMESTAMP},
219
+      </if>
220
+      <if test="zxTime != null" >
221
+        #{zxTime,jdbcType=TIMESTAMP},
222
+      </if>
223
+      <if test="funcId != null" >
224
+        #{funcId,jdbcType=INTEGER},
225
+      </if>
226
+      <if test="funcName != null" >
227
+        #{funcName,jdbcType=VARCHAR},
228
+      </if>
229
+      <if test="btnId != null" >
230
+        #{btnId,jdbcType=INTEGER},
231
+      </if>
232
+      <if test="methodName != null" >
233
+        #{methodName,jdbcType=VARCHAR},
234
+      </if>
235
+      <if test="operResult != null" >
236
+        #{operResult,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="parameter != null" >
239
+        #{parameter,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="rtnParam != null" >
242
+        #{rtnParam,jdbcType=VARCHAR},
243
+      </if>
244
+      <if test="describes != null" >
245
+        #{describes,jdbcType=VARCHAR},
246
+      </if>
247
+      <if test="type != null" >
248
+        #{type,jdbcType=VARCHAR},
249
+      </if>
250
+      <if test="deviceIp != null" >
251
+        #{deviceIp,jdbcType=VARCHAR},
252
+      </if>
253
+      <if test="systemIdentify != null" >
254
+        #{systemIdentify,jdbcType=VARCHAR},
255
+      </if>
256
+      <if test="operationTime != null" >
257
+        #{operationTime,jdbcType=TIMESTAMP},
258
+      </if>
259
+    </trim>
260
+  </insert>
261
+  <select id="countByExample" parameterType="com.chinaitop.depot.system.model.SystemLogTwoExample" resultType="java.lang.Integer" >
262
+    select count(*) from system_log_two
263
+    <if test="_parameter != null" >
264
+      <include refid="Example_Where_Clause" />
265
+    </if>
266
+  </select>
267
+  <update id="updateByExampleSelective" parameterType="map" >
268
+    update system_log_two
269
+    <set >
270
+      <if test="record.id != null" >
271
+        id = #{record.id,jdbcType=VARCHAR},
272
+      </if>
273
+      <if test="record.orgId != null" >
274
+        org_id = #{record.orgId,jdbcType=INTEGER},
275
+      </if>
276
+      <if test="record.userId != null" >
277
+        user_id = #{record.userId,jdbcType=INTEGER},
278
+      </if>
279
+      <if test="record.userZh != null" >
280
+        user_zh = #{record.userZh,jdbcType=VARCHAR},
281
+      </if>
282
+      <if test="record.userName != null" >
283
+        user_name = #{record.userName,jdbcType=VARCHAR},
284
+      </if>
285
+      <if test="record.userRole != null" >
286
+        user_role = #{record.userRole,jdbcType=VARCHAR},
287
+      </if>
288
+      <if test="record.userAddress != null" >
289
+        user_address = #{record.userAddress,jdbcType=VARCHAR},
290
+      </if>
291
+      <if test="record.dlTime != null" >
292
+        dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
293
+      </if>
294
+      <if test="record.zxTime != null" >
295
+        zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
296
+      </if>
297
+      <if test="record.funcId != null" >
298
+        func_id = #{record.funcId,jdbcType=INTEGER},
299
+      </if>
300
+      <if test="record.funcName != null" >
301
+        func_name = #{record.funcName,jdbcType=VARCHAR},
302
+      </if>
303
+      <if test="record.btnId != null" >
304
+        btn_id = #{record.btnId,jdbcType=INTEGER},
305
+      </if>
306
+      <if test="record.methodName != null" >
307
+        method_name = #{record.methodName,jdbcType=VARCHAR},
308
+      </if>
309
+      <if test="record.operResult != null" >
310
+        oper_result = #{record.operResult,jdbcType=VARCHAR},
311
+      </if>
312
+      <if test="record.parameter != null" >
313
+        parameter = #{record.parameter,jdbcType=VARCHAR},
314
+      </if>
315
+      <if test="record.rtnParam != null" >
316
+        rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
317
+      </if>
318
+      <if test="record.describes != null" >
319
+        describes = #{record.describes,jdbcType=VARCHAR},
320
+      </if>
321
+      <if test="record.type != null" >
322
+        type = #{record.type,jdbcType=VARCHAR},
323
+      </if>
324
+      <if test="record.deviceIp != null" >
325
+        device_ip = #{record.deviceIp,jdbcType=VARCHAR},
326
+      </if>
327
+      <if test="record.systemIdentify != null" >
328
+        system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
329
+      </if>
330
+      <if test="record.operationTime != null" >
331
+        operation_time = #{record.operationTime,jdbcType=TIMESTAMP},
332
+      </if>
333
+    </set>
334
+    <if test="_parameter != null" >
335
+      <include refid="Update_By_Example_Where_Clause" />
336
+    </if>
337
+  </update>
338
+  <update id="updateByExample" parameterType="map" >
339
+    update system_log_two
340
+    set id = #{record.id,jdbcType=VARCHAR},
341
+      org_id = #{record.orgId,jdbcType=INTEGER},
342
+      user_id = #{record.userId,jdbcType=INTEGER},
343
+      user_zh = #{record.userZh,jdbcType=VARCHAR},
344
+      user_name = #{record.userName,jdbcType=VARCHAR},
345
+      user_role = #{record.userRole,jdbcType=VARCHAR},
346
+      user_address = #{record.userAddress,jdbcType=VARCHAR},
347
+      dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
348
+      zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
349
+      func_id = #{record.funcId,jdbcType=INTEGER},
350
+      func_name = #{record.funcName,jdbcType=VARCHAR},
351
+      btn_id = #{record.btnId,jdbcType=INTEGER},
352
+      method_name = #{record.methodName,jdbcType=VARCHAR},
353
+      oper_result = #{record.operResult,jdbcType=VARCHAR},
354
+      parameter = #{record.parameter,jdbcType=VARCHAR},
355
+      rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
356
+      describes = #{record.describes,jdbcType=VARCHAR},
357
+      type = #{record.type,jdbcType=VARCHAR},
358
+      device_ip = #{record.deviceIp,jdbcType=VARCHAR},
359
+      system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
360
+      operation_time = #{record.operationTime,jdbcType=TIMESTAMP}
361
+    <if test="_parameter != null" >
362
+      <include refid="Update_By_Example_Where_Clause" />
363
+    </if>
364
+  </update>
365
+</mapper>

+ 383 - 0
src/main/java/com/chinaitop/depot/system/model/SystemLogThree.java

@@ -0,0 +1,383 @@
1
+package com.chinaitop.depot.system.model;
2
+
3
+import java.util.Date;
4
+
5
+public class SystemLogThree {
6
+    private String id;
7
+
8
+    private Integer orgId;
9
+
10
+    private Integer userId;
11
+
12
+    private String userZh;
13
+
14
+    private String userName;
15
+
16
+    private String userRole;
17
+
18
+    private String userAddress;
19
+
20
+    private Date dlTime;
21
+
22
+    private Date zxTime;
23
+
24
+    private Integer funcId;
25
+
26
+    private String funcName;
27
+
28
+    private Integer btnId;
29
+
30
+    private String methodName;
31
+
32
+    private String operResult;
33
+
34
+    private String parameter;
35
+
36
+    private String rtnParam;
37
+
38
+    private String describes;
39
+
40
+    private String type;
41
+
42
+    private String deviceIp;
43
+
44
+    private String systemIdentify;
45
+
46
+    private Date operationTime;
47
+
48
+    /**
49
+     * 主键
50
+     * @return id 主键
51
+     */
52
+    public String getId() {
53
+        return id;
54
+    }
55
+
56
+    /**
57
+     * 主键
58
+     * @param id 主键
59
+     */
60
+    public void setId(String id) {
61
+        this.id = id == null ? null : id.trim();
62
+    }
63
+
64
+    /**
65
+     * 机构id
66
+     * @return org_id 机构id
67
+     */
68
+    public Integer getOrgId() {
69
+        return orgId;
70
+    }
71
+
72
+    /**
73
+     * 机构id
74
+     * @param orgId 机构id
75
+     */
76
+    public void setOrgId(Integer orgId) {
77
+        this.orgId = orgId;
78
+    }
79
+
80
+    /**
81
+     * 用户id
82
+     * @return user_id 用户id
83
+     */
84
+    public Integer getUserId() {
85
+        return userId;
86
+    }
87
+
88
+    /**
89
+     * 用户id
90
+     * @param userId 用户id
91
+     */
92
+    public void setUserId(Integer userId) {
93
+        this.userId = userId;
94
+    }
95
+
96
+    /**
97
+     * 用户账号
98
+     * @return user_zh 用户账号
99
+     */
100
+    public String getUserZh() {
101
+        return userZh;
102
+    }
103
+
104
+    /**
105
+     * 用户账号
106
+     * @param userZh 用户账号
107
+     */
108
+    public void setUserZh(String userZh) {
109
+        this.userZh = userZh == null ? null : userZh.trim();
110
+    }
111
+
112
+    /**
113
+     * 用户名称
114
+     * @return user_name 用户名称
115
+     */
116
+    public String getUserName() {
117
+        return userName;
118
+    }
119
+
120
+    /**
121
+     * 用户名称
122
+     * @param userName 用户名称
123
+     */
124
+    public void setUserName(String userName) {
125
+        this.userName = userName == null ? null : userName.trim();
126
+    }
127
+
128
+    /**
129
+     * 用户角色
130
+     * @return user_role 用户角色
131
+     */
132
+    public String getUserRole() {
133
+        return userRole;
134
+    }
135
+
136
+    /**
137
+     * 用户角色
138
+     * @param userRole 用户角色
139
+     */
140
+    public void setUserRole(String userRole) {
141
+        this.userRole = userRole == null ? null : userRole.trim();
142
+    }
143
+
144
+    /**
145
+     * 用户所属机构行政区划
146
+     * @return user_address 用户所属机构行政区划
147
+     */
148
+    public String getUserAddress() {
149
+        return userAddress;
150
+    }
151
+
152
+    /**
153
+     * 用户所属机构行政区划
154
+     * @param userAddress 用户所属机构行政区划
155
+     */
156
+    public void setUserAddress(String userAddress) {
157
+        this.userAddress = userAddress == null ? null : userAddress.trim();
158
+    }
159
+
160
+    /**
161
+     * 登录时间
162
+     * @return dl_time 登录时间
163
+     */
164
+    public Date getDlTime() {
165
+        return dlTime;
166
+    }
167
+
168
+    /**
169
+     * 登录时间
170
+     * @param dlTime 登录时间
171
+     */
172
+    public void setDlTime(Date dlTime) {
173
+        this.dlTime = dlTime;
174
+    }
175
+
176
+    /**
177
+     * 注销时间
178
+     * @return zx_time 注销时间
179
+     */
180
+    public Date getZxTime() {
181
+        return zxTime;
182
+    }
183
+
184
+    /**
185
+     * 注销时间
186
+     * @param zxTime 注销时间
187
+     */
188
+    public void setZxTime(Date zxTime) {
189
+        this.zxTime = zxTime;
190
+    }
191
+
192
+    /**
193
+     * 功能id
194
+     * @return func_id 功能id
195
+     */
196
+    public Integer getFuncId() {
197
+        return funcId;
198
+    }
199
+
200
+    /**
201
+     * 功能id
202
+     * @param funcId 功能id
203
+     */
204
+    public void setFuncId(Integer funcId) {
205
+        this.funcId = funcId;
206
+    }
207
+
208
+    /**
209
+     * 菜单名称
210
+     * @return func_name 菜单名称
211
+     */
212
+    public String getFuncName() {
213
+        return funcName;
214
+    }
215
+
216
+    /**
217
+     * 菜单名称
218
+     * @param funcName 菜单名称
219
+     */
220
+    public void setFuncName(String funcName) {
221
+        this.funcName = funcName == null ? null : funcName.trim();
222
+    }
223
+
224
+    /**
225
+     * 按钮id
226
+     * @return btn_id 按钮id
227
+     */
228
+    public Integer getBtnId() {
229
+        return btnId;
230
+    }
231
+
232
+    /**
233
+     * 按钮id
234
+     * @param btnId 按钮id
235
+     */
236
+    public void setBtnId(Integer btnId) {
237
+        this.btnId = btnId;
238
+    }
239
+
240
+    /**
241
+     * 方法名
242
+     * @return method_name 方法名
243
+     */
244
+    public String getMethodName() {
245
+        return methodName;
246
+    }
247
+
248
+    /**
249
+     * 方法名
250
+     * @param methodName 方法名
251
+     */
252
+    public void setMethodName(String methodName) {
253
+        this.methodName = methodName == null ? null : methodName.trim();
254
+    }
255
+
256
+    /**
257
+     * 操作结果
258
+     * @return oper_result 操作结果
259
+     */
260
+    public String getOperResult() {
261
+        return operResult;
262
+    }
263
+
264
+    /**
265
+     * 操作结果
266
+     * @param operResult 操作结果
267
+     */
268
+    public void setOperResult(String operResult) {
269
+        this.operResult = operResult == null ? null : operResult.trim();
270
+    }
271
+
272
+    /**
273
+     * 请求参数
274
+     * @return parameter 请求参数
275
+     */
276
+    public String getParameter() {
277
+        return parameter;
278
+    }
279
+
280
+    /**
281
+     * 请求参数
282
+     * @param parameter 请求参数
283
+     */
284
+    public void setParameter(String parameter) {
285
+        this.parameter = parameter == null ? null : parameter.trim();
286
+    }
287
+
288
+    /**
289
+     * 返回参数
290
+     * @return rtn_param 返回参数
291
+     */
292
+    public String getRtnParam() {
293
+        return rtnParam;
294
+    }
295
+
296
+    /**
297
+     * 返回参数
298
+     * @param rtnParam 返回参数
299
+     */
300
+    public void setRtnParam(String rtnParam) {
301
+        this.rtnParam = rtnParam == null ? null : rtnParam.trim();
302
+    }
303
+
304
+    /**
305
+     * 日志描述
306
+     * @return describes 日志描述
307
+     */
308
+    public String getDescribes() {
309
+        return describes;
310
+    }
311
+
312
+    /**
313
+     * 日志描述
314
+     * @param describes 日志描述
315
+     */
316
+    public void setDescribes(String describes) {
317
+        this.describes = describes == null ? null : describes.trim();
318
+    }
319
+
320
+    /**
321
+     * 日志类型:1 登录 2 访问 3 操作
322
+     * @return type 日志类型:1 登录 2 访问 3 操作
323
+     */
324
+    public String getType() {
325
+        return type;
326
+    }
327
+
328
+    /**
329
+     * 日志类型:1 登录 2 访问 3 操作
330
+     * @param type 日志类型:1 登录 2 访问 3 操作
331
+     */
332
+    public void setType(String type) {
333
+        this.type = type == null ? null : type.trim();
334
+    }
335
+
336
+    /**
337
+     * 设备ip
338
+     * @return device_ip 设备ip
339
+     */
340
+    public String getDeviceIp() {
341
+        return deviceIp;
342
+    }
343
+
344
+    /**
345
+     * 设备ip
346
+     * @param deviceIp 设备ip
347
+     */
348
+    public void setDeviceIp(String deviceIp) {
349
+        this.deviceIp = deviceIp == null ? null : deviceIp.trim();
350
+    }
351
+
352
+    /**
353
+     * 系统标识:库级系统
354
+     * @return system_identify 系统标识:库级系统
355
+     */
356
+    public String getSystemIdentify() {
357
+        return systemIdentify;
358
+    }
359
+
360
+    /**
361
+     * 系统标识:库级系统
362
+     * @param systemIdentify 系统标识:库级系统
363
+     */
364
+    public void setSystemIdentify(String systemIdentify) {
365
+        this.systemIdentify = systemIdentify == null ? null : systemIdentify.trim();
366
+    }
367
+
368
+    /**
369
+     * 操作时间
370
+     * @return operation_time 操作时间
371
+     */
372
+    public Date getOperationTime() {
373
+        return operationTime;
374
+    }
375
+
376
+    /**
377
+     * 操作时间
378
+     * @param operationTime 操作时间
379
+     */
380
+    public void setOperationTime(Date operationTime) {
381
+        this.operationTime = operationTime;
382
+    }
383
+}

File diff suppressed because it is too large
+ 1619 - 0
src/main/java/com/chinaitop/depot/system/model/SystemLogThreeExample.java


+ 383 - 0
src/main/java/com/chinaitop/depot/system/model/SystemLogTwo.java

@@ -0,0 +1,383 @@
1
+package com.chinaitop.depot.system.model;
2
+
3
+import java.util.Date;
4
+
5
+public class SystemLogTwo {
6
+    private String id;
7
+
8
+    private Integer orgId;
9
+
10
+    private Integer userId;
11
+
12
+    private String userZh;
13
+
14
+    private String userName;
15
+
16
+    private String userRole;
17
+
18
+    private String userAddress;
19
+
20
+    private Date dlTime;
21
+
22
+    private Date zxTime;
23
+
24
+    private Integer funcId;
25
+
26
+    private String funcName;
27
+
28
+    private Integer btnId;
29
+
30
+    private String methodName;
31
+
32
+    private String operResult;
33
+
34
+    private String parameter;
35
+
36
+    private String rtnParam;
37
+
38
+    private String describes;
39
+
40
+    private String type;
41
+
42
+    private String deviceIp;
43
+
44
+    private String systemIdentify;
45
+
46
+    private Date operationTime;
47
+
48
+    /**
49
+     * 主键
50
+     * @return id 主键
51
+     */
52
+    public String getId() {
53
+        return id;
54
+    }
55
+
56
+    /**
57
+     * 主键
58
+     * @param id 主键
59
+     */
60
+    public void setId(String id) {
61
+        this.id = id == null ? null : id.trim();
62
+    }
63
+
64
+    /**
65
+     * 机构id
66
+     * @return org_id 机构id
67
+     */
68
+    public Integer getOrgId() {
69
+        return orgId;
70
+    }
71
+
72
+    /**
73
+     * 机构id
74
+     * @param orgId 机构id
75
+     */
76
+    public void setOrgId(Integer orgId) {
77
+        this.orgId = orgId;
78
+    }
79
+
80
+    /**
81
+     * 用户id
82
+     * @return user_id 用户id
83
+     */
84
+    public Integer getUserId() {
85
+        return userId;
86
+    }
87
+
88
+    /**
89
+     * 用户id
90
+     * @param userId 用户id
91
+     */
92
+    public void setUserId(Integer userId) {
93
+        this.userId = userId;
94
+    }
95
+
96
+    /**
97
+     * 用户账号
98
+     * @return user_zh 用户账号
99
+     */
100
+    public String getUserZh() {
101
+        return userZh;
102
+    }
103
+
104
+    /**
105
+     * 用户账号
106
+     * @param userZh 用户账号
107
+     */
108
+    public void setUserZh(String userZh) {
109
+        this.userZh = userZh == null ? null : userZh.trim();
110
+    }
111
+
112
+    /**
113
+     * 用户名称
114
+     * @return user_name 用户名称
115
+     */
116
+    public String getUserName() {
117
+        return userName;
118
+    }
119
+
120
+    /**
121
+     * 用户名称
122
+     * @param userName 用户名称
123
+     */
124
+    public void setUserName(String userName) {
125
+        this.userName = userName == null ? null : userName.trim();
126
+    }
127
+
128
+    /**
129
+     * 用户角色
130
+     * @return user_role 用户角色
131
+     */
132
+    public String getUserRole() {
133
+        return userRole;
134
+    }
135
+
136
+    /**
137
+     * 用户角色
138
+     * @param userRole 用户角色
139
+     */
140
+    public void setUserRole(String userRole) {
141
+        this.userRole = userRole == null ? null : userRole.trim();
142
+    }
143
+
144
+    /**
145
+     * 用户所属机构行政区划
146
+     * @return user_address 用户所属机构行政区划
147
+     */
148
+    public String getUserAddress() {
149
+        return userAddress;
150
+    }
151
+
152
+    /**
153
+     * 用户所属机构行政区划
154
+     * @param userAddress 用户所属机构行政区划
155
+     */
156
+    public void setUserAddress(String userAddress) {
157
+        this.userAddress = userAddress == null ? null : userAddress.trim();
158
+    }
159
+
160
+    /**
161
+     * 登录时间
162
+     * @return dl_time 登录时间
163
+     */
164
+    public Date getDlTime() {
165
+        return dlTime;
166
+    }
167
+
168
+    /**
169
+     * 登录时间
170
+     * @param dlTime 登录时间
171
+     */
172
+    public void setDlTime(Date dlTime) {
173
+        this.dlTime = dlTime;
174
+    }
175
+
176
+    /**
177
+     * 注销时间
178
+     * @return zx_time 注销时间
179
+     */
180
+    public Date getZxTime() {
181
+        return zxTime;
182
+    }
183
+
184
+    /**
185
+     * 注销时间
186
+     * @param zxTime 注销时间
187
+     */
188
+    public void setZxTime(Date zxTime) {
189
+        this.zxTime = zxTime;
190
+    }
191
+
192
+    /**
193
+     * 功能id
194
+     * @return func_id 功能id
195
+     */
196
+    public Integer getFuncId() {
197
+        return funcId;
198
+    }
199
+
200
+    /**
201
+     * 功能id
202
+     * @param funcId 功能id
203
+     */
204
+    public void setFuncId(Integer funcId) {
205
+        this.funcId = funcId;
206
+    }
207
+
208
+    /**
209
+     * 菜单名称
210
+     * @return func_name 菜单名称
211
+     */
212
+    public String getFuncName() {
213
+        return funcName;
214
+    }
215
+
216
+    /**
217
+     * 菜单名称
218
+     * @param funcName 菜单名称
219
+     */
220
+    public void setFuncName(String funcName) {
221
+        this.funcName = funcName == null ? null : funcName.trim();
222
+    }
223
+
224
+    /**
225
+     * 按钮id
226
+     * @return btn_id 按钮id
227
+     */
228
+    public Integer getBtnId() {
229
+        return btnId;
230
+    }
231
+
232
+    /**
233
+     * 按钮id
234
+     * @param btnId 按钮id
235
+     */
236
+    public void setBtnId(Integer btnId) {
237
+        this.btnId = btnId;
238
+    }
239
+
240
+    /**
241
+     * 方法名
242
+     * @return method_name 方法名
243
+     */
244
+    public String getMethodName() {
245
+        return methodName;
246
+    }
247
+
248
+    /**
249
+     * 方法名
250
+     * @param methodName 方法名
251
+     */
252
+    public void setMethodName(String methodName) {
253
+        this.methodName = methodName == null ? null : methodName.trim();
254
+    }
255
+
256
+    /**
257
+     * 操作结果
258
+     * @return oper_result 操作结果
259
+     */
260
+    public String getOperResult() {
261
+        return operResult;
262
+    }
263
+
264
+    /**
265
+     * 操作结果
266
+     * @param operResult 操作结果
267
+     */
268
+    public void setOperResult(String operResult) {
269
+        this.operResult = operResult == null ? null : operResult.trim();
270
+    }
271
+
272
+    /**
273
+     * 请求参数
274
+     * @return parameter 请求参数
275
+     */
276
+    public String getParameter() {
277
+        return parameter;
278
+    }
279
+
280
+    /**
281
+     * 请求参数
282
+     * @param parameter 请求参数
283
+     */
284
+    public void setParameter(String parameter) {
285
+        this.parameter = parameter == null ? null : parameter.trim();
286
+    }
287
+
288
+    /**
289
+     * 返回参数
290
+     * @return rtn_param 返回参数
291
+     */
292
+    public String getRtnParam() {
293
+        return rtnParam;
294
+    }
295
+
296
+    /**
297
+     * 返回参数
298
+     * @param rtnParam 返回参数
299
+     */
300
+    public void setRtnParam(String rtnParam) {
301
+        this.rtnParam = rtnParam == null ? null : rtnParam.trim();
302
+    }
303
+
304
+    /**
305
+     * 日志描述
306
+     * @return describes 日志描述
307
+     */
308
+    public String getDescribes() {
309
+        return describes;
310
+    }
311
+
312
+    /**
313
+     * 日志描述
314
+     * @param describes 日志描述
315
+     */
316
+    public void setDescribes(String describes) {
317
+        this.describes = describes == null ? null : describes.trim();
318
+    }
319
+
320
+    /**
321
+     * 日志类型:1 登录 2 访问 3 操作
322
+     * @return type 日志类型:1 登录 2 访问 3 操作
323
+     */
324
+    public String getType() {
325
+        return type;
326
+    }
327
+
328
+    /**
329
+     * 日志类型:1 登录 2 访问 3 操作
330
+     * @param type 日志类型:1 登录 2 访问 3 操作
331
+     */
332
+    public void setType(String type) {
333
+        this.type = type == null ? null : type.trim();
334
+    }
335
+
336
+    /**
337
+     * 设备ip
338
+     * @return device_ip 设备ip
339
+     */
340
+    public String getDeviceIp() {
341
+        return deviceIp;
342
+    }
343
+
344
+    /**
345
+     * 设备ip
346
+     * @param deviceIp 设备ip
347
+     */
348
+    public void setDeviceIp(String deviceIp) {
349
+        this.deviceIp = deviceIp == null ? null : deviceIp.trim();
350
+    }
351
+
352
+    /**
353
+     * 系统标识:库级系统
354
+     * @return system_identify 系统标识:库级系统
355
+     */
356
+    public String getSystemIdentify() {
357
+        return systemIdentify;
358
+    }
359
+
360
+    /**
361
+     * 系统标识:库级系统
362
+     * @param systemIdentify 系统标识:库级系统
363
+     */
364
+    public void setSystemIdentify(String systemIdentify) {
365
+        this.systemIdentify = systemIdentify == null ? null : systemIdentify.trim();
366
+    }
367
+
368
+    /**
369
+     * 操作时间
370
+     * @return operation_time 操作时间
371
+     */
372
+    public Date getOperationTime() {
373
+        return operationTime;
374
+    }
375
+
376
+    /**
377
+     * 操作时间
378
+     * @param operationTime 操作时间
379
+     */
380
+    public void setOperationTime(Date operationTime) {
381
+        this.operationTime = operationTime;
382
+    }
383
+}

File diff suppressed because it is too large
+ 1619 - 0
src/main/java/com/chinaitop/depot/system/model/SystemLogTwoExample.java


+ 3 - 2
src/main/java/com/chinaitop/depot/system/service/UserOperationlogService.java

@@ -5,6 +5,7 @@ import java.util.List;
5 5
 
6 6
 import com.chinaitop.depot.system.model.SystemLog;
7 7
 import com.chinaitop.depot.system.model.SystemLogExample;
8
+import com.chinaitop.depot.system.model.SystemLogTwo;
8 9
 import com.chinaitop.depot.system.model.UserOperationlog;
9 10
 
10 11
 public interface UserOperationlogService {
@@ -22,10 +23,10 @@ public interface UserOperationlogService {
22 23
     void AddLogMsg(UserOperationlog userOperationlog);
23 24
     
24 25
     /**
25
-     * 插入systemlog
26
+     * 插入systemlogTwo访问日志表
26 27
      * @param systemLog SystemLog对象
27 28
      */
28
-    void AddSystemLog(SystemLog systemLog);
29
+    void AddSystemLog(SystemLogTwo systemLog);
29 30
 
30 31
     /**
31 32
      * 查询systemlog表日志

+ 8 - 3
src/main/java/com/chinaitop/depot/system/service/impl/UserOperationlogServiceImpl.java

@@ -1,9 +1,11 @@
1 1
 package com.chinaitop.depot.system.service.impl;
2 2
 
3 3
 import com.chinaitop.depot.system.mapper.SystemLogMapper;
4
+import com.chinaitop.depot.system.mapper.SystemLogTwoMapper;
4 5
 import com.chinaitop.depot.system.mapper.UserOperationlogMapper;
5 6
 import com.chinaitop.depot.system.model.SystemLog;
6 7
 import com.chinaitop.depot.system.model.SystemLogExample;
8
+import com.chinaitop.depot.system.model.SystemLogTwo;
7 9
 import com.chinaitop.depot.system.model.UserOperationlog;
8 10
 import com.chinaitop.depot.system.service.UserOperationlogService;
9 11
 
@@ -27,6 +29,9 @@ public class UserOperationlogServiceImpl implements UserOperationlogService {
27 29
     @Resource
28 30
     private SystemLogMapper systemLogMapper;
29 31
 
32
+    @Resource
33
+    private SystemLogTwoMapper systemLogTwoMapper;
34
+
30 35
 	@Override
31 36
 	public List<UserOperationlog> queryAll(HashMap<Object, Object> map) {
32 37
 		return userOperationlogMapper.queryAll(map);
@@ -38,13 +43,13 @@ public class UserOperationlogServiceImpl implements UserOperationlogService {
38 43
 	}
39 44
 
40 45
 	@Override
41
-	public void AddSystemLog(SystemLog systemLog) {
42
-		systemLogMapper.insertSelective(systemLog);
46
+	public void AddSystemLog(SystemLogTwo systemLog) {
47
+		systemLogTwoMapper.insertSelective(systemLog);
43 48
 	}
44 49
 
45 50
 	@Override
46 51
 	public List<SystemLog> findSystemLogCondition(SystemLogExample example) {
47
-		return systemLogMapper.selectByExample(example);
52
+		return systemLogMapper.queryAllLog(example);
48 53
 	}
49 54
 
50 55
 }