All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.mingsoft.basic.action.MainAction Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) 2012-present 铭软科技(mingsoft.net)
 * 本软件及相关文档文件(以下简称“软件”)的版权归 铭软科技 所有
 * 遵循 铭软科技《服务协议》中的《保密条款》
 */









package net.mingsoft.basic.action;


import cn.hutool.crypto.SecureUtil;
import cn.hutool.json.JSONUtil;
import cn.hutool.system.oshi.CpuInfo;
import cn.hutool.system.oshi.OshiUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import net.mingsoft.base.entity.BaseEntity;
import net.mingsoft.base.entity.ResultData;
import net.mingsoft.basic.annotation.LogAnn;
import net.mingsoft.basic.bean.ManagerModifyPwdBean;
import net.mingsoft.basic.biz.IManagerBiz;
import net.mingsoft.basic.biz.IModelBiz;
import net.mingsoft.basic.constant.e.BusinessTypeEnum;
import net.mingsoft.basic.entity.ManagerEntity;
import net.mingsoft.basic.entity.ModelEntity;
import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.basic.util.StringUtil;
import net.mingsoft.config.MSProperties;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Properties;

/**
 * 主界面控制层
 * @author 铭飞开发团队
 * @version
 * 版本号:100-000-000
* 创建日期:2014-7-14
* 历史修订:
*/ @Api(tags={"后端-基础接口"}) @Controller @RequestMapping("/${ms.manager.path}") public class MainAction extends BaseAction { /** * 模块业务层 */ @Autowired private IModelBiz modelBiz; /** * 管理员业务层 */ @Autowired private IManagerBiz managerBiz; /** * 加载后台主界面,并查询数据 * @param request 请求对象 * @return 主界面地址 */ @ApiOperation(value = "加载后台主界面,并查询数据") @GetMapping(value = {"/index","/"}) public String index(HttpServletRequest request) { String managerPath = MSProperties.manager.path; ManagerEntity managerSession = BasicUtil.getManager(); List modelList = new ArrayList(); ModelEntity model = new ModelEntity(); modelList = modelBiz.queryModelByRoleId(managerSession.getRoleId()); //如果ischild有值,则不显示 List _modelList = new ArrayList(); for(int i=0;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy