|
@@ -6,8 +6,7 @@ import com.sooka.apply.service.IIntRecordService;
|
|
|
import com.sooka.common.utils.StringUtils;
|
|
|
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 com.sooka.system.service.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ModelMap;
|
|
@@ -17,8 +16,6 @@ import com.sooka.common.core.controller.BaseController;
|
|
|
import com.sooka.framework.util.ShiroUtils;
|
|
|
import com.sooka.system.domain.SysMenu;
|
|
|
import com.sooka.system.domain.SysUser;
|
|
|
-import com.sooka.system.service.ISysConfigService;
|
|
|
-import com.sooka.system.service.ISysMenuService;
|
|
|
|
|
|
/**
|
|
|
* 首页 业务处理
|
|
@@ -35,6 +32,9 @@ public class SysIndexController extends BaseController
|
|
|
private ISysConfigService configService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private ISysIndexService sysIndexService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private ITUInterfaceinfoService interfaceinfoService;
|
|
|
|
|
|
@Autowired
|
|
@@ -67,8 +67,43 @@ public class SysIndexController extends BaseController
|
|
|
return "skin";
|
|
|
}
|
|
|
|
|
|
- // 系统介绍
|
|
|
+ /**
|
|
|
+ * 系统首页
|
|
|
+ * @param mmap
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@GetMapping("/system/main")
|
|
|
+ public String sysMain(ModelMap mmap)
|
|
|
+ {
|
|
|
+ //系统版本
|
|
|
+ mmap.put("version", Global.getVersion());
|
|
|
+
|
|
|
+ //接口数量
|
|
|
+ mmap.put("count", sysIndexService.getInterfaceCountAll());
|
|
|
+ //调用频次
|
|
|
+ mmap.put("callFrequency", NumberUtils.amountConversion(sysIndexService.callFrequency()));
|
|
|
+ //归集频次
|
|
|
+ mmap.put("pushFrequency", NumberUtils.amountConversion(sysIndexService.pushFrequency()));
|
|
|
+ //共享频次
|
|
|
+ mmap.put("pullFrequency", NumberUtils.amountConversion(sysIndexService.pullFrequency()));
|
|
|
+ //接入部门
|
|
|
+ SysDept sysDept = new SysDept();
|
|
|
+ sysDept.setParentId(214L);
|
|
|
+ mmap.put("depts", sysIndexService.joinUpDepts(sysDept));
|
|
|
+
|
|
|
+ //接口故障
|
|
|
+ mmap.put("faultCount", sysIndexService.getInterfaceCountError());
|
|
|
+
|
|
|
+ //省接口申请频次
|
|
|
+ String[] arr = {"share_type_3","share_type_4"};
|
|
|
+ mmap.put("province", "[" + StringUtils.join(iIntRecordService.applyFrequency(arr), ",") + "]");
|
|
|
+ //市接口申请频次
|
|
|
+ String[] arr1 = {"share_type_1","share_type_2"};
|
|
|
+ mmap.put("city", "[" + StringUtils.join(iIntRecordService.applyFrequency(arr1), ",") + "]");
|
|
|
+ return "main";
|
|
|
+ }
|
|
|
+
|
|
|
+ // 系统介绍
|
|
|
public String main(ModelMap mmap)
|
|
|
{
|
|
|
//接口数量
|