mirror of https://gitee.com/stylefeng/guns
整理控制器格式规范,统一修改以/view开头
parent
e567f77da7
commit
08d6bfb0bf
|
@ -30,7 +30,6 @@ logs/
|
||||||
|
|
||||||
### NetBeans ###
|
### NetBeans ###
|
||||||
nbproject/private/
|
nbproject/private/
|
||||||
build/
|
|
||||||
nbbuild/
|
nbbuild/
|
||||||
dist/
|
dist/
|
||||||
nbdist/
|
nbdist/
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
package cn.stylefeng.guns.core.util;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.UnknownHostException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ip工具类
|
|
||||||
*
|
|
||||||
* @author fengshuonan
|
|
||||||
* @Date 2018/9/27 上午10:47
|
|
||||||
*/
|
|
||||||
public class IpInfoUtils {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取客户端IP地址
|
|
||||||
*/
|
|
||||||
public static String getIpAddr(HttpServletRequest request) {
|
|
||||||
String ip = request.getHeader("x-forwarded-for");
|
|
||||||
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
|
||||||
ip = request.getHeader("Proxy-Client-IP");
|
|
||||||
}
|
|
||||||
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
|
||||||
ip = request.getHeader("WL-Proxy-Client-IP");
|
|
||||||
}
|
|
||||||
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
|
||||||
ip = request.getRemoteAddr();
|
|
||||||
if (ip.equals("127.0.0.1")) {
|
|
||||||
//根据网卡取本机配置的IP
|
|
||||||
InetAddress inet = null;
|
|
||||||
try {
|
|
||||||
inet = InetAddress.getLocalHost();
|
|
||||||
} catch (UnknownHostException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
ip = inet.getHostAddress();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
|
|
||||||
if (ip != null && ip.length() > 15) {
|
|
||||||
if (ip.indexOf(",") > 0) {
|
|
||||||
ip = ip.substring(0, ip.indexOf(","));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("0:0:0:0:0:0:0:1".equals(ip)) {
|
|
||||||
ip = "127.0.0.1";
|
|
||||||
}
|
|
||||||
|
|
||||||
return ip;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取客户端主机名称
|
|
||||||
*/
|
|
||||||
public static String getHostName() {
|
|
||||||
try {
|
|
||||||
return InetAddress.getLocalHost().getHostName();
|
|
||||||
} catch (UnknownHostException e) {
|
|
||||||
}
|
|
||||||
return "未知";
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -8,14 +8,13 @@ import org.springframework.stereotype.Controller;
|
||||||
/**
|
/**
|
||||||
* 系统配置相关页面渲染
|
* 系统配置相关页面渲染
|
||||||
*
|
*
|
||||||
* @author: jiawei
|
* @author jiawei
|
||||||
* @date: 2021/01/04 12:02
|
* @date 2021/1/10 14:28
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ApiResource(name = "系统配置相关页面", path = "config")
|
@ApiResource(name = "系统配置相关页面")
|
||||||
public class ConfigViewController {
|
public class ConfigViewController {
|
||||||
private String PREFIX = "/modular/sysConfig";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统配置-首页-视图
|
* 系统配置-首页-视图
|
||||||
|
@ -23,9 +22,9 @@ public class ConfigViewController {
|
||||||
* @author jiawei
|
* @author jiawei
|
||||||
* @date 2021/1/4 13:33
|
* @date 2021/1/4 13:33
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "系统配置-列表-视图", path = "", requiredPermission = false, requiredLogin = false)
|
@GetResource(name = "系统配置-列表-视图", path = "/view/config")
|
||||||
public String indexView() {
|
public String indexView() {
|
||||||
return PREFIX + "/sysConfig.html";
|
return "/modular/sysConfig/sysConfig.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,11 +32,10 @@ public class ConfigViewController {
|
||||||
*
|
*
|
||||||
* @author jiawei
|
* @author jiawei
|
||||||
* @date 2021/1/4 13:34
|
* @date 2021/1/4 13:34
|
||||||
* @param
|
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "系统配置—新增-视图", path = "/addView", requiredPermission = false, requiredLogin = false)
|
@GetResource(name = "系统配置—新增-视图", path = "/view/config/addView")
|
||||||
public String addView() {
|
public String addView() {
|
||||||
return PREFIX + "/sysConfig_add.html";
|
return "/modular/sysConfig/sysConfig_add.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,10 +43,10 @@ public class ConfigViewController {
|
||||||
*
|
*
|
||||||
* @author jiawei
|
* @author jiawei
|
||||||
* @date 2021/1/4 13:35
|
* @date 2021/1/4 13:35
|
||||||
* @param
|
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "系统配置-修改-视图", path = "editView", requiredPermission = false, requiredLogin = false)
|
@GetResource(name = "系统配置-修改-视图", path = "/view/config/editView")
|
||||||
public String editView() {
|
public String editView() {
|
||||||
return PREFIX + "/sysConfig_edit.html";
|
return "/modular/sysConfig/sysConfig_edit.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,29 +8,23 @@ import org.springframework.stereotype.Controller;
|
||||||
/**
|
/**
|
||||||
* 操作业务日志管理控制器界面渲染
|
* 操作业务日志管理控制器界面渲染
|
||||||
*
|
*
|
||||||
* @param
|
|
||||||
* @return
|
|
||||||
* @author TSQ
|
* @author TSQ
|
||||||
* @date 2021/1/5 14:44
|
* @date 2021/1/5 14:44
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ApiResource(name = "操作日志管理相关的界面渲染", path = "/view/log")
|
@ApiResource(name = "操作日志管理相关的界面渲染")
|
||||||
public class LogViewController {
|
public class LogViewController {
|
||||||
|
|
||||||
private String PREFIX = "/modular/system/log";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志管理列表
|
* 操作日志管理列表
|
||||||
*
|
*
|
||||||
* @param
|
|
||||||
* @return
|
|
||||||
* @author TSQ
|
* @author TSQ
|
||||||
* @date 2021/1/5 15:18
|
* @date 2021/1/5 15:18
|
||||||
*/
|
*/
|
||||||
@GetResource(name="操作日志管理列表", path ="", requiredPermission = false, requiredLogin = false)
|
@GetResource(name = "操作日志管理列表", path = "/view/log")
|
||||||
public String indexView() {
|
public String indexView() {
|
||||||
return PREFIX + "/log.html";
|
return "/modular/system/log/log.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,29 +8,23 @@ import org.springframework.stereotype.Controller;
|
||||||
/**
|
/**
|
||||||
* 登陆日志管理控制器界面渲染
|
* 登陆日志管理控制器界面渲染
|
||||||
*
|
*
|
||||||
* @param
|
|
||||||
* @return
|
|
||||||
* @author TSQ
|
* @author TSQ
|
||||||
* @date 2021/1/5 14:42
|
* @date 2021/1/5 14:42
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ApiResource(name = "登陆日志管理相关的界面渲染", path = "loginLog")
|
@ApiResource(name = "登陆日志管理相关的界面渲染")
|
||||||
public class LoginLogViewController {
|
public class LoginLogViewController {
|
||||||
|
|
||||||
private String PREFIX = "/modular/system/log";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登陆日志管理列表
|
* 登陆日志管理列表
|
||||||
*
|
*
|
||||||
* @param
|
|
||||||
* @return
|
|
||||||
* @author TSQ
|
* @author TSQ
|
||||||
* @date 2021/1/5 15:17
|
* @date 2021/1/5 15:17
|
||||||
*/
|
*/
|
||||||
@GetResource(name="登陆日志管理列表" , path = "", requiredPermission = false ,requiredLogin = false)
|
@GetResource(name = "登陆日志管理列表", path = "/view/loginLog")
|
||||||
public String indexView() {
|
public String indexView() {
|
||||||
return PREFIX + "/login_log.html";
|
return "/modular/system/log/login_log.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,27 +6,25 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 职位管理控制器
|
* 组织机构管理控制器界面
|
||||||
*
|
*
|
||||||
* @author chenjinlong
|
* @author chenjinlong
|
||||||
* @date 2020/12/28 9:28
|
* @date 2020/12/28 9:28
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ApiResource(name = "职位管理相关的界面渲染", path = "/view/organization")
|
@ApiResource(name = "组织机构管理控制器界面")
|
||||||
public class OrganizationViewController {
|
public class OrganizationViewController {
|
||||||
|
|
||||||
private String PREFIX = "/modular/system/organization";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理-首页-视图
|
* 机构管理-首页-视图
|
||||||
*
|
*
|
||||||
* @author chenjinlong
|
* @author chenjinlong
|
||||||
* @date 2020/11/04 11:07
|
* @date 2020/11/04 11:07
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "机构管理-首页-视图", path = "")
|
@GetResource(name = "机构管理-首页-视图", path = "/view/organization")
|
||||||
public String indexView() {
|
public String indexView() {
|
||||||
return PREFIX + "/organization.html";
|
return "/modular/system/organization/organization.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,9 +33,9 @@ public class OrganizationViewController {
|
||||||
* @author chenjinlong
|
* @author chenjinlong
|
||||||
* @date 2020/11/04 11:07
|
* @date 2020/11/04 11:07
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "机构管理—新增-视图", path = "/addView")
|
@GetResource(name = "机构管理—新增-视图", path = "/view/organization/addView")
|
||||||
public String addView() {
|
public String addView() {
|
||||||
return PREFIX + "/organization_add.html";
|
return "/modular/system/organization/organization_add.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,8 +44,9 @@ public class OrganizationViewController {
|
||||||
* @author chenjinlong
|
* @author chenjinlong
|
||||||
* @date 2020/11/04 11:07
|
* @date 2020/11/04 11:07
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "机构管理-修改-视图", path = "editView")
|
@GetResource(name = "机构管理-修改-视图", path = "/view/organization/editView")
|
||||||
public String editView() {
|
public String editView() {
|
||||||
return PREFIX + "/organization_edit.html";
|
return "/modular/system/organization/organization_edit.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,20 +13,18 @@ import org.springframework.stereotype.Controller;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ApiResource(name = "职位管理相关的界面渲染", path = "/view/position")
|
@ApiResource(name = "职位管理相关的界面渲染")
|
||||||
public class PositionViewController {
|
public class PositionViewController {
|
||||||
|
|
||||||
private String PREFIX = "/modular/system/position";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 职位管理-首页-视图
|
* 职位管理-首页-视图
|
||||||
*
|
*
|
||||||
* @author chenjinlong
|
* @author chenjinlong
|
||||||
* @date 2020/11/04 11:07
|
* @date 2020/11/04 11:07
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "职位管理-首页-视图", path = "")
|
@GetResource(name = "职位管理-首页-视图", path = "/view/position")
|
||||||
public String indexView() {
|
public String indexView() {
|
||||||
return PREFIX + "/position.html";
|
return "/modular/system/position/position.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,9 +33,9 @@ public class PositionViewController {
|
||||||
* @author chenjinlong
|
* @author chenjinlong
|
||||||
* @date 2020/11/04 11:07
|
* @date 2020/11/04 11:07
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "职位管理-首页-视图", path = "/addView")
|
@GetResource(name = "职位管理-首页-视图", path = "/view/position/addView")
|
||||||
public String addView() {
|
public String addView() {
|
||||||
return PREFIX + "/position_add.html";
|
return "/modular/system/position/position_add.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,8 +44,9 @@ public class PositionViewController {
|
||||||
* @author chenjinlong
|
* @author chenjinlong
|
||||||
* @date 2020/11/04 11:07
|
* @date 2020/11/04 11:07
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "职位管理-首页-视图", path = "editView")
|
@GetResource(name = "职位管理-首页-视图", path = "/view/position/editView")
|
||||||
public String editView() {
|
public String editView() {
|
||||||
return PREFIX + "/position_edit.html";
|
return "/modular/system/position/position_edit.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package cn.stylefeng.guns.modular.system.controller;
|
package cn.stylefeng.guns.modular.system.controller;
|
||||||
|
|
||||||
import cn.stylefeng.guns.modular.system.warpper.SystemHardwareWarpper;
|
import cn.stylefeng.guns.modular.system.warpper.SystemHardwareWrapper;
|
||||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -12,15 +12,13 @@ import org.springframework.ui.Model;
|
||||||
* 项目监控
|
* 项目监控
|
||||||
*
|
*
|
||||||
* @author chenli
|
* @author chenli
|
||||||
* @Date 2020/12/30 16:40
|
* @date 2020/12/30 16:40
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ApiResource(name = "项目监控")
|
@ApiResource(name = "项目监控")
|
||||||
public class MonitorController {
|
public class MonitorController {
|
||||||
|
|
||||||
private String PREFIX = "/modular/frame";
|
|
||||||
|
|
||||||
@Value("${server.port}")
|
@Value("${server.port}")
|
||||||
private String port;
|
private String port;
|
||||||
|
|
||||||
|
@ -28,26 +26,26 @@ public class MonitorController {
|
||||||
* 系统硬件信息页面
|
* 系统硬件信息页面
|
||||||
*
|
*
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @Date 2018/12/24 22:43
|
* @date 2021/1/10 19:09
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "服务器监控", path = "/monitor/systemInfo", requiredPermission = false)
|
@GetResource(name = "服务器监控", path = "/view/monitor/systemInfo")
|
||||||
public String systemInfo(Model model) {
|
public String systemInfo(Model model) {
|
||||||
SystemHardwareWarpper systemHardwareWarpper = new SystemHardwareWarpper();
|
SystemHardwareWrapper systemHardwareWrapper = new SystemHardwareWrapper();
|
||||||
systemHardwareWarpper.copyTo();
|
systemHardwareWrapper.copyTo();
|
||||||
model.addAttribute("server",systemHardwareWarpper);
|
model.addAttribute("server", systemHardwareWrapper);
|
||||||
return PREFIX+"/systemInfo.html";
|
return "/modular/frame/systemInfo.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* durid sql监控页面
|
* druid sql监控页面
|
||||||
*
|
*
|
||||||
* @author chenli
|
* @author chenli
|
||||||
* @Date 2021/1/4 16:32
|
* @date 2021/1/4 16:32
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "SQL监控", path = "/monitor/druid", requiredPermission = false,requiredLogin = false)
|
@GetResource(name = "SQL监控", path = "/view/monitor/druid")
|
||||||
public String duridInfo(Model model){
|
public String druidInfo(Model model) {
|
||||||
model.addAttribute("port", port);
|
model.addAttribute("port", port);
|
||||||
return PREFIX+"/druid.html";
|
return "/modular/frame/druid.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import lombok.Setter;
|
||||||
* CPU相关信息
|
* CPU相关信息
|
||||||
*
|
*
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @Date 2019-07-13 13:42
|
* @date 2019-07-13 13:42
|
||||||
*/
|
*/
|
||||||
@Setter
|
@Setter
|
||||||
public class CpuInfo {
|
public class CpuInfo {
|
||||||
|
|
|
@ -12,10 +12,11 @@ import java.util.Date;
|
||||||
* JVM相关信息
|
* JVM相关信息
|
||||||
*
|
*
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @Date 2019-07-13 13:42
|
* @date 2019-07-13 13:42
|
||||||
*/
|
*/
|
||||||
@Setter
|
@Setter
|
||||||
public class JvmInfo {
|
public class JvmInfo {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前JVM占用的内存总数(M)
|
* 当前JVM占用的内存总数(M)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,10 +7,11 @@ import lombok.Setter;
|
||||||
* 內存相关信息
|
* 內存相关信息
|
||||||
*
|
*
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @Date 2019-07-13 13:42
|
* @date 2019-07-13 13:42
|
||||||
*/
|
*/
|
||||||
@Setter
|
@Setter
|
||||||
public class MemInfo {
|
public class MemInfo {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 内存总量
|
* 内存总量
|
||||||
*/
|
*/
|
||||||
|
@ -34,7 +35,6 @@ public class MemInfo {
|
||||||
return NumberUtil.div(used, (1024 * 1024 * 1024), 2);
|
return NumberUtil.div(used, (1024 * 1024 * 1024), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public double getFree() {
|
public double getFree() {
|
||||||
return NumberUtil.div(free, (1024 * 1024 * 1024), 2);
|
return NumberUtil.div(free, (1024 * 1024 * 1024), 2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import lombok.Data;
|
||||||
* 系统文件相关信息
|
* 系统文件相关信息
|
||||||
*
|
*
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @Date 2019-07-13 13:42
|
* @date 2019-07-13 13:42
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SysFileInfo {
|
public class SysFileInfo {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import lombok.Data;
|
||||||
* 系统相关信息
|
* 系统相关信息
|
||||||
*
|
*
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @Date 2019-07-13 13:42
|
* @date 2019-07-13 13:42
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SysInfo {
|
public class SysInfo {
|
||||||
|
|
|
@ -2,8 +2,8 @@ package cn.stylefeng.guns.modular.system.warpper;
|
||||||
|
|
||||||
import cn.hutool.core.net.NetUtil;
|
import cn.hutool.core.net.NetUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.stylefeng.guns.core.util.IpInfoUtils;
|
|
||||||
import cn.stylefeng.guns.modular.system.model.*;
|
import cn.stylefeng.guns.modular.system.model.*;
|
||||||
|
import cn.stylefeng.roses.kernel.rule.util.IpInfoUtils;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import oshi.SystemInfo;
|
import oshi.SystemInfo;
|
||||||
import oshi.hardware.CentralProcessor;
|
import oshi.hardware.CentralProcessor;
|
||||||
|
@ -23,10 +23,10 @@ import java.util.Properties;
|
||||||
* 服务器相关信息
|
* 服务器相关信息
|
||||||
*
|
*
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @Date 2019-07-13 13:42
|
* @date 2019-07-13 13:42
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SystemHardwareWarpper {
|
public class SystemHardwareWrapper {
|
||||||
|
|
||||||
private static final int OSHI_WAIT_SECOND = 1000;
|
private static final int OSHI_WAIT_SECOND = 1000;
|
||||||
|
|
|
@ -13,20 +13,18 @@ import org.springframework.stereotype.Controller;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ApiResource(name = "定时管理相关的界面渲染", path = "/sysTimers")
|
@ApiResource(name = "定时管理相关的界面渲染")
|
||||||
public class TimersViewController {
|
public class TimersViewController {
|
||||||
|
|
||||||
private String PREFIX = "/modular/system/timers";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时管理-首页-视图
|
* 定时管理-首页-视图
|
||||||
*
|
*
|
||||||
* @author youyongkun
|
* @author youyongkun
|
||||||
* @date 2021/1/6 4:28 下午
|
* @date 2021/1/6 4:28 下午
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "定时管理-首页-视图", path = "", requiredPermission = false, requiredLogin = false)
|
@GetResource(name = "定时管理-首页-视图", path = "/view/sysTimers")
|
||||||
public String indexView() {
|
public String indexView() {
|
||||||
return PREFIX + "/timers.html";
|
return "/modular/system/timers/timers.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,9 +33,9 @@ public class TimersViewController {
|
||||||
* @author youyongkun
|
* @author youyongkun
|
||||||
* @date 2021/1/6 4:28 下午
|
* @date 2021/1/6 4:28 下午
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "定时管理-添加-视图", path = "/addView", requiredPermission = false, requiredLogin = false)
|
@GetResource(name = "定时管理-添加-视图", path = "/view/sysTimers/addView")
|
||||||
public String addView() {
|
public String addView() {
|
||||||
return PREFIX + "/timers_add.html";
|
return "/modular/system/timers/timers_add.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,8 +44,8 @@ public class TimersViewController {
|
||||||
* @author youyongkun
|
* @author youyongkun
|
||||||
* @date 2021/1/6 4:28 下午
|
* @date 2021/1/6 4:28 下午
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "定时管理-修改-视图", path = "editView", requiredPermission = false, requiredLogin = false)
|
@GetResource(name = "定时管理-修改-视图", path = "/view/sysTimers/editView")
|
||||||
public String editView() {
|
public String editView() {
|
||||||
return PREFIX + "/timers_edit.html";
|
return "/modular/system/timers/timers_edit.html";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,20 +13,18 @@ import org.springframework.stereotype.Controller;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ApiResource(name = "用户管理界面渲染", path = "/view/user")
|
@ApiResource(name = "用户管理界面渲染")
|
||||||
public class UserViewController {
|
public class UserViewController {
|
||||||
|
|
||||||
private String PREFIX = "/modular/system/user";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户管理-首页-视图
|
* 用户管理-首页-视图
|
||||||
*
|
*
|
||||||
* @author chenjinlong
|
* @author chenjinlong
|
||||||
* @date 2021/1/7 19:09
|
* @date 2021/1/7 19:09
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "用户管理-首页-视图", path = "")
|
@GetResource(name = "用户管理-首页-视图", path = "/view/user")
|
||||||
public String indexView() {
|
public String indexView() {
|
||||||
return PREFIX + "/user.html";
|
return "/modular/system/user/user.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,9 +33,9 @@ public class UserViewController {
|
||||||
* @author chenjinlong
|
* @author chenjinlong
|
||||||
* @date 2021/1/7 19:09
|
* @date 2021/1/7 19:09
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "用户管理—新增-视图", path = "/addView")
|
@GetResource(name = "用户管理—新增-视图", path = "/view/user/addView")
|
||||||
public String addView() {
|
public String addView() {
|
||||||
return PREFIX + "/user_add.html";
|
return "/modular/system/user/user_add.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,8 +44,9 @@ public class UserViewController {
|
||||||
* @author chenjinlong
|
* @author chenjinlong
|
||||||
* @date 2021/1/7 19:09
|
* @date 2021/1/7 19:09
|
||||||
*/
|
*/
|
||||||
@GetResource(name = "用户管理-修改-视图", path = "editView")
|
@GetResource(name = "用户管理-修改-视图", path = "/view/user/editView")
|
||||||
public String editView() {
|
public String editView() {
|
||||||
return PREFIX + "/user_edit.html";
|
return "/modular/system/user/user_edit.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,10 +20,10 @@ spring:
|
||||||
locale: zh_CN
|
locale: zh_CN
|
||||||
serialization:
|
serialization:
|
||||||
indent_output: false
|
indent_output: false
|
||||||
main:
|
|
||||||
allow-bean-definition-overriding: true
|
|
||||||
scanner:
|
scanner:
|
||||||
open: true
|
open: true
|
||||||
|
|
||||||
sys-log:
|
sys-log:
|
||||||
# db-数据库,file-文件
|
# db-数据库,file-文件
|
||||||
type: db
|
type: db
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -18,4 +18,5 @@ layui.use(['element'], function () {
|
||||||
$(this).prev().find('.message-btn-more').remove();
|
$(this).prev().find('.message-btn-more').remove();
|
||||||
$(this).prev().find('.message-list-empty').css('display', 'block');
|
$(this).prev().find('.message-list-empty').css('display', 'block');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
|
@ -1,10 +1,8 @@
|
||||||
layui.use(['table', 'admin','func', 'HttpRequest', 'util'], function () {
|
layui.use(['table', 'func', 'HttpRequest'], function () {
|
||||||
var $ = layui.$;
|
var $ = layui.$;
|
||||||
var table = layui.table;
|
var table = layui.table;
|
||||||
var func = layui.func;
|
var func = layui.func;
|
||||||
var HttpRequest = layui.HttpRequest;
|
var HttpRequest = layui.HttpRequest;
|
||||||
var admin = layui.admin;
|
|
||||||
var util = layui.util;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置管理
|
* 参数配置管理
|
||||||
|
@ -48,7 +46,7 @@ layui.use(['table', 'admin','func', 'HttpRequest', 'util'], function () {
|
||||||
func.open({
|
func.open({
|
||||||
height: 800,
|
height: 800,
|
||||||
title: '添加系统配置',
|
title: '添加系统配置',
|
||||||
content: Feng.ctxPath + '/config/addView',
|
content: Feng.ctxPath + '/view/config/addView',
|
||||||
tableId: SysConfig.tableId
|
tableId: SysConfig.tableId
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -74,7 +72,7 @@ layui.use(['table', 'admin','func', 'HttpRequest', 'util'], function () {
|
||||||
func.open({
|
func.open({
|
||||||
height: 800,
|
height: 800,
|
||||||
title: '修改系统配置',
|
title: '修改系统配置',
|
||||||
content: Feng.ctxPath + '/config/editView?configId=' + data.configId,
|
content: Feng.ctxPath + '/view/config/editView?configId=' + data.configId,
|
||||||
tableId: SysConfig.tableId
|
tableId: SysConfig.tableId
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,19 +15,10 @@ layui.use(['form', 'admin', 'HttpRequest'], function () {
|
||||||
var activeDictSelect = function () {
|
var activeDictSelect = function () {
|
||||||
|
|
||||||
$("#groupCode").html('<option value="">请选择所属分类</option>');
|
$("#groupCode").html('<option value="">请选择所属分类</option>');
|
||||||
// var httpRequest = new HttpRequest(Feng.ctxPath + "/dictType/dropDown", function (data) {
|
|
||||||
// var dictTypeList = res.data;
|
|
||||||
// dictTypeList.forEach(function (v, i) {
|
|
||||||
// $("#groupCode").append('<option value="' + v.dictCode+ '">' + v.dictName + '</option>');
|
|
||||||
// })
|
|
||||||
// form.render();
|
|
||||||
//
|
|
||||||
// }, function (data) {
|
|
||||||
// });
|
|
||||||
// httpRequest.start();
|
|
||||||
|
|
||||||
//要删掉
|
//要删掉
|
||||||
$("#groupCode").append('<option value="sys_config">' + '默认常量' + '</option>');
|
$("#groupCode").append('<option value="sys_config">' + '默认常量' + '</option>');
|
||||||
|
|
||||||
form.render();
|
form.render();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ layui.use(['form', 'admin','selectPlus', 'HttpRequest'], function () {
|
||||||
form.val('sysConfigForm', result.data);
|
form.val('sysConfigForm', result.data);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 系统参数样式
|
// 系统参数样式
|
||||||
if (result.data) {
|
if (result.data) {
|
||||||
var mData = result.data;
|
var mData = result.data;
|
||||||
|
@ -28,7 +27,8 @@ layui.use(['form', 'admin','selectPlus', 'HttpRequest'], function () {
|
||||||
$('input[name="sysFlag"]').removeAttr('checked'); //改变开关为 关
|
$('input[name="sysFlag"]').removeAttr('checked'); //改变开关为 关
|
||||||
}
|
}
|
||||||
/*改变是否系统参数样式*/
|
/*改变是否系统参数样式*/
|
||||||
$("input[name='sysFlag']").attr("disabled", "true"); form.render(); //系统参数禁用
|
$("input[name='sysFlag']").attr("disabled", "true");
|
||||||
|
form.render(); //系统参数禁用
|
||||||
$("input[name='sysFlag']").next().removeClass("layui-form-onswitch"); // 系统参数去掉样式
|
$("input[name='sysFlag']").next().removeClass("layui-form-onswitch"); // 系统参数去掉样式
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,21 +36,12 @@ layui.use(['form', 'admin','selectPlus', 'HttpRequest'], function () {
|
||||||
var activeDictSelect = function () {
|
var activeDictSelect = function () {
|
||||||
|
|
||||||
$("#groupCode").html('<option value="">请选择所属分类</option>');
|
$("#groupCode").html('<option value="">请选择所属分类</option>');
|
||||||
// var httpRequest = new HttpRequest(Feng.ctxPath + "/dictType/dropDown", function (data) {
|
|
||||||
// var dictTypeList = res.data;
|
|
||||||
// dictTypeList.forEach(function (v, i) {
|
|
||||||
// $("#groupCode").append('<option value="' + v.dictCode+ '">' + v.dictName + '</option>');
|
|
||||||
// })
|
|
||||||
// form.render();
|
|
||||||
//
|
|
||||||
// }, function (data) {
|
|
||||||
// });
|
|
||||||
// httpRequest.start();
|
|
||||||
|
|
||||||
//要删掉
|
//要删掉
|
||||||
$("#groupCode").append('<option value="sys_config">' + '默认常量' + '</option>');
|
$("#groupCode").append('<option value="sys_config">' + '默认常量' + '</option>');
|
||||||
$("#groupCode").val(result.data.groupCode);
|
$("#groupCode").val(result.data.groupCode);
|
||||||
form.render();
|
form.render();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//表单提交事件
|
//表单提交事件
|
||||||
|
|
|
@ -45,7 +45,7 @@ layui.use(['table', 'admin', 'form', 'func', 'HttpRequest', 'dropdown'], functio
|
||||||
func.open({
|
func.open({
|
||||||
height: 800,
|
height: 800,
|
||||||
title: '添加定时任务',
|
title: '添加定时任务',
|
||||||
content: Feng.ctxPath + '/sysTimers/addView',
|
content: Feng.ctxPath + '/view/sysTimers/addView',
|
||||||
tableId: Position.tableId
|
tableId: Position.tableId
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -55,7 +55,7 @@ layui.use(['table', 'admin', 'form', 'func', 'HttpRequest', 'dropdown'], functio
|
||||||
func.open({
|
func.open({
|
||||||
height: 800,
|
height: 800,
|
||||||
title: '修改定时任务',
|
title: '修改定时任务',
|
||||||
content: Feng.ctxPath + '/sysTimers/editView?timerId=' + data.timerId,
|
content: Feng.ctxPath + '/view/sysTimers/editView?timerId=' + data.timerId,
|
||||||
tableId: Position.tableId
|
tableId: Position.tableId
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="layui-fluid">
|
<div class="layui-fluid">
|
||||||
<div class="layui-row layui-col-space15" >
|
<div class="layui-row layui-col-space15" >
|
||||||
<div class="layui-col-lg12">
|
<div class="layui-col-lg12">
|
||||||
<iframe id="iframe" src="http://localhost:${port}/druid/index.html" frameborder="no" width="100%" scrolling="auto" ></iframe>
|
<iframe id="iframe" src="${ctxPath}/druid/index.html" frameborder="no" width="100%" scrolling="auto" ></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue