Kaynağa Gözat

日志功能改造

fanxw 5 yıl önce
ebeveyn
işleme
9c0af7d1a2
20 değiştirilmiş dosya ile 8260 ekleme ve 34 silme
  1. 13 0
      pom.xml
  2. 2 0
      src/main/java/com/chinaitop/depot/DepotWebApplication.java
  3. 310 29
      src/main/java/com/chinaitop/depot/LogRecodeFilter.java
  4. 22 0
      src/main/java/com/chinaitop/depot/system/feignService/BasicFeignService.java
  5. 22 0
      src/main/java/com/chinaitop/depot/system/feignService/SystemFeignService.java
  6. 30 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogMapper.java
  7. 465 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogMapper.xml
  8. 22 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogThreeMapper.java
  9. 365 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogThreeMapper.xml
  10. 22 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogTwoMapper.java
  11. 365 0
      src/main/java/com/chinaitop/depot/system/mapper/SystemLogTwoMapper.xml
  12. 383 0
      src/main/java/com/chinaitop/depot/system/model/SystemLog.java
  13. 1619 0
      src/main/java/com/chinaitop/depot/system/model/SystemLogExample.java
  14. 383 0
      src/main/java/com/chinaitop/depot/system/model/SystemLogThree.java
  15. 1619 0
      src/main/java/com/chinaitop/depot/system/model/SystemLogThreeExample.java
  16. 383 0
      src/main/java/com/chinaitop/depot/system/model/SystemLogTwo.java
  17. 1619 0
      src/main/java/com/chinaitop/depot/system/model/SystemLogTwoExample.java
  18. 66 0
      src/main/java/com/chinaitop/depot/utils/RedisConfig.java
  19. 547 0
      src/main/java/com/chinaitop/depot/utils/RedisUtil.java
  20. 3 5
      src/main/resources/static/app/system/views/systemLog.html

+ 13 - 0
pom.xml

@@ -80,6 +80,19 @@
80 80
 	        <groupId>org.springframework.session</groupId>  
81 81
 	        <artifactId>spring-session-data-redis</artifactId>  
82 82
 		</dependency>
83
+		
84
+		<!-- 阿里巴巴json -->
85
+		<dependency>
86
+			<groupId>com.alibaba</groupId>
87
+			<artifactId>fastjson</artifactId>
88
+			<version>1.2.37</version>
89
+		</dependency>
90
+
91
+		<!-- feign -->
92
+		<dependency>
93
+			<groupId>org.springframework.cloud</groupId>
94
+			<artifactId>spring-cloud-starter-openfeign</artifactId>
95
+		</dependency>
83 96
 
84 97
 	</dependencies>
85 98
 

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

@@ -6,10 +6,12 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
6 6
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
7 7
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
8 8
 import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
9
+import org.springframework.cloud.openfeign.EnableFeignClients;
9 10
 
10 11
 @EnableZuulProxy //zuul网关路由转发必须加这个注解
11 12
 @EnableEurekaClient
12 13
 @EnableDiscoveryClient
14
+@EnableFeignClients
13 15
 @SpringBootApplication
14 16
 @MapperScan(basePackages = {"com.chinaitop.depot.*.mapper"})
