|
@@ -2,7 +2,9 @@ package com.sooka.system.controller;
|
|
|
|
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
import java.util.Deque;
|
|
import java.util.Deque;
|
|
|
|
+import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
import com.github.pagehelper.Page;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
@@ -17,6 +19,9 @@ import com.sooka.common.core.text.Convert;
|
|
import com.sooka.common.enums.BusinessType;
|
|
import com.sooka.common.enums.BusinessType;
|
|
import com.sooka.common.utils.CacheUtils;
|
|
import com.sooka.common.utils.CacheUtils;
|
|
import com.sooka.common.utils.poi.ExcelUtil;
|
|
import com.sooka.common.utils.poi.ExcelUtil;
|
|
|
|
+import com.sooka.system.domain.TUInterfaceinfo;
|
|
|
|
+import com.sooka.system.mapper.TUInterfaceinfoMapper;
|
|
|
|
+import com.sooka.system.mapper.TULogMapper;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.apache.shiro.cache.Cache;
|
|
import org.apache.shiro.cache.Cache;
|
|
import org.apache.shiro.cache.CacheManager;
|
|
import org.apache.shiro.cache.CacheManager;
|
|
@@ -35,6 +40,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
import com.sooka.system.domain.TULog;
|
|
import com.sooka.system.domain.TULog;
|
|
import com.sooka.system.service.ITULogService;
|
|
import com.sooka.system.service.ITULogService;
|
|
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 接口调用日志Controller
|
|
* 接口调用日志Controller
|
|
@@ -51,6 +58,12 @@ public class TULogController extends BaseController
|
|
@Autowired
|
|
@Autowired
|
|
private ITULogService tULogService;
|
|
private ITULogService tULogService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private TULogMapper tuLogMapper;
|
|
|
|
+
|
|
|
|
+ @Resource
|
|
|
|
+ private TUInterfaceinfoMapper tuInterfaceinfoMapper;
|
|
|
|
+
|
|
|
|
|
|
@RequiresPermissions("system:log:view")
|
|
@RequiresPermissions("system:log:view")
|
|
@GetMapping("/{shareType}")
|
|
@GetMapping("/{shareType}")
|
|
@@ -82,11 +95,34 @@ public class TULogController extends BaseController
|
|
TULog tULog = new TULog();
|
|
TULog tULog = new TULog();
|
|
tULog.setInterfaceinfoId(id);
|
|
tULog.setInterfaceinfoId(id);
|
|
tULog.setLoginName(loginName);
|
|
tULog.setLoginName(loginName);
|
|
-// tULog.setPlatformInterfacetype(platformInterfacetype);
|
|
|
|
|
|
+ //update t_u_log set platform_interfacetype = (select share_type from interfaceinfo where id = interfaceinfo_id)
|
|
|
|
+ //Affected rows: 1124113
|
|
|
|
+ //时间: 265.674s
|
|
|
|
+// tULog.setPlatformInterfacetype(platformInterfacetype);//按照接口id就可以确定唯一的共享类型,也就不需要按照共享类型查询了。
|
|
tULog.setDeptName(deptName);
|
|
tULog.setDeptName(deptName);
|
|
startPage();
|
|
startPage();
|
|
List<TULog> list = tULogService.selectTULogList(tULog);
|
|
List<TULog> list = tULogService.selectTULogList(tULog);
|
|
- return getDataTable(list, getTotal(tULog));
|
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
+ /*PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
|
+ Integer pageNum = pageDomain.getPageNum();
|
|
|
|
+ Integer pageSize = pageDomain.getPageSize();
|
|
|
|
+ String limit = "limit " + ((pageNum - 1) * pageSize) + ", " + pageSize;
|
|
|
|
+ Map params = new HashMap();
|
|
|
|
+ params.put("limit", limit);
|
|
|
|
+ tULog.setParams(params);
|
|
|
|
+ List<TULog> idList = tuLogMapper.selectIds(tULog);
|
|
|
|
+ String ids = "";
|
|
|
|
+ for (TULog log : idList) {
|
|
|
|
+ ids += "'" + log.getId() + "',";
|
|
|
|
+ }
|
|
|
|
+ ids = ids.length() == 0 ? "0" : ids.substring(0, ids.length() - 1);
|
|
|
|
+ Map map = new HashMap();
|
|
|
|
+ map.put("ids", ids);
|
|
|
|
+ List<TULog> list = tuLogMapper.selectListbyIds(map);
|
|
|
|
+ TUInterfaceinfo tuInterfaceinfo = tuInterfaceinfoMapper.selectTUInterfaceinfoById(id);
|
|
|
|
+ //update t_u_interfaceinfo set log_count = (select count(id) from t_u_log where interfaceinfo_id = t_u_interfaceinfo.id)
|
|
|
|
+ //-- update t_u_interfaceinfo set callfailnum = log_count where callfailnum = 0
|
|
|
|
+ return getDataTable(list, tuInterfaceinfo.getLogCount());*/
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|