31 changed files with 386 additions and 213 deletions
@ -1 +1 @@ |
|||
Subproject commit 9abae9c811a1a58f36364c4ad17ad3962e1dda01 |
|||
Subproject commit 820d1e418e28da9cc383ccd6c8489cbdf22c29f4 |
|||
@ -1,80 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.optimize.modules.macode.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 网格小程序码 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-05-15 |
|||
*/ |
|||
@Data |
|||
public class DeptMaCodeExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "网格ID") |
|||
private Long gridId; |
|||
|
|||
@Excel(name = "小程序码URL") |
|||
private String codeUrl; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
@Excel(name = "删除标记") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "是否是网格长码,0否 1是") |
|||
private String leaderFlag; |
|||
|
|||
@Excel(name = "网格名称") |
|||
private String grid; |
|||
|
|||
@Excel(name = "父所有部门") |
|||
private String parentDeptIds; |
|||
|
|||
@Excel(name = "父所有部门") |
|||
private String parentDeptNames; |
|||
|
|||
@Excel(name = "所有部门ID") |
|||
private String allDeptIds; |
|||
|
|||
@Excel(name = "所有部门名称") |
|||
private String allDeptNames; |
|||
|
|||
|
|||
} |
|||
@ -1,47 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.optimize.modules.macode.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 网格小程序码 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-05-15 |
|||
*/ |
|||
@Component |
|||
public class DeptMaCodeRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
<?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> |
|||
@ -0,0 +1,17 @@ |
|||
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 { |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
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> { |
|||
} |
|||
@ -0,0 +1,72 @@ |
|||
package com.elink.esua.epdc.optimize.deptlevel.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.FieldFill; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableLogic; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author work@yujt.net.cn |
|||
* @date |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@TableName("sys_dept") |
|||
public class OptSysDeptEntity extends BaseEntity { |
|||
|
|||
private static final long serialVersionUID = -6288907401246811269L; |
|||
|
|||
/** |
|||
* 上级ID |
|||
*/ |
|||
private Long pid; |
|||
/** |
|||
* 所有上级ID,用逗号分开 |
|||
*/ |
|||
private String pids; |
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
/** |
|||
* 删除标识 0:未删除 1:删除 |
|||
*/ |
|||
@TableLogic |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private Integer delFlag; |
|||
/** |
|||
* 更新者 |
|||
*/ |
|||
@TableField(fill = FieldFill.INSERT_UPDATE) |
|||
private Long updater; |
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
@TableField(fill = FieldFill.INSERT_UPDATE) |
|||
private Date updateDate; |
|||
|
|||
/** |
|||
* 上级部门名称 |
|||
*/ |
|||
@TableField(exist = false) |
|||
private String parentName; |
|||
|
|||
/** |
|||
* 部门类型键值 |
|||
*/ |
|||
private String typeKey; |
|||
|
|||
/** |
|||
* 部门编码 |
|||
*/ |
|||
private String partyCode; |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
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> { |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
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,8 +1,7 @@ |
|||
|
|||
mybatis-plus: |
|||
mapper-locations: classpath:/mapper/**/*.xml |
|||
#实体扫描,多个package用逗号或者分号分隔 |
|||
typeAliasesPackage: com.elink.esua.epdc.optimize.modules.*.entity |
|||
typeAliasesPackage: com.elink.esua.epdc.optimize.deptlevel.entity |
|||
global-config: |
|||
#数据库相关配置 |
|||
db-config: |
|||
@ -0,0 +1,31 @@ |
|||
<?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> |
|||
@ -0,0 +1,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"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.optimize.deptlevel.dao.OptSysDeptDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,19 @@ |
|||
package com.elink.esua.epdc.optimize.macode.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author: zy |
|||
* @Date: 2020-03-17 |
|||
*/ |
|||
@Data |
|||
public class UploadToOssDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 6136753578748343389L; |
|||
|
|||
private String fileName; |
|||
|
|||
private byte[] fileByte; |
|||
} |
|||
@ -1,9 +1,9 @@ |
|||
package com.elink.esua.epdc.optimize.modules.feign; |
|||
package com.elink.esua.epdc.optimize.macode.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.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.UploadToOssDTO; |
|||
import com.elink.esua.epdc.optimize.modules.feign.fallback.OptOssFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
@ -1,10 +1,10 @@ |
|||
package com.elink.esua.epdc.optimize.modules.feign.fallback; |
|||
package com.elink.esua.epdc.optimize.macode.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.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.UploadToOssDTO; |
|||
import com.elink.esua.epdc.optimize.modules.feign.OptOssFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
@ -1,4 +1,4 @@ |
|||
package com.elink.esua.epdc.optimize.utils; |
|||
package com.elink.esua.epdc.optimize.macode.utils; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|||
|
|||
@ -0,0 +1,24 @@ |
|||
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' |
|||
|
|||
@ -0,0 +1,22 @@ |
|||
<?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> |
|||
<groupId>com.esua.epdc.yushan</groupId> |
|||
<artifactId>epdc-cloud-parent-yushan</artifactId> |
|||
<version>1.0.0</version> |
|||
<relativePath>../epdc-cloud-parent-yushan</relativePath> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>epdc-cloud-optimize-yushan</artifactId> |
|||
<packaging>pom</packaging> |
|||
<description>党群e家部门机构优化微服务模块</description> |
|||
|
|||
<modules> |
|||
<module>epdc-optimize-dept-macode</module> |
|||
<module>epdc-optimize-dept-level</module> |
|||
</modules> |
|||
|
|||
</project> |
|||
Loading…
Reference in new issue