完善基础代码
This commit is contained in:
parent
502c180912
commit
483a6ccdc4
@ -0,0 +1,118 @@
|
||||
package ink.wgink.interfaces.menu;
|
||||
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: IMenuBaseService
|
||||
* @Description: 菜单接口
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/2/10 9:17 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IMenuBaseService {
|
||||
|
||||
/**
|
||||
* 统一用户菜单
|
||||
*/
|
||||
String MENU_UNIFIED_USER = "unified-user";
|
||||
|
||||
/**
|
||||
* 菜单详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
MenuDTO get(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 菜单列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<MenuDTO> list(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 菜单列表
|
||||
*
|
||||
* @param menuParentId 上级ID
|
||||
* @return
|
||||
*/
|
||||
List<MenuDTO> listByParentId(String menuParentId);
|
||||
|
||||
/**
|
||||
* 菜单列表
|
||||
*
|
||||
* @param menuIds 菜单ID列表
|
||||
* @return
|
||||
*/
|
||||
List<MenuDTO> listByIds(List<String> menuIds);
|
||||
|
||||
/**
|
||||
* 菜单列表
|
||||
*
|
||||
* @param menuParentId 上级菜单ID
|
||||
* @param menuIds 菜单ID列表
|
||||
* @return
|
||||
*/
|
||||
List<MenuDTO> listByParentIdAndIds(String menuParentId, List<String> menuIds);
|
||||
|
||||
/**
|
||||
* 菜单列表,递归获取全部内容
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<MenuDTO> listAll(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 菜单列表,递归获取全部内容
|
||||
*
|
||||
* @param menuParentId 上级菜单ID
|
||||
* @return
|
||||
*/
|
||||
List<MenuDTO> listAllByParentId(String menuParentId);
|
||||
|
||||
/**
|
||||
* 菜单列表,递归获取全部内容
|
||||
*
|
||||
* @param menuParentId 上级菜单ID
|
||||
* @param menuIds 菜单ID列表
|
||||
* @return
|
||||
*/
|
||||
List<MenuDTO> listAllByParentIdAndIds(String menuParentId, List<String> menuIds);
|
||||
|
||||
/**
|
||||
* zTree列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<ZTreeDTO> listZTree(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* easyui菜单列表
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<MenuDTO>> listPage(ListPage page);
|
||||
|
||||
/**
|
||||
* 通过用户获取菜单
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<String> listMenuIdByUser(Map<String, Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package ink.wgink.interfaces.user;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: IUserCheckService
|
||||
* @Description: 用户检查
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/2/10 2:06 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IUserCheckService {
|
||||
}
|
@ -27,14 +27,10 @@ public class MenuDTO implements Serializable {
|
||||
private Boolean isParent;
|
||||
@ApiModelProperty(name = "menuName", value = "菜单名称")
|
||||
private String menuName;
|
||||
@ApiModelProperty(name = "menuSummary", value = "菜单说明")
|
||||
private String menuSummary;
|
||||
@ApiModelProperty(name = "menuCode", value = "菜单编码")
|
||||
private String menuCode;
|
||||
@ApiModelProperty(name = "apiPrefix", value = "接口前缀", required = true, example = "api/menu")
|
||||
private String apiPrefix;
|
||||
@ApiModelProperty(name = "resourcePrefix", value = "资源前缀", required = true, example = "resource/menu")
|
||||
private String resourcePrefix;
|
||||
@ApiModelProperty(name = "routePrefix", value = "路由前缀", required = true, example = "route/menu")
|
||||
private String routePrefix;
|
||||
@ApiModelProperty(name = "menuUrl", value = "菜单链接")
|
||||
private String menuUrl;
|
||||
@ApiModelProperty(name = "menuIcon", value = "菜单图标")
|
||||
@ -100,28 +96,12 @@ public class MenuDTO implements Serializable {
|
||||
this.menuCode = menuCode;
|
||||
}
|
||||
|
||||
public String getApiPrefix() {
|
||||
return apiPrefix == null ? "" : apiPrefix.trim();
|
||||
public String getMenuSummary() {
|
||||
return menuSummary == null ? "" : menuSummary;
|
||||
}
|
||||
|
||||
public void setApiPrefix(String apiPrefix) {
|
||||
this.apiPrefix = apiPrefix;
|
||||
}
|
||||
|
||||
public String getResourcePrefix() {
|
||||
return resourcePrefix == null ? "" : resourcePrefix.trim();
|
||||
}
|
||||
|
||||
public void setResourcePrefix(String resourcePrefix) {
|
||||
this.resourcePrefix = resourcePrefix;
|
||||
}
|
||||
|
||||
public String getRoutePrefix() {
|
||||
return routePrefix == null ? "" : routePrefix.trim();
|
||||
}
|
||||
|
||||
public void setRoutePrefix(String routePrefix) {
|
||||
this.routePrefix = routePrefix;
|
||||
public void setMenuSummary(String menuSummary) {
|
||||
this.menuSummary = menuSummary;
|
||||
}
|
||||
|
||||
public String getMenuUrl() {
|
||||
@ -191,28 +171,24 @@ public class MenuDTO implements Serializable {
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("{");
|
||||
sb.append("\"menuId\":")
|
||||
.append("\"").append(menuId).append("\"");
|
||||
sb.append(",\"menuParentId\":")
|
||||
.append("\"").append(menuParentId).append("\"");
|
||||
sb.append(",\"menuParentName\":")
|
||||
.append("\"").append(menuParentName).append("\"");
|
||||
sb.append("\"menuId\":\"")
|
||||
.append(menuId).append('\"');
|
||||
sb.append(",\"menuParentId\":\"")
|
||||
.append(menuParentId).append('\"');
|
||||
sb.append(",\"menuParentName\":\"")
|
||||
.append(menuParentName).append('\"');
|
||||
sb.append(",\"isParent\":")
|
||||
.append(isParent);
|
||||
sb.append(",\"menuName\":")
|
||||
.append("\"").append(menuName).append("\"");
|
||||
sb.append(",\"menuCode\":")
|
||||
.append("\"").append(menuCode).append("\"");
|
||||
sb.append(",\"apiPrefix\":")
|
||||
.append("\"").append(apiPrefix).append("\"");
|
||||
sb.append(",\"resourcePrefix\":")
|
||||
.append("\"").append(resourcePrefix).append("\"");
|
||||
sb.append(",\"routePrefix\":")
|
||||
.append("\"").append(routePrefix).append("\"");
|
||||
sb.append(",\"menuUrl\":")
|
||||
.append("\"").append(menuUrl).append("\"");
|
||||
sb.append(",\"menuIcon\":")
|
||||
.append("\"").append(menuIcon).append("\"");
|
||||
sb.append(",\"menuName\":\"")
|
||||
.append(menuName).append('\"');
|
||||
sb.append(",\"menuSummary\":\"")
|
||||
.append(menuSummary).append('\"');
|
||||
sb.append(",\"menuCode\":\"")
|
||||
.append(menuCode).append('\"');
|
||||
sb.append(",\"menuUrl\":\"")
|
||||
.append(menuUrl).append('\"');
|
||||
sb.append(",\"menuIcon\":\"")
|
||||
.append(menuIcon).append('\"');
|
||||
sb.append(",\"menuType\":")
|
||||
.append(menuType);
|
||||
sb.append(",\"menuOrder\":")
|
||||
|
@ -1,5 +1,8 @@
|
||||
package ink.wgink.common.base;
|
||||
|
||||
import ink.wgink.interfaces.menu.IMenuBaseService;
|
||||
import ink.wgink.interfaces.user.IUserCheckService;
|
||||
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
import ink.wgink.util.request.RequestUtil;
|
||||
import org.slf4j.Logger;
|
||||
@ -14,7 +17,9 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -31,10 +36,29 @@ public class DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private HttpSession httpSession;
|
||||
@Autowired(required = false)
|
||||
private IMenuBaseService menuBaseService;
|
||||
@Autowired(required = false)
|
||||
private IUserCheckService userCheckService;
|
||||
|
||||
@GetMapping("index")
|
||||
public ModelAndView goIndex() {
|
||||
ModelAndView mv = new ModelAndView("index");
|
||||
|
||||
if (menuBaseService != null) {
|
||||
List<MenuDTO> menus;
|
||||
// 加载菜单
|
||||
if (userCheckService != null) {
|
||||
// 引入用户模块,是统一用户系统,加载统一用户系统菜单
|
||||
menus = menuBaseService.listAllByParentId(IMenuBaseService.MENU_UNIFIED_USER);
|
||||
} else {
|
||||
// 未引入用户模块,是客户端系统,加载客户端菜单
|
||||
menus = new ArrayList<>();
|
||||
}
|
||||
|
||||
mv.addObject("menus", menus);
|
||||
}
|
||||
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package ink.wgink.common.config;
|
||||
|
||||
import ink.wgink.common.config.properties.TransactionProperties;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.springframework.aop.Advisor;
|
||||
import org.springframework.aop.aspectj.AspectJExpressionPointcut;
|
||||
@ -66,7 +67,7 @@ public class TransactionConfig {
|
||||
required.setIsolationLevel(TransactionDefinition.ISOLATION_SERIALIZABLE);
|
||||
|
||||
DefaultTransactionAttribute readOnly = new DefaultTransactionAttribute();
|
||||
required.setPropagationBehavior(TransactionDefinition.PROPAGATION_SUPPORTS);
|
||||
readOnly.setPropagationBehavior(TransactionDefinition.PROPAGATION_SUPPORTS);
|
||||
readOnly.setReadOnly(true);
|
||||
|
||||
List<String> saveList = transactionProperties.getSaveList();
|
||||
@ -105,14 +106,8 @@ public class TransactionConfig {
|
||||
|
||||
@Bean
|
||||
public Advisor txAdviceAdvisor() {
|
||||
StringBuilder expressionSB = new StringBuilder("execution(* *..service..*(..))");
|
||||
// List<String> servicePackageList = transactionProperties.getServicePackageList();
|
||||
// for (String servicePackage : servicePackageList) {
|
||||
// expressionSB.append(" or execution(* " + servicePackage + "..*.service..*(..))");
|
||||
// }
|
||||
|
||||
AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
|
||||
pointcut.setExpression(expressionSB.toString());
|
||||
pointcut.setExpression("execution(* *..*Service*.*(..))");
|
||||
return new DefaultPointcutAdvisor(pointcut, txAdvice());
|
||||
}
|
||||
|
||||
|
@ -20,24 +20,12 @@ import java.util.List;
|
||||
@ConfigurationProperties(prefix = "transaction")
|
||||
public class TransactionProperties {
|
||||
|
||||
private List<String> servicePackageList;
|
||||
private List<String> saveList;
|
||||
private List<String> removeList;
|
||||
private List<String> updateList;
|
||||
private List<String> otherList;
|
||||
private List<String> queryList;
|
||||
|
||||
public List<String> getServicePackageList() {
|
||||
if (servicePackageList == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return servicePackageList;
|
||||
}
|
||||
|
||||
public void setServicePackageList(List<String> servicePackageList) {
|
||||
this.servicePackageList = servicePackageList;
|
||||
}
|
||||
|
||||
public List<String> getSaveList() {
|
||||
if (saveList == null) {
|
||||
return new ArrayList<>();
|
||||
@ -96,9 +84,7 @@ public class TransactionProperties {
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("{");
|
||||
sb.append("\"servicePackageList\":")
|
||||
.append(servicePackageList);
|
||||
sb.append(",\"saveList\":")
|
||||
sb.append("\"saveList\":")
|
||||
.append(saveList);
|
||||
sb.append(",\"removeList\":")
|
||||
.append(removeList);
|
||||
|
@ -1,11 +1,11 @@
|
||||
package ink.wgink.module.dictionary.controller.api;
|
||||
package ink.wgink.service.dictionary.controller.api;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.module.dictionary.pojo.vos.AreaVO;
|
||||
import ink.wgink.module.dictionary.service.IAreaService;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.service.dictionary.pojo.vos.AreaVO;
|
||||
import ink.wgink.service.dictionary.service.IAreaService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,11 +1,11 @@
|
||||
package ink.wgink.module.dictionary.controller.api;
|
||||
package ink.wgink.service.dictionary.controller.api;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.module.dictionary.pojo.vos.DataVO;
|
||||
import ink.wgink.module.dictionary.service.IDataService;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.service.dictionary.pojo.vos.DataVO;
|
||||
import ink.wgink.service.dictionary.service.IDataService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,9 +1,9 @@
|
||||
package ink.wgink.module.dictionary.controller.app.api;
|
||||
package ink.wgink.service.dictionary.controller.app.api;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.module.dictionary.service.IAreaService;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.service.dictionary.service.IAreaService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,9 +1,9 @@
|
||||
package ink.wgink.module.dictionary.controller.app.api;
|
||||
package ink.wgink.service.dictionary.controller.app.api;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.module.dictionary.service.IDataService;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.service.dictionary.service.IDataService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.dictionary.controller.route;
|
||||
package ink.wgink.service.dictionary.controller.route;
|
||||
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import io.swagger.annotations.Api;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.dictionary.controller.route;
|
||||
package ink.wgink.service.dictionary.controller.route;
|
||||
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import io.swagger.annotations.Api;
|
@ -1,9 +1,9 @@
|
||||
package ink.wgink.module.dictionary.controller.wechat;
|
||||
package ink.wgink.service.dictionary.controller.wechat;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.module.dictionary.service.IAreaService;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.service.dictionary.service.IAreaService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,9 +1,9 @@
|
||||
package ink.wgink.module.dictionary.controller.wechat;
|
||||
package ink.wgink.service.dictionary.controller.wechat;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.module.dictionary.service.IDataService;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.service.dictionary.service.IDataService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,10 +1,10 @@
|
||||
package ink.wgink.module.dictionary.dao;
|
||||
package ink.wgink.service.dictionary.dao;
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package ink.wgink.module.dictionary.dao;
|
||||
package ink.wgink.service.dictionary.dao;
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.dictionary.pojo.dtos;
|
||||
package ink.wgink.service.dictionary.pojo.dtos;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.dictionary.pojo.dtos;
|
||||
package ink.wgink.service.dictionary.pojo.dtos;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.dictionary.pojo.vos;
|
||||
package ink.wgink.service.dictionary.pojo.vos;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.dictionary.pojo.vos;
|
||||
package ink.wgink.service.dictionary.pojo.vos;
|
||||
|
||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
@ -1,7 +1,7 @@
|
||||
package ink.wgink.module.dictionary.service;
|
||||
package ink.wgink.service.dictionary.service;
|
||||
|
||||
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.module.dictionary.pojo.vos.AreaVO;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.service.dictionary.pojo.vos.AreaVO;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
@ -1,7 +1,7 @@
|
||||
package ink.wgink.module.dictionary.service;
|
||||
package ink.wgink.service.dictionary.service;
|
||||
|
||||
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.module.dictionary.pojo.vos.DataVO;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.service.dictionary.pojo.vos.DataVO;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
@ -1,12 +1,12 @@
|
||||
package ink.wgink.module.dictionary.service.impl;
|
||||
package ink.wgink.service.dictionary.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.module.dictionary.dao.IAreaDao;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.module.dictionary.pojo.vos.AreaVO;
|
||||
import ink.wgink.module.dictionary.service.IAreaService;
|
||||
import ink.wgink.service.dictionary.dao.IAreaDao;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.service.dictionary.pojo.vos.AreaVO;
|
||||
import ink.wgink.service.dictionary.service.IAreaService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
@ -14,7 +14,6 @@ import ink.wgink.util.map.HashMapUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -1,13 +1,13 @@
|
||||
package ink.wgink.module.dictionary.service.impl;
|
||||
package ink.wgink.service.dictionary.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.dictionary.dao.IDataDao;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.module.dictionary.pojo.vos.DataVO;
|
||||
import ink.wgink.module.dictionary.service.IDataService;
|
||||
import ink.wgink.service.dictionary.dao.IDataDao;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.service.dictionary.pojo.vos.DataVO;
|
||||
import ink.wgink.service.dictionary.service.IDataService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ink.wgink.module.dictionary.dao.IAreaDao">
|
||||
<mapper namespace="ink.wgink.service.dictionary.dao.IAreaDao">
|
||||
|
||||
<cache flushInterval="3600000"/>
|
||||
|
||||
<resultMap id="areaDTO" type="ink.wgink.module.dictionary.pojo.dtos.AreaDTO">
|
||||
<resultMap id="areaDTO" type="ink.wgink.service.dictionary.pojo.dtos.AreaDTO">
|
||||
<id property="areaId" column="area_id"/>
|
||||
<result property="areaParentId" column="area_parent_id"/>
|
||||
<result property="areaName" column="area_name"/>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ink.wgink.module.dictionary.dao.IDataDao">
|
||||
<mapper namespace="ink.wgink.service.dictionary.dao.IDataDao">
|
||||
|
||||
<cache flushInterval="3600000"/>
|
||||
|
||||
<resultMap id="dataDTO" type="ink.wgink.module.dictionary.pojo.dtos.DataDTO">
|
||||
<resultMap id="dataDTO" type="ink.wgink.service.dictionary.pojo.dtos.DataDTO">
|
||||
<id property="dataId" column="data_id"/>
|
||||
<result property="dataParentId" column="data_parent_id"/>
|
||||
<result property="dataParentName" column="data_parent_name"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.file.config.properties;
|
||||
package ink.wgink.service.file.config.properties;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.file.config.properties;
|
||||
package ink.wgink.service.file.config.properties;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.file.config.properties;
|
||||
package ink.wgink.service.file.config.properties;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.file.config.properties;
|
||||
package ink.wgink.service.file.config.properties;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.file.config.properties;
|
||||
package ink.wgink.service.file.config.properties;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.file.config.properties;
|
||||
package ink.wgink.service.file.config.properties;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
@ -1,13 +1,13 @@
|
||||
package ink.wgink.module.file.controller.api;
|
||||
package ink.wgink.service.file.controller.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.file.config.properties.FileProperties;
|
||||
import ink.wgink.module.file.enums.UploadTypeEnum;
|
||||
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.module.file.pojo.dtos.FileInfoDTO;
|
||||
import ink.wgink.module.file.service.IFileService;
|
||||
import ink.wgink.service.file.config.properties.FileProperties;
|
||||
import ink.wgink.service.file.enums.UploadTypeEnum;
|
||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.service.file.pojo.dtos.FileInfoDTO;
|
||||
import ink.wgink.service.file.service.IFileService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
@ -1,12 +1,12 @@
|
||||
package ink.wgink.module.file.controller.app.api;
|
||||
package ink.wgink.service.file.controller.app.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.file.config.properties.FileProperties;
|
||||
import ink.wgink.module.file.enums.UploadTypeEnum;
|
||||
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.module.file.service.IFileService;
|
||||
import ink.wgink.service.file.config.properties.FileProperties;
|
||||
import ink.wgink.service.file.enums.UploadTypeEnum;
|
||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.service.file.service.IFileService;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import io.swagger.annotations.*;
|
@ -1,10 +1,10 @@
|
||||
package ink.wgink.module.file.controller.route;
|
||||
package ink.wgink.service.file.controller.route;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.exceptions.ParamsException;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.file.config.properties.FileProperties;
|
||||
import ink.wgink.module.file.service.IFileService;
|
||||
import ink.wgink.service.file.config.properties.FileProperties;
|
||||
import ink.wgink.service.file.service.IFileService;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
@ -1,11 +1,11 @@
|
||||
package ink.wgink.module.file.controller.wechat;
|
||||
package ink.wgink.service.file.controller.wechat;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.file.config.properties.FileProperties;
|
||||
import ink.wgink.module.file.enums.UploadTypeEnum;
|
||||
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.module.file.service.IFileService;
|
||||
import ink.wgink.service.file.config.properties.FileProperties;
|
||||
import ink.wgink.service.file.enums.UploadTypeEnum;
|
||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.service.file.service.IFileService;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import io.swagger.annotations.*;
|
@ -1,11 +1,11 @@
|
||||
package ink.wgink.module.file.dao;
|
||||
package ink.wgink.service.file.dao;
|
||||
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.module.file.pojo.dtos.FileInfoDTO;
|
||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.service.file.pojo.dtos.FileInfoDTO;
|
||||
import ink.wgink.pojo.pos.FilePO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.file.enums;
|
||||
package ink.wgink.service.file.enums;
|
||||
|
||||
/**
|
||||
* @ClassName: UploadTypeEnum
|
@ -1,9 +1,8 @@
|
||||
package ink.wgink.module.file.excel.error;
|
||||
package ink.wgink.service.file.excel.error;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import ink.wgink.module.file.service.IFileService;
|
||||
import ink.wgink.service.file.service.IFileService;
|
||||
import ink.wgink.util.UUIDUtil;
|
||||
import ink.wgink.util.request.RequestUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.file.pojo.dtos;
|
||||
package ink.wgink.service.file.pojo.dtos;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.file.pojo.dtos;
|
||||
package ink.wgink.service.file.pojo.dtos;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
@ -1,9 +1,9 @@
|
||||
package ink.wgink.module.file.service;
|
||||
package ink.wgink.service.file.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import ink.wgink.module.file.enums.UploadTypeEnum;
|
||||
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.module.file.pojo.dtos.FileInfoDTO;
|
||||
import ink.wgink.service.file.enums.UploadTypeEnum;
|
||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.service.file.pojo.dtos.FileInfoDTO;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.pos.FilePO;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.file.service.impl;
|
||||
package ink.wgink.service.file.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@ -12,12 +12,12 @@ import ink.wgink.exceptions.ParamsException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.base.SystemException;
|
||||
import ink.wgink.module.file.config.properties.FileProperties;
|
||||
import ink.wgink.module.file.dao.IFileDao;
|
||||
import ink.wgink.module.file.enums.UploadTypeEnum;
|
||||
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.module.file.pojo.dtos.FileInfoDTO;
|
||||
import ink.wgink.module.file.service.IFileService;
|
||||
import ink.wgink.service.file.config.properties.FileProperties;
|
||||
import ink.wgink.service.file.dao.IFileDao;
|
||||
import ink.wgink.service.file.enums.UploadTypeEnum;
|
||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
||||
import ink.wgink.service.file.pojo.dtos.FileInfoDTO;
|
||||
import ink.wgink.service.file.service.IFileService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.pos.FilePO;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
@ -1,8 +1,6 @@
|
||||
package ink.wgink.module.file.startup;
|
||||
package ink.wgink.service.file.startup;
|
||||
|
||||
import ink.wgink.module.file.dao.IFileDao;
|
||||
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||
import ink.wgink.util.date.DateUtil;
|
||||
import ink.wgink.service.file.dao.IFileDao;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -10,9 +8,6 @@ import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ink.wgink.module.file.dao.IFileDao">
|
||||
<mapper namespace="ink.wgink.service.file.dao.IFileDao">
|
||||
|
||||
<cache/>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<result property="isDelete" column="is_delete"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="fileDTO" type="ink.wgink.module.file.pojo.dtos.FileDTO">
|
||||
<resultMap id="fileDTO" type="ink.wgink.service.file.pojo.dtos.FileDTO">
|
||||
<id property="fileId" column="file_id"/>
|
||||
<result property="fileName" column="file_name"/>
|
||||
<result property="fileUrl" column="file_url"/>
|
||||
@ -28,7 +28,7 @@
|
||||
<result property="fileSize" column="file_size"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="fileInfoDTO" type="ink.wgink.module.file.pojo.dtos.FileInfoDTO" extends="fileDTO">
|
||||
<resultMap id="fileInfoDTO" type="ink.wgink.service.file.pojo.dtos.FileInfoDTO" extends="fileDTO">
|
||||
<id property="fileId" column="file_id"/>
|
||||
<result property="fileName" column="file_name"/>
|
||||
<result property="fileUrl" column="file_url"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.permission.controller.api;
|
||||
package ink.wgink.service.permission.controller.api;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
@ -10,8 +10,8 @@ import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.module.permission.pojo.vos.PermissionVO;
|
||||
import ink.wgink.module.permission.service.IPermissionService;
|
||||
import ink.wgink.service.permission.pojo.vos.PermissionVO;
|
||||
import ink.wgink.service.permission.service.IPermissionService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.AntPathMatcher;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.permission.dao;
|
||||
package ink.wgink.service.permission.dao;
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.permission.enums;
|
||||
package ink.wgink.service.permission.enums;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.permission.pojo.vos;
|
||||
package ink.wgink.service.permission.pojo.vos;
|
||||
|
||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
@ -1,10 +1,10 @@
|
||||
package ink.wgink.module.permission.service;
|
||||
package ink.wgink.service.permission.service;
|
||||
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.permission.PermissionDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.module.permission.pojo.vos.PermissionVO;
|
||||
import ink.wgink.service.permission.pojo.vos.PermissionVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.permission.service.impl;
|
||||
package ink.wgink.service.permission.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
@ -7,9 +7,9 @@ import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.permission.PermissionDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.module.permission.dao.IPermissionDao;
|
||||
import ink.wgink.module.permission.pojo.vos.PermissionVO;
|
||||
import ink.wgink.module.permission.service.IPermissionService;
|
||||
import ink.wgink.service.permission.dao.IPermissionDao;
|
||||
import ink.wgink.service.permission.pojo.vos.PermissionVO;
|
||||
import ink.wgink.service.permission.service.IPermissionService;
|
||||
import ink.wgink.util.UUIDUtil;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ink.wgink.module.permission.dao.IPermissionDao">
|
||||
<mapper namespace="ink.wgink.service.permission.dao.IPermissionDao">
|
||||
|
||||
<resultMap id="permissionDTO" type="ink.wgink.pojo.dtos.permission.PermissionDTO">
|
||||
<id column="permission_id" property="permissionId"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.controller.api;
|
||||
package ink.wgink.service.department.controller.api;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
@ -8,11 +8,11 @@ import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentDTO;
|
||||
import ink.wgink.pojo.result.*;
|
||||
import ink.wgink.module.department.pojo.vos.DepartmentVO;
|
||||
import ink.wgink.module.department.pojo.vos.MergeDepartmentInfoVO;
|
||||
import ink.wgink.module.department.pojo.vos.MergeNewDepartmentInfoVO;
|
||||
import ink.wgink.module.department.pojo.vos.SplitDepartmentVO;
|
||||
import ink.wgink.module.department.service.IDepartmentService;
|
||||
import ink.wgink.service.department.pojo.vos.DepartmentVO;
|
||||
import ink.wgink.service.department.pojo.vos.MergeDepartmentInfoVO;
|
||||
import ink.wgink.service.department.pojo.vos.MergeNewDepartmentInfoVO;
|
||||
import ink.wgink.service.department.pojo.vos.SplitDepartmentVO;
|
||||
import ink.wgink.service.department.service.IDepartmentService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.controller.api;
|
||||
package ink.wgink.service.department.controller.api;
|
||||
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import io.swagger.annotations.Api;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.controller.route;
|
||||
package ink.wgink.service.department.controller.route;
|
||||
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import io.swagger.annotations.Api;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.dao;
|
||||
package ink.wgink.service.department.dao;
|
||||
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import org.springframework.stereotype.Repository;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.dao;
|
||||
package ink.wgink.service.department.dao;
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.dao;
|
||||
package ink.wgink.service.department.dao;
|
||||
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import org.springframework.stereotype.Repository;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.dao;
|
||||
package ink.wgink.service.department.dao;
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.enmus;
|
||||
package ink.wgink.service.department.enmus;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.listener.excel;
|
||||
package ink.wgink.service.department.listener.excel;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.listener.excel;
|
||||
package ink.wgink.service.department.listener.excel;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.listener.excel;
|
||||
package ink.wgink.service.department.listener.excel;
|
||||
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.pojo.vos;
|
||||
package ink.wgink.service.department.pojo.vos;
|
||||
|
||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.pojo.vos;
|
||||
package ink.wgink.service.department.pojo.vos;
|
||||
|
||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||
import io.swagger.annotations.ApiModel;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.pojo.vos;
|
||||
package ink.wgink.service.department.pojo.vos;
|
||||
|
||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||
import io.swagger.annotations.ApiModel;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.pojo.vos;
|
||||
package ink.wgink.service.department.pojo.vos;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.pojo.vos;
|
||||
package ink.wgink.service.department.pojo.vos;
|
||||
|
||||
import ink.wgink.annotation.CheckListAnnotation;
|
||||
import io.swagger.annotations.ApiModel;
|
@ -1,6 +1,6 @@
|
||||
package ink.wgink.module.department.service;
|
||||
package ink.wgink.service.department.service;
|
||||
|
||||
import ink.wgink.module.department.enmus.DepartmentAdjustmentTypeEnum;
|
||||
import ink.wgink.service.department.enmus.DepartmentAdjustmentTypeEnum;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.service;
|
||||
package ink.wgink.service.department.service;
|
||||
|
||||
import ink.wgink.interfaces.department.IDepartmentBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
@ -8,10 +8,10 @@ import ink.wgink.pojo.dtos.department.DepartmentDTO;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.pojo.result.UploadExcelResultDTO;
|
||||
import ink.wgink.module.department.pojo.vos.DepartmentVO;
|
||||
import ink.wgink.module.department.pojo.vos.MergeDepartmentInfoVO;
|
||||
import ink.wgink.module.department.pojo.vos.MergeNewDepartmentInfoVO;
|
||||
import ink.wgink.module.department.pojo.vos.SplitDepartmentVO;
|
||||
import ink.wgink.service.department.pojo.vos.DepartmentVO;
|
||||
import ink.wgink.service.department.pojo.vos.MergeDepartmentInfoVO;
|
||||
import ink.wgink.service.department.pojo.vos.MergeNewDepartmentInfoVO;
|
||||
import ink.wgink.service.department.pojo.vos.SplitDepartmentVO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.service;
|
||||
package ink.wgink.service.department.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.service;
|
||||
package ink.wgink.service.department.service;
|
||||
|
||||
import ink.wgink.interfaces.department.IDepartmentUserBaseService;
|
||||
|
@ -1,12 +1,12 @@
|
||||
package ink.wgink.module.department.service.impl;
|
||||
package ink.wgink.service.department.service.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||
import ink.wgink.module.department.dao.IDepartmentAdjustmentDao;
|
||||
import ink.wgink.module.department.enmus.DepartmentAdjustmentTypeEnum;
|
||||
import ink.wgink.module.department.service.IDepartmentAdjustmentService;
|
||||
import ink.wgink.module.department.service.IDepartmentUserAdjustmentService;
|
||||
import ink.wgink.module.user.service.IUserService;
|
||||
import ink.wgink.service.department.dao.IDepartmentAdjustmentDao;
|
||||
import ink.wgink.service.department.enmus.DepartmentAdjustmentTypeEnum;
|
||||
import ink.wgink.service.department.service.IDepartmentAdjustmentService;
|
||||
import ink.wgink.service.department.service.IDepartmentUserAdjustmentService;
|
||||
import ink.wgink.service.user.service.IUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.department.service.impl;
|
||||
package ink.wgink.service.department.service.impl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@ -9,10 +9,10 @@ import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.module.dictionary.service.IAreaService;
|
||||
import ink.wgink.module.file.excel.error.AbstractErrorExcelHandler;
|
||||
import ink.wgink.module.file.service.IFileService;
|
||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
||||
import ink.wgink.service.dictionary.service.IAreaService;
|
||||
import ink.wgink.service.file.excel.error.AbstractErrorExcelHandler;
|
||||
import ink.wgink.service.file.service.IFileService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.bos.DepartmentBO;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
@ -20,15 +20,15 @@ import ink.wgink.pojo.dtos.department.DepartmentDTO;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.pojo.result.UploadExcelResultDTO;
|
||||
import ink.wgink.module.department.dao.IDepartmentDao;
|
||||
import ink.wgink.module.department.enmus.DepartmentAdjustmentTypeEnum;
|
||||
import ink.wgink.module.department.listener.excel.DepartmentExcel;
|
||||
import ink.wgink.module.department.listener.excel.DepartmentExcelError;
|
||||
import ink.wgink.module.department.listener.excel.DepartmentExcelListener;
|
||||
import ink.wgink.module.department.pojo.vos.*;
|
||||
import ink.wgink.module.department.service.IDepartmentAdjustmentService;
|
||||
import ink.wgink.module.department.service.IDepartmentService;
|
||||
import ink.wgink.module.department.service.IDepartmentUserService;
|
||||
import ink.wgink.service.department.dao.IDepartmentDao;
|
||||
import ink.wgink.service.department.enmus.DepartmentAdjustmentTypeEnum;
|
||||
import ink.wgink.service.department.listener.excel.DepartmentExcel;
|
||||
import ink.wgink.service.department.listener.excel.DepartmentExcelError;
|
||||
import ink.wgink.service.department.listener.excel.DepartmentExcelListener;
|
||||
import ink.wgink.service.department.pojo.vos.*;
|
||||
import ink.wgink.service.department.service.IDepartmentAdjustmentService;
|
||||
import ink.wgink.service.department.service.IDepartmentService;
|
||||
import ink.wgink.service.department.service.IDepartmentUserService;
|
||||
import ink.wgink.util.UUIDUtil;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
@ -1,8 +1,8 @@
|
||||
package ink.wgink.module.department.service.impl;
|
||||
package ink.wgink.service.department.service.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.module.department.dao.IDepartmentUserAdjustmentDao;
|
||||
import ink.wgink.module.department.service.IDepartmentUserAdjustmentService;
|
||||
import ink.wgink.service.department.dao.IDepartmentUserAdjustmentDao;
|
||||
import ink.wgink.service.department.service.IDepartmentUserAdjustmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,12 +1,12 @@
|
||||
package ink.wgink.module.department.service.impl;
|
||||
package ink.wgink.service.department.service.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
|
||||
import ink.wgink.module.department.dao.IDepartmentUserDao;
|
||||
import ink.wgink.module.department.service.IDepartmentAdjustmentService;
|
||||
import ink.wgink.module.department.service.IDepartmentService;
|
||||
import ink.wgink.module.department.service.IDepartmentUserService;
|
||||
import ink.wgink.service.department.dao.IDepartmentUserDao;
|
||||
import ink.wgink.service.department.service.IDepartmentAdjustmentService;
|
||||
import ink.wgink.service.department.service.IDepartmentService;
|
||||
import ink.wgink.service.department.service.IDepartmentUserService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ink.wgink.module.department.dao.IDepartmentAdjustmentDao">
|
||||
<mapper namespace="ink.wgink.service.department.dao.IDepartmentAdjustmentDao">
|
||||
|
||||
<cache flushInterval="3600000"/>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ink.wgink.module.department.dao.IDepartmentDao">
|
||||
<mapper namespace="ink.wgink.service.department.dao.IDepartmentDao">
|
||||
|
||||
<cache flushInterval="3600000"/>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ink.wgink.module.department.dao.IDepartmentUserAdjustmentDao">
|
||||
<mapper namespace="ink.wgink.service.department.dao.IDepartmentUserAdjustmentDao">
|
||||
|
||||
<cache flushInterval="3600000"/>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ink.wgink.module.department.dao.IDepartmentUserDao">
|
||||
<mapper namespace="ink.wgink.service.department.dao.IDepartmentUserDao">
|
||||
|
||||
<cache flushInterval="3600000"/>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.service.controller.api;
|
||||
package ink.wgink.service.menu.controller.api;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.exceptions.ParamsException;
|
||||
@ -9,8 +9,8 @@ import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.service.pojo.vos.MenuVO;
|
||||
import ink.wgink.service.service.IMenuService;
|
||||
import ink.wgink.service.menu.pojo.vos.MenuVO;
|
||||
import ink.wgink.service.menu.service.IMenuService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -154,11 +154,11 @@ public class MenuController extends DefaultBaseController {
|
||||
@ApiImplicitParam(name = "menuId", value = "菜单ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("getmenu/{menuId}")
|
||||
public MenuDTO getMenu(@PathVariable("menuId") String menuId) {
|
||||
@GetMapping("get/{menuId}")
|
||||
public MenuDTO get(@PathVariable("menuId") String menuId) {
|
||||
Map<String, Object> params = getParams();
|
||||
params.put("menuId", menuId);
|
||||
return menuService.getMenu(params);
|
||||
return menuService.get(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "菜单列表", notes = "菜单列表接口")
|
||||
@ -166,11 +166,9 @@ public class MenuController extends DefaultBaseController {
|
||||
@ApiImplicitParam(name = "menuParentId", value = "菜单父ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listmenus/{menuParentId}")
|
||||
public List<MenuDTO> listMenus(@PathVariable("menuParentId") String menuParentId) {
|
||||
Map<String, Object> params = requestParams();
|
||||
params.put("menuParentId", menuParentId);
|
||||
return menuService.listMenuAllJson(params);
|
||||
@GetMapping("listallbyparentid/{menuParentId}")
|
||||
public List<MenuDTO> listAllByParentId(@PathVariable("menuParentId") String menuParentId) {
|
||||
return menuService.listAllByParentId(menuParentId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "zTree列表", notes = "zTree列表接口")
|
||||
@ -178,18 +176,18 @@ public class MenuController extends DefaultBaseController {
|
||||
@ApiImplicitParam(name = "id", value = "父ID", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listztreemenus")
|
||||
public List<ZTreeDTO> listZTreeMenus() {
|
||||
@GetMapping("listztree")
|
||||
public List<ZTreeDTO> listZTree() {
|
||||
Map<String, Object> params = requestParams();
|
||||
String menuParentId = "0";
|
||||
if (!StringUtils.isBlank(params.get("id") == null ? null : params.get("id").toString())) {
|
||||
if (!StringUtils.isBlank(params.get(ISystemConstant.PARAMS_ID) == null ? null : params.get(ISystemConstant.PARAMS_ID).toString())) {
|
||||
menuParentId = params.get("id").toString();
|
||||
}
|
||||
params.put("menuParentId", menuParentId);
|
||||
return menuService.listZTreeMenus(params);
|
||||
return menuService.listZTree(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "easyui菜单列表", notes = "easyui菜单列表接口")
|
||||
@ApiOperation(value = "菜单列表", notes = "菜单列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "parentId", value = "上级ID", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ -199,8 +197,8 @@ public class MenuController extends DefaultBaseController {
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpagemenus")
|
||||
public SuccessResultList<List<MenuDTO>> listPageMenus(ListPage page) {
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<MenuDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
String menuParentId = "0";
|
||||
if (!StringUtils.isBlank(params.get("parentId") == null ? null : params.get("parentId").toString())) {
|
||||
@ -208,7 +206,7 @@ public class MenuController extends DefaultBaseController {
|
||||
}
|
||||
params.put("menuParentId", menuParentId);
|
||||
page.setParams(params);
|
||||
return menuService.listPageMenus(page);
|
||||
return menuService.listPage(page);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package ink.wgink.service.menu.controller.route;
|
||||
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: MenuRouteController
|
||||
* @Description: 菜单路由
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/2/10 1:43 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "菜单路由接口")
|
||||
@Controller
|
||||
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/menu")
|
||||
public class MenuRouteController {
|
||||
|
||||
@GetMapping("list-tree")
|
||||
public ModelAndView listTree() {
|
||||
return new ModelAndView("menu/list-tree");
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list() {
|
||||
return new ModelAndView("menu/list");
|
||||
}
|
||||
|
||||
@GetMapping("icon")
|
||||
public ModelAndView icon() {
|
||||
return new ModelAndView("menu/icon");
|
||||
}
|
||||
|
||||
@GetMapping("save")
|
||||
public ModelAndView save() {
|
||||
return new ModelAndView("menu/save");
|
||||
}
|
||||
|
||||
@GetMapping("update")
|
||||
public ModelAndView update() {
|
||||
return new ModelAndView("menu/update");
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package ink.wgink.service.dao;
|
||||
package ink.wgink.service.menu.dao;
|
||||
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@ -17,22 +18,36 @@ import java.util.Map;
|
||||
@Repository
|
||||
public interface IMenuDao {
|
||||
|
||||
/**
|
||||
* 建表
|
||||
*
|
||||
* @throws UpdateException
|
||||
*/
|
||||
void createTable() throws UpdateException;
|
||||
|
||||
/**
|
||||
* 菜单列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<MenuDTO> listMenus(Map<String, Object> params);
|
||||
List<MenuDTO> list(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 菜单详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
MenuDTO getMenu(Map<String, Object> params);
|
||||
MenuDTO get(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 菜单详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
MenuDTO getSimple(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* zTree菜单列表
|
||||
@ -40,7 +55,7 @@ public interface IMenuDao {
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<ZTreeDTO> listZTreeMenus(Map<String, Object> params);
|
||||
List<ZTreeDTO> listZTree(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 子节点数量
|
||||
@ -63,21 +78,21 @@ public interface IMenuDao {
|
||||
*
|
||||
* @param params
|
||||
*/
|
||||
void saveMenu(Map<String, Object> params);
|
||||
void save(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 删除菜单
|
||||
*
|
||||
* @param params
|
||||
*/
|
||||
void removeMenu(Map<String, Object> params);
|
||||
void remove(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 修改菜单
|
||||
*
|
||||
* @param params
|
||||
*/
|
||||
void updateMenu(Map<String, Object> params);
|
||||
void update(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 通过用户获取菜单ID
|
||||
@ -85,5 +100,6 @@ public interface IMenuDao {
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<String> listMenuIdByUser(Map<String, Object> params);
|
||||
List<String> listIdByUser(Map<String, Object> params);
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.service.pojo.vos;
|
||||
package ink.wgink.service.menu.pojo.vos;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
@ -1,5 +1,6 @@
|
||||
package ink.wgink.service.service;
|
||||
package ink.wgink.service.menu.service;
|
||||
|
||||
import ink.wgink.interfaces.menu.IMenuBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||
@ -17,47 +18,7 @@ import java.util.Map;
|
||||
* @Date: 2018/12/27 10:18 PM
|
||||
* @Version: 1.0
|
||||
**/
|
||||
public interface IMenuService {
|
||||
|
||||
/**
|
||||
* 菜单列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<MenuDTO> listMenuAllJson(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 菜单列表,递归获取全部内容
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<MenuDTO> listMenusAll(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 菜单详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
MenuDTO getMenu(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* zTree列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<ZTreeDTO> listZTreeMenus(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* easyui菜单列表
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<MenuDTO>> listPageMenus(ListPage page);
|
||||
public interface IMenuService extends IMenuBaseService {
|
||||
|
||||
/**
|
||||
* 保存菜单
|
||||
@ -107,11 +68,4 @@ public interface IMenuService {
|
||||
*/
|
||||
// SuccessResultData<List<MenuDTO>> listMenuByClientIdAndUserId(String clientId, String userId);
|
||||
|
||||
/**
|
||||
* 通过用户获取菜单
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<String> listMenuIdByUser(Map<String, Object> params);
|
||||
}
|
@ -1,25 +1,21 @@
|
||||
package ink.wgink.service.service.impl;
|
||||
package ink.wgink.service.menu.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.common.component.SecurityComponent;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.service.dao.IMenuDao;
|
||||
import ink.wgink.service.service.IMenuService;
|
||||
import ink.wgink.service.menu.dao.IMenuDao;
|
||||
import ink.wgink.service.menu.service.IMenuService;
|
||||
import ink.wgink.util.UUIDUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName: MenuServiceImpl
|
||||
@ -43,29 +39,64 @@ public class MenuServiceImpl extends DefaultBaseService implements IMenuService
|
||||
// private IUserService userService;
|
||||
|
||||
@Override
|
||||
public List<MenuDTO> listMenuAllJson(Map<String, Object> params) {
|
||||
if (!SecurityComponent.USERNAME_ADMIN.equals(securityComponent.getCurrentUsername())) {
|
||||
LOG.debug("非管理员菜单查询");
|
||||
// params.put("menuIds", listUserMenuId());
|
||||
}
|
||||
return listMenusAll(params);
|
||||
public MenuDTO get(Map<String, Object> params) {
|
||||
return menuDao.get(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MenuDTO> listMenusAll(Map<String, Object> params) {
|
||||
List<MenuDTO> menuDTOs = new ArrayList<>(menuDao.listMenus(params));
|
||||
// listSubMenus(menuDTOs, params);
|
||||
public List<MenuDTO> list(Map<String, Object> params) {
|
||||
List<MenuDTO> srcMenuDTOs = menuDao.list(params);
|
||||
List<MenuDTO> desMenuDTOs = Arrays.asList(new MenuDTO[srcMenuDTOs.size()]);
|
||||
Collections.copy(desMenuDTOs, srcMenuDTOs);
|
||||
return srcMenuDTOs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MenuDTO> listByParentId(String menuParentId) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("menuParentId", menuParentId);
|
||||
return list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MenuDTO> listByIds(List<String> menuIds) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("menuIds", menuIds);
|
||||
return list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MenuDTO> listByParentIdAndIds(String menuParentId, List<String> menuIds) {
|
||||
Map<String, Object> params = getHashMap(4);
|
||||
params.put("menuParentId", menuParentId);
|
||||
params.put("menuIds", menuIds);
|
||||
return list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MenuDTO> listAll(Map<String, Object> params) {
|
||||
List<MenuDTO> menuDTOs = list(params);
|
||||
listSub(menuDTOs);
|
||||
return menuDTOs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuDTO getMenu(Map<String, Object> params) {
|
||||
return menuDao.getMenu(params);
|
||||
public List<MenuDTO> listAllByParentId(String menuParentId) {
|
||||
List<MenuDTO> menuDTOs = listByParentId(menuParentId);
|
||||
listSub(menuDTOs);
|
||||
return menuDTOs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZTreeDTO> listZTreeMenus(Map<String, Object> params) {
|
||||
List<ZTreeDTO> zTreeDTOs = menuDao.listZTreeMenus(params);
|
||||
public List<MenuDTO> listAllByParentIdAndIds(String menuParentId, List<String> menuIds) {
|
||||
List<MenuDTO> menuDTOs = listByParentIdAndIds(menuParentId, menuIds);
|
||||
listSubByIds(menuDTOs, menuIds);
|
||||
return menuDTOs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZTreeDTO> listZTree(Map<String, Object> params) {
|
||||
List<ZTreeDTO> zTreeDTOs = menuDao.listZTree(params);
|
||||
for (ZTreeDTO zTreeDTO : zTreeDTOs) {
|
||||
Integer subCount = menuDao.countByParentId(zTreeDTO.getId());
|
||||
setZTreeInfo(zTreeDTO, subCount);
|
||||
@ -74,9 +105,9 @@ public class MenuServiceImpl extends DefaultBaseService implements IMenuService
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<MenuDTO>> listPageMenus(ListPage page) {
|
||||
public SuccessResultList<List<MenuDTO>> listPage(ListPage page) {
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<MenuDTO> menuDTOs = new ArrayList<>(menuDao.listMenus(page.getParams()));
|
||||
List<MenuDTO> menuDTOs = list(page.getParams());
|
||||
PageInfo<MenuDTO> pageInfo = new PageInfo<>(menuDTOs);
|
||||
return new SuccessResultList<>(menuDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
@ -87,14 +118,14 @@ public class MenuServiceImpl extends DefaultBaseService implements IMenuService
|
||||
String menuParentId = params.get("menuParentId").toString();
|
||||
if (!"0".equals(menuParentId)) {
|
||||
params.put("menuId", menuParentId);
|
||||
MenuDTO menuDTO = menuDao.getMenu(params);
|
||||
MenuDTO menuDTO = menuDao.get(params);
|
||||
parentCode = menuDTO.getMenuCode();
|
||||
}
|
||||
String menuCode = getCode(parentCode, menuParentId);
|
||||
params.put("menuCode", menuCode);
|
||||
params.put("menuId", UUIDUtil.getUUID());
|
||||
setSaveInfo(params);
|
||||
menuDao.saveMenu(params);
|
||||
menuDao.save(params);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ -102,7 +133,7 @@ public class MenuServiceImpl extends DefaultBaseService implements IMenuService
|
||||
public SuccessResult removeMenu(Map<String, Object> params) {
|
||||
params.put("menuIds", Arrays.asList(params.get("menuIds").toString().split("_")));
|
||||
setUpdateInfo(params);
|
||||
menuDao.removeMenu(params);
|
||||
menuDao.remove(params);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ -170,13 +201,13 @@ public class MenuServiceImpl extends DefaultBaseService implements IMenuService
|
||||
|
||||
@Override
|
||||
public List<String> listMenuIdByUser(Map<String, Object> params) {
|
||||
return menuDao.listMenuIdByUser(params);
|
||||
return menuDao.listIdByUser(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResult updateMenu(Map<String, Object> params) {
|
||||
setUpdateInfo(params);
|
||||
menuDao.updateMenu(params);
|
||||
menuDao.update(params);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ -227,40 +258,34 @@ public class MenuServiceImpl extends DefaultBaseService implements IMenuService
|
||||
* 递归查询子菜单
|
||||
*
|
||||
* @param menuDTOs
|
||||
* @param params
|
||||
*/
|
||||
// private void listSubMenus(List<MenuDTO> menuDTOs, Map<String, Object> params) {
|
||||
// if (!StringUtils.isBlank(params.get("roleId") == null ? null : params.get("roleId").toString())) {
|
||||
// String type = params.get("type").toString();
|
||||
// if (IRoleService.AUTH_TYPE_INSERT.equals(type)) {
|
||||
// params.put(IRoleService.ROLE_TYPE, IRoleService.ROLE_INSERT);
|
||||
// } else if (IRoleService.AUTH_TYPE_DELETE.equals(type)) {
|
||||
// params.put(IRoleService.ROLE_TYPE, IRoleService.ROLE_DELETE);
|
||||
// } else if (IRoleService.AUTH_TYPE_UPDATE.equals(type)) {
|
||||
// params.put(IRoleService.ROLE_TYPE, IRoleService.ROLE_UPDATE);
|
||||
// } else if (IRoleService.AUTH_TYPE_QUERY.equals(type)) {
|
||||
// params.put(IRoleService.ROLE_TYPE, IRoleService.ROLE_QUERY);
|
||||
// } else {
|
||||
// params.put(IRoleService.ROLE_TYPE, IRoleService.ROLE_MENU);
|
||||
// }
|
||||
// log.debug("管理员菜单查询");
|
||||
// if (StringUtils.equals(SecurityComponent.USERNAME_ADMIN, params.get("roleId").toString())) {
|
||||
// List<RoleMenuBO> roleMenuBOs = listAdminMenu();
|
||||
// if (!Objects.isNull(roleMenuBOs) && !roleMenuBOs.isEmpty()) {
|
||||
// List<String> menuIds = new ArrayList<>();
|
||||
// for (RoleMenuBO roleMenuBO : roleMenuBOs) {
|
||||
// menuIds.add(roleMenuBO.getMenuId());
|
||||
// }
|
||||
// }
|
||||
// listSubMenus(menuDTOs, params, roleMenuBOs);
|
||||
// } else {
|
||||
// List<RoleMenuBO> roleMenuBOs = roleDao.listRoleMenuInfo(params);
|
||||
// listSubMenus(menuDTOs, params, roleMenuBOs);
|
||||
// }
|
||||
// } else {
|
||||
// listSubMenus(menuDTOs, params, null);
|
||||
// }
|
||||
// }
|
||||
private void listSub(List<MenuDTO> menuDTOs) {
|
||||
if (menuDTOs.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (MenuDTO menuDTO : menuDTOs) {
|
||||
List<MenuDTO> subMenuDTOs = listByParentId(menuDTO.getMenuId());
|
||||
menuDTO.setSubMenus(subMenuDTOs);
|
||||
if (!subMenuDTOs.isEmpty()) {
|
||||
menuDTO.setParent(true);
|
||||
}
|
||||
listSub(subMenuDTOs);
|
||||
}
|
||||
}
|
||||
|
||||
private void listSubByIds(List<MenuDTO> menuDTOs, List<String> menuIds) {
|
||||
if (menuDTOs.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (MenuDTO menuDTO : menuDTOs) {
|
||||
List<MenuDTO> subMenuDTOs = listByParentIdAndIds(menuDTO.getMenuId(), menuIds);
|
||||
menuDTO.setSubMenus(subMenuDTOs);
|
||||
if (!subMenuDTOs.isEmpty()) {
|
||||
menuDTO.setParent(true);
|
||||
}
|
||||
listSubByIds(subMenuDTOs, menuIds);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 子菜单权限
|
@ -0,0 +1,209 @@
|
||||
package ink.wgink.service.menu.startup;
|
||||
|
||||
import ink.wgink.interfaces.menu.IMenuBaseService;
|
||||
import ink.wgink.interfaces.user.IUserCheckService;
|
||||
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||
import ink.wgink.service.menu.dao.IMenuDao;
|
||||
import ink.wgink.util.UUIDUtil;
|
||||
import ink.wgink.util.date.DateUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: ServiceMenuStartUp
|
||||
* @Description: 菜单业务启动
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/2/10 1:12 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Component
|
||||
public class ServiceMenuStartUp implements ApplicationRunner {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ServiceMenuStartUp.class);
|
||||
@Autowired
|
||||
private IMenuDao menuDao;
|
||||
@Autowired(required = false)
|
||||
private IUserCheckService userCheckService;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
initTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* 建表
|
||||
*/
|
||||
private void initTable() {
|
||||
LOG.debug("创建 sys_menu 表");
|
||||
menuDao.createTable();
|
||||
initMenu();
|
||||
}
|
||||
|
||||
private void initMenu() {
|
||||
Map<String, Object> params = new HashMap<>(20);
|
||||
String gmt = DateUtil.getTime();
|
||||
params.put("gmtCreate", gmt);
|
||||
params.put("gmtModified", gmt);
|
||||
params.put("creator", "1");
|
||||
params.put("modifier", "1");
|
||||
params.put("isDelete", 0);
|
||||
|
||||
params.put("menuCode", "0001");
|
||||
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||
String menuId = IMenuBaseService.MENU_UNIFIED_USER;
|
||||
if (menuDTO == null) {
|
||||
params.put("menuId", menuId);
|
||||
params.put("menuParentId", "0");
|
||||
params.put("menuName", "统一用户系统");
|
||||
params.put("menuSummary", "统一用户系统");
|
||||
params.put("menuUrl", "javascript:void(0);");
|
||||
params.put("menuType", "1");
|
||||
params.put("menuIcon", "fa-icon-color-white fa fa-cogs");
|
||||
params.put("menuOrder", "1");
|
||||
params.put("menuStatus", "0");
|
||||
params.put("openType", "1");
|
||||
menuDao.save(params);
|
||||
}
|
||||
initSystemManage(params, menuId);
|
||||
initUserPermissionManage(params, menuId);
|
||||
}
|
||||
|
||||
private void initSystemManage(Map<String, Object> params, String menuParentId) {
|
||||
LOG.debug("初始化菜单:系统管理");
|
||||
params.remove("menuId");
|
||||
params.put("menuCode", "00010001");
|
||||
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||
String menuId = UUIDUtil.getUUID();
|
||||
if (menuDTO == null) {
|
||||
params.put("menuId", menuId);
|
||||
params.put("menuParentId", menuParentId);
|
||||
params.put("menuName", "系统管理");
|
||||
params.put("menuSummary", "系统管理");
|
||||
params.put("menuUrl", "javascript:void(0);");
|
||||
params.put("menuType", "1");
|
||||
params.put("menuIcon", "fa-icon-color-white fa fa-cogs");
|
||||
params.put("menuOrder", "1");
|
||||
params.put("menuStatus", "0");
|
||||
params.put("openType", "1");
|
||||
menuDao.save(params);
|
||||
}
|
||||
initMenuManage(params, menuId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单管理
|
||||
*
|
||||
* @param params
|
||||
* @param menuParentId
|
||||
*/
|
||||
private void initMenuManage(Map<String, Object> params, String menuParentId) {
|
||||
LOG.debug("初始化菜单:菜单管理");
|
||||
params.remove("menuId");
|
||||
params.put("menuCode", "000100010001");
|
||||
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||
if (menuDTO == null) {
|
||||
params.put("menuId", UUIDUtil.getUUID());
|
||||
params.put("menuParentId", menuParentId);
|
||||
params.put("menuName", "菜单管理");
|
||||
params.put("menuSummary", "菜单管理");
|
||||
params.put("menuUrl", "/route/menu/list-tree");
|
||||
params.put("menuType", "1");
|
||||
params.put("menuIcon", "fa-icon-color-white fa fa-list");
|
||||
params.put("menuOrder", "1");
|
||||
params.put("menuStatus", "0");
|
||||
params.put("openType", "1");
|
||||
menuDao.save(params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户权限管理
|
||||
*
|
||||
* @param params
|
||||
* @param menuParentId
|
||||
*/
|
||||
private void initUserPermissionManage(Map<String, Object> params, String menuParentId) {
|
||||
LOG.debug("初始化菜单:用户与权限");
|
||||
params.remove("menuId");
|
||||
params.put("menuCode", "00010002");
|
||||
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||
String menuId = UUIDUtil.getUUID();
|
||||
if (menuDTO == null) {
|
||||
params.put("menuId", menuId);
|
||||
params.put("menuParentId", menuParentId);
|
||||
params.put("menuName", "用户与权限");
|
||||
params.put("menuSummary", "用户与权限");
|
||||
params.put("menuUrl", "javascript:void(0);");
|
||||
params.put("menuType", "1");
|
||||
params.put("menuIcon", "fa-icon-color-white fa fa-users");
|
||||
params.put("menuOrder", "2");
|
||||
params.put("menuStatus", "0");
|
||||
params.put("openType", "1");
|
||||
menuDao.save(params);
|
||||
}
|
||||
initUserManage(params, menuId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户管理
|
||||
*
|
||||
* @param params
|
||||
* @param menuParentId
|
||||
*/
|
||||
private void initUserManage(Map<String, Object> params, String menuParentId) {
|
||||
if (userCheckService == null) {
|
||||
return;
|
||||
}
|
||||
LOG.debug("初始化菜单:用户管理");
|
||||
params.remove("menuId");
|
||||
params.put("menuCode", "000100020001");
|
||||
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||
String menuId = UUIDUtil.getUUID();
|
||||
if (menuDTO == null) {
|
||||
params.put("menuId", menuId);
|
||||
params.put("menuParentId", menuParentId);
|
||||
params.put("menuName", "用户管理");
|
||||
params.put("menuSummary", "用户管理");
|
||||
params.put("menuUrl", "/route/user/list");
|
||||
params.put("menuType", "1");
|
||||
params.put("menuIcon", "fa-icon-color-white fa fa-address-book");
|
||||
params.put("menuOrder", "1");
|
||||
params.put("menuStatus", "0");
|
||||
params.put("openType", "1");
|
||||
menuDao.save(params);
|
||||
}
|
||||
}
|
||||
|
||||
private void initMenuDepartment() {
|
||||
LOG.debug("初始化菜单:组织机构管理");
|
||||
LOG.debug("初始化菜单:用户组管理");
|
||||
LOG.debug("初始化菜单:职位管理");
|
||||
LOG.debug("初始化菜单:权限管理");
|
||||
LOG.debug("初始化菜单:角色管理");
|
||||
}
|
||||
|
||||
private void initMenuGroup() {
|
||||
|
||||
}
|
||||
|
||||
private void initMenuPosition() {
|
||||
|
||||
}
|
||||
|
||||
private void initMenuPermission() {
|
||||
|
||||
}
|
||||
|
||||
private void initMenuRole() {
|
||||
|
||||
}
|
||||
}
|
333
service-menu/src/main/resources/mybatis/mapper/menu-mapper.xml
Normal file
333
service-menu/src/main/resources/mybatis/mapper/menu-mapper.xml
Normal file
@ -0,0 +1,333 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ink.wgink.service.menu.dao.IMenuDao">
|
||||
<cache/>
|
||||
|
||||
<resultMap id="menuDTO" type="ink.wgink.pojo.dtos.menu.MenuDTO">
|
||||
<id property="menuId" column="menu_id"/>
|
||||
<result property="menuParentId" column="menu_parent_id"/>
|
||||
<result property="menuParentName" column="menu_parent_name"/>
|
||||
<result property="menuName" column="menu_name"/>
|
||||
<result property="menuSummary" column="menu_summary"/>
|
||||
<result property="menuCode" column="menu_code"/>
|
||||
<result property="menuUrl" column="menu_url"/>
|
||||
<result property="menuType" column="menu_type"/>
|
||||
<result property="menuIcon" column="menu_icon"/>
|
||||
<result property="menuOrder" column="menu_order"/>
|
||||
<result property="menuStatus" column="menu_status"/>
|
||||
<result property="openType" column="open_type"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ZTreeDTO" type="ink.wgink.pojo.dtos.ZTreeDTO">
|
||||
<id property="id" column="menu_id"/>
|
||||
<result property="pId" column="menu_parent_id"/>
|
||||
<result property="name" column="menu_name"/>
|
||||
<result property="url" column="menu_url"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 建表 -->
|
||||
<update id="createTable">
|
||||
CREATE TABLE IF NOT EXISTS `sys_menu` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`menu_id` char(36) NOT NULL,
|
||||
`menu_parent_id` char(36) DEFAULT '0' COMMENT '父ID',
|
||||
`menu_name` varchar(255) DEFAULT NULL COMMENT '菜单名称',
|
||||
`menu_summary` varchar(255) DEFAULT NULL COMMENT '菜单说明',
|
||||
`menu_code` varchar(255) DEFAULT NULL COMMENT '菜单编码',
|
||||
`menu_url` varchar(255) DEFAULT 'javascript:void(0);' COMMENT '菜单链接',
|
||||
`menu_type` int(2) DEFAULT '0' COMMENT '菜单类型',
|
||||
`menu_icon` varchar(255) DEFAULT 'fa-icon-color-white fa fa-list' COMMENT '菜单图标',
|
||||
`menu_order` int(11) DEFAULT '0' COMMENT '菜单排序',
|
||||
`menu_status` int(2) DEFAULT '0' COMMENT '菜单状态',
|
||||
`open_type` int(2) DEFAULT '1' COMMENT '打开方式:1: 默认,2: 弹窗,3: 页面',
|
||||
`gmt_create` datetime DEFAULT NULL,
|
||||
`creator` char(36) DEFAULT NULL,
|
||||
`gmt_modified` datetime DEFAULT NULL,
|
||||
`modifier` char(36) DEFAULT NULL,
|
||||
`is_delete` int(2) DEFAULT '0',
|
||||
PRIMARY KEY (`id`,`menu_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
</update>
|
||||
|
||||
<!-- 新增菜单 -->
|
||||
<insert id="save" parameterType="map" flushCache="true">
|
||||
INSERT INTO sys_menu (
|
||||
menu_id,
|
||||
menu_parent_id,
|
||||
menu_name,
|
||||
menu_summary,
|
||||
menu_code,
|
||||
menu_url,
|
||||
menu_type,
|
||||
menu_icon,
|
||||
menu_order,
|
||||
menu_status,
|
||||
open_type,
|
||||
creator,
|
||||
gmt_create,
|
||||
modifier,
|
||||
gmt_modified,
|
||||
is_delete
|
||||
) VALUES (
|
||||
#{menuId},
|
||||
#{menuParentId},
|
||||
#{menuName},
|
||||
#{menuSummary},
|
||||
#{menuCode},
|
||||
#{menuUrl},
|
||||
#{menuType},
|
||||
#{menuIcon},
|
||||
#{menuOrder},
|
||||
#{menuStatus},
|
||||
#{openType},
|
||||
#{creator},
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
#{gmtModified},
|
||||
#{isDelete}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除菜单 -->
|
||||
<update id="remove" parameterType="map" flushCache="true">
|
||||
UPDATE
|
||||
sys_menu
|
||||
SET
|
||||
is_delete = 1,
|
||||
modifier = #{modifier},
|
||||
gmt_modified = #{gmtModified}
|
||||
WHERE
|
||||
menu_id IN
|
||||
<foreach collection="menuIds" index="index" open="(" separator="," close=")">
|
||||
#{menuIds[${index}]}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 修改菜单 -->
|
||||
<update id="update" parameterType="map" flushCache="true">
|
||||
UPDATE
|
||||
sys_menu
|
||||
SET
|
||||
<if test="menuName != null and menuName != ''">
|
||||
menu_name = #{menuName},
|
||||
</if>
|
||||
<if test="menuSummary != null and menuSummary != ''">
|
||||
menu_summary = #{menuSummary},
|
||||
</if>
|
||||
<if test="menuCode != null and menuCode != ''">
|
||||
menu_code = #{menuCode},
|
||||
</if>
|
||||
<if test="menuUrl != null and menuUrl != ''">
|
||||
menu_url = #{menuUrl},
|
||||
</if>
|
||||
<if test="menuType != null">
|
||||
menu_type = #{menuType},
|
||||
</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">
|
||||
menu_icon = #{menuIcon},
|
||||
</if>
|
||||
<if test="menuOrder != null and menuOrder != ''">
|
||||
menu_order = #{menuOrder},
|
||||
</if>
|
||||
<if test="menuStatus != null">
|
||||
menu_status = #{menuStatus},
|
||||
</if>
|
||||
<if test="openType != null">
|
||||
open_type = #{openType},
|
||||
</if>
|
||||
modifier = #{modifier},
|
||||
gmt_modified = #{gmtModified}
|
||||
WHERE
|
||||
menu_id = #{menuId}
|
||||
</update>
|
||||
|
||||
<!-- ztree列表 -->
|
||||
<select id="listZTree" parameterType="map" resultMap="ZTreeDTO" useCache="true">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
sys_menu
|
||||
WHERE
|
||||
is_delete = 0
|
||||
<if test="menuParentId != null and menuParentId != ''">
|
||||
AND
|
||||
menu_parent_id = #{menuParentId}
|
||||
</if>
|
||||
ORDER BY
|
||||
menu_order asc
|
||||
</select>
|
||||
|
||||
<!-- 菜单列表 -->
|
||||
<select id="list" parameterType="map" resultMap="menuDTO" useCache="true">
|
||||
SELECT
|
||||
menu_id,
|
||||
menu_parent_id,
|
||||
menu_name,
|
||||
menu_summary,
|
||||
menu_code,
|
||||
menu_url,
|
||||
menu_type,
|
||||
menu_icon,
|
||||
menu_order,
|
||||
menu_status,
|
||||
open_type
|
||||
FROM
|
||||
sys_menu t1
|
||||
WHERE
|
||||
is_delete = 0
|
||||
<if test="menuParentId != null and menuParentId != ''">
|
||||
AND
|
||||
menu_parent_id = #{menuParentId}
|
||||
</if>
|
||||
<if test="menuIds != null and menuIds.size > 0">
|
||||
AND
|
||||
menu_id IN
|
||||
<foreach collection="menuIds" index="index" open="(" separator="," close=")">
|
||||
#{menuIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="menuStatus != null">
|
||||
AND
|
||||
menu_status = #{menuStatus}
|
||||
</if>
|
||||
<if test="menuType != null">
|
||||
AND
|
||||
menu_type = #{menuType}
|
||||
</if>
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND
|
||||
menu_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
gmt_create <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND
|
||||
gmt_create <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="sort != null and (sort == 'menuType' or sort == 'menuCode' or sort == 'menuName' or sort == 'menuOrder' or sort == 'menuStatus')">
|
||||
ORDER BY
|
||||
<if test="sort == 'menuType'">
|
||||
menu_type ${order}
|
||||
</if>
|
||||
<if test="sort == 'menuCode'">
|
||||
menu_code ${order}
|
||||
</if>
|
||||
<if test="sort == 'menuName'">
|
||||
menu_name ${order}
|
||||
</if>
|
||||
<if test="sort == 'menuOrder'">
|
||||
menu_order ${order}
|
||||
</if>
|
||||
<if test="sort == 'menuStatus'">
|
||||
menu_status ${order}
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY
|
||||
menu_order asc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- 菜单详情 -->
|
||||
<select id="get" parameterType="map" resultMap="menuDTO" useCache="false">
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.menu_name menu_parent_name
|
||||
FROM
|
||||
sys_menu t1
|
||||
LEFT JOIN
|
||||
sys_menu t2
|
||||
ON
|
||||
t1.menu_parent_id = t2.menu_id
|
||||
AND
|
||||
t2.is_delete = 0
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="menuId != null and menuId != ''">
|
||||
AND
|
||||
t1.menu_id = #{menuId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 菜单详情 -->
|
||||
<select id="getSimple" parameterType="map" resultMap="menuDTO">
|
||||
SELECT
|
||||
t1.menu_id,
|
||||
t1.menu_parent_id,
|
||||
t1.menu_name,
|
||||
t1.menu_summary,
|
||||
t1.menu_code,
|
||||
t1.menu_url,
|
||||
t1.menu_type,
|
||||
t1.menu_icon,
|
||||
t1.menu_order,
|
||||
t1.menu_status,
|
||||
t1.open_type
|
||||
FROM
|
||||
sys_menu t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="menuId != null and menuId != ''">
|
||||
AND
|
||||
t1.menu_id = #{menuId}
|
||||
</if>
|
||||
<if test="menuCode != null and menuCode != ''">
|
||||
AND
|
||||
t1.menu_code = #{menuCode}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 子节点数量 -->
|
||||
<select id="countByParentId" parameterType="String" resultType="Integer" useCache="false">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
sys_menu
|
||||
WHERE
|
||||
is_delete = 0
|
||||
AND
|
||||
menu_parent_id = #{_parameter}
|
||||
</select>
|
||||
|
||||
<!-- 获取最后一个子菜单,实际数据,包含已删除,方式编码重复 -->
|
||||
<select id="getLastByParentId" parameterType="String" resultMap="menuDTO" useCache="false">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
sys_menu
|
||||
WHERE
|
||||
menu_parent_id = #{_parameter}
|
||||
ORDER BY
|
||||
menu_code desc
|
||||
LIMIT 0, 1
|
||||
</select>
|
||||
|
||||
<!-- 通过用户获取菜单 -->
|
||||
<select id="listIdByUser" parameterType="map" resultType="String" useCache="false">
|
||||
SELECT
|
||||
t1.menu_id
|
||||
FROM
|
||||
sys_role_menu t1
|
||||
LEFT JOIN
|
||||
sys_role_user t2
|
||||
ON
|
||||
t1.role_id = t2.role_id
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="roleType != null and roleType != ''">
|
||||
AND
|
||||
t1.role_type = #{roleType}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
AND
|
||||
t2.user_id = #{userId}
|
||||
</if>
|
||||
GROUP BY
|
||||
t1.menu_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
1015
service-menu/src/main/resources/templates/menu/icon.html
Normal file
1015
service-menu/src/main/resources/templates/menu/icon.html
Normal file
File diff suppressed because it is too large
Load Diff
114
service-menu/src/main/resources/templates/menu/list-tree.html
Normal file
114
service-menu/src/main/resources/templates/menu/list-tree.html
Normal file
@ -0,0 +1,114 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/js/vendor/zTree3/css/metroStyle/metroStyle.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/common.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md2 layui-col-sm2 layui-col-xs2">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body left-tree-wrap">
|
||||
<div id="leftTreeWrap">
|
||||
<ul id="leftTree" class="ztree"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md10 layui-col-sm10 layui-col-xs10">
|
||||
<div class="layui-card">
|
||||
<div id="listContentWrap" class="layui-card-body">
|
||||
<iframe id="listContent" frameborder="0" class="layadmin-iframe"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
var common;
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'ztree', 'common'], function() {
|
||||
common = layui.common;
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var resizeTimeout = null;
|
||||
var parentId = 0;
|
||||
|
||||
// 初始化IFrame
|
||||
function initIFrame() {
|
||||
$('#listContent').attr('src', top.restAjax.path('route/menu/list?parentId={parentId}', [parentId]));
|
||||
}
|
||||
// 初始化大小
|
||||
function initSize() {
|
||||
$('#leftTreeWrap').css({
|
||||
height: $win.height() - 30,
|
||||
overflow: 'auto'
|
||||
});
|
||||
$('#listContentWrap').css({
|
||||
height: $win.height() - 50,
|
||||
});
|
||||
}
|
||||
// 初始化树
|
||||
function initThree() {
|
||||
var setting = {
|
||||
async: {
|
||||
enable: true,
|
||||
autoLoad: false,
|
||||
type: 'get',
|
||||
url: top.restAjax.path('api/menu/listztree', []),
|
||||
autoParam: ['id'],
|
||||
otherParam: {},
|
||||
dataFilter: function (treeId, parentNode, childNodes) {
|
||||
if (!childNodes) return null;
|
||||
for (var i = 0, l = childNodes.length; i < l; i++) {
|
||||
childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
|
||||
}
|
||||
return childNodes;
|
||||
}
|
||||
},
|
||||
callback: {
|
||||
onClick: function (event, treeId, treeNode) {
|
||||
parentId = treeNode.id;
|
||||
initIFrame();
|
||||
return false;
|
||||
}
|
||||
},
|
||||
};
|
||||
var zTree = $.fn.zTree.init($("#leftTree"), setting);
|
||||
zTree.addNodes(null, {
|
||||
id: '0',
|
||||
pId: '-1',
|
||||
name: top.dataMessage.tree.rootName,
|
||||
url: 'javascript:;',
|
||||
isParent: 'true'
|
||||
});
|
||||
common.refreshTree('leftTree');
|
||||
}
|
||||
initSize();
|
||||
initIFrame();
|
||||
initThree();
|
||||
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(function() {
|
||||
initSize();
|
||||
}, 500);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
265
service-menu/src/main/resources/templates/menu/list.html
Normal file
265
service-menu/src/main/resources/templates/menu/list.html
Normal file
@ -0,0 +1,265 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein" style="padding: 0;">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
<!-- 表头按钮组 -->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="save">
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="update">
|
||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="remove">
|
||||
<i class="fa fa-lg fa-trash"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'ztree'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var table = layui.table;
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
var parentId = top.restAjax.params(window.location.href).parentId;
|
||||
var tableUrl = 'api/menu/listpage?parentId={parentId}';
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: top.restAjax.path(tableUrl, [parentId]),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 60,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
toolbar: '#headerToolBar',
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field:'menuName', width:180, title: '菜单名称', align:'center',},
|
||||
{field:'menuSummary', width:180, title: '菜单说明', align:'center',},
|
||||
{field:'menuCode', width:170, title: '菜单编码', align:'center',},
|
||||
{field:'openType', width:170, title: '打开方式', align:'center',
|
||||
templet: function(item) {
|
||||
var value;
|
||||
switch (item.openType) {
|
||||
case 1:
|
||||
value = '默认';
|
||||
break;
|
||||
case 2:
|
||||
value = '弹窗';
|
||||
break;
|
||||
case 3:
|
||||
value = '新窗口';
|
||||
break;
|
||||
case 4:
|
||||
value = '本窗口';
|
||||
break;
|
||||
default:
|
||||
value = '无';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{field:'menuUrl', width:170, title: '菜单链接', align:'center',},
|
||||
{field:'menuType', width:100, title: '菜单类别', align:'center',
|
||||
templet: function(item) {
|
||||
var value;
|
||||
switch (item.menuType) {
|
||||
case 1:
|
||||
value = '系统菜单';
|
||||
break;
|
||||
case 2:
|
||||
value = '业务菜单';
|
||||
break;
|
||||
default:
|
||||
value = '无';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{field:'menuIcon', width:70, title: '图标', align:'center',
|
||||
templet: function(item) {
|
||||
return '<i class="' + item.menuIcon + '"/>';
|
||||
}
|
||||
},
|
||||
{field:'menuStatus', width:70, title: '状态', align:'center',
|
||||
templet: function(item) {
|
||||
var value;
|
||||
switch (item.menuStatus) {
|
||||
case 0:
|
||||
value = '启用';
|
||||
break;
|
||||
case 1:
|
||||
value = '关闭';
|
||||
break;
|
||||
default:
|
||||
value = '无';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
url: top.restAjax.path(tableUrl, [parentId]),
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
height: $win.height() - 60,
|
||||
});
|
||||
}
|
||||
function refreshTable() {
|
||||
parent.common.refreshTree('leftTree');
|
||||
reloadTable();
|
||||
}
|
||||
// 初始化日期
|
||||
function initDate() {}
|
||||
// 删除
|
||||
function removeData(ids) {
|
||||
top.dialog.msg(top.dataMessage.delete, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.delete(top.restAjax.path('api/menu/remove/{ids}', [ids]), {}, null, function (code, data) {
|
||||
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000}, function () {
|
||||
refreshTable();
|
||||
});
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
top.dialog.close(layIndex);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
initDate();
|
||||
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
reloadTable();
|
||||
});
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'save') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/menu/save?menuParentId={parentId}', [parentId]),
|
||||
end: function() {
|
||||
refreshTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'update') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/menu/update?menuId={menuId}', [checkDatas[0].menuId]),
|
||||
end: function() {
|
||||
refreshTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'remove') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item.menuId;
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
201
service-menu/src/main/resources/templates/menu/save.html
Normal file
201
service-menu/src/main/resources/templates/menu/save.html
Normal file
@ -0,0 +1,201 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein" style="padding: 0;overflow: hidden;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>新增内容</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">上级名称 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" name="menuParentId" lay-verify="required">
|
||||
<input type="text" name="menuParentName" class="layui-input" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单名称 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="menuName" lay-verify="required" placeholder="请输入菜单名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单说明 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="menuSummary" lay-verify="required" placeholder="请输入菜单说明" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">链接 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="menuUrl" type="text" name="menuUrl" lay-verify="required" placeholder="请输入菜单链接" class="layui-input" value="javascript:void(0);">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单排序 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" name="menuOrder" lay-verify="required|number" placeholder="请输入菜单排序" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单类别 *</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="menuType" lay-verify="required">
|
||||
<option value="1" selected>系统菜单</option>
|
||||
<option value="2">业务接口</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">菜单状态 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="menuStatus" value="0" title="启用" checked>
|
||||
<input type="radio" name="menuStatus" value="1" title="关闭">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">打开方式 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="openType" value="1" title="默认" checked>
|
||||
<input type="radio" name="openType" value="2" title="弹窗">
|
||||
<input type="radio" name="openType" value="3" title="新窗口">
|
||||
<input type="radio" name="openType" value="4" title="本窗口">
|
||||
<input type="radio" name="openType" value="5" title="无">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">菜单图标 *</label>
|
||||
<div class="layui-input-block">
|
||||
<div id="openIcon" style="cursor: pointer; font-size: 30px;">
|
||||
<i id="menuIconLogo" class="fa fa-list" style="margin: 4px 0 0 15px;"></i>
|
||||
</div>
|
||||
<input type="hidden" class="form-control" id="menuIcon" name="menuIcon" value="fa fa-list">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var menuParentId = top.restAjax.params(window.location.href).menuParentId;
|
||||
var menuParentName = null;
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
// 初始化
|
||||
function initData() {
|
||||
form.val('dataForm', {
|
||||
menuParentId: menuParentId,
|
||||
});
|
||||
if(menuParentId == 0) {
|
||||
form.val('dataForm', {
|
||||
menuParentName: '根节点',
|
||||
});
|
||||
form.render(null, 'dataForm');
|
||||
return;
|
||||
}
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/menu/get/{menuParentId}', [menuParentId]), {}, null, function(code, data) {
|
||||
form.val('dataForm', {
|
||||
menuParentName: data.menuName
|
||||
});
|
||||
form.render(null, 'dataForm');
|
||||
}, function(code, data) {
|
||||
top.DialogBox.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.post(top.restAjax.path('api/menu/savemenu', []), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function() {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
// 图标变化
|
||||
$('#openIcon').on('click', function() {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/menu/icon', []),
|
||||
title: '修改图标',
|
||||
width: '600px',
|
||||
height: '400px',
|
||||
onClose: function() {
|
||||
var dialogData = top.dialog.dialogData;
|
||||
var iconClasses = '';
|
||||
if(typeof(dialogData.iconColor) != 'undefined' && null != dialogData.iconColor && '' != dialogData.iconColor) {
|
||||
iconClasses += dialogData.iconColor;
|
||||
}
|
||||
if(typeof(dialogData.iconClass) != 'undefined' && null != dialogData.iconClass && '' != dialogData.iconClass) {
|
||||
iconClasses += ' '+ dialogData.iconClass
|
||||
}
|
||||
$('#menuIconLogo').attr('class', iconClasses);
|
||||
$('#menuIcon').val(iconClasses);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
200
service-menu/src/main/resources/templates/menu/update.html
Normal file
200
service-menu/src/main/resources/templates/menu/update.html
Normal file
@ -0,0 +1,200 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein" style="padding: 0;overflow: hidden;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>编辑内容</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">上级名称 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" name="menuParentId" lay-verify="required">
|
||||
<input type="text" name="menuParentName" class="layui-input" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单名称 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="menuName" lay-verify="required" placeholder="请输入菜单名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单说明 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="menuSummary" lay-verify="required" placeholder="请输入菜单说明" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">链接 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="menuUrl" type="text" name="menuUrl" lay-verify="required" placeholder="请输入菜单链接" class="layui-input" value="javascript:void(0);">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单排序 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" name="menuOrder" lay-verify="required|number" placeholder="请输入菜单排序" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单类别 *</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="menuType" lay-verify="required">
|
||||
<option value="1" selected>系统菜单</option>
|
||||
<option value="2">业务接口</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">菜单状态 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="menuStatus" value="0" title="启用" checked>
|
||||
<input type="radio" name="menuStatus" value="1" title="关闭">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">打开方式 *</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="openType" value="1" title="默认" checked>
|
||||
<input type="radio" name="openType" value="2" title="弹窗">
|
||||
<input type="radio" name="openType" value="3" title="新窗口">
|
||||
<input type="radio" name="openType" value="4" title="本窗口">
|
||||
<input type="radio" name="openType" value="5" title="无">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">菜单图标 *</label>
|
||||
<div class="layui-input-block">
|
||||
<div id="openIcon" style="cursor: pointer; font-size: 30px;">
|
||||
<i id="menuIconLogo" class="fa fa-list" style="margin: 4px 0 0 15px;"></i>
|
||||
</div>
|
||||
<input type="hidden" class="form-control" id="menuIcon" name="menuIcon" value="fa fa-list">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var menuId = top.restAjax.params(window.location.href).menuId;
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
// 初始化
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/menu/get/{menuId}', [menuId]), {}, null, function(code, data) {
|
||||
form.val('dataForm', {
|
||||
menuParentName: data.menuParentName == '' ? '根节点' : data.menuParentName,
|
||||
menuParentId: data.menuParentId,
|
||||
menuName: data.menuName,
|
||||
menuSummary: data.menuSummary,
|
||||
menuUrl: data.menuUrl,
|
||||
menuCode: data.menuCode,
|
||||
menuOrder: data.menuOrder,
|
||||
menuType: data.menuType.toString(),
|
||||
menuStatus: data.menuStatus.toString(),
|
||||
openType: data.openType +'',
|
||||
menuIcon: data.menuIcon,
|
||||
});
|
||||
form.render(null, 'dataForm');
|
||||
$('#menuIconLogo').attr('class', data.menuIcon);
|
||||
}, function(code, data) {
|
||||
top.DialogBox.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/menu/updatemenu/{menuId}', [menuId]), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function() {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
// 图标变化
|
||||
$('#openIcon').on('click', function() {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/menu/icon', []),
|
||||
title: '修改图标',
|
||||
width: '600px',
|
||||
height: '400px',
|
||||
onClose: function() {
|
||||
var dialogData = top.dialog.dialogData;
|
||||
var iconClasses = '';
|
||||
if(typeof(dialogData.iconColor) != 'undefined' && null != dialogData.iconColor && '' != dialogData.iconColor) {
|
||||
iconClasses += dialogData.iconColor;
|
||||
}
|
||||
if(typeof(dialogData.iconClass) != 'undefined' && null != dialogData.iconClass && '' != dialogData.iconClass) {
|
||||
iconClasses += ' '+ dialogData.iconClass
|
||||
}
|
||||
$('#menuIconLogo').attr('class', iconClasses);
|
||||
$('#menuIcon').val(iconClasses);
|
||||
}
|
||||
})
|
||||
});
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.role.controller.api;
|
||||
package ink.wgink.service.role.controller.api;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
@ -6,16 +6,15 @@ import ink.wgink.exceptions.*;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||
import ink.wgink.pojo.dtos.role.RoleDTO;
|
||||
import ink.wgink.pojo.dtos.role.RoleDataAuthorityTypeDTO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.module.role.pojo.vos.RoleDataAuthorityVO;
|
||||
import ink.wgink.module.role.pojo.vos.RoleUserAuthorizationVO;
|
||||
import ink.wgink.module.role.pojo.vos.RoleVO;
|
||||
import ink.wgink.module.role.service.IRoleService;
|
||||
import ink.wgink.service.role.pojo.vos.RoleDataAuthorityVO;
|
||||
import ink.wgink.service.role.pojo.vos.RoleUserAuthorizationVO;
|
||||
import ink.wgink.service.role.pojo.vos.RoleVO;
|
||||
import ink.wgink.service.role.service.IRoleService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
@ -1,17 +1,4 @@
|
||||
package ink.wgink.module.role.controller.api;
|
||||
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
package ink.wgink.service.role.controller.api;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
@ -1,10 +1,10 @@
|
||||
package ink.wgink.module.role.dao;
|
||||
package ink.wgink.service.role.dao;
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import ink.wgink.module.role.pojo.pos.RolePO;
|
||||
import ink.wgink.service.role.pojo.pos.RolePO;
|
||||
import ink.wgink.pojo.bos.RoleBO;
|
||||
import ink.wgink.pojo.bos.RoleMenuBO;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
@ -1,11 +1,8 @@
|
||||
package ink.wgink.module.role.dao;
|
||||
package ink.wgink.service.role.dao;
|
||||
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.role.dao;
|
||||
package ink.wgink.service.role.dao;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.role.dao;
|
||||
package ink.wgink.service.role.dao;
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
@ -1,4 +1,4 @@
|
||||
package ink.wgink.module.role.pojo.pos;
|
||||
package ink.wgink.service.role.pojo.pos;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user