|
@@ -4,32 +4,18 @@ package com.bzd.web.controller.server;
|
|
import com.bzd.common.annotation.Log;
|
|
import com.bzd.common.annotation.Log;
|
|
import com.bzd.common.core.controller.BaseController;
|
|
import com.bzd.common.core.controller.BaseController;
|
|
import com.bzd.common.core.domain.AjaxResult;
|
|
import com.bzd.common.core.domain.AjaxResult;
|
|
-import com.bzd.common.core.domain.entity.ServerG;
|
|
|
|
-import com.bzd.common.core.domain.entity.SysRole;
|
|
|
|
-import com.bzd.common.core.domain.entity.SysUser;
|
|
|
|
import com.bzd.common.core.page.TableDataInfo;
|
|
import com.bzd.common.core.page.TableDataInfo;
|
|
-import com.bzd.common.core.text.Convert;
|
|
|
|
import com.bzd.common.enums.BusinessType;
|
|
import com.bzd.common.enums.BusinessType;
|
|
-import com.bzd.common.utils.DateUtils;
|
|
|
|
-import com.bzd.common.utils.ShiroUtils;
|
|
|
|
-import com.bzd.common.utils.StringUtils;
|
|
|
|
-import com.bzd.common.utils.poi.ExcelUtil;
|
|
|
|
-import com.bzd.framework.shiro.util.AuthorizationUtils;
|
|
|
|
import com.bzd.system.service.IServerGService;
|
|
import com.bzd.system.service.IServerGService;
|
|
import com.bzd.common.config.dao.PageData;
|
|
import com.bzd.common.config.dao.PageData;
|
|
import com.bzd.system.service.ServerService;
|
|
import com.bzd.system.service.ServerService;
|
|
-import org.apache.commons.lang3.ArrayUtils;
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.ui.ModelMap;
|
|
-import org.springframework.validation.annotation.Validated;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
-import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
-import java.util.Map;
|
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 服务管理
|
|
* 服务管理
|
|
@@ -45,6 +31,7 @@ public class ServerGController extends BaseController{
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ServerService service;
|
|
private ServerService service;
|
|
|
|
+ private Object server;
|
|
|
|
|
|
@RequiresPermissions("server:serv:view")
|
|
@RequiresPermissions("server:serv:view")
|
|
@GetMapping()
|
|
@GetMapping()
|
|
@@ -103,14 +90,31 @@ public class ServerGController extends BaseController{
|
|
|
|
|
|
@RequiresPermissions("server:serv:edit")
|
|
@RequiresPermissions("server:serv:edit")
|
|
@GetMapping("/edit/{serviceId}")
|
|
@GetMapping("/edit/{serviceId}")
|
|
- public ModelAndView view(@PathVariable("serviceId") Long serviceId)throws Exception
|
|
|
|
|
|
+ public String view(@PathVariable("serviceId") Long serviceId, ModelMap mmap)throws Exception
|
|
{
|
|
{
|
|
- ModelAndView mv = new ModelAndView();
|
|
|
|
PageData pd = this.getPageData();
|
|
PageData pd = this.getPageData();
|
|
pd.put("serviceId",serviceId);
|
|
pd.put("serviceId",serviceId);
|
|
- //List<PageData> pageData = service.find(pd);
|
|
|
|
- mv.addObject("server",service.find(pd).get(0));
|
|
|
|
- mv.setViewName(prefix + "/edit");
|
|
|
|
- return mv;
|
|
|
|
|
|
+ PageData pageData = service.find(pd).get(0);
|
|
|
|
+ mmap.putAll(pageData);
|
|
|
|
+ return prefix + "/edit";
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 保存修改信息
|
|
|
|
+ */
|
|
|
|
+ @RequiresPermissions("server:user:edit")
|
|
|
|
+ @Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
|
|
|
+ @PostMapping("/edit")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public AjaxResult editSave() throws Exception
|
|
|
|
+ {
|
|
|
|
+ PageData pd = this.getPageData();
|
|
|
|
+ Integer update = service.update(pd);
|
|
|
|
+ if(update!=1){
|
|
|
|
+ return error("修改失败");
|
|
|
|
+ }
|
|
|
|
+ return toAjax(service.update(pd));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|