15 17
 public class DepotWebApplication {

+ 310 - 29
src/main/java/com/chinaitop/depot/LogRecodeFilter.java

@@ -1,22 +1,37 @@
1 1
 package com.chinaitop.depot;
2 2
 
3 3
 import java.util.Date;
4
+import java.util.HashMap;
5
+import java.util.Iterator;
4 6
 import java.util.List;
5 7
 import java.util.Map;
6 8
 import java.util.Set;
9
+import java.util.UUID;
7 10
 
8 11
 import javax.annotation.Resource;
9 12
 import javax.servlet.http.HttpServletRequest;
13
+import javax.servlet.http.HttpServletResponse;
10 14
 
11 15
 import org.apache.commons.lang.ObjectUtils;
12 16
 import org.slf4j.Logger;
13 17
 import org.slf4j.LoggerFactory;
18
+import org.springframework.beans.factory.annotation.Autowired;
14 19
 import org.springframework.stereotype.Component;
15 20
 
16
-import com.chinaitop.depot.system.model.UserOperationlog;
17
-import com.chinaitop.depot.system.model.UserOperationtype;
21
+import com.alibaba.fastjson.JSONArray;
22
+import com.alibaba.fastjson.JSONObject;
23
+import com.chinaitop.depot.system.feignService.BasicFeignService;
24
+import com.chinaitop.depot.system.feignService.SystemFeignService;
25
+import com.chinaitop.depot.system.mapper.SystemLogMapper;
26
+import com.chinaitop.depot.system.mapper.SystemLogThreeMapper;
27
+import com.chinaitop.depot.system.mapper.SystemLogTwoMapper;
28
+import com.chinaitop.depot.system.model.SystemLog;
29
+import com.chinaitop.depot.system.model.SystemLogExample;
30
+import com.chinaitop.depot.system.model.SystemLogThree;
31
+import com.chinaitop.depot.system.model.SystemLogTwo;
18 32
 import com.chinaitop.depot.system.service.UserOperationlogService;
19 33
 import com.chinaitop.depot.system.service.UserOperationtypeService;
34
+import com.chinaitop.depot.utils.RedisUtil;
20 35
 import com.netflix.zuul.ZuulFilter;
21 36
 import com.netflix.zuul.context.RequestContext;
22 37
 import com.netflix.zuul.exception.ZuulException;
@@ -35,6 +50,26 @@ public class LogRecodeFilter extends ZuulFilter {
35 50
 	
36 51
 	@Resource
37 52
 	private UserOperationlogService userOperationlogService;
53
+	
54
+	private static String system_index = "库级系统";
55
+
56
+	@Autowired
57
+	private RedisUtil redisUtil;
58
+	
59
+	@Autowired
60
+	private SystemLogMapper systemLogMapper;
61
+	
62
+	@Autowired
63
+	private SystemLogTwoMapper systemLogTwoMapper;
64
+	
65
+	@Autowired
66
+	private SystemLogThreeMapper systemLogThreeMapper;
67
+	
68
+	@Resource
69
+	private SystemFeignService systemFeignService;
70
+
71
+	@Resource
72
+	private BasicFeignService basicFeignService;
38 73
 
39 74
 	@Override
40 75
 	public Object run() throws ZuulException {
@@ -42,33 +77,10 @@ public class LogRecodeFilter extends ZuulFilter {
42 77
             logger.info("进入日志记录过滤器");
43 78
             RequestContext ctx = RequestContext.getCurrentContext();
44 79
             HttpServletRequest request = ctx.getRequest();
45
-            
46
-            //String method = request.getMethod();
47
-            String interfaceMethod = request.getServletPath();
48
-            //查询所有的操作类型
49
-            List<UserOperationtype> list = userOperationtypeService.queryByExample(null);
50
-            for(UserOperationtype userOperationtype:list) {
51
-            	String operation_url = userOperationtype.getOperationUrl();
52
-            	String parameter_name = userOperationtype.getParameterName();
53
-            	if(interfaceMethod.contains(operation_url)) {//当前访问路径存在操作类型表里,插入一条操作记录
54
-            		Integer userId = Integer.parseInt(ObjectUtils.toString(request.getSession().getAttribute("userId")));
55
-            		StringBuilder param = new StringBuilder();
56
-                    Map<String,String[]> map = request.getParameterMap();
57
-                    Set<String> key = map.keySet();
58
-                    for (String eachKey: key) {
59
-                        param.append(eachKey+"="+map.get(eachKey)[0]+"; ");
60
-                    }
61
-            		UserOperationlog userOperationlog = new UserOperationlog();
62
-            		userOperationlog.setUserId(userId);
63
-            		userOperationlog.setOperationTime(new Date());
64
-            		userOperationlog.setUotId(userOperationtype.getUotId());
65
-            		userOperationlog.setParameterValue(ObjectUtils.toString(request.getParameter(parameter_name),""));
66
-            		userOperationlog.setParameter(param.toString());
67
-            		userOperationlogService.AddLogMsg(userOperationlog);
68
-            		break;
69
-            	}
70
-            }
71
-            //getIpAddr(request);
80
+            HttpServletResponse response = ctx.getResponse();
81
+
82
+            //记录日志
83
+            saveSystemLog(request, response);
72 84
         } catch (Exception e) {
73 85
             logger.error("LogRecode IO异常", e);
74 86
         }
@@ -111,5 +123,274 @@ public class LogRecodeFilter extends ZuulFilter {
111 123
 		}
112 124
 		return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
113 125
 	}
126
+	
127
+	private void saveSystemLog(HttpServletRequest request, HttpServletResponse response) {
128
+		//获取URL
129
+        String url = request.getRequestURI();
130
+        //获取用户信息和单位信息
131
+        String userJson = ObjectUtils.toString(request.getSession().getAttribute("userInfo"),"");
132
+        String orgInfoJson = ObjectUtils.toString(request.getSession().getAttribute("orgInfo"),"");
133
+        String yzm_code = ObjectUtils.toString(request.getSession().getAttribute("Service_Code"),"");
134
+
135
+        //退出日志
136
+    	if ("/depot-system/userInfo/exitLogin".equals(url)
137
+    			&& !"".equals(userJson) && !"".equals(orgInfoJson)
138
+    			&& null != userJson && null != orgInfoJson) {
139
+    		loginOrExitLogger(request, response, url, userJson, orgInfoJson);
140
+    	}
141
+    	//登录日志
142
+    	if ("/depot-system/userInfo/login".equals(url)) {
143
+    		Map<String,String[]> param_map = request.getParameterMap();
144
+    		String yzm = ObjectUtils.toString(param_map.get("yzm")[0], "");
145
+    		if (yzm_code.equals(yzm)) {
146
+    			String username = ObjectUtils.toString(param_map.get("username")[0], "");
147
+    			String password = ObjectUtils.toString(param_map.get("password")[0], "");
148
+    			Map<String, Object> result_map = systemFeignService.getUserData(username, password);
149
+    			String userInfo = ObjectUtils.toString(result_map.get("user"), "");
150
+    			String orgInfo = "";
151
+    			if (null != userInfo && !"".equals(userInfo)) {
152
+    				orgInfo = result_map.get("org").toString();
153
+    				loginOrExitLogger(request, response, url, userInfo, orgInfo);
154
+    			}
155
+    		} else {
156
+    			//验证码不对就不执行了
157
+    		}
158
+    	}
159
+    	//功能操作和访问日志
160
+    	if (!"/depot-system/userInfo/login".equals(url) && !"/depot-system/userInfo/exitLogin".equals(url)
161
+    			&& !"".equals(userJson) && !"".equals(orgInfoJson)
162
+    			&& null != userJson && null != orgInfoJson) {
163
+    		url = url.substring(url.indexOf("/", 1), url.length());
164
+    		operationLogger(request, response, url);
165
+    	}
166
+	}
167
+	
168
+	/**
169
+     * 登录和退出日志
170
+     * @param request
171
+     * @param response
172
+     */
173
+    private void loginOrExitLogger(HttpServletRequest request, HttpServletResponse response, String url, String userJson, String orgInfoJson) {
174
+    	//获取用户信息和单位信息
175
+        //String userJson = ObjectUtils.toString(request.getSession().getAttribute("userInfo"),"");
176
+        //String orgInfoJson = ObjectUtils.toString(request.getSession().getAttribute("orgInfo"),"");
177
+    	//登录
178
+        if ("/depot-system/userInfo/login".equals(url)) {
179
+	    	SystemLog log = new SystemLog();
180
+	    	Map<String, String> user_map = getUserOrgInfo(userJson, orgInfoJson);
181
+			log.setSystemIdentify(system_index);
182
+			log.setUserZh(ObjectUtils.toString(user_map.get("username"),""));//账号
183
+			log.setUserName(ObjectUtils.toString(user_map.get("realName"),""));//名称
184
+			String device_ip = getIpAddr(request);
185
+			log.setDeviceIp(device_ip);
186
+			log.setDlTime(new Date());
187
+			log.setUserRole(ObjectUtils.toString(user_map.get("roleName"),""));//角色
188
+			log.setOrgId(Integer.parseInt(user_map.get("orgId")));//单位
189
+			String enumid = ObjectUtils.toString(user_map.get("areaCode"), "0");
190
+			if (!"0".equals(enumid)) {
191
+				String strResult = basicFeignService.getEnumData(Integer.parseInt(enumid));
192
+				//String strResult = doGet(httpurl);
193
+				if (null != strResult && !"".equals(strResult)) {
194
+					JSONObject enum_obj = JSONObject.parseObject(strResult);
195
+					log.setUserAddress(ObjectUtils.toString(enum_obj.get("gbcode"), ""));//行政区划
196
+				}
197
+			}
198
+			log.setId(UUID.randomUUID().toString().replace("-", ""));
199
+			log.setUserId(Integer.parseInt(user_map.get("userId")));
200
+			log.setOperationTime(new Date());//操作时间
201
+			log.setType("1");
202
+
203
+			//添加保存日志
204
+			systemLogMapper.insert(log);
205
+    	}
206
+
207
+        //注销
208
+        if ("/depot-system/userInfo/exitLogin".equals(url)) {
209
+        	if (null != userJson && null != orgInfoJson
210
+        			&& !"".equals(userJson) && !"".equals(orgInfoJson)) {
211
+        		Map<String, String> user_map = getUserOrgInfo(userJson, orgInfoJson);
212
+        		//修改条件
213
+        		SystemLogExample example = new SystemLogExample();
214
+        		SystemLogExample.Criteria criteria = example.createCriteria();
215
+        		criteria.andUserZhEqualTo(ObjectUtils.toString(user_map.get("username"),""));
216
+        		criteria.andOrgIdEqualTo(Integer.parseInt(user_map.get("orgId")));
217
+        		criteria.andTypeEqualTo("1");
218
+        		example.setOrderByClause(" dl_time desc");
219
+        		List<SystemLog> list = systemLogMapper.selectByExample(example);
220
+
221
+        		if (null != list && list.size() > 0) {
222
+        			//注销时间
223
+        			list.get(0).setZxTime(new Date());
224
+        			list.get(0).setOperationTime(new Date());//操作时间
225
+
226
+        			//修改登录日志信息
227
+        			systemLogMapper.updateByPrimaryKey(list.get(0));
228
+        		}
229
+        	}
230
+    	}
231
+    }
232
+
233
+    /**
234
+     * 操作日志实现思路:
235
+     * 1、URL要是可以在菜单里面找到对应菜单,那么当前这个操作属于功能操作日志
236
+     * 2、如果没在菜单里面找到对应菜单,却在按钮中找到了,那么就是功能访问日志
237
+     * 3、如果菜单和按钮中都没有找到对应的URL,那么说明当前这个方位没在功能管理里面配置正确,或者没有加入到功能管理中
238
+     * 
239
+     * @param request
240
+     * @param response
241
+     * @param url
242
+     */
243
+    @SuppressWarnings("all")
244
+	private void operationLogger(HttpServletRequest request, HttpServletResponse response, String url) {
245
+    	//获取用户信息和单位信息
246
+        String userJson = ObjectUtils.toString(request.getSession().getAttribute("userInfo"),"");
247
+        String orgInfoJson = ObjectUtils.toString(request.getSession().getAttribute("orgInfo"),"");
248
+        Map<String, String> user_map = getUserOrgInfo(userJson, orgInfoJson);
249
+
250
+        //是否还需要继续往下执行
251
+        boolean flag = false;
252
+
253
+    	//获取菜单权限并且组装功能日志
254
+    	String func_list = (String) redisUtil.get("hasFuncList");
255
+    	JSONArray array = JSONArray.parseArray(func_list);
256
+    	if (null != array && array.size() > 4) {
257
+    		JSONObject object = null;
258
+    		SystemLogThree log = new SystemLogThree();
259
+    		for (Iterator iterator = array.iterator(); iterator.hasNext();) {
260
+    			object = (JSONObject) iterator.next();
261
+    			String func_url = ObjectUtils.toString(object.get("funcUrl"));
262
+    			if (url.equals(func_url)) {
263
+    				log.setId(UUID.randomUUID().toString().replace("-", ""));
264
+    				log.setType("3");//功能访问日志
265
+    				log.setSystemIdentify(system_index);//标识
266
+    				log.setUserId(Integer.parseInt(user_map.get("userId")));//用户ID
267
+    				log.setUserZh(ObjectUtils.toString(user_map.get("username"),""));//账号
268
+    				log.setUserName(ObjectUtils.toString(user_map.get("realName"),""));//名称
269
+    				String device_ip = getIpAddr(request);
270
+    				log.setDeviceIp(device_ip);//操作IP
271
+    				log.setFuncId(Integer.parseInt(object.get("funcId").toString()));//功能ID
272
+    				log.setFuncName(ObjectUtils.toString(object.get("funcName")));//功能名称
273
+    				log.setOperationTime(new Date());//操作时间
274
+    				log.setUserRole(ObjectUtils.toString(user_map.get("roleName"),""));//角色
275
+    				log.setOrgId(Integer.parseInt(user_map.get("orgId")));//单位
276
+
277
+    				String enumid = ObjectUtils.toString(user_map.get("areaCode"), "0");
278
+    				if (!"0".equals(enumid)) {
279
+    					String strResult = basicFeignService.getEnumData(Integer.parseInt(enumid));
280
+    					if (null != strResult && !"".equals(strResult)) {
281
+    						JSONObject enum_obj = JSONObject.parseObject(strResult);
282
+    						log.setUserAddress(ObjectUtils.toString(enum_obj.get("gbcode"), ""));//行政区划
283
+    					}
284
+    				}
285
+
286
+    				//添加保存日志
287
+    				systemLogThreeMapper.insert(log);
288
+
289
+    				//已经是操作日志了,那么没必要在遍历按钮了
290
+    				flag = true;
291
+    				//也不用继续当前循环了
292
+    				break;
293
+    			}
294
+    		}
295
+    	}
296
+        //获取按钮权限并且组装访问日志
297
+    	if (!flag) {
298
+    		String perm_list = (String) redisUtil.get("permissionList");
299
+    		JSONArray but_array = JSONArray.parseArray(perm_list);
300
+        	if (null != but_array && but_array.size() > 4) {
301
+        		JSONObject but_object = null;
302
+        		SystemLogTwo log = new SystemLogTwo();
303
+        		for (Iterator iterator = but_array.iterator(); iterator.hasNext();) {
304
+        			but_object = (JSONObject) iterator.next();
305
+        			if (but_object == null) {
306
+        				continue;
307
+        			}
308
+        			String but_url = ObjectUtils.toString(but_object.get("btnUrl"), "");
309
+        			if (url.equals(but_url)) {
310
+        				log.setId(UUID.randomUUID().toString().replace("-", ""));
311
+        				log.setType("2");//功能操作日志
312
+        				log.setSystemIdentify(system_index);//标识
313
+        				log.setUserId(Integer.parseInt(user_map.get("userId")));//用户ID
314
+        				log.setUserZh(ObjectUtils.toString(user_map.get("username"),""));//账号
315
+        				log.setUserName(ObjectUtils.toString(user_map.get("realName"),""));//名称
316
+        				String device_ip = getIpAddr(request);
317
+        				log.setDeviceIp(device_ip);//操作IP
318
+        				String f_name = ObjectUtils.toString(but_object.get("funcName"), "");
319
+        				String b_name = ObjectUtils.toString(but_object.get("btnName"), "");
320
+        				String ramark = ObjectUtils.toString(but_object.get("remark"), "");
321
+        				StringBuffer sbf = new StringBuffer();
322
+        				if (!"".equals(ramark)) {
323
+        					sbf.append(f_name).append("功能").append(ramark).append("操作");
324
+        				} else {
325
+        					sbf.append(f_name).append("功能").append(b_name).append("操作");
326
+        				}
327
+        				log.setFuncId(Integer.parseInt(but_object.get("funcId").toString()));//功能ID
328
+        				log.setFuncName(ObjectUtils.toString(sbf.toString(), ""));//菜单名称
329
+        				log.setMethodName(url.substring(url.lastIndexOf("/")+1, url.length()));//方法名
330
+        				log.setBtnId(Integer.parseInt(but_object.get("btnId").toString()));//按钮ID
331
+        				log.setUserRole(ObjectUtils.toString(user_map.get("roleName"),""));//角色
332
+        				log.setOperationTime(new Date());//操作时间
333
+        				StringBuilder param = new StringBuilder();
334
+                        Map<String,String[]> map = request.getParameterMap();
335
+                        Set<String> key = map.keySet();
336
+                        for (String eachKey: key) {
337
+                            param.append(eachKey+"="+map.get(eachKey)[0]+"; ");
338
+                        }
339
+        				log.setParameter(param.toString());//传入参数
340
+
341
+        				String status = ObjectUtils.toString(response.getStatus(), "");
342
+        				log.setOperResult(status);//操作结果状态
343
+        				if ("200".equals(status)) {
344
+        					log.setRtnParam("请求成功");//返回参数
345
+        				} else {
346
+        					log.setRtnParam("请求失败");//返回参数
347
+        				}
348
+        				log.setOrgId(Integer.parseInt(user_map.get("orgId")));//所属机构
349
+        				String enumid = ObjectUtils.toString(user_map.get("areaCode"), "0");
350
+        				if (!"0".equals(enumid)) {
351
+        					String strResult = basicFeignService.getEnumData(Integer.parseInt(enumid));
352
+        					if (null != strResult && !"".equals(strResult)) {
353
+        						JSONObject enum_obj = JSONObject.parseObject(strResult);
354
+        						log.setUserAddress(ObjectUtils.toString(enum_obj.get("gbcode"), ""));//行政区划
355
+        					}
356
+        				}
357
+
358
+        				//添加保存日志
359
+        				systemLogTwoMapper.insert(log);
360
+
361
+        				//中断本次循环
362
+        				break;
363
+        			}
364
+        		}
365
+        	}
366
+    	}
367
+    }
368
+    /**
369
+     * 封装登录信息
370
+     * 
371
+     * @param userJson
372
+     * @param orgInfoJson
373
+     * @return
374
+     */
375
+    private Map<String, String> getUserOrgInfo(String userJson, String orgInfoJson) {
376
+    	Map<String, String> user_map = new HashMap<String, String>();
377
+    	JSONObject userinfo = JSONObject.parseObject(userJson);
378
+    	JSONObject orginfo = JSONObject.parseObject(orgInfoJson);
379
+    	user_map.put("userId", userinfo == null ? "" : userinfo.get("userId")+"");
380
+    	user_map.put("username", userinfo == null ? "" : userinfo.get("username")+"");
381
+    	user_map.put("realName", userinfo == null ? "" : userinfo.get("realName")+"");
382
+    	user_map.put("orgId", userinfo == null ? "" : userinfo.get("orgId")+"");
383
+    	user_map.put("roleName", userinfo == null ? "" : userinfo.get("roleNames")+"");
384
+    	user_map.put("areaCode", orginfo == null ? "":ObjectUtils.toString(orginfo.get("areaCode")+"",""));
385
+    	user_map.put("areaName", orginfo == null ? "":ObjectUtils.toString(orginfo.get("areaName")+"",""));
386
+    	user_map.put("orgName", orginfo == null ? "":ObjectUtils.toString(orginfo.get("orgName")+"",""));
387
+		return user_map;
388
+	}
114 389
 
390
+    public static void main(String[] args) {
391
+		
392
+		String a = "/depot-system/org/getuser";
393
+		System.out.println(a.indexOf("/", 1));
394
+		System.out.println(a.substring(a.lastIndexOf("/")+1, a.length()));
395
+	}
115 396
 }

+ 22 - 0
src/main/java/com/chinaitop/depot/system/feignService/BasicFeignService.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-basic")
12
+public interface BasicFeignService {
13
+
14
+	/**
15
+	 * 获取一条字典数据
16
+	 * @param username
17
+	 * @param password
18
+	 * @return
19
+	 */
20
+	@RequestMapping(value = "/Enum/findByEnum", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
21
+	String getEnumData(@RequestParam("id") Integer id);
22
+}

+ 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
+}

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

@@ -0,0 +1,30 @@
1
+package com.chinaitop.depot.system.mapper;
2
+
3
+import com.chinaitop.depot.system.model.SystemLog;
4
+import com.chinaitop.depot.system.model.SystemLogExample;
5
+import java.util.List;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+public interface SystemLogMapper {
9
+    int countByExample(SystemLogExample example);
10
+
11
+    int deleteByExample(SystemLogExample example);
12
+
13
+    int deleteByPrimaryKey(String id);
14
+
15
+    int insert(SystemLog record);
16
+
17
+    int insertSelective(SystemLog record);
18
+
19
+    List<SystemLog> selectByExample(SystemLogExample example);
20
+
21
+    SystemLog selectByPrimaryKey(String id);
22
+
23
+    int updateByExampleSelective(@Param("record") SystemLog record, @Param("example") SystemLogExample example);
24
+
25
+    int updateByExample(@Param("record") SystemLog record, @Param("example") SystemLogExample example);
26
+
27
+    int updateByPrimaryKeySelective(SystemLog record);
28
+
29
+    int updateByPrimaryKey(SystemLog record);
30
+}

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

@@ -0,0 +1,465 @@
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.SystemLogMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.system.model.SystemLog" >
5
+    <id 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.SystemLogExample" >
91
+    select
92
+    <if test="distinct" >
93
+      distinct
94
+    </if>
95
+    <include refid="Base_Column_List" />
96
+    from system_log
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
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
105
+    select 
106
+    <include refid="Base_Column_List" />
107
+    from system_log
108
+    where id = #{id,jdbcType=VARCHAR}
109
+  </select>
110
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
111
+    delete from system_log
112
+    where id = #{id,jdbcType=VARCHAR}
113
+  </delete>
114
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.system.model.SystemLogExample" >
115
+    delete from system_log
116
+    <if test="_parameter != null" >
117
+      <include refid="Example_Where_Clause" />
118
+    </if>
119
+  </delete>
120
+  <insert id="insert" parameterType="com.chinaitop.depot.system.model.SystemLog" >
121
+    insert into system_log (id, org_id, user_id, 
122
+      user_zh, user_name, user_role, 
123
+      user_address, dl_time, zx_time, 
124
+      func_id, func_name, btn_id, 
125
+      method_name, oper_result, parameter, 
126
+      rtn_param, describes, type, 
127
+      device_ip, system_identify, operation_time
128
+      )
129
+    values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, 
130
+      #{userZh,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userRole,jdbcType=VARCHAR}, 
131
+      #{userAddress,jdbcType=VARCHAR}, #{dlTime,jdbcType=TIMESTAMP}, #{zxTime,jdbcType=TIMESTAMP}, 
132
+      #{funcId,jdbcType=INTEGER}, #{funcName,jdbcType=VARCHAR}, #{btnId,jdbcType=INTEGER}, 
133
+      #{methodName,jdbcType=VARCHAR}, #{operResult,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR}, 
134
+      #{rtnParam,jdbcType=VARCHAR}, #{describes,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, 
135
+      #{deviceIp,jdbcType=VARCHAR}, #{systemIdentify,jdbcType=VARCHAR}, #{operationTime,jdbcType=TIMESTAMP}
136
+      )
137
+  </insert>
138
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.system.model.SystemLog" >
139
+    insert into system_log
140
+    <trim prefix="(" suffix=")" suffixOverrides="," >
141
+      <if test="id != null" >
142
+        id,
143
+      </if>
144
+      <if test="orgId != null" >
145
+        org_id,
146
+      </if>
147
+      <if test="userId != null" >
148
+        user_id,
149
+      </if>
150
+      <if test="userZh != null" >
151
+        user_zh,
152
+      </if>
153
+      <if test="userName != null" >
154
+        user_name,
155
+      </if>
156
+      <if test="userRole != null" >
157
+        user_role,
158
+      </if>
159
+      <if test="userAddress != null" >
160
+        user_address,
161
+      </if>
162
+      <if test="dlTime != null" >
163
+        dl_time,
164
+      </if>
165
+      <if test="zxTime != null" >
166
+        zx_time,
167
+      </if>
168
+      <if test="funcId != null" >
169
+        func_id,
170
+      </if>
171
+      <if test="funcName != null" >
172
+        func_name,
173
+      </if>
174
+      <if test="btnId != null" >
175
+        btn_id,
176
+      </if>
177
+      <if test="methodName != null" >
178
+        method_name,
179
+      </if>
180
+      <if test="operResult != null" >
181
+        oper_result,
182
+      </if>
183
+      <if test="parameter != null" >
184
+        parameter,
185
+      </if>
186
+      <if test="rtnParam != null" >
187
+        rtn_param,
188
+      </if>
189
+      <if test="describes != null" >
190
+        describes,
191
+      </if>
192
+      <if test="type != null" >
193
+        type,
194
+      </if>
195
+      <if test="deviceIp != null" >
196
+        device_ip,
197
+      </if>
198
+      <if test="systemIdentify != null" >
199
+        system_identify,
200
+      </if>
201
+      <if test="operationTime != null" >
202
+        operation_time,
203
+      </if>
204
+    </trim>
205
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
206
+      <if test="id != null" >
207
+        #{id,jdbcType=VARCHAR},
208
+      </if>
209
+      <if test="orgId != null" >
210
+        #{orgId,jdbcType=INTEGER},
211
+      </if>
212
+      <if test="userId != null" >
213
+        #{userId,jdbcType=INTEGER},
214
+      </if>
215
+      <if test="userZh != null" >
216
+        #{userZh,jdbcType=VARCHAR},
217
+      </if>
218
+      <if test="userName != null" >
219
+        #{userName,jdbcType=VARCHAR},
220
+      </if>
221
+      <if test="userRole != null" >
222
+        #{userRole,jdbcType=VARCHAR},
223
+      </if>
224
+      <if test="userAddress != null" >
225
+        #{userAddress,jdbcType=VARCHAR},
226
+      </if>
227
+      <if test="dlTime != null" >
228
+        #{dlTime,jdbcType=TIMESTAMP},
229
+      </if>
230
+      <if test="zxTime != null" >
231
+        #{zxTime,jdbcType=TIMESTAMP},
232
+      </if>
233
+      <if test="funcId != null" >
234
+        #{funcId,jdbcType=INTEGER},
235
+      </if>
236
+      <if test="funcName != null" >
237
+        #{funcName,jdbcType=VARCHAR},
238
+      </if>
239
+      <if test="btnId != null" >
240
+        #{btnId,jdbcType=INTEGER},
241
+      </if>
242
+      <if test="methodName != null" >
243
+        #{methodName,jdbcType=VARCHAR},
244
+      </if>
245
+      <if test="operResult != null" >
246
+        #{operResult,jdbcType=VARCHAR},
247
+      </if>
248
+      <if test="parameter != null" >
249
+        #{parameter,jdbcType=VARCHAR},
250
+      </if>
251
+      <if test="rtnParam != null" >
252
+        #{rtnParam,jdbcType=VARCHAR},
253
+      </if>
254
+      <if test="describes != null" >
255
+        #{describes,jdbcType=VARCHAR},
256
+      </if>
257
+      <if test="type != null" >
258
+        #{type,jdbcType=VARCHAR},
259
+      </if>
260
+      <if test="deviceIp != null" >
261
+        #{deviceIp,jdbcType=VARCHAR},
262
+      </if>
263
+      <if test="systemIdentify != null" >
264
+        #{systemIdentify,jdbcType=VARCHAR},
265
+      </if>
266
+      <if test="operationTime != null" >
267
+        #{operationTime,jdbcType=TIMESTAMP},
268
+      </if>
269
+    </trim>
270
+  </insert>
271
+  <select id="countByExample" parameterType="com.chinaitop.depot.system.model.SystemLogExample" resultType="java.lang.Integer" >
272
+    select count(*) from system_log
273
+    <if test="_parameter != null" >
274
+      <include refid="Example_Where_Clause" />
275
+    </if>
276
+  </select>
277
+  <update id="updateByExampleSelective" parameterType="map" >
278
+    update system_log
279
+    <set >
280
+      <if test="record.id != null" >
281
+        id = #{record.id,jdbcType=VARCHAR},
282
+      </if>
283
+      <if test="record.orgId != null" >
284
+        org_id = #{record.orgId,jdbcType=INTEGER},
285
+      </if>
286
+      <if test="record.userId != null" >
287
+        user_id = #{record.userId,jdbcType=INTEGER},
288
+      </if>
289
+      <if test="record.userZh != null" >
290
+        user_zh = #{record.userZh,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="record.userName != null" >
293
+        user_name = #{record.userName,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="record.userRole != null" >
296
+        user_role = #{record.userRole,jdbcType=VARCHAR},
297
+      </if>
298
+      <if test="record.userAddress != null" >
299
+        user_address = #{record.userAddress,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="record.dlTime != null" >
302
+        dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
303
+      </if>
304
+      <if test="record.zxTime != null" >
305
+        zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
306
+      </if>
307
+      <if test="record.funcId != null" >
308
+        func_id = #{record.funcId,jdbcType=INTEGER},
309
+      </if>
310
+      <if test="record.funcName != null" >
311
+        func_name = #{record.funcName,jdbcType=VARCHAR},
312
+      </if>
313
+      <if test="record.btnId != null" >
314
+        btn_id = #{record.btnId,jdbcType=INTEGER},
315
+      </if>
316
+      <if test="record.methodName != null" >
317
+        method_name = #{record.methodName,jdbcType=VARCHAR},
318
+      </if>
319
+      <if test="record.operResult != null" >
320
+        oper_result = #{record.operResult,jdbcType=VARCHAR},
321
+      </if>
322
+      <if test="record.parameter != null" >
323
+        parameter = #{record.parameter,jdbcType=VARCHAR},
324
+      </if>
325
+      <if test="record.rtnParam != null" >
326
+        rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
327
+      </if>
328
+      <if test="record.describes != null" >
329
+        describes = #{record.describes,jdbcType=VARCHAR},
330
+      </if>
331
+      <if test="record.type != null" >
332
+        type = #{record.type,jdbcType=VARCHAR},
333
+      </if>
334
+      <if test="record.deviceIp != null" >
335
+        device_ip = #{record.deviceIp,jdbcType=VARCHAR},
336
+      </if>
337
+      <if test="record.systemIdentify != null" >
338
+        system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
339
+      </if>
340
+      <if test="record.operationTime != null" >
341
+        operation_time = #{record.operationTime,jdbcType=TIMESTAMP},
342
+      </if>
343
+    </set>
344
+    <if test="_parameter != null" >
345
+      <include refid="Update_By_Example_Where_Clause" />
346
+    </if>
347
+  </update>
348
+  <update id="updateByExample" parameterType="map" >
349
+    update system_log
350
+    set id = #{record.id,jdbcType=VARCHAR},
351
+      org_id = #{record.orgId,jdbcType=INTEGER},
352
+      user_id = #{record.userId,jdbcType=INTEGER},
353
+      user_zh = #{record.userZh,jdbcType=VARCHAR},
354
+      user_name = #{record.userName,jdbcType=VARCHAR},
355
+      user_role = #{record.userRole,jdbcType=VARCHAR},
356
+      user_address = #{record.userAddress,jdbcType=VARCHAR},
357
+      dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
358
+      zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
359
+      func_id = #{record.funcId,jdbcType=INTEGER},
360
+      func_name = #{record.funcName,jdbcType=VARCHAR},
361
+      btn_id = #{record.btnId,jdbcType=INTEGER},
362
+      method_name = #{record.methodName,jdbcType=VARCHAR},
363
+      oper_result = #{record.operResult,jdbcType=VARCHAR},
364
+      parameter = #{record.parameter,jdbcType=VARCHAR},
365
+      rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
366
+      describes = #{record.describes,jdbcType=VARCHAR},
367
+      type = #{record.type,jdbcType=VARCHAR},
368
+      device_ip = #{record.deviceIp,jdbcType=VARCHAR},
369
+      system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
370
+      operation_time = #{record.operationTime,jdbcType=TIMESTAMP}
371
+    <if test="_parameter != null" >
372
+      <include refid="Update_By_Example_Where_Clause" />
373
+    </if>
374
+  </update>
375
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.system.model.SystemLog" >
376
+    update system_log
377
+    <set >
378
+      <if test="orgId != null" >
379
+        org_id = #{orgId,jdbcType=INTEGER},
380
+      </if>
381
+      <if test="userId != null" >
382
+        user_id = #{userId,jdbcType=INTEGER},
383
+      </if>
384
+      <if test="userZh != null" >
385
+        user_zh = #{userZh,jdbcType=VARCHAR},
386
+      </if>
387
+      <if test="userName != null" >
388
+        user_name = #{userName,jdbcType=VARCHAR},
389
+      </if>
390
+      <if test="userRole != null" >
391
+        user_role = #{userRole,jdbcType=VARCHAR},
392
+      </if>
393
+      <if test="userAddress != null" >
394
+        user_address = #{userAddress,jdbcType=VARCHAR},
395
+      </if>
396
+      <if test="dlTime != null" >
397
+        dl_time = #{dlTime,jdbcType=TIMESTAMP},
398
+      </if>
399
+      <if test="zxTime != null" >
400
+        zx_time = #{zxTime,jdbcType=TIMESTAMP},
401
+      </if>
402
+      <if test="funcId != null" >
403
+        func_id = #{funcId,jdbcType=INTEGER},
404
+      </if>
405
+      <if test="funcName != null" >
406
+        func_name = #{funcName,jdbcType=VARCHAR},
407
+      </if>
408
+      <if test="btnId != null" >
409
+        btn_id = #{btnId,jdbcType=INTEGER},
410
+      </if>
411
+      <if test="methodName != null" >
412
+        method_name = #{methodName,jdbcType=VARCHAR},
413
+      </if>
414
+      <if test="operResult != null" >
415
+        oper_result = #{operResult,jdbcType=VARCHAR},
416
+      </if>
417
+      <if test="parameter != null" >
418
+        parameter = #{parameter,jdbcType=VARCHAR},
419
+      </if>
420
+      <if test="rtnParam != null" >
421
+        rtn_param = #{rtnParam,jdbcType=VARCHAR},
422
+      </if>
423
+      <if test="describes != null" >
424
+        describes = #{describes,jdbcType=VARCHAR},
425
+      </if>
426
+      <if test="type != null" >
427
+        type = #{type,jdbcType=VARCHAR},
428
+      </if>
429
+      <if test="deviceIp != null" >
430
+        device_ip = #{deviceIp,jdbcType=VARCHAR},
431
+      </if>
432
+      <if test="systemIdentify != null" >
433
+        system_identify = #{systemIdentify,jdbcType=VARCHAR},
434
+      </if>
435
+      <if test="operationTime != null" >
436
+        operation_time = #{operationTime,jdbcType=TIMESTAMP},
437
+      </if>
438
+    </set>
439
+    where id = #{id,jdbcType=VARCHAR}
440
+  </update>
441
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.system.model.SystemLog" >
442
+    update system_log
443
+    set org_id = #{orgId,jdbcType=INTEGER},
444
+      user_id = #{userId,jdbcType=INTEGER},
445
+      user_zh = #{userZh,jdbcType=VARCHAR},
446
+      user_name = #{userName,jdbcType=VARCHAR},
447
+      user_role = #{userRole,jdbcType=VARCHAR},
448
+      user_address = #{userAddress,jdbcType=VARCHAR},
449
+      dl_time = #{dlTime,jdbcType=TIMESTAMP},
450
+      zx_time = #{zxTime,jdbcType=TIMESTAMP},
451
+      func_id = #{funcId,jdbcType=INTEGER},
452
+      func_name = #{funcName,jdbcType=VARCHAR},
453
+      btn_id = #{btnId,jdbcType=INTEGER},
454
+      method_name = #{methodName,jdbcType=VARCHAR},
455
+      oper_result = #{operResult,jdbcType=VARCHAR},
456
+      parameter = #{parameter,jdbcType=VARCHAR},
457
+      rtn_param = #{rtnParam,jdbcType=VARCHAR},
458
+      describes = #{describes,jdbcType=VARCHAR},
459
+      type = #{type,jdbcType=VARCHAR},
460
+      device_ip = #{deviceIp,jdbcType=VARCHAR},
461
+      system_identify = #{systemIdentify,jdbcType=VARCHAR},
462
+      operation_time = #{operationTime,jdbcType=TIMESTAMP}
463
+    where id = #{id,jdbcType=VARCHAR}
464
+  </update>
465
+</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/SystemLog.java

