完善基础代码
This commit is contained in:
parent
483a6ccdc4
commit
ef5eae3aa0
@ -0,0 +1,14 @@
|
|||||||
|
package ink.wgink.interfaces.dictionary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When you feel like quitting. Think about why you started
|
||||||
|
* 当你想要放弃的时候,想想当初你为何开始
|
||||||
|
*
|
||||||
|
* @ClassName: IDictionaryCheckService
|
||||||
|
* @Description: 字典检查
|
||||||
|
* @Author: wanggeng
|
||||||
|
* @Date: 2021/2/11 9:02 下午
|
||||||
|
* @Version: 1.0
|
||||||
|
*/
|
||||||
|
public interface IDictionaryCheckService {
|
||||||
|
}
|
@ -1,11 +1,11 @@
|
|||||||
package ink.wgink.service.dictionary.controller.api;
|
package ink.wgink.module.dictionary.controller.api;
|
||||||
|
|
||||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||||
import ink.wgink.service.dictionary.pojo.vos.AreaVO;
|
import ink.wgink.module.dictionary.pojo.vos.AreaVO;
|
||||||
import ink.wgink.service.dictionary.service.IAreaService;
|
import ink.wgink.module.dictionary.service.IAreaService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,11 +1,11 @@
|
|||||||
package ink.wgink.service.dictionary.controller.api;
|
package ink.wgink.module.dictionary.controller.api;
|
||||||
|
|
||||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
import ink.wgink.service.dictionary.pojo.vos.DataVO;
|
import ink.wgink.module.dictionary.pojo.vos.DataVO;
|
||||||
import ink.wgink.service.dictionary.service.IDataService;
|
import ink.wgink.module.dictionary.service.IDataService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,9 +1,9 @@
|
|||||||
package ink.wgink.service.dictionary.controller.app.api;
|
package ink.wgink.module.dictionary.controller.app.api;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||||
import ink.wgink.service.dictionary.service.IAreaService;
|
import ink.wgink.module.dictionary.service.IAreaService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,9 +1,9 @@
|
|||||||
package ink.wgink.service.dictionary.controller.app.api;
|
package ink.wgink.module.dictionary.controller.app.api;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
import ink.wgink.service.dictionary.service.IDataService;
|
import ink.wgink.module.dictionary.service.IDataService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
@ -0,0 +1,45 @@
|
|||||||
|
package ink.wgink.module.dictionary.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: IDataDictionaryRouteController
|
||||||
|
* @Description: 数据字典
|
||||||
|
* @Author: WangGeng
|
||||||
|
* @Date: 2019/12/6 16:52
|
||||||
|
* @Version: 1.0
|
||||||
|
**/
|
||||||
|
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "地区字典页面接口")
|
||||||
|
@Controller
|
||||||
|
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/area")
|
||||||
|
public class AreaRouteController {
|
||||||
|
|
||||||
|
@GetMapping("save")
|
||||||
|
public ModelAndView save() {
|
||||||
|
return new ModelAndView("area/save");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("update")
|
||||||
|
public ModelAndView updateDataDictionary() {
|
||||||
|
return new ModelAndView("area/update");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list-tree")
|
||||||
|
public ModelAndView listTree() {
|
||||||
|
return new ModelAndView("area/list-tree");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public ModelAndView list() {
|
||||||
|
return new ModelAndView("area/list");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package ink.wgink.module.dictionary.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: IDataDictionaryRouteController
|
||||||
|
* @Description: 数据字典
|
||||||
|
* @Author: WangGeng
|
||||||
|
* @Date: 2019/12/6 16:52
|
||||||
|
* @Version: 1.0
|
||||||
|
**/
|
||||||
|
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "数据字典页面接口")
|
||||||
|
@Controller
|
||||||
|
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/data")
|
||||||
|
public class DataRouteController {
|
||||||
|
|
||||||
|
@GetMapping("save")
|
||||||
|
public ModelAndView save() {
|
||||||
|
return new ModelAndView("data/save");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("update")
|
||||||
|
public ModelAndView update() {
|
||||||
|
return new ModelAndView("data/update");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list-tree")
|
||||||
|
public ModelAndView listTree() {
|
||||||
|
return new ModelAndView("data/list-tree");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public ModelAndView list() {
|
||||||
|
return new ModelAndView("data/list");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
package ink.wgink.service.dictionary.controller.wechat;
|
package ink.wgink.module.dictionary.controller.wechat;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||||
import ink.wgink.service.dictionary.service.IAreaService;
|
import ink.wgink.module.dictionary.service.IAreaService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,9 +1,9 @@
|
|||||||
package ink.wgink.service.dictionary.controller.wechat;
|
package ink.wgink.module.dictionary.controller.wechat;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
import ink.wgink.service.dictionary.service.IDataService;
|
import ink.wgink.module.dictionary.service.IDataService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
@ -1,10 +1,10 @@
|
|||||||
package ink.wgink.service.dictionary.dao;
|
package ink.wgink.module.dictionary.dao;
|
||||||
|
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
import ink.wgink.exceptions.UpdateException;
|
import ink.wgink.exceptions.UpdateException;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@ -21,6 +21,13 @@ import java.util.Map;
|
|||||||
@Repository
|
@Repository
|
||||||
public interface IAreaDao {
|
public interface IAreaDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建表
|
||||||
|
*
|
||||||
|
* @throws UpdateException
|
||||||
|
*/
|
||||||
|
void createTable() throws UpdateException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增地区字典
|
* 新增地区字典
|
||||||
*
|
*
|
@ -1,10 +1,10 @@
|
|||||||
package ink.wgink.service.dictionary.dao;
|
package ink.wgink.module.dictionary.dao;
|
||||||
|
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
import ink.wgink.exceptions.UpdateException;
|
import ink.wgink.exceptions.UpdateException;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@ -21,6 +21,13 @@ import java.util.Map;
|
|||||||
@Repository
|
@Repository
|
||||||
public interface IDataDao {
|
public interface IDataDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建表
|
||||||
|
*
|
||||||
|
* @throws UpdateException
|
||||||
|
*/
|
||||||
|
void createTable() throws UpdateException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增字典
|
* 新增字典
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.dictionary.pojo.dtos;
|
package ink.wgink.module.dictionary.pojo.dtos;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.dictionary.pojo.dtos;
|
package ink.wgink.module.dictionary.pojo.dtos;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
@ -1,5 +1,7 @@
|
|||||||
package ink.wgink.service.dictionary.pojo.vos;
|
package ink.wgink.module.dictionary.pojo.vos;
|
||||||
|
|
||||||
|
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||||
|
import ink.wgink.annotation.CheckNumberAnnotation;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
@ -14,28 +16,37 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
public class AreaVO {
|
public class AreaVO {
|
||||||
|
|
||||||
@ApiModelProperty(name = "areaParentId", value = "字典上级ID")
|
@ApiModelProperty(name = "areaParentId", value = "字典上级ID")
|
||||||
|
@CheckEmptyAnnotation(name = "字典上级ID")
|
||||||
private String areaParentId;
|
private String areaParentId;
|
||||||
@ApiModelProperty(name = "areaName", value = "地区名称")
|
@ApiModelProperty(name = "areaName", value = "地区名称")
|
||||||
|
@CheckEmptyAnnotation(name = "地区名称")
|
||||||
private String areaName;
|
private String areaName;
|
||||||
@ApiModelProperty(name = "areaCode", value = "地区编码")
|
@ApiModelProperty(name = "areaCode", value = "地区编码")
|
||||||
private Boolean areaCode;
|
@CheckEmptyAnnotation(name = "地区编码")
|
||||||
|
private String areaCode;
|
||||||
@ApiModelProperty(name = "areaCityCode", value = "地区城市编码")
|
@ApiModelProperty(name = "areaCityCode", value = "地区城市编码")
|
||||||
private String areaCityCode;
|
private String areaCityCode;
|
||||||
@ApiModelProperty(name = "areaMergerName", value = "地区合并名称")
|
@ApiModelProperty(name = "areaMergerName", value = "地区合并名称")
|
||||||
|
@CheckEmptyAnnotation(name = "地区合并名称")
|
||||||
private String areaMergerName;
|
private String areaMergerName;
|
||||||
@ApiModelProperty(name = "areaShortName", value = "地区简称")
|
@ApiModelProperty(name = "areaShortName", value = "地区简称")
|
||||||
|
@CheckEmptyAnnotation(name = "地区简称")
|
||||||
private String areaShortName;
|
private String areaShortName;
|
||||||
@ApiModelProperty(name = "areaZipCode", value = "地区邮政编码")
|
@ApiModelProperty(name = "areaZipCode", value = "地区邮政编码")
|
||||||
|
@CheckEmptyAnnotation(name = "地区邮政编码")
|
||||||
private String areaZipCode;
|
private String areaZipCode;
|
||||||
@ApiModelProperty(name = "areaLevel", value = "地区级别(0: 省级 1:市级 2:县级 3:镇级 4:乡村级)")
|
@ApiModelProperty(name = "areaLevel", value = "地区级别(0: 省级 1:市级 2:县级 3:镇级 4:乡村级)")
|
||||||
|
@CheckEmptyAnnotation(name = "地区级别")
|
||||||
private String areaLevel;
|
private String areaLevel;
|
||||||
@ApiModelProperty(name = "areaLng", value = "地区经度")
|
@ApiModelProperty(name = "areaLng", value = "地区经度")
|
||||||
private String areaLng;
|
private String areaLng;
|
||||||
@ApiModelProperty(name = "areaLat", value = "地区纬度")
|
@ApiModelProperty(name = "areaLat", value = "地区纬度")
|
||||||
private String areaLat;
|
private String areaLat;
|
||||||
@ApiModelProperty(name = "areaPinyin", value = "地区拼音")
|
@ApiModelProperty(name = "areaPinyin", value = "地区拼音")
|
||||||
|
@CheckEmptyAnnotation(name = "地区拼音")
|
||||||
private String areaPinyin;
|
private String areaPinyin;
|
||||||
@ApiModelProperty(name = "areaFirst", value = "地区首字母")
|
@ApiModelProperty(name = "areaFirst", value = "地区首字母")
|
||||||
|
@CheckEmptyAnnotation(name = "地区首字母")
|
||||||
private String areaFirst;
|
private String areaFirst;
|
||||||
|
|
||||||
public String getAreaParentId() {
|
public String getAreaParentId() {
|
||||||
@ -54,11 +65,11 @@ public class AreaVO {
|
|||||||
this.areaName = areaName;
|
this.areaName = areaName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getAreaCode() {
|
public String getAreaCode() {
|
||||||
return areaCode;
|
return areaCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAreaCode(Boolean areaCode) {
|
public void setAreaCode(String areaCode) {
|
||||||
this.areaCode = areaCode;
|
this.areaCode = areaCode;
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.dictionary.pojo.vos;
|
package ink.wgink.module.dictionary.pojo.vos;
|
||||||
|
|
||||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
import ink.wgink.annotation.CheckNumberAnnotation;
|
@ -1,7 +1,7 @@
|
|||||||
package ink.wgink.service.dictionary.service;
|
package ink.wgink.module.dictionary.service;
|
||||||
|
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||||
import ink.wgink.service.dictionary.pojo.vos.AreaVO;
|
import ink.wgink.module.dictionary.pojo.vos.AreaVO;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
@ -1,7 +1,8 @@
|
|||||||
package ink.wgink.service.dictionary.service;
|
package ink.wgink.module.dictionary.service;
|
||||||
|
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
import ink.wgink.interfaces.dictionary.IDictionaryCheckService;
|
||||||
import ink.wgink.service.dictionary.pojo.vos.DataVO;
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
|
import ink.wgink.module.dictionary.pojo.vos.DataVO;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
@ -19,7 +20,7 @@ import java.util.Map;
|
|||||||
* @Date: 2019/11/18 14:09
|
* @Date: 2019/11/18 14:09
|
||||||
* @Version: 1.0
|
* @Version: 1.0
|
||||||
**/
|
**/
|
||||||
public interface IDataService {
|
public interface IDataService extends IDictionaryCheckService {
|
||||||
/**
|
/**
|
||||||
* 字典新增
|
* 字典新增
|
||||||
*
|
*
|
@ -1,12 +1,12 @@
|
|||||||
package ink.wgink.service.dictionary.service.impl;
|
package ink.wgink.module.dictionary.service.impl;
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.service.dictionary.dao.IAreaDao;
|
import ink.wgink.module.dictionary.dao.IAreaDao;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||||
import ink.wgink.service.dictionary.pojo.vos.AreaVO;
|
import ink.wgink.module.dictionary.pojo.vos.AreaVO;
|
||||||
import ink.wgink.service.dictionary.service.IAreaService;
|
import ink.wgink.module.dictionary.service.IAreaService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
@ -1,13 +1,13 @@
|
|||||||
package ink.wgink.service.dictionary.service.impl;
|
package ink.wgink.module.dictionary.service.impl;
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.dictionary.dao.IDataDao;
|
import ink.wgink.module.dictionary.dao.IDataDao;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.DataDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
import ink.wgink.service.dictionary.pojo.vos.DataVO;
|
import ink.wgink.module.dictionary.pojo.vos.DataVO;
|
||||||
import ink.wgink.service.dictionary.service.IDataService;
|
import ink.wgink.module.dictionary.service.IDataService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
@ -0,0 +1,45 @@
|
|||||||
|
package ink.wgink.module.dictionary.startup;
|
||||||
|
|
||||||
|
import ink.wgink.module.dictionary.dao.IAreaDao;
|
||||||
|
import ink.wgink.module.dictionary.dao.IDataDao;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When you feel like quitting. Think about why you started
|
||||||
|
* 当你想要放弃的时候,想想当初你为何开始
|
||||||
|
*
|
||||||
|
* @ClassName: ModuleDictionaryStartUp
|
||||||
|
* @Description: 字典模块启动
|
||||||
|
* @Author: wanggeng
|
||||||
|
* @Date: 2021/2/11 9:41 下午
|
||||||
|
* @Version: 1.0
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class ModuleDictionaryStartUp implements ApplicationRunner {
|
||||||
|
|
||||||
|
private static final Logger LOG = LoggerFactory.getLogger(ModuleDictionaryStartUp.class);
|
||||||
|
@Autowired
|
||||||
|
private IDataDao dataDao;
|
||||||
|
@Autowired
|
||||||
|
private IAreaDao areaDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(ApplicationArguments args) throws Exception {
|
||||||
|
initTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建表
|
||||||
|
*/
|
||||||
|
private void initTable() {
|
||||||
|
LOG.debug("创建 data_data 表");
|
||||||
|
dataDao.createTable();
|
||||||
|
LOG.debug("创建 data_area 表");
|
||||||
|
areaDao.createTable();
|
||||||
|
}
|
||||||
|
}
|
@ -1,53 +0,0 @@
|
|||||||
package ink.wgink.service.dictionary.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.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* When you feel like quitting. Think about why you started
|
|
||||||
* 当你想要放弃的时候,想想当初你为何开始
|
|
||||||
*
|
|
||||||
* @ClassName: IDataDictionaryRouteController
|
|
||||||
* @Description: 数据字典
|
|
||||||
* @Author: WangGeng
|
|
||||||
* @Date: 2019/12/6 16:52
|
|
||||||
* @Version: 1.0
|
|
||||||
**/
|
|
||||||
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "地区字典页面接口")
|
|
||||||
@Controller
|
|
||||||
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/area")
|
|
||||||
public class AreaRouteController {
|
|
||||||
|
|
||||||
@GetMapping("save/{areaParentId}")
|
|
||||||
public ModelAndView save(@PathVariable("areaParentId") String areaParentId) {
|
|
||||||
ModelAndView mv = new ModelAndView("area/save");
|
|
||||||
mv.addObject("areaParentId", areaParentId);
|
|
||||||
return mv;
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("update/{areaId}")
|
|
||||||
public ModelAndView updateDataDictionary(@PathVariable("areaId") String areaId) {
|
|
||||||
ModelAndView mv = new ModelAndView("area/update");
|
|
||||||
mv.addObject("areaId", areaId);
|
|
||||||
return mv;
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("listtree")
|
|
||||||
public ModelAndView listTree() {
|
|
||||||
ModelAndView mv = new ModelAndView("area/list-tree");
|
|
||||||
return mv;
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("list/{areaParentId}")
|
|
||||||
public ModelAndView list(@PathVariable("areaParentId") String areaParentId) {
|
|
||||||
ModelAndView mv = new ModelAndView("area/list");
|
|
||||||
mv.addObject("areaParentId", areaParentId);
|
|
||||||
return mv;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
package ink.wgink.service.dictionary.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.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* When you feel like quitting. Think about why you started
|
|
||||||
* 当你想要放弃的时候,想想当初你为何开始
|
|
||||||
*
|
|
||||||
* @ClassName: IDataDictionaryRouteController
|
|
||||||
* @Description: 数据字典
|
|
||||||
* @Author: WangGeng
|
|
||||||
* @Date: 2019/12/6 16:52
|
|
||||||
* @Version: 1.0
|
|
||||||
**/
|
|
||||||
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "数据字典页面接口")
|
|
||||||
@Controller
|
|
||||||
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/data")
|
|
||||||
public class DataRouteController {
|
|
||||||
|
|
||||||
@GetMapping("save/{parentId}")
|
|
||||||
public ModelAndView save(@PathVariable("parentId") String parentId) {
|
|
||||||
ModelAndView mv = new ModelAndView("data/save");
|
|
||||||
mv.addObject("parentId", parentId);
|
|
||||||
return mv;
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("update/{dataId}")
|
|
||||||
public ModelAndView update(@PathVariable("dataId") String dataId) {
|
|
||||||
ModelAndView mv = new ModelAndView("data/update");
|
|
||||||
mv.addObject("dataId", dataId);
|
|
||||||
return mv;
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("listtree")
|
|
||||||
public ModelAndView listTree() {
|
|
||||||
ModelAndView mv = new ModelAndView("data/list-tree");
|
|
||||||
return mv;
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("list/{parentId}")
|
|
||||||
public ModelAndView list(@PathVariable("parentId") String parentId) {
|
|
||||||
ModelAndView mv = new ModelAndView("data/list");
|
|
||||||
mv.addObject("parentId", parentId);
|
|
||||||
return mv;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="ink.wgink.service.dictionary.dao.IAreaDao">
|
<mapper namespace="ink.wgink.module.dictionary.dao.IAreaDao">
|
||||||
|
|
||||||
<cache flushInterval="3600000"/>
|
<cache flushInterval="3600000"/>
|
||||||
|
|
||||||
<resultMap id="areaDTO" type="ink.wgink.service.dictionary.pojo.dtos.AreaDTO">
|
<resultMap id="areaDTO" type="ink.wgink.module.dictionary.pojo.dtos.AreaDTO">
|
||||||
<id property="areaId" column="area_id"/>
|
<id property="areaId" column="area_id"/>
|
||||||
<result property="areaParentId" column="area_parent_id"/>
|
<result property="areaParentId" column="area_parent_id"/>
|
||||||
<result property="areaName" column="area_name"/>
|
<result property="areaName" column="area_name"/>
|
||||||
@ -27,8 +27,35 @@
|
|||||||
<result property="title" column="area_merger_name"/>
|
<result property="title" column="area_merger_name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 建表 -->
|
||||||
|
<update id="createTable">
|
||||||
|
CREATE TABLE IF NOT EXISTS `data_area` (
|
||||||
|
`area_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`area_parent_id` bigint(20) DEFAULT '0',
|
||||||
|
`area_name` varchar(255) DEFAULT NULL COMMENT '地区名称',
|
||||||
|
`area_code` varchar(255) DEFAULT NULL COMMENT '地区编码',
|
||||||
|
`area_city_code` varchar(255) DEFAULT NULL COMMENT '地区城市编码',
|
||||||
|
`area_merger_name` varchar(255) DEFAULT NULL COMMENT '地区合并名称',
|
||||||
|
`area_short_name` varchar(255) DEFAULT NULL COMMENT '地区简称',
|
||||||
|
`area_zip_code` varchar(255) DEFAULT NULL COMMENT '地区邮政编码',
|
||||||
|
`area_level` int(1) DEFAULT '0' COMMENT '地区级别(0: 省级 1:市级 2:县级 3:镇级 4:乡村级)',
|
||||||
|
`area_lng` varchar(255) DEFAULT NULL COMMENT '地区经度',
|
||||||
|
`area_lat` varchar(255) DEFAULT NULL COMMENT '地区纬度',
|
||||||
|
`area_pinyin` varchar(255) DEFAULT NULL COMMENT '地区拼音',
|
||||||
|
`area_first` varchar(255) DEFAULT NULL COMMENT '地区首字母',
|
||||||
|
`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 (`area_id`),
|
||||||
|
KEY `area_parent_id` (`area_parent_id`) USING BTREE,
|
||||||
|
KEY `is_delete` (`is_delete`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
</update>
|
||||||
|
|
||||||
<!-- 新增字典 -->
|
<!-- 新增字典 -->
|
||||||
<insert id="save" parameterType="map" useGeneratedKeys="true" keyColumn="areaId" flushCache="true">
|
<insert id="save" parameterType="map" useGeneratedKeys="true" keyProperty="areaId" flushCache="true">
|
||||||
INSERT INTO data_area(
|
INSERT INTO data_area(
|
||||||
area_parent_id,
|
area_parent_id,
|
||||||
area_name,
|
area_name,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="ink.wgink.service.dictionary.dao.IDataDao">
|
<mapper namespace="ink.wgink.module.dictionary.dao.IDataDao">
|
||||||
|
|
||||||
<cache flushInterval="3600000"/>
|
<cache flushInterval="3600000"/>
|
||||||
|
|
||||||
<resultMap id="dataDTO" type="ink.wgink.service.dictionary.pojo.dtos.DataDTO">
|
<resultMap id="dataDTO" type="ink.wgink.module.dictionary.pojo.dtos.DataDTO">
|
||||||
<id property="dataId" column="data_id"/>
|
<id property="dataId" column="data_id"/>
|
||||||
<result property="dataParentId" column="data_parent_id"/>
|
<result property="dataParentId" column="data_parent_id"/>
|
||||||
<result property="dataParentName" column="data_parent_name"/>
|
<result property="dataParentName" column="data_parent_name"/>
|
||||||
@ -20,6 +20,27 @@
|
|||||||
<result property="name" column="data_name"/>
|
<result property="name" column="data_name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 建表 -->
|
||||||
|
<update id="createTable">
|
||||||
|
CREATE TABLE IF NOT EXISTS `data_data` (
|
||||||
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`data_id` char(36) NOT NULL,
|
||||||
|
`data_parent_id` char(36) DEFAULT '0' COMMENT '字典上级ID',
|
||||||
|
`data_name` varchar(255) DEFAULT NULL COMMENT '字典名称',
|
||||||
|
`data_summary` varchar(255) DEFAULT NULL COMMENT '字典说明',
|
||||||
|
`data_code` varchar(255) DEFAULT NULL COMMENT '字典编码',
|
||||||
|
`data_sort` int(11) DEFAULT '0' COMMENT '字典排序',
|
||||||
|
`creator` char(36) DEFAULT NULL,
|
||||||
|
`gmt_create` datetime DEFAULT NULL,
|
||||||
|
`modifier` char(36) DEFAULT NULL,
|
||||||
|
`gmt_modified` datetime DEFAULT NULL,
|
||||||
|
`is_delete` int(2) DEFAULT '0',
|
||||||
|
PRIMARY KEY (`id`,`data_id`),
|
||||||
|
KEY `is_delete_index` (`is_delete`) USING BTREE,
|
||||||
|
KEY `data_id` (`data_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
</update>
|
||||||
|
|
||||||
<!-- 新增字典 -->
|
<!-- 新增字典 -->
|
||||||
<insert id="save" parameterType="map" flushCache="true">
|
<insert id="save" parameterType="map" flushCache="true">
|
||||||
INSERT INTO data_data(
|
INSERT INTO data_data(
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
// 初始化IFrame
|
// 初始化IFrame
|
||||||
function initIFrame() {
|
function initIFrame() {
|
||||||
$('#listContent').attr('src', top.restAjax.path('route/area/list/{parentId}', [parentId]));
|
$('#listContent').attr('src', top.restAjax.path('route/area/list?parentId={parentId}', [parentId]));
|
||||||
}
|
}
|
||||||
// 初始化大小
|
// 初始化大小
|
||||||
function initSize() {
|
function initSize() {
|
||||||
@ -88,14 +88,6 @@
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
var zTree = $.fn.zTree.init($("#leftTree"), setting);
|
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();
|
initSize();
|
||||||
initIFrame();
|
initIFrame();
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
var table = layui.table;
|
var table = layui.table;
|
||||||
var admin = layui.admin;
|
var admin = layui.admin;
|
||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
var parentId = $('#areaParentId').val();
|
var parentId = top.restAjax.params(window.location.href).parentId;
|
||||||
var tableUrl = top.restAjax.path('api/area/listpage?parentId={parentId}', [parentId]);
|
var tableUrl = top.restAjax.path('api/area/listpage?parentId={parentId}', [parentId]);
|
||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
@ -164,7 +164,7 @@
|
|||||||
area: ['100%', '100%'],
|
area: ['100%', '100%'],
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
anim: 2,
|
anim: 2,
|
||||||
content: top.restAjax.path('route/area/save/{parentId}', [parentId]),
|
content: top.restAjax.path('route/area/save?areaParentId={parentId}', [parentId]),
|
||||||
end: function() {
|
end: function() {
|
||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@
|
|||||||
area: ['100%', '100%'],
|
area: ['100%', '100%'],
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
anim: 2,
|
anim: 2,
|
||||||
content: top.restAjax.path('route/area/update/{areaId}', [checkDatas[0].areaId]),
|
content: top.restAjax.path('route/area/update?areaId={areaId}', [checkDatas[0].areaId]),
|
||||||
end: function() {
|
end: function() {
|
||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
}).use(['index', 'form', 'laydate'], function(){
|
}).use(['index', 'form', 'laydate'], function(){
|
||||||
var $ = layui.$;
|
var $ = layui.$;
|
||||||
var form = layui.form;
|
var form = layui.form;
|
||||||
var areaParentId = $('#areaParentId').val();
|
var areaParentId = top.restAjax.params(window.location.href).areaParentId;
|
||||||
function closeBox() {
|
function closeBox() {
|
||||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@
|
|||||||
});
|
});
|
||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.DialogBox.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -161,18 +161,17 @@
|
|||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
top.restAjax.post(top.restAjax.path('api/area/save', []), formData.field, null, function(code, data) {
|
top.restAjax.post(top.restAjax.path('api/area/save', []), formData.field, null, function(code, data) {
|
||||||
|
parent.parent.common.refreshTree('leftTree');
|
||||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||||
time: 0,
|
time: 0,
|
||||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||||
shade: 0.3,
|
shade: 0.3,
|
||||||
yes: function(index) {
|
yes: function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
parent.parent.common.refreshTree('leftTree');
|
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
},
|
},
|
||||||
btn2: function() {
|
btn2: function() {
|
||||||
closeBox();
|
closeBox();
|
||||||
parent.parent.common.refreshTree('leftTree');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
}).use(['index', 'form', 'laydate'], function(){
|
}).use(['index', 'form', 'laydate'], function(){
|
||||||
var $ = layui.$;
|
var $ = layui.$;
|
||||||
var form = layui.form;
|
var form = layui.form;
|
||||||
var areaId = $('#areaId').val();
|
var areaId = top.restAjax.params(window.location.href).areaId;
|
||||||
function closeBox() {
|
function closeBox() {
|
||||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@
|
|||||||
});
|
});
|
||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.DialogBox.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -163,18 +163,17 @@
|
|||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
top.restAjax.put(top.restAjax.path('api/area/update/{areaId}', [areaId]), formData.field, null, function(code, data) {
|
top.restAjax.put(top.restAjax.path('api/area/update/{areaId}', [areaId]), formData.field, null, function(code, data) {
|
||||||
|
parent.parent.common.refreshTree('leftTree');
|
||||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||||
time: 0,
|
time: 0,
|
||||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||||
shade: 0.3,
|
shade: 0.3,
|
||||||
yes: function(index) {
|
yes: function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
parent.parent.common.refreshTree('leftTree');
|
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
},
|
},
|
||||||
btn2: function() {
|
btn2: function() {
|
||||||
closeBox();
|
closeBox();
|
||||||
parent.parent.common.refreshTree('leftTree');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
// 初始化IFrame
|
// 初始化IFrame
|
||||||
function initIFrame() {
|
function initIFrame() {
|
||||||
$('#listContent').attr('src', top.restAjax.path('route/data/list/{parentId}', [parentId]));
|
$('#listContent').attr('src', top.restAjax.path('route/data/list?parentId={parentId}', [parentId]));
|
||||||
}
|
}
|
||||||
// 初始化大小
|
// 初始化大小
|
||||||
function initSize() {
|
function initSize() {
|
@ -57,7 +57,7 @@
|
|||||||
var table = layui.table;
|
var table = layui.table;
|
||||||
var admin = layui.admin;
|
var admin = layui.admin;
|
||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
var parentId = $('#parentId').val();
|
var parentId = top.restAjax.params(window.location.href).parentId;
|
||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
function initTable() {
|
function initTable() {
|
||||||
@ -156,7 +156,7 @@
|
|||||||
area: ['100%', '100%'],
|
area: ['100%', '100%'],
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
anim: 2,
|
anim: 2,
|
||||||
content: top.restAjax.path('route/data/save/{parentId}', [parentId]),
|
content: top.restAjax.path('route/data/save?dataParentId={parentId}', [parentId]),
|
||||||
end: function() {
|
end: function() {
|
||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@
|
|||||||
area: ['100%', '100%'],
|
area: ['100%', '100%'],
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
anim: 2,
|
anim: 2,
|
||||||
content: top.restAjax.path('route/data/update/{dictionaryId}', [checkDatas[0].dictionaryId]),
|
content: top.restAjax.path('route/data/update?dataId={dataId}', [checkDatas[0].dataId]),
|
||||||
end: function() {
|
end: function() {
|
||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
@ -69,7 +69,7 @@
|
|||||||
}).use(['index', 'form', 'laydate'], function(){
|
}).use(['index', 'form', 'laydate'], function(){
|
||||||
var $ = layui.$;
|
var $ = layui.$;
|
||||||
var form = layui.form;
|
var form = layui.form;
|
||||||
var dataParentId = $('#parentId').val();
|
var dataParentId = top.restAjax.params(window.location.href).dataParentId;
|
||||||
function closeBox() {
|
function closeBox() {
|
||||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@
|
|||||||
});
|
});
|
||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.DialogBox.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -107,18 +107,17 @@
|
|||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
top.restAjax.post(top.restAjax.path('api/data/save', []), formData.field, null, function(code, data) {
|
top.restAjax.post(top.restAjax.path('api/data/save', []), formData.field, null, function(code, data) {
|
||||||
|
parent.parent.common.refreshTree('leftTree');
|
||||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||||
time: 0,
|
time: 0,
|
||||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||||
shade: 0.3,
|
shade: 0.3,
|
||||||
yes: function(index) {
|
yes: function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
parent.parent.common.refreshTree('leftTree');
|
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
},
|
},
|
||||||
btn2: function() {
|
btn2: function() {
|
||||||
closeBox();
|
closeBox();
|
||||||
parent.parent.common.refreshTree('leftTree');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
@ -69,7 +69,7 @@
|
|||||||
}).use(['index', 'form', 'laydate'], function(){
|
}).use(['index', 'form', 'laydate'], function(){
|
||||||
var $ = layui.$;
|
var $ = layui.$;
|
||||||
var form = layui.form;
|
var form = layui.form;
|
||||||
var dataId = $('#dataId').val();
|
var dataId = top.restAjax.params(window.location.href).dataId;
|
||||||
function closeBox() {
|
function closeBox() {
|
||||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@
|
|||||||
});
|
});
|
||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.DialogBox.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -101,18 +101,17 @@
|
|||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
top.restAjax.put(top.restAjax.path('api/data/update/{dataId}', [dataId]), formData.field, null, function(code, data) {
|
top.restAjax.put(top.restAjax.path('api/data/update/{dataId}', [dataId]), formData.field, null, function(code, data) {
|
||||||
|
parent.parent.common.refreshTree('leftTree');
|
||||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||||
time: 0,
|
time: 0,
|
||||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||||
shade: 0.3,
|
shade: 0.3,
|
||||||
yes: function(index) {
|
yes: function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
parent.parent.common.refreshTree('leftTree');
|
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
},
|
},
|
||||||
btn2: function() {
|
btn2: function() {
|
||||||
closeBox();
|
closeBox();
|
||||||
parent.parent.common.refreshTree('leftTree');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.file.config.properties;
|
package ink.wgink.module.file.config.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When you feel like quitting. Think about why you started
|
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.file.config.properties;
|
package ink.wgink.module.file.config.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When you feel like quitting. Think about why you started
|
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.file.config.properties;
|
package ink.wgink.module.file.config.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When you feel like quitting. Think about why you started
|
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.file.config.properties;
|
package ink.wgink.module.file.config.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When you feel like quitting. Think about why you started
|
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.file.config.properties;
|
package ink.wgink.module.file.config.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When you feel like quitting. Think about why you started
|
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.file.config.properties;
|
package ink.wgink.module.file.config.properties;
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
@ -1,13 +1,13 @@
|
|||||||
package ink.wgink.service.file.controller.api;
|
package ink.wgink.module.file.controller.api;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.file.config.properties.FileProperties;
|
import ink.wgink.module.file.config.properties.FileProperties;
|
||||||
import ink.wgink.service.file.enums.UploadTypeEnum;
|
import ink.wgink.module.file.enums.UploadTypeEnum;
|
||||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||||
import ink.wgink.service.file.pojo.dtos.FileInfoDTO;
|
import ink.wgink.module.file.pojo.dtos.FileInfoDTO;
|
||||||
import ink.wgink.service.file.service.IFileService;
|
import ink.wgink.module.file.service.IFileService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
@ -1,12 +1,12 @@
|
|||||||
package ink.wgink.service.file.controller.app.api;
|
package ink.wgink.module.file.controller.app.api;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.file.config.properties.FileProperties;
|
import ink.wgink.module.file.config.properties.FileProperties;
|
||||||
import ink.wgink.service.file.enums.UploadTypeEnum;
|
import ink.wgink.module.file.enums.UploadTypeEnum;
|
||||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||||
import ink.wgink.service.file.service.IFileService;
|
import ink.wgink.module.file.service.IFileService;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultData;
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
@ -1,10 +1,10 @@
|
|||||||
package ink.wgink.service.file.controller.route;
|
package ink.wgink.module.file.controller.route;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.exceptions.ParamsException;
|
import ink.wgink.exceptions.ParamsException;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.file.config.properties.FileProperties;
|
import ink.wgink.module.file.config.properties.FileProperties;
|
||||||
import ink.wgink.service.file.service.IFileService;
|
import ink.wgink.module.file.service.IFileService;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
@ -1,11 +1,11 @@
|
|||||||
package ink.wgink.service.file.controller.wechat;
|
package ink.wgink.module.file.controller.wechat;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.file.config.properties.FileProperties;
|
import ink.wgink.module.file.config.properties.FileProperties;
|
||||||
import ink.wgink.service.file.enums.UploadTypeEnum;
|
import ink.wgink.module.file.enums.UploadTypeEnum;
|
||||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||||
import ink.wgink.service.file.service.IFileService;
|
import ink.wgink.module.file.service.IFileService;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultData;
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
@ -1,11 +1,11 @@
|
|||||||
package ink.wgink.service.file.dao;
|
package ink.wgink.module.file.dao;
|
||||||
|
|
||||||
|
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||||
import ink.wgink.service.file.pojo.dtos.FileInfoDTO;
|
import ink.wgink.module.file.pojo.dtos.FileInfoDTO;
|
||||||
import ink.wgink.pojo.pos.FilePO;
|
import ink.wgink.pojo.pos.FilePO;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.file.enums;
|
package ink.wgink.module.file.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: UploadTypeEnum
|
* @ClassName: UploadTypeEnum
|
@ -1,7 +1,7 @@
|
|||||||
package ink.wgink.service.file.excel.error;
|
package ink.wgink.module.file.excel.error;
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import ink.wgink.service.file.service.IFileService;
|
import ink.wgink.module.file.service.IFileService;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.file.pojo.dtos;
|
package ink.wgink.module.file.pojo.dtos;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.file.pojo.dtos;
|
package ink.wgink.module.file.pojo.dtos;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
@ -1,9 +1,9 @@
|
|||||||
package ink.wgink.service.file.service;
|
package ink.wgink.module.file.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import ink.wgink.service.file.enums.UploadTypeEnum;
|
import ink.wgink.module.file.enums.UploadTypeEnum;
|
||||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||||
import ink.wgink.service.file.pojo.dtos.FileInfoDTO;
|
import ink.wgink.module.file.pojo.dtos.FileInfoDTO;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.pos.FilePO;
|
import ink.wgink.pojo.pos.FilePO;
|
||||||
import ink.wgink.pojo.result.SuccessResultData;
|
import ink.wgink.pojo.result.SuccessResultData;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.file.service.impl;
|
package ink.wgink.module.file.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@ -12,12 +12,12 @@ import ink.wgink.exceptions.ParamsException;
|
|||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
import ink.wgink.exceptions.base.SystemException;
|
import ink.wgink.exceptions.base.SystemException;
|
||||||
import ink.wgink.service.file.config.properties.FileProperties;
|
import ink.wgink.module.file.config.properties.FileProperties;
|
||||||
import ink.wgink.service.file.dao.IFileDao;
|
import ink.wgink.module.file.dao.IFileDao;
|
||||||
import ink.wgink.service.file.enums.UploadTypeEnum;
|
import ink.wgink.module.file.enums.UploadTypeEnum;
|
||||||
import ink.wgink.service.file.pojo.dtos.FileDTO;
|
import ink.wgink.module.file.pojo.dtos.FileDTO;
|
||||||
import ink.wgink.service.file.pojo.dtos.FileInfoDTO;
|
import ink.wgink.module.file.pojo.dtos.FileInfoDTO;
|
||||||
import ink.wgink.service.file.service.IFileService;
|
import ink.wgink.module.file.service.IFileService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.pos.FilePO;
|
import ink.wgink.pojo.pos.FilePO;
|
||||||
import ink.wgink.pojo.result.SuccessResultData;
|
import ink.wgink.pojo.result.SuccessResultData;
|
@ -1,6 +1,6 @@
|
|||||||
package ink.wgink.service.file.startup;
|
package ink.wgink.module.file.startup;
|
||||||
|
|
||||||
import ink.wgink.service.file.dao.IFileDao;
|
import ink.wgink.module.file.dao.IFileDao;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="ink.wgink.service.file.dao.IFileDao">
|
<mapper namespace="ink.wgink.module.file.dao.IFileDao">
|
||||||
|
|
||||||
<cache/>
|
<cache/>
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<result property="isDelete" column="is_delete"/>
|
<result property="isDelete" column="is_delete"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="fileDTO" type="ink.wgink.service.file.pojo.dtos.FileDTO">
|
<resultMap id="fileDTO" type="ink.wgink.module.file.pojo.dtos.FileDTO">
|
||||||
<id property="fileId" column="file_id"/>
|
<id property="fileId" column="file_id"/>
|
||||||
<result property="fileName" column="file_name"/>
|
<result property="fileName" column="file_name"/>
|
||||||
<result property="fileUrl" column="file_url"/>
|
<result property="fileUrl" column="file_url"/>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
<result property="fileSize" column="file_size"/>
|
<result property="fileSize" column="file_size"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="fileInfoDTO" type="ink.wgink.service.file.pojo.dtos.FileInfoDTO" extends="fileDTO">
|
<resultMap id="fileInfoDTO" type="ink.wgink.module.file.pojo.dtos.FileInfoDTO" extends="fileDTO">
|
||||||
<id property="fileId" column="file_id"/>
|
<id property="fileId" column="file_id"/>
|
||||||
<result property="fileName" column="file_name"/>
|
<result property="fileName" column="file_name"/>
|
||||||
<result property="fileUrl" column="file_url"/>
|
<result property="fileUrl" column="file_url"/>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.permission.controller.api;
|
package ink.wgink.module.permission.controller.api;
|
||||||
|
|
||||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
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.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultData;
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.service.permission.pojo.vos.PermissionVO;
|
import ink.wgink.module.permission.pojo.vos.PermissionVO;
|
||||||
import ink.wgink.service.permission.service.IPermissionService;
|
import ink.wgink.module.permission.service.IPermissionService;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.util.AntPathMatcher;
|
import org.springframework.util.AntPathMatcher;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.permission.dao;
|
package ink.wgink.module.permission.dao;
|
||||||
|
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.permission.enums;
|
package ink.wgink.module.permission.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When you feel like quitting. Think about why you started
|
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.permission.pojo.vos;
|
package ink.wgink.module.permission.pojo.vos;
|
||||||
|
|
||||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
import ink.wgink.annotation.CheckNumberAnnotation;
|
@ -1,10 +1,10 @@
|
|||||||
package ink.wgink.service.permission.service;
|
package ink.wgink.module.permission.service;
|
||||||
|
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.permission.PermissionDTO;
|
import ink.wgink.pojo.dtos.permission.PermissionDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResultData;
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.service.permission.pojo.vos.PermissionVO;
|
import ink.wgink.module.permission.pojo.vos.PermissionVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.permission.service.impl;
|
package ink.wgink.module.permission.service.impl;
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
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.dtos.permission.PermissionDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResultData;
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.service.permission.dao.IPermissionDao;
|
import ink.wgink.module.permission.dao.IPermissionDao;
|
||||||
import ink.wgink.service.permission.pojo.vos.PermissionVO;
|
import ink.wgink.module.permission.pojo.vos.PermissionVO;
|
||||||
import ink.wgink.service.permission.service.IPermissionService;
|
import ink.wgink.module.permission.service.IPermissionService;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="ink.wgink.service.permission.dao.IPermissionDao">
|
<mapper namespace="ink.wgink.module.permission.dao.IPermissionDao">
|
||||||
|
|
||||||
<resultMap id="permissionDTO" type="ink.wgink.pojo.dtos.permission.PermissionDTO">
|
<resultMap id="permissionDTO" type="ink.wgink.pojo.dtos.permission.PermissionDTO">
|
||||||
<id column="permission_id" property="permissionId"/>
|
<id column="permission_id" property="permissionId"/>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.controller.api;
|
package ink.wgink.module.department.controller.api;
|
||||||
|
|
||||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
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.ZTreeDTO;
|
||||||
import ink.wgink.pojo.dtos.department.DepartmentDTO;
|
import ink.wgink.pojo.dtos.department.DepartmentDTO;
|
||||||
import ink.wgink.pojo.result.*;
|
import ink.wgink.pojo.result.*;
|
||||||
import ink.wgink.service.department.pojo.vos.DepartmentVO;
|
import ink.wgink.module.department.pojo.vos.DepartmentVO;
|
||||||
import ink.wgink.service.department.pojo.vos.MergeDepartmentInfoVO;
|
import ink.wgink.module.department.pojo.vos.MergeDepartmentInfoVO;
|
||||||
import ink.wgink.service.department.pojo.vos.MergeNewDepartmentInfoVO;
|
import ink.wgink.module.department.pojo.vos.MergeNewDepartmentInfoVO;
|
||||||
import ink.wgink.service.department.pojo.vos.SplitDepartmentVO;
|
import ink.wgink.module.department.pojo.vos.SplitDepartmentVO;
|
||||||
import ink.wgink.service.department.service.IDepartmentService;
|
import ink.wgink.module.department.service.IDepartmentService;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.controller.api;
|
package ink.wgink.module.department.controller.api;
|
||||||
|
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.controller.route;
|
package ink.wgink.module.department.controller.route;
|
||||||
|
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.dao;
|
package ink.wgink.module.department.dao;
|
||||||
|
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.dao;
|
package ink.wgink.module.department.dao;
|
||||||
|
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.dao;
|
package ink.wgink.module.department.dao;
|
||||||
|
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.dao;
|
package ink.wgink.module.department.dao;
|
||||||
|
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.enmus;
|
package ink.wgink.module.department.enmus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When you feel like quitting. Think about why you started
|
* When you feel like quitting. Think about why you started
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.listener.excel;
|
package ink.wgink.module.department.listener.excel;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.listener.excel;
|
package ink.wgink.module.department.listener.excel;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.listener.excel;
|
package ink.wgink.module.department.listener.excel;
|
||||||
|
|
||||||
import com.alibaba.excel.context.AnalysisContext;
|
import com.alibaba.excel.context.AnalysisContext;
|
||||||
import com.alibaba.excel.event.AnalysisEventListener;
|
import com.alibaba.excel.event.AnalysisEventListener;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.pojo.vos;
|
package ink.wgink.module.department.pojo.vos;
|
||||||
|
|
||||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
import ink.wgink.annotation.CheckNumberAnnotation;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.pojo.vos;
|
package ink.wgink.module.department.pojo.vos;
|
||||||
|
|
||||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.pojo.vos;
|
package ink.wgink.module.department.pojo.vos;
|
||||||
|
|
||||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.pojo.vos;
|
package ink.wgink.module.department.pojo.vos;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.pojo.vos;
|
package ink.wgink.module.department.pojo.vos;
|
||||||
|
|
||||||
import ink.wgink.annotation.CheckListAnnotation;
|
import ink.wgink.annotation.CheckListAnnotation;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
@ -1,6 +1,6 @@
|
|||||||
package ink.wgink.service.department.service;
|
package ink.wgink.module.department.service;
|
||||||
|
|
||||||
import ink.wgink.service.department.enmus.DepartmentAdjustmentTypeEnum;
|
import ink.wgink.module.department.enmus.DepartmentAdjustmentTypeEnum;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.service;
|
package ink.wgink.module.department.service;
|
||||||
|
|
||||||
import ink.wgink.interfaces.department.IDepartmentBaseService;
|
import ink.wgink.interfaces.department.IDepartmentBaseService;
|
||||||
import ink.wgink.pojo.ListPage;
|
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.dtos.department.DepartmentSimpleDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.pojo.result.UploadExcelResultDTO;
|
import ink.wgink.pojo.result.UploadExcelResultDTO;
|
||||||
import ink.wgink.service.department.pojo.vos.DepartmentVO;
|
import ink.wgink.module.department.pojo.vos.DepartmentVO;
|
||||||
import ink.wgink.service.department.pojo.vos.MergeDepartmentInfoVO;
|
import ink.wgink.module.department.pojo.vos.MergeDepartmentInfoVO;
|
||||||
import ink.wgink.service.department.pojo.vos.MergeNewDepartmentInfoVO;
|
import ink.wgink.module.department.pojo.vos.MergeNewDepartmentInfoVO;
|
||||||
import ink.wgink.service.department.pojo.vos.SplitDepartmentVO;
|
import ink.wgink.module.department.pojo.vos.SplitDepartmentVO;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.service;
|
package ink.wgink.module.department.service;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.service;
|
package ink.wgink.module.department.service;
|
||||||
|
|
||||||
import ink.wgink.interfaces.department.IDepartmentUserBaseService;
|
import ink.wgink.interfaces.department.IDepartmentUserBaseService;
|
||||||
|
|
@ -1,12 +1,12 @@
|
|||||||
package ink.wgink.service.department.service.impl;
|
package ink.wgink.module.department.service.impl;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.pojo.dtos.user.UserDTO;
|
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||||
import ink.wgink.service.department.dao.IDepartmentAdjustmentDao;
|
import ink.wgink.module.department.dao.IDepartmentAdjustmentDao;
|
||||||
import ink.wgink.service.department.enmus.DepartmentAdjustmentTypeEnum;
|
import ink.wgink.module.department.enmus.DepartmentAdjustmentTypeEnum;
|
||||||
import ink.wgink.service.department.service.IDepartmentAdjustmentService;
|
import ink.wgink.module.department.service.IDepartmentAdjustmentService;
|
||||||
import ink.wgink.service.department.service.IDepartmentUserAdjustmentService;
|
import ink.wgink.module.department.service.IDepartmentUserAdjustmentService;
|
||||||
import ink.wgink.service.user.service.IUserService;
|
import ink.wgink.module.user.service.IUserService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.department.service.impl;
|
package ink.wgink.module.department.service.impl;
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@ -9,10 +9,10 @@ import ink.wgink.common.base.DefaultBaseService;
|
|||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.service.dictionary.pojo.dtos.AreaDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
|
||||||
import ink.wgink.service.dictionary.service.IAreaService;
|
import ink.wgink.module.dictionary.service.IAreaService;
|
||||||
import ink.wgink.service.file.excel.error.AbstractErrorExcelHandler;
|
import ink.wgink.module.file.excel.error.AbstractErrorExcelHandler;
|
||||||
import ink.wgink.service.file.service.IFileService;
|
import ink.wgink.module.file.service.IFileService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.bos.DepartmentBO;
|
import ink.wgink.pojo.bos.DepartmentBO;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
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.dtos.department.DepartmentSimpleDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.pojo.result.UploadExcelResultDTO;
|
import ink.wgink.pojo.result.UploadExcelResultDTO;
|
||||||
import ink.wgink.service.department.dao.IDepartmentDao;
|
import ink.wgink.module.department.dao.IDepartmentDao;
|
||||||
import ink.wgink.service.department.enmus.DepartmentAdjustmentTypeEnum;
|
import ink.wgink.module.department.enmus.DepartmentAdjustmentTypeEnum;
|
||||||
import ink.wgink.service.department.listener.excel.DepartmentExcel;
|
import ink.wgink.module.department.listener.excel.DepartmentExcel;
|
||||||
import ink.wgink.service.department.listener.excel.DepartmentExcelError;
|
import ink.wgink.module.department.listener.excel.DepartmentExcelError;
|
||||||
import ink.wgink.service.department.listener.excel.DepartmentExcelListener;
|
import ink.wgink.module.department.listener.excel.DepartmentExcelListener;
|
||||||
import ink.wgink.service.department.pojo.vos.*;
|
import ink.wgink.module.department.pojo.vos.*;
|
||||||
import ink.wgink.service.department.service.IDepartmentAdjustmentService;
|
import ink.wgink.module.department.service.IDepartmentAdjustmentService;
|
||||||
import ink.wgink.service.department.service.IDepartmentService;
|
import ink.wgink.module.department.service.IDepartmentService;
|
||||||
import ink.wgink.service.department.service.IDepartmentUserService;
|
import ink.wgink.module.department.service.IDepartmentUserService;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
@ -1,8 +1,8 @@
|
|||||||
package ink.wgink.service.department.service.impl;
|
package ink.wgink.module.department.service.impl;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.service.department.dao.IDepartmentUserAdjustmentDao;
|
import ink.wgink.module.department.dao.IDepartmentUserAdjustmentDao;
|
||||||
import ink.wgink.service.department.service.IDepartmentUserAdjustmentService;
|
import ink.wgink.module.department.service.IDepartmentUserAdjustmentService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -1,12 +1,12 @@
|
|||||||
package ink.wgink.service.department.service.impl;
|
package ink.wgink.module.department.service.impl;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
|
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
|
||||||
import ink.wgink.service.department.dao.IDepartmentUserDao;
|
import ink.wgink.module.department.dao.IDepartmentUserDao;
|
||||||
import ink.wgink.service.department.service.IDepartmentAdjustmentService;
|
import ink.wgink.module.department.service.IDepartmentAdjustmentService;
|
||||||
import ink.wgink.service.department.service.IDepartmentService;
|
import ink.wgink.module.department.service.IDepartmentService;
|
||||||
import ink.wgink.service.department.service.IDepartmentUserService;
|
import ink.wgink.module.department.service.IDepartmentUserService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="ink.wgink.service.department.dao.IDepartmentAdjustmentDao">
|
<mapper namespace="ink.wgink.module.department.dao.IDepartmentAdjustmentDao">
|
||||||
|
|
||||||
<cache flushInterval="3600000"/>
|
<cache flushInterval="3600000"/>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="ink.wgink.service.department.dao.IDepartmentDao">
|
<mapper namespace="ink.wgink.module.department.dao.IDepartmentDao">
|
||||||
|
|
||||||
<cache flushInterval="3600000"/>
|
<cache flushInterval="3600000"/>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="ink.wgink.service.department.dao.IDepartmentUserAdjustmentDao">
|
<mapper namespace="ink.wgink.module.department.dao.IDepartmentUserAdjustmentDao">
|
||||||
|
|
||||||
<cache flushInterval="3600000"/>
|
<cache flushInterval="3600000"/>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="ink.wgink.service.department.dao.IDepartmentUserDao">
|
<mapper namespace="ink.wgink.module.department.dao.IDepartmentUserDao">
|
||||||
|
|
||||||
<cache flushInterval="3600000"/>
|
<cache flushInterval="3600000"/>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.group.controller.api;
|
package ink.wgink.module.group.controller.api;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.exceptions.ParamsException;
|
import ink.wgink.exceptions.ParamsException;
|
||||||
@ -9,8 +9,8 @@ import ink.wgink.pojo.dtos.group.GroupDTO;
|
|||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.service.group.pojo.vos.GroupVO;
|
import ink.wgink.module.group.pojo.vos.GroupVO;
|
||||||
import ink.wgink.service.group.service.IGroupService;
|
import ink.wgink.module.group.service.IGroupService;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.group.dao;
|
package ink.wgink.module.group.dao;
|
||||||
|
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
@ -7,7 +7,7 @@ import ink.wgink.exceptions.UpdateException;
|
|||||||
import ink.wgink.pojo.bos.GroupBO;
|
import ink.wgink.pojo.bos.GroupBO;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
import ink.wgink.pojo.dtos.group.GroupDTO;
|
import ink.wgink.pojo.dtos.group.GroupDTO;
|
||||||
import ink.wgink.service.group.pojo.pos.GroupPO;
|
import ink.wgink.module.group.pojo.pos.GroupPO;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.group.pojo.pos;
|
package ink.wgink.module.group.pojo.pos;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: GroupDTO
|
* @ClassName: GroupDTO
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.group.pojo.vos;
|
package ink.wgink.module.group.pojo.vos;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.group.service;
|
package ink.wgink.module.group.service;
|
||||||
|
|
||||||
import ink.wgink.interfaces.group.IGroupBaseService;
|
import ink.wgink.interfaces.group.IGroupBaseService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.group.service.impl;
|
package ink.wgink.module.group.service.impl;
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
@ -9,8 +9,8 @@ import ink.wgink.pojo.dtos.ZTreeDTO;
|
|||||||
import ink.wgink.pojo.dtos.group.GroupDTO;
|
import ink.wgink.pojo.dtos.group.GroupDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.service.group.dao.IGroupDao;
|
import ink.wgink.module.group.dao.IGroupDao;
|
||||||
import ink.wgink.service.group.service.IGroupService;
|
import ink.wgink.module.group.service.IGroupService;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
@ -11,7 +11,7 @@
|
|||||||
<result property="groupCode" column="group_code"/>
|
<result property="groupCode" column="group_code"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="groupPO" type="ink.wgink.service.group.pojo.pos.GroupPO">
|
<resultMap id="groupPO" type="ink.wgink.module.group.pojo.pos.GroupPO">
|
||||||
<id property="groupId" column="group_id"/>
|
<id property="groupId" column="group_id"/>
|
||||||
<result property="groupParentId" column="group_parent_id"/>
|
<result property="groupParentId" column="group_parent_id"/>
|
||||||
<result property="groupName" column="group_name"/>
|
<result property="groupName" column="group_name"/>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package ink.wgink.service.menu.controller.api;
|
package ink.wgink.module.menu.controller.api;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.exceptions.ParamsException;
|
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||||
@ -9,14 +8,14 @@ import ink.wgink.pojo.dtos.menu.MenuDTO;
|
|||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.service.menu.pojo.vos.MenuVO;
|
import ink.wgink.module.menu.pojo.vos.MenuVO;
|
||||||
import ink.wgink.service.menu.service.IMenuService;
|
import ink.wgink.module.menu.service.IMenuService;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -39,11 +38,11 @@ public class MenuController extends DefaultBaseController {
|
|||||||
|
|
||||||
@ApiOperation(value = "保存菜单", notes = "保存菜单接口")
|
@ApiOperation(value = "保存菜单", notes = "保存菜单接口")
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PostMapping("savemenu")
|
@PostMapping("save")
|
||||||
public SuccessResult saveMenu(@RequestBody MenuVO menuVO) {
|
public SuccessResult saveMenu(@RequestBody MenuVO menuVO) {
|
||||||
Map<String, Object> params = new HashMap<>(16);
|
checkParams(menuVO);
|
||||||
checkParams(menuVO, params);
|
menuService.save(menuVO);
|
||||||
return menuService.saveMenu(params);
|
return new SuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "菜单删除", notes = "通过id列表批量删除菜单接口")
|
@ApiOperation(value = "菜单删除", notes = "通过id列表批量删除菜单接口")
|
||||||
@ -51,11 +50,10 @@ public class MenuController extends DefaultBaseController {
|
|||||||
@ApiImplicitParam(name = "ids", value = "菜单ID列表,用下划线分隔", paramType = "path")
|
@ApiImplicitParam(name = "ids", value = "菜单ID列表,用下划线分隔", paramType = "path")
|
||||||
})
|
})
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@DeleteMapping("removemenu/{ids}")
|
@DeleteMapping("remove/{ids}")
|
||||||
public SuccessResult removeMenu(@PathVariable("ids") String ids) {
|
public SuccessResult removeMenu(@PathVariable("ids") String ids) {
|
||||||
Map<String, Object> params = new HashMap<>(0);
|
menuService.remove(Arrays.asList(ids.split("\\_")));
|
||||||
params.put("menuIds", ids);
|
return new SuccessResult();
|
||||||
return menuService.removeMenu(params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "修改菜单", notes = "修改菜单接口")
|
@ApiOperation(value = "修改菜单", notes = "修改菜单接口")
|
||||||
@ -63,68 +61,21 @@ public class MenuController extends DefaultBaseController {
|
|||||||
@ApiImplicitParam(name = "menuId", value = "菜单ID", paramType = "path")
|
@ApiImplicitParam(name = "menuId", value = "菜单ID", paramType = "path")
|
||||||
})
|
})
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PutMapping("updatemenu/{menuId}")
|
@PutMapping("update/{menuId}")
|
||||||
public SuccessResult updateMenu(@PathVariable("menuId") String menuId, @RequestBody MenuVO menuVO) {
|
public SuccessResult updateMenu(@PathVariable("menuId") String menuId, @RequestBody MenuVO menuVO) {
|
||||||
Map<String, Object> params = new HashMap<>(16);
|
checkParams(menuVO);
|
||||||
params.put("menuId", menuId);
|
menuService.update(menuId, menuVO);
|
||||||
checkParams(menuVO, params);
|
return new SuccessResult();
|
||||||
return menuService.updateMenu(params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数校验
|
* 参数校验
|
||||||
*
|
*
|
||||||
* @param menuVO
|
* @param menuVO
|
||||||
* @param params
|
|
||||||
* @throws ParamsException
|
|
||||||
*/
|
*/
|
||||||
private void checkParams(MenuVO menuVO, Map<String, Object> params) {
|
private void checkParams(MenuVO menuVO) {
|
||||||
if (StringUtils.isBlank(menuVO.getMenuParentId())) {
|
if (!StringUtils.equals(menuVO.getMenuUrl(), "javascript:void(0);")) {
|
||||||
throw new ParamsException("父ID不能为空");
|
menuVO.setMenuUrl(addSlash(menuVO.getMenuUrl()));
|
||||||
}
|
|
||||||
params.put("menuParentId", menuVO.getMenuParentId());
|
|
||||||
|
|
||||||
if (StringUtils.isBlank(menuVO.getMenuName())) {
|
|
||||||
throw new ParamsException("菜单名称不能为空");
|
|
||||||
}
|
|
||||||
params.put("menuName", menuVO.getMenuName());
|
|
||||||
|
|
||||||
if (StringUtils.isBlank(menuVO.getMenuOrder())) {
|
|
||||||
throw new ParamsException("菜单排序不能为空");
|
|
||||||
}
|
|
||||||
params.put("menuOrder", menuVO.getMenuOrder());
|
|
||||||
|
|
||||||
if (menuVO.getMenuType() == null) {
|
|
||||||
throw new ParamsException("菜单类别不能为空或格式错误,格式为数字");
|
|
||||||
}
|
|
||||||
params.put("menuType", menuVO.getMenuType());
|
|
||||||
|
|
||||||
if (menuVO.getMenuStatus() == null) {
|
|
||||||
throw new ParamsException("菜单状态不能为空或格式错误,格式为数字");
|
|
||||||
}
|
|
||||||
params.put("menuStatus", menuVO.getMenuStatus());
|
|
||||||
|
|
||||||
if (StringUtils.isBlank(menuVO.getMenuUrl())) {
|
|
||||||
params.put("menuUrl", "javascript:void(0);");
|
|
||||||
} else if (StringUtils.equals(menuVO.getMenuUrl(), "javascript:void(0);")) {
|
|
||||||
params.put("menuUrl", menuVO.getMenuUrl());
|
|
||||||
} else {
|
|
||||||
params.put("menuUrl", addSlash(menuVO.getMenuUrl()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (menuVO.getOpenType() == null) {
|
|
||||||
throw new ParamsException("打开方式不能为空或格式错误,格式为数字");
|
|
||||||
}
|
|
||||||
params.put("openType", menuVO.getOpenType());
|
|
||||||
|
|
||||||
params.put("apiPrefix", addSlash(menuVO.getApiPrefix()));
|
|
||||||
params.put("resourcePrefix", addSlash(menuVO.getResourcePrefix()));
|
|
||||||
params.put("routePrefix", addSlash(menuVO.getRoutePrefix()));
|
|
||||||
|
|
||||||
if (StringUtils.isBlank(menuVO.getMenuIcon())) {
|
|
||||||
params.put("menuIcon", "fa-icon-color-white fa fa-list");
|
|
||||||
} else {
|
|
||||||
params.put("menuIcon", menuVO.getMenuIcon());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.menu.controller.route;
|
package ink.wgink.module.menu.controller.route;
|
||||||
|
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.menu.dao;
|
package ink.wgink.module.menu.dao;
|
||||||
|
|
||||||
import ink.wgink.exceptions.UpdateException;
|
import ink.wgink.exceptions.UpdateException;
|
||||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
import ink.wgink.pojo.dtos.ZTreeDTO;
|
@ -0,0 +1,115 @@
|
|||||||
|
package ink.wgink.module.menu.pojo.vos;
|
||||||
|
|
||||||
|
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||||
|
import ink.wgink.annotation.CheckNumberAnnotation;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: MenuVO
|
||||||
|
* @Description: 菜单视图
|
||||||
|
* @Author: WangGeng
|
||||||
|
* @Date: 2019/3/1 10:24 PM
|
||||||
|
* @Version: 1.0
|
||||||
|
**/
|
||||||
|
@ApiModel
|
||||||
|
public class MenuVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "menuParentId", value = "上级ID", required = true, example = "0")
|
||||||
|
@CheckEmptyAnnotation(name = "上级ID")
|
||||||
|
private String menuParentId;
|
||||||
|
@ApiModelProperty(name = "menuName", value = "菜单名称", required = true)
|
||||||
|
@CheckEmptyAnnotation(name = "菜单名称")
|
||||||
|
private String menuName;
|
||||||
|
@ApiModelProperty(name = "menuSummary", value = "菜单说明", required = true)
|
||||||
|
@CheckEmptyAnnotation(name = "菜单说明")
|
||||||
|
private String menuSummary;
|
||||||
|
@ApiModelProperty(name = "menuUrl", value = "菜单链接")
|
||||||
|
private String menuUrl;
|
||||||
|
@ApiModelProperty(name = "menuIcon", value = "菜单图标")
|
||||||
|
private String menuIcon;
|
||||||
|
@ApiModelProperty(name = "menuType", value = "菜单类型,1:系统菜单,2:业务菜单", example = "1")
|
||||||
|
@CheckNumberAnnotation(name = "菜单类型", types = {"1", "2"})
|
||||||
|
private Integer menuType;
|
||||||
|
@ApiModelProperty(name = "menuOrder", value = "菜单排序", required = true, example = "99")
|
||||||
|
@CheckNumberAnnotation(name = "菜单排序")
|
||||||
|
private String menuOrder;
|
||||||
|
@ApiModelProperty(name = "menuStatus", value = "菜单状态,0:显示,1:不显示", example = "1")
|
||||||
|
@CheckNumberAnnotation(name = "菜单状态", types = {"0", "1"})
|
||||||
|
private Integer menuStatus;
|
||||||
|
@ApiModelProperty(name = "openType", value = "打开方式,1: 默认,2: 弹窗,3: 页面")
|
||||||
|
@CheckNumberAnnotation(name = "打开方式", types = {"1", "2", "3"})
|
||||||
|
private Integer openType;
|
||||||
|
|
||||||
|
public String getMenuParentId() {
|
||||||
|
return menuParentId == null ? "" : menuParentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuParentId(String menuParentId) {
|
||||||
|
this.menuParentId = menuParentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuName() {
|
||||||
|
return menuName == null ? "" : menuName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuName(String menuName) {
|
||||||
|
this.menuName = menuName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuSummary() {
|
||||||
|
return menuSummary == null ? "" : menuSummary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuSummary(String menuSummary) {
|
||||||
|
this.menuSummary = menuSummary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuUrl() {
|
||||||
|
return menuUrl == null ? "javascript:void(0);" : menuUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuUrl(String menuUrl) {
|
||||||
|
this.menuUrl = menuUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuIcon() {
|
||||||
|
return menuIcon == null ? "fa-icon-color-white fa fa-list" : menuIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuIcon(String menuIcon) {
|
||||||
|
this.menuIcon = menuIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMenuType() {
|
||||||
|
return menuType == null ? 0 : menuType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuType(Integer menuType) {
|
||||||
|
this.menuType = menuType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuOrder() {
|
||||||
|
return menuOrder == null ? "" : menuOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuOrder(String menuOrder) {
|
||||||
|
this.menuOrder = menuOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMenuStatus() {
|
||||||
|
return menuStatus == null ? 0 : menuStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuStatus(Integer menuStatus) {
|
||||||
|
this.menuStatus = menuStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOpenType() {
|
||||||
|
return openType == null ? 0 : openType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenType(Integer openType) {
|
||||||
|
this.openType = openType;
|
||||||
|
}
|
||||||
|
}
|
@ -1,15 +1,10 @@
|
|||||||
package ink.wgink.service.menu.service;
|
package ink.wgink.module.menu.service;
|
||||||
|
|
||||||
import ink.wgink.interfaces.menu.IMenuBaseService;
|
import ink.wgink.interfaces.menu.IMenuBaseService;
|
||||||
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.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultData;
|
import ink.wgink.module.menu.pojo.vos.MenuVO;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: IMenuService
|
* @ClassName: IMenuService
|
||||||
@ -23,26 +18,27 @@ public interface IMenuService extends IMenuBaseService {
|
|||||||
/**
|
/**
|
||||||
* 保存菜单
|
* 保存菜单
|
||||||
*
|
*
|
||||||
* @param params
|
* @param menuVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SuccessResult saveMenu(Map<String, Object> params);
|
SuccessResult save(MenuVO menuVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改菜单
|
* 修改菜单
|
||||||
*
|
*
|
||||||
* @param params
|
* @param menuId 菜单ID
|
||||||
|
* @param menuVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SuccessResult updateMenu(Map<String, Object> params);
|
SuccessResult update(String menuId, MenuVO menuVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单删除
|
* 菜单删除
|
||||||
*
|
*
|
||||||
* @param params
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SuccessResult removeMenu(Map<String, Object> params);
|
SuccessResult remove(List<String> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过clientId获取菜单
|
* 通过clientId获取菜单
|
@ -1,4 +1,4 @@
|
|||||||
package ink.wgink.service.menu.service.impl;
|
package ink.wgink.module.menu.service.impl;
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
@ -9,9 +9,11 @@ import ink.wgink.pojo.dtos.ZTreeDTO;
|
|||||||
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.service.menu.dao.IMenuDao;
|
import ink.wgink.module.menu.dao.IMenuDao;
|
||||||
import ink.wgink.service.menu.service.IMenuService;
|
import ink.wgink.module.menu.pojo.vos.MenuVO;
|
||||||
|
import ink.wgink.module.menu.service.IMenuService;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -113,7 +115,8 @@ public class MenuServiceImpl extends DefaultBaseService implements IMenuService
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized SuccessResult saveMenu(Map<String, Object> params) {
|
public synchronized SuccessResult save(MenuVO menuVO) {
|
||||||
|
Map<String, Object> params = HashMapUtil.beanToMap(menuVO);
|
||||||
String parentCode = null;
|
String parentCode = null;
|
||||||
String menuParentId = params.get("menuParentId").toString();
|
String menuParentId = params.get("menuParentId").toString();
|
||||||
if (!"0".equals(menuParentId)) {
|
if (!"0".equals(menuParentId)) {
|
||||||
@ -130,13 +133,22 @@ public class MenuServiceImpl extends DefaultBaseService implements IMenuService
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SuccessResult removeMenu(Map<String, Object> params) {
|
public SuccessResult remove(List<String> ids) {
|
||||||
params.put("menuIds", Arrays.asList(params.get("menuIds").toString().split("_")));
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("menuIds", ids);
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
menuDao.remove(params);
|
menuDao.remove(params);
|
||||||
return new SuccessResult();
|
return new SuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuccessResult update(String menuId, MenuVO menuVO) {
|
||||||
|
Map<String, Object> params = HashMapUtil.beanToMap(menuVO);
|
||||||
|
params.put("menuId", menuId);
|
||||||
|
setUpdateInfo(params);
|
||||||
|
menuDao.update(params);
|
||||||
|
return new SuccessResult();
|
||||||
|
}
|
||||||
// @Override
|
// @Override
|
||||||
// public SuccessResultData<List<MenuDTO>> listMenuByClientId(Map<String, Object> params) {
|
// public SuccessResultData<List<MenuDTO>> listMenuByClientId(Map<String, Object> params) {
|
||||||
// OauthClientDTO oauthClientDTO = oauthClientService.getOauthClient(params);
|
// OauthClientDTO oauthClientDTO = oauthClientService.getOauthClient(params);
|
||||||
@ -204,13 +216,6 @@ public class MenuServiceImpl extends DefaultBaseService implements IMenuService
|
|||||||
return menuDao.listIdByUser(params);
|
return menuDao.listIdByUser(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public SuccessResult updateMenu(Map<String, Object> params) {
|
|
||||||
setUpdateInfo(params);
|
|
||||||
menuDao.update(params);
|
|
||||||
return new SuccessResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取角色菜单列表
|
* 获取角色菜单列表
|
||||||
*
|
*
|
@ -1,9 +1,10 @@
|
|||||||
package ink.wgink.service.menu.startup;
|
package ink.wgink.module.menu.startup;
|
||||||
|
|
||||||
|
import ink.wgink.interfaces.dictionary.IDictionaryCheckService;
|
||||||
import ink.wgink.interfaces.menu.IMenuBaseService;
|
import ink.wgink.interfaces.menu.IMenuBaseService;
|
||||||
import ink.wgink.interfaces.user.IUserCheckService;
|
import ink.wgink.interfaces.user.IUserCheckService;
|
||||||
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||||
import ink.wgink.service.menu.dao.IMenuDao;
|
import ink.wgink.module.menu.dao.IMenuDao;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import ink.wgink.util.date.DateUtil;
|
import ink.wgink.util.date.DateUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -33,6 +34,8 @@ public class ServiceMenuStartUp implements ApplicationRunner {
|
|||||||
private IMenuDao menuDao;
|
private IMenuDao menuDao;
|
||||||
@Autowired(required = false)
|
@Autowired(required = false)
|
||||||
private IUserCheckService userCheckService;
|
private IUserCheckService userCheckService;
|
||||||
|
@Autowired(required = false)
|
||||||
|
private IDictionaryCheckService dictionaryCheckService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(ApplicationArguments args) throws Exception {
|
public void run(ApplicationArguments args) throws Exception {
|
||||||
@ -82,8 +85,9 @@ public class ServiceMenuStartUp implements ApplicationRunner {
|
|||||||
params.remove("menuId");
|
params.remove("menuId");
|
||||||
params.put("menuCode", "00010001");
|
params.put("menuCode", "00010001");
|
||||||
MenuDTO menuDTO = menuDao.getSimple(params);
|
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||||
String menuId = UUIDUtil.getUUID();
|
String menuId;
|
||||||
if (menuDTO == null) {
|
if (menuDTO == null) {
|
||||||
|
menuId = UUIDUtil.getUUID();
|
||||||
params.put("menuId", menuId);
|
params.put("menuId", menuId);
|
||||||
params.put("menuParentId", menuParentId);
|
params.put("menuParentId", menuParentId);
|
||||||
params.put("menuName", "系统管理");
|
params.put("menuName", "系统管理");
|
||||||
@ -95,8 +99,12 @@ public class ServiceMenuStartUp implements ApplicationRunner {
|
|||||||
params.put("menuStatus", "0");
|
params.put("menuStatus", "0");
|
||||||
params.put("openType", "1");
|
params.put("openType", "1");
|
||||||
menuDao.save(params);
|
menuDao.save(params);
|
||||||
|
} else {
|
||||||
|
menuId = menuDTO.getMenuId();
|
||||||
}
|
}
|
||||||
initMenuManage(params, menuId);
|
initMenuManage(params, menuId);
|
||||||
|
initDataManager(params, menuId);
|
||||||
|
initAreaManager(params, menuId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -125,6 +133,64 @@ public class ServiceMenuStartUp implements ApplicationRunner {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化数据字典
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @param menuParentId
|
||||||
|
*/
|
||||||
|
public void initDataManager(Map<String, Object> params, String menuParentId) {
|
||||||
|
if (dictionaryCheckService == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LOG.debug("初始化菜单:数据字典");
|
||||||
|
params.remove("menuId");
|
||||||
|
params.put("menuCode", "000100010002");
|
||||||
|
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/data/list-tree");
|
||||||
|
params.put("menuType", "1");
|
||||||
|
params.put("menuIcon", "fa-icon-color-white fa fa-address-book");
|
||||||
|
params.put("menuOrder", "2");
|
||||||
|
params.put("menuStatus", "0");
|
||||||
|
params.put("openType", "1");
|
||||||
|
menuDao.save(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化地区字典
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @param menuParentId
|
||||||
|
*/
|
||||||
|
public void initAreaManager(Map<String, Object> params, String menuParentId) {
|
||||||
|
if (dictionaryCheckService == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LOG.debug("初始化菜单:地区字典");
|
||||||
|
params.remove("menuId");
|
||||||
|
params.put("menuCode", "000100010003");
|
||||||
|
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/area/list-tree");
|
||||||
|
params.put("menuType", "1");
|
||||||
|
params.put("menuIcon", "fa-icon-color-white fa fa-map-o");
|
||||||
|
params.put("menuOrder", "3");
|
||||||
|
params.put("menuStatus", "0");
|
||||||
|
params.put("openType", "1");
|
||||||
|
menuDao.save(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户权限管理
|
* 用户权限管理
|
||||||
*
|
*
|
||||||
@ -136,8 +202,9 @@ public class ServiceMenuStartUp implements ApplicationRunner {
|
|||||||
params.remove("menuId");
|
params.remove("menuId");
|
||||||
params.put("menuCode", "00010002");
|
params.put("menuCode", "00010002");
|
||||||
MenuDTO menuDTO = menuDao.getSimple(params);
|
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||||
String menuId = UUIDUtil.getUUID();
|
String menuId;
|
||||||
if (menuDTO == null) {
|
if (menuDTO == null) {
|
||||||
|
menuId = UUIDUtil.getUUID();
|
||||||
params.put("menuId", menuId);
|
params.put("menuId", menuId);
|
||||||
params.put("menuParentId", menuParentId);
|
params.put("menuParentId", menuParentId);
|
||||||
params.put("menuName", "用户与权限");
|
params.put("menuName", "用户与权限");
|
||||||
@ -149,6 +216,8 @@ public class ServiceMenuStartUp implements ApplicationRunner {
|
|||||||
params.put("menuStatus", "0");
|
params.put("menuStatus", "0");
|
||||||
params.put("openType", "1");
|
params.put("openType", "1");
|
||||||
menuDao.save(params);
|
menuDao.save(params);
|
||||||
|
} else {
|
||||||
|
menuId = menuDTO.getMenuId();
|
||||||
}
|
}
|
||||||
initUserManage(params, menuId);
|
initUserManage(params, menuId);
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user