33 changed files with 368 additions and 318 deletions
@ -1 +1 @@ |
|||
Subproject commit 820d1e418e28da9cc383ccd6c8489cbdf22c29f4 |
|||
Subproject commit ac24e1b28acb3f901024a783742e1559f0ae8222 |
|||
@ -1,7 +1,7 @@ |
|||
package com.elink.esua.epdc.optimize.macode.feign; |
|||
package com.elink.esua.epdc.optimize.feign; |
|||
|
|||
import com.elink.esua.epdc.optimize.macode.feign.fallback.OptOssFeignClientFallback; |
|||
import com.elink.esua.epdc.optimize.macode.dto.UploadToOssDTO; |
|||
import com.elink.esua.epdc.optimize.feign.fallback.OptOssFeignClientFallback; |
|||
import com.elink.esua.epdc.optimize.modules.macode.dto.UploadToOssDTO; |
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
@ -1,7 +1,7 @@ |
|||
package com.elink.esua.epdc.optimize.macode.feign.fallback; |
|||
package com.elink.esua.epdc.optimize.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.optimize.macode.feign.OptOssFeignClient; |
|||
import com.elink.esua.epdc.optimize.macode.dto.UploadToOssDTO; |
|||
import com.elink.esua.epdc.optimize.feign.OptOssFeignClient; |
|||
import com.elink.esua.epdc.optimize.modules.macode.dto.UploadToOssDTO; |
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
@ -0,0 +1,43 @@ |
|||
package com.elink.esua.epdc.optimize.modules.deptlevel.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO; |
|||
import com.elink.esua.epdc.optimize.modules.deptlevel.service.OptSysDeptService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
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.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 部门层级相关调用 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/21 09:58 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("optimize/deptlevel") |
|||
public class OptDeptLevelController { |
|||
|
|||
|
|||
@Autowired |
|||
private OptSysDeptService optSysDeptService; |
|||
|
|||
|
|||
/** |
|||
* 通过部门id,获取所有下级机构(包括冗余字段) |
|||
* |
|||
* @param typeKey 部门类别关键字{@link com.elink.esua.epdc.commons.tools.constant.OrganizationTypeConstant} |
|||
* @param deptId 部门id |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO>> |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/22 09:13 |
|||
*/ |
|||
@GetMapping("listByParent/{typeKey}/{deptId}") |
|||
public Result<List<DeptLevelAndLeaderDTO>> listChildDeptLevelById(@PathVariable("typeKey") String typeKey, @PathVariable("deptId") Long deptId) { |
|||
List<DeptLevelAndLeaderDTO> childDeptLevelList = optSysDeptService.listChildDeptLevelById(typeKey, deptId); |
|||
return new Result().ok(childDeptLevelList); |
|||
} |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
package com.elink.esua.epdc.optimize.modules.deptlevel.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO; |
|||
import com.elink.esua.epdc.optimize.modules.deptlevel.entity.OptSysDeptEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 部门相关 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/21 10:11 |
|||
*/ |
|||
@Mapper |
|||
public interface OptSysDeptDao extends BaseDao<OptSysDeptEntity> { |
|||
|
|||
/** |
|||
* 根据父级部门id,获取单一类别的子部门 |
|||
* |
|||
* @param typeKey 类别关键字 |
|||
* @param deptId 父部门id |
|||
* @return java.util.List<com.elink.esua.epdc.optimize.modules.deptlevel.entity.OptSysDeptEntity> |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/22 09:33 |
|||
*/ |
|||
List<OptSysDeptEntity> selectListChildDept(@Param("typeKey") String typeKey,@Param("deptId") Long deptId); |
|||
|
|||
/** |
|||
* 根据机构id和机构父id,查询机构及父机构名称 |
|||
* |
|||
* @param deptId 机构id |
|||
* @param parentIds 父机构id |
|||
* @return java.util.List<DeptLevelAndLeaderDTO> |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/15 14:10 |
|||
*/ |
|||
List<DeptLevelAndLeaderDTO> selectListDeptAndParents(@Param("deptId") Long deptId, @Param("parentIds") String[] parentIds); |
|||
} |
|||
@ -1,4 +1,4 @@ |
|||
package com.elink.esua.epdc.optimize.deptlevel.entity; |
|||
package com.elink.esua.epdc.optimize.modules.deptlevel.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.FieldFill; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
@ -0,0 +1,27 @@ |
|||
package com.elink.esua.epdc.optimize.modules.deptlevel.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO; |
|||
import com.elink.esua.epdc.optimize.modules.deptlevel.entity.OptSysDeptEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 部门相关 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/21 10:11 |
|||
*/ |
|||
public interface OptSysDeptService extends BaseService<OptSysDeptEntity> { |
|||
|
|||
/** |
|||
* 通过部门id,获取所有下级机构(包括冗余字段) |
|||
* |
|||
* @param typeKey 部门类别关键字{@link com.elink.esua.epdc.commons.tools.constant.OrganizationTypeConstant} |
|||
* @param deptId 部门id |
|||
* @return java.util.List<com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO> |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/22 09:13 |
|||
*/ |
|||
List<DeptLevelAndLeaderDTO> listChildDeptLevelById(String typeKey, Long deptId); |
|||
} |
|||
@ -0,0 +1,110 @@ |
|||
package com.elink.esua.epdc.optimize.modules.deptlevel.service.impl; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.elink.esua.epdc.commons.tools.constant.StrConstant; |
|||
import com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO; |
|||
import com.elink.esua.epdc.optimize.modules.deptlevel.dao.OptSysDeptDao; |
|||
import com.elink.esua.epdc.optimize.modules.deptlevel.entity.OptSysDeptEntity; |
|||
import com.elink.esua.epdc.optimize.modules.deptlevel.service.OptSysDeptService; |
|||
import com.elink.esua.epdc.optimize.utils.DeptUtils; |
|||
import com.google.common.collect.Lists; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 部门相关业务实现 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/21 10:12 |
|||
*/ |
|||
@Service |
|||
public class OptSysDeptServiceImpl extends BaseServiceImpl<OptSysDeptDao, OptSysDeptEntity> implements OptSysDeptService { |
|||
|
|||
@Override |
|||
public List<DeptLevelAndLeaderDTO> listChildDeptLevelById(String typeKey, Long deptId) { |
|||
OptSysDeptEntity parentDept = baseDao.selectById(deptId); |
|||
List<OptSysDeptEntity> childDeptList = baseDao.selectListChildDept(typeKey, deptId); |
|||
// 直属子部门
|
|||
List<OptSysDeptEntity> sonNodeDepts = Lists.newArrayList(); |
|||
// 非直属子部门,可能是子部门的子部门
|
|||
List<OptSysDeptEntity> grandsonNodeDepts = Lists.newArrayList(); |
|||
childDeptList.forEach( |
|||
childDept -> { |
|||
if (childDept.getPid().equals(deptId)) { |
|||
sonNodeDepts.add(childDept); |
|||
} else { |
|||
grandsonNodeDepts.add(childDept); |
|||
} |
|||
} |
|||
); |
|||
List<DeptLevelAndLeaderDTO> result = packSonNodeDeptLevelList(parentDept, sonNodeDepts); |
|||
if (CollUtil.isNotEmpty(grandsonNodeDepts)) { |
|||
grandsonNodeDepts.forEach(dept -> { |
|||
DeptLevelAndLeaderDTO dto = packCompleteDeptLevel(dept.getId(), dept.getPids()); |
|||
if (null != dto) { |
|||
result.add(dto); |
|||
} |
|||
}); |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 组装所有子部门(父部门直属)的层级关系 |
|||
* |
|||
* @param parentDept 父部门 |
|||
* @param sonNodeDepts 所有子部门 |
|||
* @return java.util.List<com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO> |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/22 11:09 |
|||
*/ |
|||
private List<DeptLevelAndLeaderDTO> packSonNodeDeptLevelList(OptSysDeptEntity parentDept, List<OptSysDeptEntity> sonNodeDepts) { |
|||
List<DeptLevelAndLeaderDTO> result = Lists.newArrayList(); |
|||
if (CollUtil.isEmpty(sonNodeDepts)) { |
|||
return result; |
|||
} |
|||
DeptLevelAndLeaderDTO baseDeptLevel = packCompleteDeptLevel(parentDept.getId(), parentDept.getPids()); |
|||
sonNodeDepts.forEach(dept -> result.add(packSonNodeDeptLevel(dept, baseDeptLevel))); |
|||
return result; |
|||
} |
|||
|
|||
/** |
|||
* 组装子部门(父部门直属)的层级关系 |
|||
* |
|||
* @param dept 子部门 |
|||
* @param baseDeptLevel 父部门及层级关系 |
|||
* @return com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/22 11:02 |
|||
*/ |
|||
private DeptLevelAndLeaderDTO packSonNodeDeptLevel(OptSysDeptEntity dept, DeptLevelAndLeaderDTO baseDeptLevel) { |
|||
DeptLevelAndLeaderDTO dto = new DeptLevelAndLeaderDTO(); |
|||
dto.setDeptId(dept.getId()); |
|||
dto.setDeptName(dept.getName()); |
|||
dto.setTypeKey(dept.getTypeKey()); |
|||
dto.setParentDeptIds(baseDeptLevel.getAllDeptIds()); |
|||
dto.setParentDeptNames(baseDeptLevel.getAllDeptNames()); |
|||
dto.setAllDeptIds(baseDeptLevel.getAllDeptIds().concat(StrConstant.COMMA).concat(String.valueOf(dept.getId()))); |
|||
dto.setAllDeptNames(baseDeptLevel.getAllDeptNames().concat(StrConstant.HYPHEN).concat(dept.getName())); |
|||
return dto; |
|||
} |
|||
|
|||
/** |
|||
* 获取部门及父部门信息,拼接部门id,部门名称 |
|||
* |
|||
* @param deptId 本部门id |
|||
* @param pids 所有父部门id |
|||
* @return OptDeptMaCodeEntity |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/18 14:06 |
|||
*/ |
|||
private DeptLevelAndLeaderDTO packCompleteDeptLevel(Long deptId, String pids) { |
|||
String[] deptPids = pids.split(StrConstant.COMMA); |
|||
// 查询机构及父级机构
|
|||
List<DeptLevelAndLeaderDTO> deptList = baseDao.selectListDeptAndParents(deptId, deptPids); |
|||
return DeptUtils.packageDeptLevelDto(deptPids, deptList); |
|||
} |
|||
} |
|||
@ -1,4 +1,4 @@ |
|||
package com.elink.esua.epdc.optimize.macode.dto; |
|||
package com.elink.esua.epdc.optimize.modules.macode.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
74
epdc-cloud-optimize-yushan/epdc-optimize-dept-macode/src/main/java/com/elink/esua/epdc/optimize/macode/service/impl/OptDeptMaCodeServiceImpl.java → epdc-cloud-optimize-yushan/epdc-optimize-department/src/main/java/com/elink/esua/epdc/optimize/modules/macode/service/impl/OptDeptMaCodeServiceImpl.java
74
epdc-cloud-optimize-yushan/epdc-optimize-dept-macode/src/main/java/com/elink/esua/epdc/optimize/macode/service/impl/OptDeptMaCodeServiceImpl.java → epdc-cloud-optimize-yushan/epdc-optimize-department/src/main/java/com/elink/esua/epdc/optimize/modules/macode/service/impl/OptDeptMaCodeServiceImpl.java
@ -0,0 +1,66 @@ |
|||
package com.elink.esua.epdc.optimize.utils; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import cn.hutool.core.util.ArrayUtil; |
|||
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|||
import com.elink.esua.epdc.commons.tools.constant.StrConstant; |
|||
import com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO; |
|||
import com.google.common.collect.Lists; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 部门相关静态方法工具类 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/22 10:21 |
|||
*/ |
|||
public class DeptUtils { |
|||
|
|||
public static DeptLevelAndLeaderDTO packageDeptLevelDto(String[] deptPids,List<DeptLevelAndLeaderDTO> deptList){ |
|||
if (CollUtil.isEmpty(deptList)) { |
|||
return null; |
|||
} |
|||
// 按上下级顺序组装部门集合
|
|||
List<DeptLevelAndLeaderDTO> newDeptIdList = Lists.newArrayList(); |
|||
if (ArrayUtil.isEmpty(deptPids)) { |
|||
// 父级部门为空,则只有部门本身,没有上级
|
|||
newDeptIdList = deptList; |
|||
} else { |
|||
// 按部门顺序开始组装
|
|||
for (int i = 0; i < deptPids.length; i++) { |
|||
for (DeptLevelAndLeaderDTO entity : deptList) { |
|||
if (String.valueOf(entity.getDeptId()).equals(deptPids[i])) { |
|||
newDeptIdList.add(entity); |
|||
deptList.remove(entity); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
// 所有父级部门处理完成,最后剩下部门本身
|
|||
newDeptIdList.addAll(deptList); |
|||
} |
|||
int size = newDeptIdList.size(); |
|||
int maxIndex = size - NumConstant.ONE; |
|||
|
|||
String[] allDeptIds = new String[size]; |
|||
String[] allDeptNames = new String[size]; |
|||
String[] parentDeptIds = new String[maxIndex]; |
|||
String[] parentDeptNames = new String[maxIndex]; |
|||
for (int i = 0; i < size; i++) { |
|||
allDeptIds[i] = String.valueOf(newDeptIdList.get(i).getDeptId()); |
|||
allDeptNames[i] = newDeptIdList.get(i).getDeptName(); |
|||
if (i < maxIndex) { |
|||
parentDeptIds[i] = String.valueOf(newDeptIdList.get(i).getDeptId()); |
|||
parentDeptNames[i] = newDeptIdList.get(i).getDeptName(); |
|||
} |
|||
} |
|||
DeptLevelAndLeaderDTO deptLevelDto = newDeptIdList.get(maxIndex); |
|||
deptLevelDto.setAllDeptIds(StringUtils.join(allDeptIds, StrConstant.COMMA)); |
|||
deptLevelDto.setParentDeptIds(StringUtils.join(parentDeptIds, StrConstant.COMMA)); |
|||
deptLevelDto.setAllDeptNames(StringUtils.join(allDeptNames, StrConstant.HYPHEN)); |
|||
deptLevelDto.setParentDeptNames(StringUtils.join(parentDeptNames, StrConstant.HYPHEN)); |
|||
return deptLevelDto; |
|||
} |
|||
} |
|||
@ -1,4 +1,4 @@ |
|||
package com.elink.esua.epdc.optimize.macode.utils; |
|||
package com.elink.esua.epdc.optimize.utils; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|||
|
|||
@ -1,7 +1,7 @@ |
|||
mybatis-plus: |
|||
mapper-locations: classpath:/mapper/**/*.xml |
|||
#实体扫描,多个package用逗号或者分号分隔 |
|||
typeAliasesPackage: com.elink.esua.epdc.optimize.deptlevel.entity |
|||
typeAliasesPackage: com.elink.esua.epdc.optimize.modules.*.entity |
|||
global-config: |
|||
#数据库相关配置 |
|||
db-config: |
|||
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.optimize.modules.deptlevel.dao.OptSysDeptDao"> |
|||
|
|||
<select id="selectListChildDept" |
|||
resultType="com.elink.esua.epdc.optimize.modules.deptlevel.entity.OptSysDeptEntity"> |
|||
SELECT * FROM sys_dept d |
|||
WHERE d.pids LIKE '%${deptId}%' AND d.type_key = #{typeKey} and d.del_flag = '0' |
|||
</select> |
|||
|
|||
|
|||
<select id="selectListDeptAndParents" resultType="com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO"> |
|||
SELECT |
|||
t.id as deptId, t.`name` as deptName, t.type_key as typeKey |
|||
FROM |
|||
sys_dept t |
|||
WHERE |
|||
t.id = #{deptId} |
|||
<if test="parentIds != null and parentIds.length > 0"> |
|||
OR t.id IN <foreach collection="parentIds" open="(" separator="," close=")" item="parentId">#{parentId}</foreach> |
|||
</if> |
|||
ORDER BY t.update_date ASC; |
|||
</select> |
|||
</mapper> |
|||
@ -1,91 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>epdc-cloud-optimize-yushan</artifactId> |
|||
<groupId>com.esua.epdc.yushan</groupId> |
|||
<version>1.0.0</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>epdc-optimize-dept-level</artifactId> |
|||
<description>部门层级关系功能优化</description> |
|||
<packaging>jar</packaging> |
|||
|
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.esua.epdc.yushan</groupId> |
|||
<artifactId>epdc-cloud-admin-client</artifactId> |
|||
<version>${epdc-cloud-commons.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-autoconfigure</artifactId> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.esua.epdc.yushan</groupId> |
|||
<artifactId>epdc-commons-mybatis</artifactId> |
|||
<version>${epdc-cloud-commons.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework</groupId> |
|||
<artifactId>spring-context-support</artifactId> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<finalName>${project.artifactId}</finalName> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-surefire-plugin</artifactId> |
|||
<configuration> |
|||
<skipTests>true</skipTests> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-deploy-plugin</artifactId> |
|||
<configuration> |
|||
<skip>true</skip> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>com.spotify</groupId> |
|||
<artifactId>dockerfile-maven-plugin</artifactId> |
|||
</plugin> |
|||
</plugins> |
|||
|
|||
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory> |
|||
|
|||
<resources> |
|||
<resource> |
|||
<filtering>true</filtering> |
|||
<directory>${basedir}/src/main/resources</directory> |
|||
<includes> |
|||
<include>**/application*.yml</include> |
|||
<include>**/*.properties</include> |
|||
<include>logback-spring.xml</include> |
|||
<include>registry.conf</include> |
|||
</includes> |
|||
</resource> |
|||
<resource> |
|||
<directory>${basedir}/src/main/resources</directory> |
|||
<excludes> |
|||
<exclude>**/application*.yml</exclude> |
|||
<exclude>**/*.properties</exclude> |
|||
<exclude>logback-spring.xml</exclude> |
|||
<exclude>registry.conf</exclude> |
|||
</excludes> |
|||
</resource> |
|||
</resources> |
|||
</build> |
|||
|
|||
</project> |
|||
@ -1,17 +0,0 @@ |
|||
package com.elink.esua.epdc.optimize.deptlevel.controller; |
|||
|
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* 部门层级相关调用 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/21 09:58 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("optimize/deptlevel") |
|||
public class OptDeptLevelController { |
|||
|
|||
|
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
package com.elink.esua.epdc.optimize.deptlevel.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.optimize.deptlevel.entity.OptSysDeptEntity; |
|||
|
|||
/** |
|||
* 部门相关 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/21 10:11 |
|||
*/ |
|||
public interface OptSysDeptDao extends BaseDao<OptSysDeptEntity> { |
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
package com.elink.esua.epdc.optimize.deptlevel.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.optimize.deptlevel.entity.OptSysDeptEntity; |
|||
|
|||
/** |
|||
* 部门相关 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/21 10:11 |
|||
*/ |
|||
public interface OptSysDeptService extends BaseService<OptSysDeptEntity> { |
|||
} |
|||
@ -1,17 +0,0 @@ |
|||
package com.elink.esua.epdc.optimize.deptlevel.service.impl; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.elink.esua.epdc.optimize.deptlevel.dao.OptSysDeptDao; |
|||
import com.elink.esua.epdc.optimize.deptlevel.entity.OptSysDeptEntity; |
|||
import com.elink.esua.epdc.optimize.deptlevel.service.OptSysDeptService; |
|||
|
|||
/** |
|||
* 部门相关业务实现 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/5/21 10:12 |
|||
*/ |
|||
public class OptSysDeptServiceImpl extends BaseServiceImpl<OptSysDeptDao, OptSysDeptEntity> implements OptSysDeptService { |
|||
|
|||
|
|||
} |
|||
@ -1,31 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<configuration> |
|||
|
|||
<!-- 开发、测试环境 --> |
|||
<springProfile name="dev,test"> |
|||
<logger name="org.springframework.web" level="INFO"/> |
|||
<logger name="org.springboot.sample" level="INFO"/> |
|||
<logger name="com.elink.esua.epdc" level="INFO"/> |
|||
<logger name="com.elink.esua.epdc.optimize.deptlevel.dao" level="DEBUG"/> |
|||
<root level="INFO"> |
|||
<appender-ref ref="DEBUG_FILE"/> |
|||
<appender-ref ref="INFO_FILE"/> |
|||
<appender-ref ref="WARN_FILE"/> |
|||
<appender-ref ref="ERROR_FILE"/> |
|||
</root> |
|||
</springProfile> |
|||
|
|||
<!-- 生产环境 --> |
|||
<springProfile name="prod"> |
|||
<logger name="org.springframework.web" level="INFO"/> |
|||
<logger name="org.springboot.sample" level="INFO"/> |
|||
<logger name="com.elink.esua.epdc" level="INFO"/> |
|||
<root level="INFO"> |
|||
<appender-ref ref="DEBUG_FILE"/> |
|||
<appender-ref ref="INFO_FILE"/> |
|||
<appender-ref ref="WARN_FILE"/> |
|||
<appender-ref ref="ERROR_FILE"/> |
|||
</root> |
|||
</springProfile> |
|||
|
|||
</configuration> |
|||
@ -1,8 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.optimize.deptlevel.dao.OptSysDeptDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
|||
@ -1,24 +0,0 @@ |
|||
mybatis-plus: |
|||
mapper-locations: classpath:/mapper/**/*.xml |
|||
#实体扫描,多个package用逗号或者分号分隔 |
|||
typeAliasesPackage: com.elink.esua.epdc.optimize.macode.entity |
|||
global-config: |
|||
#数据库相关配置 |
|||
db-config: |
|||
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID"; |
|||
id-type: ID_WORKER |
|||
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断" |
|||
field-strategy: NOT_NULL |
|||
#驼峰下划线转换 |
|||
column-underline: true |
|||
#db-type: mysql |
|||
#刷新mapper 调试神器 |
|||
refresh-mapper: true |
|||
banner: false |
|||
#原生配置 |
|||
configuration: |
|||
map-underscore-to-camel-case: true |
|||
cache-enabled: false |
|||
call-setters-on-nulls: true |
|||
jdbc-type-for-null: 'null' |
|||
|
|||
Loading…
Reference in new issue