@@ -0,0 +1,383 @@
1
+package com.chinaitop.depot.system.model;
2
+
3
+import java.util.Date;
4
+
5
+public class SystemLog {
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
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1619 - 0
src/main/java/com/chinaitop/depot/system/model/SystemLogExample.java


+ 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
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 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
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1619 - 0
src/main/java/com/chinaitop/depot/system/model/SystemLogTwoExample.java


+ 66 - 0
src/main/java/com/chinaitop/depot/utils/RedisConfig.java

@@ -0,0 +1,66 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
4
+import com.fasterxml.jackson.annotation.PropertyAccessor;
5
+import com.fasterxml.jackson.databind.ObjectMapper;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.context.annotation.Bean;
8
+import org.springframework.context.annotation.Configuration;
9
+import org.springframework.data.redis.connection.RedisConnectionFactory;
10
+import org.springframework.data.redis.core.HashOperations;
11
+import org.springframework.data.redis.core.ListOperations;
12
+import org.springframework.data.redis.core.RedisTemplate;
13
+import org.springframework.data.redis.core.SetOperations;
14
+import org.springframework.data.redis.core.ValueOperations;
15
+import org.springframework.data.redis.core.ZSetOperations;
16
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
17
+import org.springframework.data.redis.serializer.StringRedisSerializer;
18
+
19
+@Configuration
20
+public class RedisConfig {
21
+    @Autowired
22
+    private RedisConnectionFactory factory;
23
+
24
+    @Bean
25
+    public RedisTemplate<String, Object> redisTemplate() {
26
+        Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<Object>(Object.class);
27
+        ObjectMapper om = new ObjectMapper();
28
+        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
29
+        om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
30
+        jackson2JsonRedisSerializer.setObjectMapper(om);
31
+        RedisTemplate<String, Object> template = new RedisTemplate<String, Object>();
32
+        template.setConnectionFactory(factory);
33
+        template.setKeySerializer(new StringRedisSerializer());
34
+        template.setValueSerializer(jackson2JsonRedisSerializer);
35
+        template.setHashKeySerializer(jackson2JsonRedisSerializer);
36
+        template.setHashValueSerializer(jackson2JsonRedisSerializer);
37
+        template.setDefaultSerializer(new StringRedisSerializer());
38
+        template.afterPropertiesSet();
39
+        return template;
40
+    }
41
+
42
+    @Bean
43
+    public HashOperations<String, String, Object> hashOperations(RedisTemplate<String, Object> redisTemplate) {
44
+        return redisTemplate.opsForHash();
45
+    }
46
+
47
+    @Bean
48
+    public ValueOperations<String, String> valueOperations(RedisTemplate<String, String> redisTemplate) {
49
+        return redisTemplate.opsForValue();
50
+    }
51
+
52
+    @Bean
53
+    public ListOperations<String, Object> listOperations(RedisTemplate<String, Object> redisTemplate) {
54
+        return redisTemplate.opsForList();
55
+    }
56
+
57
+    @Bean
58
+    public SetOperations<String, Object> setOperations(RedisTemplate<String, Object> redisTemplate) {
59
+        return redisTemplate.opsForSet();
60
+    }
61
+
62
+    @Bean
63
+    public ZSetOperations<String, Object> zSetOperations(RedisTemplate<String, Object> redisTemplate) {
64
+        return redisTemplate.opsForZSet();
65
+    }
66
+}

+ 547 - 0
src/main/java/com/chinaitop/depot/utils/RedisUtil.java

@@ -0,0 +1,547 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import java.util.List;
4
+import java.util.Map;
5
+import java.util.Set;
6
+import java.util.concurrent.TimeUnit;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.data.redis.core.HashOperations;
9
+import org.springframework.data.redis.core.ListOperations;
10
+import org.springframework.data.redis.core.RedisTemplate;
11
+import org.springframework.data.redis.core.SetOperations;
12
+import org.springframework.data.redis.core.ValueOperations;
13
+import org.springframework.stereotype.Component;
14
+import org.springframework.util.CollectionUtils;
15
+
16
+@Component
17
+public class RedisUtil {
18
+
19
+    @Autowired
20
+    private RedisTemplate<String, Object> redisTemplate;
21
+    @Autowired
22
+    private ValueOperations<String, String> valueOperations;
23
+    @Autowired
24
+    private HashOperations<String, String, Object> hashOperations;
25
+    @Autowired
26
+    private ListOperations<String, Object> listOperations;
27
+    @Autowired
28
+    private SetOperations<String, Object> setOperations;
29
+
30
+    //=============================common============================
31
+    /**
32
+     * 指定缓存失效时间
33
+     * @param key 键
34
+     * @param time 时间(秒)
35
+     * @return
36
+     */
37
+    public boolean expire(String key,long time){
38
+        try {
39
+            if(time>0){
40
+                redisTemplate.expire(key, time, TimeUnit.SECONDS);
41
+            }
42
+            return true;
43
+        } catch (Exception e) {
44
+            e.printStackTrace();
45
+            return false;
46
+        }
47
+    }
48
+
49
+    /**
50
+     * 根据key 获取过期时间
51
+     * @param key 键 不能为null
52
+     * @return 时间(秒) 返回0代表为永久有效
53
+     */
54
+    public long getExpire(String key){
55
+        return redisTemplate.getExpire(key,TimeUnit.SECONDS);
56
+    }
57
+
58
+    /**
59
+     * 判断key是否存在
60
+     * @param key 键
61
+     * @return true 存在 false不存在
62
+     */
63
+    public boolean hasKey(String key){
64
+        try {
65
+            return redisTemplate.hasKey(key);
66
+        } catch (Exception e) {
67
+            e.printStackTrace();
68
+            return false;
69
+        }
70
+    }
71
+
72
+    /**
73
+     * 删除缓存
74
+     * @param key 可以传一个值 或多个
75
+     */
76
+    @SuppressWarnings("unchecked")
77
+    public void del(String ... key){
78
+        if(key!=null&&key.length>0){
79
+            if(key.length==1){
80
+                redisTemplate.delete(key[0]);
81
+            }else{
82
+                redisTemplate.delete(CollectionUtils.arrayToList(key));
83
+            }
84
+        }
85
+    }
86
+
87
+    //============================String=============================
88
+    /**
89
+     * 普通缓存获取
90
+     * @param key 键
91
+     * @return 值
92
+     */
93
+    public Object get(String key){
94
+        return key==null?null:valueOperations.get(key);
95
+    }
96
+
97
+    /**
98
+     * 普通缓存放入
99
+     * @param key 键
100
+     * @param value 值
101
+     * @return true成功 false失败
102
+     */
103
+    public boolean set(String key,String value) {
104
+        try {
105
+            valueOperations.set(key, value);
106
+            return true;
107
+        } catch (Exception e) {
108
+            e.printStackTrace();
109
+            return false;
110
+        }
111
+
112
+    }
113
+
114
+    /**
115
+     * 普通缓存放入并设置时间
116
+     * @param key 键
117
+     * @param value 值
118
+     * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期
119
+     * @return true成功 false 失败
120
+     */
121
+    public boolean set(String key,String value,long time){
122
+        try {
123
+            if(time>0){
124
+                valueOperations.set(key, value, time, TimeUnit.SECONDS);
125
+            }else{
126
+                set(key, value);
127
+            }
128
+            return true;
129
+        } catch (Exception e) {
130
+            e.printStackTrace();
131
+            return false;
132
+        }
133
+    }
134
+
135
+    /**
136
+     * 递增
137
+     * @param key 键
138
+     * @param by 要增加几(大于0)
139
+     * @return
140
+     */
141
+    public long incr(String key, long delta){
142
+        if(delta<0){
143
+            throw new RuntimeException("递增因子必须大于0");
144
+        }
145
+        return valueOperations.increment(key, delta);
146
+    }
147
+
148
+    /**
149
+     * 递减
150
+     * @param key 键
151
+     * @param by 要减少几(小于0)
152
+     * @return
153
+     */
154
+    public long decr(String key, long delta){
155
+        if(delta<0){
156
+            throw new RuntimeException("递减因子必须大于0");
157
+        }
158
+        return valueOperations.increment(key, -delta);
159
+    }
160
+
161
+    //================================Map=================================
162
+    /**
163
+     * HashGet
164
+     * @param key 键 不能为null
165
+     * @param item 项 不能为null
166
+     * @return 值
167
+     */
168
+    public Object hget(String key,String item){
169
+        return hashOperations.get(key, item);
170
+    }
171
+
172
+    /**
173
+     * 获取hashKey对应的所有键值
174
+     * @param key 键
175
+     * @return 对应的多个键值
176
+     */
177
+    public Map<String, Object> hmget(String key){
178
+        return hashOperations.entries(key);
179
+    }
180
+
181
+    /**
182
+     * HashSet
183
+     * @param key 键
184
+     * @param map 对应多个键值
185
+     * @return true 成功 false 失败
186
+     */
187
+    public boolean hmset(String key, Map<String,Object> map){
188
+        try {
189
+            hashOperations.putAll(key, map);
190
+            return true;
191
+        } catch (Exception e) {
192
+            e.printStackTrace();
193
+            return false;
194
+        }
195
+    }
196
+
197
+    /**
198
+     * HashSet 并设置时间
199
+     * @param key 键
200
+     * @param map 对应多个键值
201
+     * @param time 时间(秒)
202
+     * @return true成功 false失败
203
+     */
204
+    public boolean hmset(String key, Map<String,Object> map, long time){
205
+        try {
206
+            hashOperations.putAll(key, map);
207
+            if(time>0){
208
+                expire(key, time);
209
+            }
210
+            return true;
211
+        } catch (Exception e) {
212
+            e.printStackTrace();
213
+            return false;
214
+        }
215
+    }
216
+
217
+    /**
218
+     * 向一张hash表中放入数据,如果不存在将创建
219
+     * @param key 键
220
+     * @param item 项
221
+     * @param value 值
222
+     * @return true 成功 false失败
223
+     */
224
+    public boolean hset(String key,String item,Object value) {
225
+        try {
226
+            hashOperations.put(key, item, value);
227
+            return true;
228
+        } catch (Exception e) {
229
+            e.printStackTrace();
230
+            return false;
231
+        }
232
+    }
233
+
234
+    /**
235
+     * 向一张hash表中放入数据,如果不存在将创建
236
+     * @param key 键
237
+     * @param item 项
238
+     * @param value 值
239
+     * @param time 时间(秒)  注意:如果已存在的hash表有时间,这里将会替换原有的时间
240
+     * @return true 成功 false失败
241
+     */
242
+    public boolean hset(String key,String item,Object value,long time) {
243
+        try {
244
+            hashOperations.put(key, item, value);
245
+            if(time>0){
246
+                expire(key, time);
247
+            }
248
+            return true;
249
+        } catch (Exception e) {
250
+            e.printStackTrace();
251
+            return false;
252
+        }
253
+    }
254
+
255
+    /**
256
+     * 删除hash表中的值
257
+     * @param key 键 不能为null
258
+     * @param item 项 可以使多个 不能为null
259
+     */
260
+    public void hdel(String key, Object... item){
261
+        hashOperations.delete(key,item);
262
+    }
263
+
264
+    /**
265
+     * 判断hash表中是否有该项的值
266
+     * @param key 键 不能为null
267
+     * @param item 项 不能为null
268
+     * @return true 存在 false不存在
269
+     */
270
+    public boolean hHasKey(String key, String item){
271
+        return hashOperations.hasKey(key, item);
272
+    }
273
+
274
+    /**
275
+     * hash递增 如果不存在,就会创建一个 并把新增后的值返回
276
+     * @param key 键
277
+     * @param item 项
278
+     * @param by 要增加几(大于0)
279
+     * @return
280
+     */
281
+    public double hincr(String key, String item,double by){
282
+        return hashOperations.increment(key, item, by);
283
+    }
284
+
285
+    /**
286
+     * hash递减
287
+     * @param key 键
288
+     * @param item 项
289
+     * @param by 要减少记(小于0)
290
+     * @return
291
+     */
292
+    public double hdecr(String key, String item,double by){
293
+        return hashOperations.increment(key, item,-by);
294
+    }
295
+
296
+    //============================set=============================
297
+    /**
298
+     * 根据key获取Set中的所有值
299
+     * @param key 键
300
+     * @return
301
+     */
302
+    public Set<Object> sGet(String key){
303
+        try {
304
+            return setOperations.members(key);
305
+        } catch (Exception e) {
306
+            e.printStackTrace();
307
+            return null;
308
+        }
309
+    }
310
+
311
+    /**
312
+     * 根据value从一个set中查询,是否存在
313
+     * @param key 键
314
+     * @param value 值
315
+     * @return true 存在 false不存在
316
+     */
317
+    public boolean sHasKey(String key,Object value){
318
+        try {
319
+            return setOperations.isMember(key, value);
320
+        } catch (Exception e) {
321
+            e.printStackTrace();
322
+            return false;
323
+        }
324
+    }
325
+
326
+    /**
327
+     * 将数据放入set缓存
328
+     * @param key 键
329
+     * @param values 值 可以是多个
330
+     * @return 成功个数
331
+     */
332
+    public long sSet(String key, Object...values) {
333
+        try {
334
+            return setOperations.add(key, values);
335
+        } catch (Exception e) {
336
+            e.printStackTrace();
337
+            return 0;
338
+        }
339
+    }
340
+
341
+    /**
342
+     * 将set数据放入缓存
343
+     * @param key 键
344
+     * @param time 时间(秒)
345
+     * @param values 值 可以是多个
346
+     * @return 成功个数
347
+     */
348
+    public long sSetAndTime(String key,long time,Object...values) {
349
+        try {
350
+            Long count = setOperations.add(key, values);
351
+            if(time>0) expire(key, time);
352
+            return count;
353
+        } catch (Exception e) {
354
+            e.printStackTrace();
355
+            return 0;
356
+        }
357
+    }
358
+
359
+    /**
360
+     * 获取set缓存的长度
361
+     * @param key 键
362
+     * @return
363
+     */
364
+    public long sGetSetSize(String key){
365
+        try {
366
+            return setOperations.size(key);
367
+        } catch (Exception e) {
368
+            e.printStackTrace();
369
+            return 0;
370
+        }
371
+    }
372
+
373
+    /**
374
+     * 移除值为value的
375
+     * @param key 键
376
+     * @param values 值 可以是多个
377
+     * @return 移除的个数
378
+     */
379
+    public long setRemove(String key, Object ...values) {
380
+        try {
381
+            Long count = setOperations.remove(key, values);
382
+            return count;
383
+        } catch (Exception e) {
384
+            e.printStackTrace();
385
+            return 0;
386
+        }
387
+    }
388
+    //===============================list=================================
389
+
390
+    /**
391
+     * 获取list缓存的内容
392
+     * @param key 键
393
+     * @param start 开始
394
+     * @param end 结束  0 到 -1代表所有值
395
+     * @return
396
+     */
397
+    public List<Object> lGet(String key, long start, long end){
398
+        try {
399
+            return listOperations.range(key, start, end);
400
+        } catch (Exception e) {
401
+            e.printStackTrace();
402
+            return null;
403
+        }
404
+    }
405
+
406
+    /**
407
+     * 获取list缓存的所有内容
408
+     * @param key
409
+     * @return
410
+     */
411
+    public List<Object> lGetAll(String key){
412
+        return lGet(key,0,-1);
413
+    }
414
+
415
+    /**
416
+     * 获取list缓存的长度
417
+     * @param key 键
418
+     * @return
419
+     */
420
+    public long lGetListSize(String key){
421
+        try {
422
+            return listOperations.size(key);
423
+        } catch (Exception e) {
424
+            e.printStackTrace();
425
+            return 0;
426
+        }
427
+    }
428
+
429
+    /**
430
+     * 通过索引 获取list中的值
431
+     * @param key 键
432
+     * @param index 索引  index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推
433
+     * @return
434
+     */
435
+    public Object lGetIndex(String key,long index){
436
+        try {
437
+            return listOperations.index(key, index);
438
+        } catch (Exception e) {
439
+            e.printStackTrace();
440
+            return null;
441
+        }
442
+    }
443
+
444
+    /**
445
+     * 将list放入缓存
446
+     * @param key 键
447
+     * @param value 值
448
+     * @param time 时间(秒)
449
+     * @return
450
+     */
451
+    public boolean lSet(String key, Object value) {
452
+        try {
453
+            listOperations.rightPush(key, value);
454
+            return true;
455
+        } catch (Exception e) {
456
+            e.printStackTrace();
457
+            return false;
458
+        }
459
+    }
460
+
461
+    /**
462
+     * 将list放入缓存
463
+     * @param key 键
464
+     * @param value 值
465
+     * @param time 时间(秒)
466
+     * @return
467
+     */
468
+    public boolean lSet(String key, Object value, long time) {
469
+        try {
470
+            listOperations.rightPush(key, value);
471
+            if (time > 0) expire(key, time);
472
+            return true;
473
+        } catch (Exception e) {
474
+            e.printStackTrace();
475
+            return false;
476
+        }
477
+    }
478
+
479
+    /**
480
+     * 将list放入缓存
481
+     * @param key 键
482
+     * @param value 值
483
+     * @param time 时间(秒)
484
+     * @return
485
+     */
486
+    public boolean lSet(String key, List<Object> value) {
487
+        try {
488
+            listOperations.rightPushAll(key, value);
489
+            return true;
490
+        } catch (Exception e) {
491
+            e.printStackTrace();
492
+            return false;
493
+        }
494
+    }
495
+
496
+    /**
497
+     * 将list放入缓存
498
+     * @param key 键
499
+     * @param value 值
500
+     * @param time 时间(秒)
501
+     * @return
502
+     */
503
+    public boolean lSet(String key, List<Object> value, long time) {
504
+        try {
505
+            listOperations.rightPushAll(key, value);
506
+            if (time > 0) expire(key, time);
507
+            return true;
508
+        } catch (Exception e) {
509
+            e.printStackTrace();
510
+            return false;
511
+        }
512
+    }
513
+
514
+    /**
515
+     * 根据索引修改list中的某条数据
516
+     * @param key 键
517
+     * @param index 索引
518
+     * @param value 值
519
+     * @return
520
+     */
521
+    public boolean lUpdateIndex(String key, long index,Object value) {
522
+        try {
523
+            listOperations.set(key, index, value);
524
+            return true;
525
+        } catch (Exception e) {
526
+            e.printStackTrace();
527
+            return false;
528
+        }
529
+    }
530
+
531
+    /**
532
+     * 移除N个值为value
533
+     * @param key 键
534
+     * @param count 移除多少个
535
+     * @param value 值
536
+     * @return 移除的个数
537
+     */
538
+    public long lRemove(String key,long count,Object value) {
539
+        try {
540
+            Long remove = listOperations.remove(key, count, value);
541
+            return remove;
542
+        } catch (Exception e) {
543
+            e.printStackTrace();
544
+            return 0;
545
+        }
546
+    }
547
+}

+ 3 - 5
src/main/resources/static/app/system/views/systemLog.html

@@ -20,11 +20,9 @@
20 20
 								<div class="dt-toolbar">
21 21
 									<div class="col-xs-12 col-sm-9">
22 22
 										<div class="form-group">
23
-											<label> 操作人:&emsp;<input type="search" ng-model="search.username"
24
-												class="form-control input-sm" placeholder=""> &emsp;
25
-											</label>
26
-											<a class="btn btn-default btn-sm" ng-click="loadData()">
27
-												<i class="fa fa-search"></i>&nbsp;查&nbsp;询</a>
23
+											<label></label>
24
+<!-- 											<a class="btn btn-default btn-sm" ng-click="loadData()"> -->
25
+<!-- 												<i class="fa fa-search"></i>&nbsp;查&nbsp;询</a> -->
28 26
 										</div>
29 27
 									</div>
30 28
 									<div class="col-sm-3 col-xs-6 hidden-xs">