25 changed files with 107 additions and 319 deletions
@ -1,89 +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>esua-epdc</artifactId> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<version>1.0.0</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>epdc-admin-epmet</artifactId> |
|||
<description>admin模块项目对接产品功能工具包</description> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-admin-client</artifactId> |
|||
<version>1.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-commons-mybatis</artifactId> |
|||
<version>1.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-autoconfigure</artifactId> |
|||
<scope>compile</scope> |
|||
</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 @@ |
|||
CREATE TABLE `sys_epmet_user_relation` ( |
|||
`ID` varchar(32) NOT NULL COMMENT 'ID', |
|||
`SYS_USER_ID` bigint(20) NOT NULL COMMENT '项目端用户ID', |
|||
`STAFF_ID` varchar(100) NOT NULL COMMENT '产品端工作人员ID', |
|||
`STAFF_NAME` varchar(100) NOT NULL COMMENT '产品端工作人员姓名', |
|||
`MOBILE` varchar(50) NOT NULL COMMENT '产品端工作人员手机号', |
|||
`AGENCY_ID` varchar(100) NOT NULL COMMENT '产品端工作人员所属组织ID', |
|||
`AGENCY_ALL_NAME` varchar(300) NOT NULL COMMENT '产品端工作人员所属组织全路径名称', |
|||
`CUSTOMER_ID` varchar(100) NOT NULL COMMENT '产品端工作人员所属客户id', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识 0-否,1-是', |
|||
`REVISION` int(11) DEFAULT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目产品工作人员关系表'; |
|||
@ -1,31 +0,0 @@ |
|||
package com.elink.esua.epdc.epmet.modules.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.admin.*; |
|||
import com.elink.esua.epdc.epmet.modules.feign.fallback.EpmetAnalysisFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
|
|||
/** |
|||
* 数据分析模块调用 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2020/9/9 15:41 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_ANALYSIS_SERVER, fallback = EpmetAnalysisFeignClientFallback.class) |
|||
public interface EpmetAnalysisFeignClient { |
|||
|
|||
/** |
|||
* 根据手机号获取产品工作人员信息 |
|||
* |
|||
* @param formDto 入参 |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.admin.SysEpmetUserResultDTO> |
|||
* @author liuchuang |
|||
* @since 2021/7/8 19:19 |
|||
*/ |
|||
@GetMapping(value = "analysis/admin/getEpmetUserInfo", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<SysEpmetUserResultDTO> getEpmetUserInfoByMobile(SysEpmetUserFormDTO formDto); |
|||
|
|||
} |
|||
@ -1,22 +0,0 @@ |
|||
package com.elink.esua.epdc.epmet.modules.feign.fallback; |
|||
|
|||
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.admin.*; |
|||
import com.elink.esua.epdc.epmet.modules.feign.EpmetAnalysisFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author:songyunpeg |
|||
* @Date:2020/9/9 15:42 |
|||
*/ |
|||
@Component |
|||
public class EpmetAnalysisFeignClientFallback implements EpmetAnalysisFeignClient { |
|||
|
|||
|
|||
@Override |
|||
public Result<SysEpmetUserResultDTO> getEpmetUserInfoByMobile(SysEpmetUserFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "getEpmetUserInfoByMobile",formDto); |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
mybatis-plus: |
|||
mapper-locations: classpath:/mapper/**/*.xml |
|||
#实体扫描,多个package用逗号或者分号分隔 |
|||
typeAliasesPackage: com.elink.esua.epdc.epmet.modules.*.entity |
|||
global-config: |
|||
#数据库相关配置 |
|||
db-config: |
|||
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID"; |
|||
id-type: UUID |
|||
#字段策略 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' |
|||
|
|||
@ -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.epmet.modules.userrelation.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,16 +1,12 @@ |
|||
<?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.epmet.modules.userrelation.dao.SysEpmetUserRelationDao"> |
|||
<mapper namespace="com.elink.esua.epdc.dao.SysEpmetUserRelationDao"> |
|||
|
|||
<select id="selectSysUserRelationEpmetInfo" resultType="com.elink.esua.epdc.epmet.modules.userrelation.entity.SysEpmetUserRelationEntity"> |
|||
<select id="selectSysUserRelationEpmetInfo" resultType="com.elink.esua.epdc.entity.SysEpmetUserRelationEntity"> |
|||
SELECT * FROM sys_epmet_user_relation WHERE DEL_FLAG = '0' AND SYS_USER_ID = #{id} |
|||
</select> |
|||
|
|||
<select id="selectSysUserInfoByMobile" resultType="com.elink.esua.epdc.dto.SysUserDTO"> |
|||
SELECT * FROM sys_user WHERE DEL_FLAG = 0 AND mobile = #{mobile} |
|||
</select> |
|||
|
|||
<delete id="deleteRelationInfoBySysUserId"> |
|||
DELETE FROM sys_epmet_user_relation WHERE SYS_USER_ID = #{id} |
|||
</delete> |
|||
Loading…
Reference in new issue