|
@@ -1,6 +1,11 @@
|
|
|
package com.sooka.web.controller.system;
|
|
|
|
|
|
import java.util.List;
|
|
|
+
|
|
|
+import com.sooka.system.domain.SysDept;
|
|
|
+import com.sooka.system.domain.TUInterfaceinfo;
|
|
|
+import com.sooka.system.service.ISysDeptService;
|
|
|
+import com.sooka.system.service.ITUInterfaceinfoService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ModelMap;
|
|
@@ -15,7 +20,7 @@ import com.sooka.system.service.ISysMenuService;
|
|
|
|
|
|
/**
|
|
|
* 首页 业务处理
|
|
|
- *
|
|
|
+ *
|
|
|
* @author lei_wang
|
|
|
*/
|
|
|
@Controller
|
|
@@ -27,6 +32,12 @@ public class SysIndexController extends BaseController
|
|
|
@Autowired
|
|
|
private ISysConfigService configService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ITUInterfaceinfoService interfaceinfoService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISysDeptService sysDeptService;
|
|
|
+
|
|
|
// 系统首页
|
|
|
@GetMapping("/index")
|
|
|
public String index(ModelMap mmap)
|
|
@@ -55,7 +66,25 @@ public class SysIndexController extends BaseController
|
|
|
@GetMapping("/system/main")
|
|
|
public String main(ModelMap mmap)
|
|
|
{
|
|
|
+ //接口数量
|
|
|
+ List<TUInterfaceinfo> list_count = interfaceinfoService.getCount();
|
|
|
mmap.put("version", Global.getVersion());
|
|
|
+ //接口数量
|
|
|
+ mmap.put("count", interfaceinfoService.getInterfaceCount("0"));
|
|
|
+ //故障接口数量
|
|
|
+ mmap.put("faultCount", interfaceinfoService.getInterfaceCount("1"));
|
|
|
+ //调用频次
|
|
|
+ mmap.put("callFrequency", NumberUtils.amountConversion(interfaceinfoService.callFrequency()));
|
|
|
+ //归集频次
|
|
|
+ mmap.put("pushFrequency", NumberUtils.amountConversion(interfaceinfoService.pushFrequency()));
|
|
|
+ //共享频次
|
|
|
+ mmap.put("pullFrequency", NumberUtils.amountConversion(interfaceinfoService.pullFrequency()));
|
|
|
+ //接入部门
|
|
|
+ SysDept dept = new SysDept();
|
|
|
+ dept.setParentId(214L);
|
|
|
+ List<SysDept> depts = sysDeptService.selectDeptList(dept);
|
|
|
+ mmap.put("depts", depts.size());
|
|
|
return "main";
|
|
|
}
|
|
|
+
|
|
|
}
|