diff --git a/pom.xml b/pom.xml
index 7e5fc07..506a0b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,11 +80,48 @@
httpclient
4.3.5
+
+
+ org.apache.commons
+ commons-lang3
+ 3.4
+
+
+ com.belerweb
+ pinyin4j
+ 2.5.1
+
+
+ joda-time
+ joda-time
+ 2.9.4
+
+
+
+ io.springfox
+ springfox-swagger2
+ 2.5.0
+
+
+ io.springfox
+ springfox-swagger-ui
+ 2.5.0
+
+
+ com.github.xiaoymin
+ knife4j-spring-ui
+ 2.0.4
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 2.1.2.RELEASE
+
org.springframework.boot
spring-boot-maven-plugin
diff --git a/src/main/java/cn/com/tenlion/BusinessCardApplication.java b/src/main/java/cn/com/tenlion/BusinessCardApplication.java
index 12fa8fe..d4cf8b0 100644
--- a/src/main/java/cn/com/tenlion/BusinessCardApplication.java
+++ b/src/main/java/cn/com/tenlion/BusinessCardApplication.java
@@ -1,4 +1,4 @@
-package cn.com.tenlion.businesscard;
+package cn.com.tenlion;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/src/main/java/cn/com/tenlion/controller/AbstractController.java b/src/main/java/cn/com/tenlion/controller/AbstractController.java
index fb118f1..75a0a70 100644
--- a/src/main/java/cn/com/tenlion/controller/AbstractController.java
+++ b/src/main/java/cn/com/tenlion/controller/AbstractController.java
@@ -1,13 +1,12 @@
-package com.cm.common.base;
+package cn.com.tenlion.controller;
-import com.cm.common.utils.HashMapUtil;
-import com.cm.common.utils.RequestUtil;
+import cn.com.tenlion.util.base.HashMapUtil;
+import cn.com.tenlion.util.html.RequestUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
-
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.net.URLDecoder;
diff --git a/src/main/java/cn/com/tenlion/controller/app/apis/datadictionary/DataDictionaryAppController.java b/src/main/java/cn/com/tenlion/controller/app/apis/datadictionary/DataDictionaryAppController.java
index eddb51e..744b0d3 100644
--- a/src/main/java/cn/com/tenlion/controller/app/apis/datadictionary/DataDictionaryAppController.java
+++ b/src/main/java/cn/com/tenlion/controller/app/apis/datadictionary/DataDictionaryAppController.java
@@ -1,134 +1,80 @@
-package cn.com.tenlion.controller.app.apis.data;
+package cn.com.tenlion.controller.app.apis.datadictionary;
+import cn.com.tenlion.controller.AbstractController;
+import cn.com.tenlion.pojo.dtos.datadictionary.DataDictionaryDTO;
+import cn.com.tenlion.pojo.vos.datadictionary.DataDictionaryVO;
+import cn.com.tenlion.service.datadictionary.IDataDictionaryService;
+import cn.com.tenlion.util.cons.ISystemConstant;
+import cn.com.tenlion.util.exception.SearchException;
+import cn.com.tenlion.util.page.ListPage;
+import cn.com.tenlion.util.result.ErrorResult;
+import cn.com.tenlion.util.result.SuccessResult;
+import cn.com.tenlion.util.result.SuccessResultList;
+import cn.com.tenlion.util.ztree.ZTreeDTO;
+import io.swagger.annotations.*;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
-
+import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("app/datadictionary")
-public class DataDictionaryAppController {
+public class DataDictionaryAppController extends AbstractController {
@Autowired
private IDataDictionaryService dataDictionaryService;
@PostMapping("savedictionary")
- public SuccessResult saveDictionary(@RequestHeader("token") String token, @RequestBody DataDictionaryVO dictionaryVO) throws Exception {
+ public String saveDictionary(@RequestHeader("token") String token, @RequestBody DataDictionaryVO dictionaryVO) throws Exception {
return dataDictionaryService.saveDictionary(token, dictionaryVO);
}
- @ApiOperation(value = "字典删除", notes = "通过id列表批量删除字典接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "token", value = "token", paramType = "header"),
- @ApiImplicitParam(name = "ids", value = "字典ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("removedictionary/{ids}")
- public SuccessResult removeDictionary(@RequestHeader("token") String token, @PathVariable("ids") String ids) {
- return dataDictionaryService.removeDictionary(token, ids);
+ public SuccessResult removeDictionary(@PathVariable("ids") String ids) throws Exception {
+ return dataDictionaryService.removeDictionary(ids);
}
- @ApiOperation(value = "字典修改", notes = "字典修改接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "token", value = "token", paramType = "header"),
- @ApiImplicitParam(name = "dictionaryId", value = "字典ID", paramType = "path")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("updatedictionary/{dictionaryId}")
- @CheckRequestBodyAnnotation
- public SuccessResult updateDictionary(@RequestHeader("token") String token, @PathVariable("dictionaryId") String dictionaryId, @RequestBody DataDictionaryVO dictionaryVO) throws Exception {
- return dataDictionaryService.updateDictionary(token, dictionaryId, dictionaryVO);
+ public SuccessResult updateDictionary(@PathVariable("dictionaryId") String dictionaryId, @RequestBody DataDictionaryVO dictionaryVO) throws Exception {
+ return dataDictionaryService.updateDictionary("", dictionaryId, dictionaryVO);
}
- @ApiOperation(value = "字典详情(ID查询)", notes = "字典详情(ID查询)接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "token", value = "token", paramType = "header"),
- @ApiImplicitParam(name = "dictionaryId", value = "字典ID", paramType = "path")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("getdictionarybyid/{dictionaryId}")
- public DataDictionaryDTO getDictionaryById(@RequestHeader("token") String token, @PathVariable("dictionaryId") String dictionaryId) {
+ public DataDictionaryDTO getDictionaryById(@PathVariable("dictionaryId") String dictionaryId) throws Exception {
return getDictionaryByIdRelease(dictionaryId);
}
- @ApiOperation(value = ISystemConstant.API_TAGS_RELEASE_PREFIX + "字典详情(ID查询)", notes = ISystemConstant.API_TAGS_RELEASE_PREFIX + "字典详情(ID查询)接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "dictionaryId", value = "字典ID", paramType = "path")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("getdictionarybyid" + ISystemConstant.RELEASE_SUFFIX + "/{dictionaryId}")
- public DataDictionaryDTO getDictionaryByIdRelease(@PathVariable("dictionaryId") String dictionaryId) {
+ public DataDictionaryDTO getDictionaryByIdRelease(@PathVariable("dictionaryId") String dictionaryId) throws Exception{
return dataDictionaryService.getDictionaryById(dictionaryId);
}
- @ApiOperation(value = "字典列表(上级ID查询)", notes = "字典列表(上级ID查询)接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "token", value = "token", paramType = "header"),
- @ApiImplicitParam(name = "dictionaryParentId", value = "字典上级ID", paramType = "path")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listdictionarybyparentid/{dictionaryParentId}")
public List listDictionaryByParentId(@RequestHeader("token") String token, @PathVariable("dictionaryParentId") String dictionaryParentId) {
return listDictionaryByParentIdRelease(dictionaryParentId);
}
- @ApiOperation(value = ISystemConstant.API_TAGS_RELEASE_PREFIX + "字典列表(上级ID查询)", notes = ISystemConstant.API_TAGS_RELEASE_PREFIX + "字典列表(上级ID查询)接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "dictionaryParentId", value = "字典上级ID", paramType = "path")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listdictionarybyparentid" + ISystemConstant.RELEASE_SUFFIX + "/{dictionaryParentId}")
public List listDictionaryByParentIdRelease(@PathVariable("dictionaryParentId") String dictionaryParentId) {
return dataDictionaryService.listDictionaryByParentId(dictionaryParentId);
}
-
- @ApiOperation(value = "字典全部列表(上级ID查询)", notes = "字典全部列表(上级ID查询)接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "token", value = "token", paramType = "header"),
- @ApiImplicitParam(name = "dictionaryParentId", value = "字典上级ID", paramType = "path")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listdictionaryallbyparentid/{dictionaryParentId}")
public List listDictionary(@RequestHeader("token") String token, @PathVariable("dictionaryParentId") String dictionaryParentId) throws SearchException {
return listDictionaryRelease(dictionaryParentId);
}
- @ApiOperation(value = ISystemConstant.API_TAGS_RELEASE_PREFIX + "字典全部列表(上级ID查询)", notes = ISystemConstant.API_TAGS_RELEASE_PREFIX + "字典全部列表(上级ID查询)接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "dictionaryParentId", value = "字典上级ID", paramType = "path")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listdictionaryallbyparentid" + ISystemConstant.RELEASE_SUFFIX + "/{dictionaryParentId}")
public List listDictionaryRelease(@PathVariable("dictionaryParentId") String dictionaryParentId) throws SearchException {
return dataDictionaryService.listDictionaryAllByParentId(dictionaryParentId);
}
- @ApiOperation(value = "分页字典列表", notes = "分页字典列表接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "token", value = "token", paramType = "header"),
- @ApiImplicitParam(name = "parentId", value = "上级ID", paramType = "query", dataType = "String"),
- @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
- @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
- @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
- @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
- @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
- })
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpagedictionary")
public SuccessResultList> listPageDictionary(@RequestHeader("token") String token, ListPage page) {
return listPageDictionaryRelease(page);
}
- @ApiOperation(value = ISystemConstant.API_TAGS_RELEASE_PREFIX + "分页字典列表", notes = ISystemConstant.API_TAGS_RELEASE_PREFIX + "分页字典列表接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "parentId", value = "上级ID", paramType = "query", dataType = "String"),
- @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
- @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
- @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
- @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
- @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpagedictionary" + ISystemConstant.RELEASE_SUFFIX)
public SuccessResultList> listPageDictionaryRelease(ListPage page) {
Map params = requestParams();
@@ -141,22 +87,11 @@ public class DataDictionaryAppController {
return dataDictionaryService.listPageDictionary(page);
}
- @ApiOperation(value = "zTree列表", notes = "zTree列表接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "token", value = "token", paramType = "header"),
- @ApiImplicitParam(name = "id", value = "父ID", paramType = "query", dataType = "String")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listztreedictionary")
public List listZTreeDictionary(@RequestHeader("token") String token) throws SearchException {
return listZTreeDictionaryRelease();
}
- @ApiOperation(value = ISystemConstant.API_TAGS_RELEASE_PREFIX + "zTree列表", notes = ISystemConstant.API_TAGS_RELEASE_PREFIX + "zTree列表接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "父ID", paramType = "query", dataType = "String")
- })
- @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listztreedictionary" + ISystemConstant.RELEASE_SUFFIX)
public List listZTreeDictionaryRelease() throws SearchException {
Map params = requestParams();
diff --git a/src/main/java/cn/com/tenlion/dao/datadictionary/IDataDictionaryDao.java b/src/main/java/cn/com/tenlion/dao/datadictionary/IDataDictionaryDao.java
index 7e979e0..53ae952 100644
--- a/src/main/java/cn/com/tenlion/dao/datadictionary/IDataDictionaryDao.java
+++ b/src/main/java/cn/com/tenlion/dao/datadictionary/IDataDictionaryDao.java
@@ -1,13 +1,9 @@
-package com.cm.common.plugin.dao.datadictionary;
+package cn.com.tenlion.dao.datadictionary;
-import com.cm.common.exception.RemoveException;
-import com.cm.common.exception.SaveException;
-import com.cm.common.exception.SearchException;
-import com.cm.common.exception.UpdateException;
-import com.cm.common.plugin.pojo.dtos.datadictionary.DataDictionaryDTO;
-import com.cm.common.pojo.dtos.ZTreeDTO;
+import cn.com.tenlion.pojo.dtos.datadictionary.DataDictionaryDTO;
+import cn.com.tenlion.util.exception.SearchException;
+import cn.com.tenlion.util.ztree.ZTreeDTO;
import org.springframework.stereotype.Repository;
-
import java.util.List;
import java.util.Map;
@@ -21,73 +17,20 @@ import java.util.Map;
@Repository
public interface IDataDictionaryDao {
- /**
- * 新增字典
- *
- * @param params
- * @throws SaveException
- */
- void saveDictionary(Map params) throws SaveException;
+ void saveDictionary(Map params) throws Exception;
- /**
- * 删除字典
- *
- * @param params
- * @throws RemoveException
- */
- void removeDictionary(Map params) throws RemoveException;
+ void removeDictionary(Map params) throws Exception;
- /**
- * 修改字典
- *
- * @param params
- * @throws UpdateException
- */
- void updateDictionary(Map params) throws UpdateException;
+ void updateDictionary(Map params) throws Exception;
- /**
- * 字典列表
- *
- * @param params
- * @return
- * @throws SearchException
- */
List listDictionary(Map params) throws SearchException;
- /**
- * 字典详情
- *
- * @param params
- * @return
- * @throws SearchException
- */
- DataDictionaryDTO getDictionary(Map params) throws SearchException;
+ DataDictionaryDTO getDictionary(Map params) throws Exception;
- /**
- * 获取最后一个字字典
- *
- * @param parentId
- * @return
- * @throws SearchException
- */
DataDictionaryDTO getLastByParentId(String parentId) throws SearchException;
- /**
- * 字典ZTree列表
- *
- * @param params
- * @return
- * @throws SearchException
- */
List listZTreeDictionary(Map params) throws SearchException;
- /**
- * 子列表个数
- *
- * @param id
- * @return
- * @throws SearchException
- */
Integer countByParentId(String id) throws SearchException;
}
diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/datadictionary/DataDictionaryDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/datadictionary/DataDictionaryDTO.java
index 82eda99..04481e2 100644
--- a/src/main/java/cn/com/tenlion/pojo/dtos/datadictionary/DataDictionaryDTO.java
+++ b/src/main/java/cn/com/tenlion/pojo/dtos/datadictionary/DataDictionaryDTO.java
@@ -1,22 +1,11 @@
-package com.cm.common.plugin.pojo.dtos.datadictionary;
+package cn.com.tenlion.pojo.dtos.datadictionary;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
-/**
- * When you feel like quitting. Think about why you started
- * 当你想要放弃的时候,想想当初你为何开始
- *
- * @ClassName: DictionaryDTO
- * @Description: 字典
- * @Author: WangGeng
- * @Date: 2019/11/18 14:17
- * @Version: 1.0
- **/
@ApiModel
public class DataDictionaryDTO implements Serializable {
diff --git a/src/main/java/cn/com/tenlion/pojo/vos/datadictionary/DataDictionaryVO.java b/src/main/java/cn/com/tenlion/pojo/vos/datadictionary/DataDictionaryVO.java
index 3a35006..e95031c 100644
--- a/src/main/java/cn/com/tenlion/pojo/vos/datadictionary/DataDictionaryVO.java
+++ b/src/main/java/cn/com/tenlion/pojo/vos/datadictionary/DataDictionaryVO.java
@@ -1,17 +1,10 @@
-package com.cm.common.plugin.pojo.vos.datadictionary;
+package cn.com.tenlion.pojo.vos.datadictionary;
-import com.cm.common.annotation.CheckEmptyAnnotation;
-import com.cm.common.annotation.CheckNumberAnnotation;
+import cn.com.tenlion.util.check.CheckEmptyAnnotation;
+import cn.com.tenlion.util.check.CheckNumberAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-/**
- * @ClassName: DictionaryVO
- * @Description: 字典视图
- * @Author: WangGeng
- * @Date: 2019/3/4 2:30 PM
- * @Version: 1.0
- **/
@ApiModel
public class DataDictionaryVO {
diff --git a/src/main/java/cn/com/tenlion/service/AbstractService.java b/src/main/java/cn/com/tenlion/service/AbstractService.java
index 28593d9..1c2001b 100644
--- a/src/main/java/cn/com/tenlion/service/AbstractService.java
+++ b/src/main/java/cn/com/tenlion/service/AbstractService.java
@@ -1,22 +1,12 @@
-package com.cm.common.base;
+package cn.com.tenlion.service;
-import com.alibaba.fastjson.JSONObject;
-import com.cm.common.component.SecurityComponent;
-import com.cm.common.constants.ISystemConstant;
-import com.cm.common.enums.RoleDataAuthorityEnum;
-import com.cm.common.exception.AccessTokenException;
-import com.cm.common.exception.SearchException;
-import com.cm.common.pojo.bos.UserInfoBO;
-import com.cm.common.pojo.dtos.ZTreeDTO;
-import com.cm.common.token.app.AppTokenManager;
-import com.cm.common.token.app.entity.AppTokenUser;
-import com.cm.common.utils.DateUtil;
+import cn.com.tenlion.util.base.DateUtil;
+import cn.com.tenlion.util.ztree.ZTreeDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
-
import javax.servlet.http.HttpSession;
import java.util.*;
@@ -32,35 +22,8 @@ public abstract class AbstractService {
protected static Logger LOG = LoggerFactory.getLogger(AbstractService.class);
@Autowired
- protected SecurityComponent securityComponent;
- @Autowired
private HttpSession httpSession;
- /**
- * 设置新增基础数据
- *
- * @param params
- */
- protected void setSaveInfo(Map params) {
- UserInfoBO userInfoBO = securityComponent.getCurrentUser();
- if (userInfoBO != null) {
- setSave(userInfoBO.getUserId(), params);
- } else {
- setSave("1", params);
- }
- }
-
- /**
- * token类型设置新增基础数据
- *
- * @param token
- * @param params
- */
- protected void setSaveInfo(String token, Map params) {
- AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser();
- setSave(appTokenUser.getId(), params);
- }
-
/**
* 设置新增基础信息
*
@@ -86,30 +49,6 @@ public abstract class AbstractService {
params.put("isDelete", 0);
}
- /**
- * 设置修改基础数据
- *
- * @param params
- */
- protected void setUpdateInfo(Map params) {
- UserInfoBO userInfoBO = securityComponent.getCurrentUser();
- if (userInfoBO != null) {
- setUpdate(userInfoBO.getUserId(), params);
- } else {
- setUpdateInfo("1", params);
- }
- }
-
- /**
- * token类型设置修改基础数据
- *
- * @param token
- * @param params
- */
- protected void setUpdateInfo(String token, Map params) {
- AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser();
- setUpdate(appTokenUser.getId(), params);
- }
/**
* 设置更新基础信息
@@ -184,68 +123,6 @@ public abstract class AbstractService {
return new HashMap<>(initSize);
}
- /**
- * 是否管理员
- *
- * @return
- */
- protected boolean isAdmin() {
- if (ISystemConstant.ADMIN.equalsIgnoreCase(securityComponent.getCurrentUsername())) {
- return true;
- }
- return false;
- }
-
- /**
- * 获取基础部门ID列表
- *
- * @return
- */
- protected List listBaseDepartmentIds() {
- if (isAdmin()) {
- return null;
- }
- return securityComponent.getCurrentUser().getBaseDepartmentIds();
- }
-
- /**
- * 查询资源结果
- *
- * @param result 结果
- * @param errorMessage 异常提示
- * @throws AccessTokenException
- * @throws SearchException
- */
- protected void searchResourceResult(String result, String errorMessage) throws AccessTokenException, SearchException {
- if (result == null) {
- throw new AccessTokenException("认证失败");
- }
- if (result.isEmpty()) {
- throw new SearchException(errorMessage);
- }
- }
-
- /**
- * 更新结果
- *
- * @param result
- * @param errorMessage
- * @throws AccessTokenException
- * @throws SearchException
- */
- protected void updateResourceResult(String result, String errorMessage) throws AccessTokenException, SearchException {
- if (result == null) {
- throw new AccessTokenException("认证失败");
- }
- if (result.isEmpty()) {
- throw new SearchException(errorMessage);
- }
- JSONObject resultObj = JSONObject.parseObject(result);
- if (resultObj.getString("msg") != null) {
- throw new SearchException(resultObj.getString("msg"));
- }
- }
-
/**
* 简单Excel的Header
*
@@ -262,34 +139,4 @@ public abstract class AbstractService {
return listHeaders;
}
- /**
- * 设置数据权限信息
- *
- * @param params
- */
- protected void setDataAuthorityInfo(Map params) {
- UserInfoBO currentUser = securityComponent.getCurrentUser();
- if (ISystemConstant.ADMIN.equals(securityComponent.getCurrentUser().getUserName())) {
- return;
- }
- String dataAuthority = currentUser.getDataAuthority();
- List dataAuthorityUserIds = currentUser.getDataAuthorityUserIds();
- if (org.apache.commons.lang3.StringUtils.equals(RoleDataAuthorityEnum.ALL.getDataAuthorityType(), dataAuthority)) {
- return;
- } else if (org.apache.commons.lang3.StringUtils.equals(RoleDataAuthorityEnum.SELF.getDataAuthorityType(), dataAuthority)) {
- params.put(ISystemConstant.DATA_AUTHORITY, dataAuthority);
- params.put(ISystemConstant.DATA_CREATOR, currentUser.getUserId());
- } else if (org.apache.commons.lang3.StringUtils.equals(RoleDataAuthorityEnum.DEPARTMENT.getDataAuthorityType(), dataAuthority)
- || org.apache.commons.lang3.StringUtils.equals(RoleDataAuthorityEnum.CUSTOM.getDataAuthorityType(), dataAuthority)) {
- if (Objects.isNull(dataAuthorityUserIds) || dataAuthorityUserIds.isEmpty()) {
- LOG.debug("权限列表为空,设置查看个人");
- params.put(ISystemConstant.DATA_AUTHORITY, RoleDataAuthorityEnum.SELF.getDataAuthorityType());
- params.put(ISystemConstant.DATA_CREATOR, currentUser.getUserId());
- } else {
- params.put(ISystemConstant.DATA_AUTHORITY, dataAuthority);
- params.put(ISystemConstant.DATA_CREATORS, dataAuthorityUserIds);
- }
- }
- }
-
}
diff --git a/src/main/java/cn/com/tenlion/service/datadictionary/IDataDictionaryService.java b/src/main/java/cn/com/tenlion/service/datadictionary/IDataDictionaryService.java
index a7c3bc1..7f78157 100644
--- a/src/main/java/cn/com/tenlion/service/datadictionary/IDataDictionaryService.java
+++ b/src/main/java/cn/com/tenlion/service/datadictionary/IDataDictionaryService.java
@@ -1,159 +1,34 @@
-package com.cm.common.plugin.service.datadictionary;
+package cn.com.tenlion.service.datadictionary;
-import com.cm.common.exception.RemoveException;
-import com.cm.common.exception.SaveException;
-import com.cm.common.exception.SearchException;
-import com.cm.common.exception.UpdateException;
-import com.cm.common.plugin.pojo.dtos.datadictionary.DataDictionaryDTO;
-import com.cm.common.plugin.pojo.vos.datadictionary.DataDictionaryVO;
-import com.cm.common.pojo.ListPage;
-import com.cm.common.pojo.dtos.ZTreeDTO;
-import com.cm.common.result.SuccessResult;
-import com.cm.common.result.SuccessResultList;
+import cn.com.tenlion.pojo.dtos.datadictionary.DataDictionaryDTO;
+import cn.com.tenlion.pojo.vos.datadictionary.DataDictionaryVO;
+import cn.com.tenlion.util.exception.SearchException;
+import cn.com.tenlion.util.page.ListPage;
+import cn.com.tenlion.util.result.SuccessResult;
+import cn.com.tenlion.util.result.SuccessResultList;
+import cn.com.tenlion.util.ztree.ZTreeDTO;
import java.util.List;
import java.util.Map;
-/**
- * When you feel like quitting. Think about why you started
- * 当你想要放弃的时候,想想当初你为何开始
- *
- * @ClassName: IDictionaryService
- * @Description: 字典
- * @Author: WangGeng
- * @Date: 2019/11/18 14:09
- * @Version: 1.0
- **/
public interface IDataDictionaryService {
- /**
- * 字典新增
- *
- * @param dictionaryVO
- * @return
- * @throws Exception
- */
- SuccessResult saveDictionary(DataDictionaryVO dictionaryVO) throws Exception;
- /**
- * 字典新增
- *
- * @param token
- * @param dictionaryVO
- * @return
- * @throws Exception
- */
- SuccessResult saveDictionary(String token, DataDictionaryVO dictionaryVO) throws Exception;
+ String saveDictionary(String userId, DataDictionaryVO dictionaryVO) throws Exception;
- /**
- * 字典新增
- *
- * @param dictionaryVO
- * @return 新增ID
- * @throws Exception
- */
- String saveDictionaryReturnId(DataDictionaryVO dictionaryVO) throws Exception;
+ SuccessResult removeDictionary(String ids) throws Exception;
- /**
- * 字典新增
- *
- * @param token
- * @param dictionaryVO
- * @return 新增ID
- * @throws Exception
- */
- String saveDictionaryReturnId(String token, DataDictionaryVO dictionaryVO) throws Exception;
+ SuccessResult updateDictionary(String userId, String dictionaryId, DataDictionaryVO dictionaryVO) throws Exception;
- /**
- * 字典删除
- *
- * @param ids
- * @return
- * @throws RemoveException
- */
- SuccessResult removeDictionary(String ids) throws RemoveException;
+ DataDictionaryDTO getDictionaryById(String dictionaryId) throws Exception;
- /**
- * 字典删除
- *
- * @param token
- * @param ids
- * @return
- * @throws RemoveException
- */
- SuccessResult removeDictionary(String token, String ids) throws RemoveException;
-
- /**
- * 字典修改
- *
- * @param dictionaryId
- * @param dictionaryVO
- * @return
- * @throws Exception
- */
- SuccessResult updateDictionary(String dictionaryId, DataDictionaryVO dictionaryVO) throws Exception;
-
- /**
- * 字典修改
- *
- * @param token
- * @param dictionaryId
- * @param dictionaryVO
- * @return
- * @throws Exception
- */
- SuccessResult updateDictionary(String token, String dictionaryId, DataDictionaryVO dictionaryVO) throws Exception;
-
- /**
- * 通过ID获取字典
- *
- * @param dictionaryId
- * @return
- * @throws SearchException
- */
- DataDictionaryDTO getDictionaryById(String dictionaryId) throws SearchException;
-
- /**
- * 通过上级ID获取字典列表
- *
- * @param dictionaryParentId
- * @return
- * @throws SearchException
- */
List listDictionaryByParentId(String dictionaryParentId) throws SearchException;
- /**
- * 通过上级ID获取字典全部列表
- *
- * @param dictionaryParentId
- * @return
- * @throws SearchException
- */
List listDictionaryAllByParentId(String dictionaryParentId) throws SearchException;
- /**
- * 分页获取字典列表
- *
- * @param page
- * @return
- * @throws SearchException
- */
SuccessResultList> listPageDictionary(ListPage page) throws SearchException;
- /**
- * zTree列表
- *
- * @param params
- * @return
- * @throws SearchException
- */
List listZTreeDictionary(Map params) throws SearchException;
- /**
- * 字典列表(通过字典编码)
- *
- * @param dictionaryCode
- * @return
- * @throws SearchException
- */
List listDictionaryByDictionaryCode(String dictionaryCode) throws SearchException;
+
}
diff --git a/src/main/java/cn/com/tenlion/service/datadictionary/impl/DataDictionaryServiceImpl.java b/src/main/java/cn/com/tenlion/service/datadictionary/impl/DataDictionaryServiceImpl.java
index cae2046..87a1c37 100644
--- a/src/main/java/cn/com/tenlion/service/datadictionary/impl/DataDictionaryServiceImpl.java
+++ b/src/main/java/cn/com/tenlion/service/datadictionary/impl/DataDictionaryServiceImpl.java
@@ -1,39 +1,27 @@
-package com.cm.common.plugin.service.datadictionary.impl;
+package cn.com.tenlion.service.datadictionary.impl;
-import com.cm.common.base.AbstractService;
-import com.cm.common.constants.ISystemConstant;
-import com.cm.common.exception.RemoveException;
-import com.cm.common.exception.SearchException;
-import com.cm.common.plugin.dao.datadictionary.IDataDictionaryDao;
-import com.cm.common.plugin.pojo.dtos.datadictionary.DataDictionaryDTO;
-import com.cm.common.plugin.pojo.vos.datadictionary.DataDictionaryVO;
-import com.cm.common.plugin.service.datadictionary.IDataDictionaryService;
-import com.cm.common.pojo.ListPage;
-import com.cm.common.pojo.dtos.ZTreeDTO;
-import com.cm.common.result.SuccessResult;
-import com.cm.common.result.SuccessResultList;
-import com.cm.common.utils.HashMapUtil;
-import com.cm.common.utils.UUIDUtil;
+import cn.com.tenlion.dao.datadictionary.IDataDictionaryDao;
+import cn.com.tenlion.pojo.dtos.datadictionary.DataDictionaryDTO;
+import cn.com.tenlion.pojo.vos.datadictionary.DataDictionaryVO;
+import cn.com.tenlion.service.AbstractService;
+import cn.com.tenlion.service.datadictionary.IDataDictionaryService;
+import cn.com.tenlion.util.base.DateUtil;
+import cn.com.tenlion.util.base.HashMapUtil;
+import cn.com.tenlion.util.base.UUIDUtil;
+import cn.com.tenlion.util.cons.ISystemConstant;
+import cn.com.tenlion.util.exception.SearchException;
+import cn.com.tenlion.util.page.ListPage;
+import cn.com.tenlion.util.result.SuccessResult;
+import cn.com.tenlion.util.result.SuccessResultList;
+import cn.com.tenlion.util.ztree.ZTreeDTO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
-/**
- * When you feel like quitting. Think about why you started
- * 当你想要放弃的时候,想想当初你为何开始
- *
- * @ClassName: DictionaryServiceImpl
- * @Description: 字典
- * @Author: WangGeng
- * @Date: 2019/11/18 14:09
- * @Version: 1.0
- **/
@Service
public class DataDictionaryServiceImpl extends AbstractService implements IDataDictionaryService {
@@ -41,28 +29,7 @@ public class DataDictionaryServiceImpl extends AbstractService implements IDataD
private IDataDictionaryDao dictionaryDao;
@Override
- public SuccessResult saveDictionary(DataDictionaryVO dictionaryVO) throws Exception {
- saveDictionaryInfo(null, dictionaryVO);
- return new SuccessResult();
- }
-
- @Override
- public SuccessResult saveDictionary(String token, DataDictionaryVO dictionaryVO) throws Exception {
- saveDictionaryInfo(token, dictionaryVO);
- return new SuccessResult();
- }
-
- @Override
- public String saveDictionaryReturnId(DataDictionaryVO dictionaryVO) throws Exception {
- return saveDictionaryInfo(null, dictionaryVO);
- }
-
- @Override
- public String saveDictionaryReturnId(String token, DataDictionaryVO dictionaryVO) throws Exception {
- return saveDictionaryInfo(token, dictionaryVO);
- }
-
- private String saveDictionaryInfo(String token, DataDictionaryVO dictionaryVO) throws Exception {
+ public String saveDictionary(String userId, DataDictionaryVO dictionaryVO) throws Exception {
String uuid = UUIDUtil.getUUID();
String parentCode = null;
String dictionaryParentId = dictionaryVO.getDictionaryParentId();
@@ -74,78 +41,51 @@ public class DataDictionaryServiceImpl extends AbstractService implements IDataD
Map params = HashMapUtil.beanToMap(dictionaryVO);
params.put("dictionaryCode", dictionaryCode);
params.put("dictionaryId", uuid);
- if (StringUtils.isBlank(token)) {
- setSaveInfo(params);
- } else {
- setSaveInfo(token, params);
- }
+ params.put("creator", userId);
+ params.put("gmtCreate", DateUtil.getTime());
+ params.put("modifier", "");
+ params.put("gmtModified", "");
+ params.put("isDelete", 0);
dictionaryDao.saveDictionary(params);
return uuid;
}
@Override
- public SuccessResult removeDictionary(String ids) throws RemoveException {
- removeDictionaryInfo(null, ids);
- return new SuccessResult();
- }
-
- @Override
- public SuccessResult removeDictionary(String token, String ids) throws RemoveException {
- removeDictionaryInfo(token, ids);
- return new SuccessResult();
- }
-
- private void removeDictionaryInfo(String token, String ids) {
- Map params = getHashMap(3);
+ public SuccessResult removeDictionary(String ids) throws Exception {
+ Map params = new HashMap<>(3);
params.put("dictionaryIds", Arrays.asList(ids.split("_")));
- if (StringUtils.isBlank(token)) {
- setUpdateInfo(params);
- } else {
- setUpdateInfo(token, params);
- }
dictionaryDao.removeDictionary(params);
- }
-
- @Override
- public SuccessResult updateDictionary(String dictionaryId, DataDictionaryVO dictionaryVO) throws Exception {
- updateDictionaryInfo(null, dictionaryId, dictionaryVO);
return new SuccessResult();
}
@Override
- public SuccessResult updateDictionary(String token, String dictionaryId, DataDictionaryVO dictionaryVO) throws Exception {
- updateDictionaryInfo(token, dictionaryId, dictionaryVO);
- return new SuccessResult();
- }
-
- private void updateDictionaryInfo(String token, String dictionaryId, DataDictionaryVO dictionaryVO) throws Exception {
+ public SuccessResult updateDictionary(String userId, String dictionaryId, DataDictionaryVO dictionaryVO) throws Exception {
Map params = HashMapUtil.beanToMap(dictionaryVO);
params.put("dictionaryId", dictionaryId);
- if (StringUtils.isBlank(token)) {
- setUpdateInfo(params);
- } else {
- setUpdateInfo(token, params);
- }
+ params.put("modifier", userId);
+ params.put("gmtModified", DateUtil.getTime());
+ params.put("isDelete", 0);
dictionaryDao.updateDictionary(params);
+ return new SuccessResult();
}
@Override
- public DataDictionaryDTO getDictionaryById(String dictionaryId) throws SearchException {
- Map params = super.getHashMap(1);
+ public DataDictionaryDTO getDictionaryById(String dictionaryId) throws Exception {
+ Map params = new HashMap<>(3);
params.put("dictionaryId", dictionaryId);
return dictionaryDao.getDictionary(params);
}
@Override
public List listDictionaryByParentId(String dictionaryParentId) throws SearchException {
- Map params = getHashMap(1);
+ Map params = new HashMap<>(3);
params.put("dictionaryParentId", dictionaryParentId);
return dictionaryDao.listDictionary(params);
}
@Override
public List listDictionaryAllByParentId(String dictionaryParentId) throws SearchException {
- Map params = getHashMap(1);
+ Map params = new HashMap<>(3);
params.put("dictionaryParentId", dictionaryParentId);
List dictionaryDTOs = dictionaryDao.listDictionary(params);
listSubDictionarys(dictionaryDTOs, params);
diff --git a/src/main/java/cn/com/tenlion/util/WxUtil.java b/src/main/java/cn/com/tenlion/util/WxUtil.java
index 9079d8b..f91ca7f 100644
--- a/src/main/java/cn/com/tenlion/util/WxUtil.java
+++ b/src/main/java/cn/com/tenlion/util/WxUtil.java
@@ -1,6 +1,5 @@
package cn.com.tenlion.util;
-import com.sun.org.apache.xml.internal.security.utils.Base64;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
@@ -14,19 +13,10 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
-import org.springframework.boot.configurationprocessor.json.JSONObject;
-import javax.crypto.Cipher;
-import javax.crypto.spec.IvParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
-import javax.net.ssl.HttpsURLConnection;
-import java.io.*;
+
+import java.io.IOException;
import java.net.URI;
-import java.net.URL;
-import java.net.URLConnection;
-import java.nio.charset.StandardCharsets;
-import java.security.Security;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
diff --git a/src/main/java/cn/com/tenlion/util/base/DateUtil.java b/src/main/java/cn/com/tenlion/util/base/DateUtil.java
index be99063..ffdec43 100644
--- a/src/main/java/cn/com/tenlion/util/base/DateUtil.java
+++ b/src/main/java/cn/com/tenlion/util/base/DateUtil.java
@@ -1,8 +1,7 @@
-package com.cm.common.utils;
+package cn.com.tenlion.util.base;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime;
-
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
diff --git a/src/main/java/cn/com/tenlion/util/base/HashMapUtil.java b/src/main/java/cn/com/tenlion/util/base/HashMapUtil.java
index 32cf1f1..535f8e5 100644
--- a/src/main/java/cn/com/tenlion/util/base/HashMapUtil.java
+++ b/src/main/java/cn/com/tenlion/util/base/HashMapUtil.java
@@ -1,4 +1,4 @@
-package com.cm.common.utils;
+package cn.com.tenlion.util.base;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
diff --git a/src/main/java/cn/com/tenlion/util/base/UUIDUtil.java b/src/main/java/cn/com/tenlion/util/base/UUIDUtil.java
index 442643f..3aacaae 100644
--- a/src/main/java/cn/com/tenlion/util/base/UUIDUtil.java
+++ b/src/main/java/cn/com/tenlion/util/base/UUIDUtil.java
@@ -1,4 +1,4 @@
-package com.cm.common.utils;
+package cn.com.tenlion.util.base;
import java.util.UUID;
diff --git a/src/main/java/cn/com/tenlion/util/base/WStringUtil.java b/src/main/java/cn/com/tenlion/util/base/WStringUtil.java
index cc0b13d..926893a 100644
--- a/src/main/java/cn/com/tenlion/util/base/WStringUtil.java
+++ b/src/main/java/cn/com/tenlion/util/base/WStringUtil.java
@@ -1,4 +1,4 @@
-package com.cm.common.utils;
+package cn.com.tenlion.util.base;
import net.sourceforge.pinyin4j.PinyinHelper;
@@ -7,7 +7,6 @@ import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
-
import java.util.regex.Matcher;
import java.util.regex.Pattern;
diff --git a/src/main/java/cn/com/tenlion/util/check/CheckBooleanAnnotation.java b/src/main/java/cn/com/tenlion/util/check/CheckBooleanAnnotation.java
index 8ec2f38..87cb68e 100644
--- a/src/main/java/cn/com/tenlion/util/check/CheckBooleanAnnotation.java
+++ b/src/main/java/cn/com/tenlion/util/check/CheckBooleanAnnotation.java
@@ -1,4 +1,4 @@
-package com.cm.common.annotation;
+package cn.com.tenlion.util.check;
/**
* When you feel like quitting. Think about why you started
diff --git a/src/main/java/cn/com/tenlion/util/check/CheckEmptyAnnotation.java b/src/main/java/cn/com/tenlion/util/check/CheckEmptyAnnotation.java
index 8240dff..ebee33d 100644
--- a/src/main/java/cn/com/tenlion/util/check/CheckEmptyAnnotation.java
+++ b/src/main/java/cn/com/tenlion/util/check/CheckEmptyAnnotation.java
@@ -1,4 +1,4 @@
-package com.cm.common.annotation;
+package cn.com.tenlion.util.check;
import java.lang.annotation.*;
diff --git a/src/main/java/cn/com/tenlion/util/check/CheckListAnnotation.java b/src/main/java/cn/com/tenlion/util/check/CheckListAnnotation.java
index c53b608..3bcccc5 100644
--- a/src/main/java/cn/com/tenlion/util/check/CheckListAnnotation.java
+++ b/src/main/java/cn/com/tenlion/util/check/CheckListAnnotation.java
@@ -1,4 +1,4 @@
-package com.cm.common.annotation;
+package cn.com.tenlion.util.check;
import java.lang.annotation.*;
diff --git a/src/main/java/cn/com/tenlion/util/check/CheckNullAnnotation.java b/src/main/java/cn/com/tenlion/util/check/CheckNullAnnotation.java
index 5e17fc7..e5b3ab0 100644
--- a/src/main/java/cn/com/tenlion/util/check/CheckNullAnnotation.java
+++ b/src/main/java/cn/com/tenlion/util/check/CheckNullAnnotation.java
@@ -1,4 +1,4 @@
-package com.cm.common.annotation;
+package cn.com.tenlion.util.check;
import java.lang.annotation.*;
diff --git a/src/main/java/cn/com/tenlion/util/check/CheckNumberAnnotation.java b/src/main/java/cn/com/tenlion/util/check/CheckNumberAnnotation.java
index f3c4988..6c70ebb 100644
--- a/src/main/java/cn/com/tenlion/util/check/CheckNumberAnnotation.java
+++ b/src/main/java/cn/com/tenlion/util/check/CheckNumberAnnotation.java
@@ -1,4 +1,4 @@
-package com.cm.common.annotation;
+package cn.com.tenlion.util.check;
import java.lang.annotation.*;
diff --git a/src/main/java/cn/com/tenlion/util/check/CheckRequestBodyAnnotation.java b/src/main/java/cn/com/tenlion/util/check/CheckRequestBodyAnnotation.java
index b9577d4..cee943f 100644
--- a/src/main/java/cn/com/tenlion/util/check/CheckRequestBodyAnnotation.java
+++ b/src/main/java/cn/com/tenlion/util/check/CheckRequestBodyAnnotation.java
@@ -1,4 +1,4 @@
-package com.cm.common.annotation;
+package cn.com.tenlion.util.check;
import java.lang.annotation.*;
diff --git a/src/main/java/cn/com/tenlion/util/cons/ISystemConstant.java b/src/main/java/cn/com/tenlion/util/cons/ISystemConstant.java
index a12dacd..a1ebc82 100644
--- a/src/main/java/cn/com/tenlion/util/cons/ISystemConstant.java
+++ b/src/main/java/cn/com/tenlion/util/cons/ISystemConstant.java
@@ -1,4 +1,4 @@
-package com.cm.common.constants;
+package cn.com.tenlion.util.cons;
/**
* @ClassName: ISystemConstant
diff --git a/src/main/java/cn/com/tenlion/util/exception/ParamsException.java b/src/main/java/cn/com/tenlion/util/exception/ParamsException.java
index 7a509ac..82d791d 100644
--- a/src/main/java/cn/com/tenlion/util/exception/ParamsException.java
+++ b/src/main/java/cn/com/tenlion/util/exception/ParamsException.java
@@ -1,6 +1,4 @@
-package com.cm.common.exception;
-
-import com.cm.common.exception.base.SystemException;
+package cn.com.tenlion.util.exception;
/**
* @ClassName: ParamsException
diff --git a/src/main/java/cn/com/tenlion/util/exception/RemoveException.java b/src/main/java/cn/com/tenlion/util/exception/RemoveException.java
index 395c277..257deb0 100644
--- a/src/main/java/cn/com/tenlion/util/exception/RemoveException.java
+++ b/src/main/java/cn/com/tenlion/util/exception/RemoveException.java
@@ -1,6 +1,4 @@
-package com.cm.common.exception;
-
-import com.cm.common.exception.base.SystemException;
+package cn.com.tenlion.util.exception;
/**
* @ClassName: RemoveException
diff --git a/src/main/java/cn/com/tenlion/util/exception/SaveException.java b/src/main/java/cn/com/tenlion/util/exception/SaveException.java
index 4749061..aa4c368 100644
--- a/src/main/java/cn/com/tenlion/util/exception/SaveException.java
+++ b/src/main/java/cn/com/tenlion/util/exception/SaveException.java
@@ -1,6 +1,4 @@
-package com.cm.common.exception;
-
-import com.cm.common.exception.base.SystemException;
+package cn.com.tenlion.util.exception;
/**
* @ClassName: SaveException
diff --git a/src/main/java/cn/com/tenlion/util/exception/SearchException.java b/src/main/java/cn/com/tenlion/util/exception/SearchException.java
index e8046ff..127e403 100644
--- a/src/main/java/cn/com/tenlion/util/exception/SearchException.java
+++ b/src/main/java/cn/com/tenlion/util/exception/SearchException.java
@@ -1,6 +1,4 @@
-package com.cm.common.exception;
-
-import com.cm.common.exception.base.SystemException;
+package cn.com.tenlion.util.exception;
/**
* @ClassName: SearchException
diff --git a/src/main/java/cn/com/tenlion/util/exception/SystemException.java b/src/main/java/cn/com/tenlion/util/exception/SystemException.java
index 10075ae..4be130a 100644
--- a/src/main/java/cn/com/tenlion/util/exception/SystemException.java
+++ b/src/main/java/cn/com/tenlion/util/exception/SystemException.java
@@ -1,4 +1,4 @@
-package com.cm.common.exception.base;
+package cn.com.tenlion.util.exception;
/**
* @ClassName: SystemException
diff --git a/src/main/java/cn/com/tenlion/util/html/RequestUtil.java b/src/main/java/cn/com/tenlion/util/html/RequestUtil.java
index a9ea5b1..31b9695 100644
--- a/src/main/java/cn/com/tenlion/util/html/RequestUtil.java
+++ b/src/main/java/cn/com/tenlion/util/html/RequestUtil.java
@@ -1,11 +1,10 @@
-package com.cm.common.utils;
+package cn.com.tenlion.util.html;
-import com.cm.common.exception.base.SystemException;
+import cn.com.tenlion.util.exception.SystemException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
diff --git a/src/main/java/cn/com/tenlion/util/page/ListPage.java b/src/main/java/cn/com/tenlion/util/page/ListPage.java
index 1d60a47..95a8273 100644
--- a/src/main/java/cn/com/tenlion/util/page/ListPage.java
+++ b/src/main/java/cn/com/tenlion/util/page/ListPage.java
@@ -1,7 +1,4 @@
-package com.cm.common.pojo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+package cn.com.tenlion.util.page;
import java.util.Map;
diff --git a/src/main/java/cn/com/tenlion/util/result/ErrorResult.java b/src/main/java/cn/com/tenlion/util/result/ErrorResult.java
index 4a68912..b5eb03e 100644
--- a/src/main/java/cn/com/tenlion/util/result/ErrorResult.java
+++ b/src/main/java/cn/com/tenlion/util/result/ErrorResult.java
@@ -1,4 +1,4 @@
-package com.cm.common.result;
+package cn.com.tenlion.util.result;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/src/main/java/cn/com/tenlion/util/result/SuccessResult.java b/src/main/java/cn/com/tenlion/util/result/SuccessResult.java
index c4b01ee..0559e16 100644
--- a/src/main/java/cn/com/tenlion/util/result/SuccessResult.java
+++ b/src/main/java/cn/com/tenlion/util/result/SuccessResult.java
@@ -1,4 +1,4 @@
-package com.cm.common.result;
+package cn.com.tenlion.util.result;
import io.swagger.annotations.ApiModel;
diff --git a/src/main/java/cn/com/tenlion/util/result/SuccessResultData.java b/src/main/java/cn/com/tenlion/util/result/SuccessResultData.java
index 7d4a750..4157291 100644
--- a/src/main/java/cn/com/tenlion/util/result/SuccessResultData.java
+++ b/src/main/java/cn/com/tenlion/util/result/SuccessResultData.java
@@ -1,4 +1,4 @@
-package com.cm.common.result;
+package cn.com.tenlion.util.result;
import io.swagger.annotations.ApiModel;
diff --git a/src/main/java/cn/com/tenlion/util/result/SuccessResultList.java b/src/main/java/cn/com/tenlion/util/result/SuccessResultList.java
index f52616d..b2ff122 100644
--- a/src/main/java/cn/com/tenlion/util/result/SuccessResultList.java
+++ b/src/main/java/cn/com/tenlion/util/result/SuccessResultList.java
@@ -1,4 +1,4 @@
-package com.cm.common.result;
+package cn.com.tenlion.util.result;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/src/main/java/cn/com/tenlion/util/result/UploadExcelResultDTO.java b/src/main/java/cn/com/tenlion/util/result/UploadExcelResultDTO.java
index 050c1e5..087eb35 100644
--- a/src/main/java/cn/com/tenlion/util/result/UploadExcelResultDTO.java
+++ b/src/main/java/cn/com/tenlion/util/result/UploadExcelResultDTO.java
@@ -1,4 +1,4 @@
-package com.cm.common.result;
+package cn.com.tenlion.util.result;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/src/main/java/cn/com/tenlion/util/ztree/ZTreeDTO.java b/src/main/java/cn/com/tenlion/util/ztree/ZTreeDTO.java
index 90f94f7..03fed53 100644
--- a/src/main/java/cn/com/tenlion/util/ztree/ZTreeDTO.java
+++ b/src/main/java/cn/com/tenlion/util/ztree/ZTreeDTO.java
@@ -1,4 +1,4 @@
-package com.cm.common.pojo.dtos;
+package cn.com.tenlion.util.ztree;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/src/main/resources/mybatis/mapper/datadictionary/datadictionary-mapper.xml b/src/main/resources/mybatis/mapper/datadictionary/datadictionary-mapper.xml
index 59ae73f..c0ea570 100644
--- a/src/main/resources/mybatis/mapper/datadictionary/datadictionary-mapper.xml
+++ b/src/main/resources/mybatis/mapper/datadictionary/datadictionary-mapper.xml
@@ -1,10 +1,10 @@
-
+
-
+
@@ -14,7 +14,7 @@
-
+