{
+
+}
\ No newline at end of file
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerUserEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerUserEntity.java
new file mode 100644
index 0000000000..11a6e86b09
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerUserEntity.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 居民用户信息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-16
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("customer_user")
+public class CustomerUserEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id CUSTOMER.id
+ */
+ private String customerId;
+
+ /**
+ * 微信openId
+ */
+ private String wxOpenId;
+
+ /**
+ * 手机号
+ */
+ private String mobile;
+
+ /**
+ * 昵称
+ */
+ private String nickname;
+
+ /**
+ * 性别:0.未知 1.男性2女性
+ */
+ private Integer sex;
+
+ /**
+ * 头像
+ */
+ private String headImgUrl;
+
+ /**
+ * 国家
+ */
+ private String country;
+
+ /**
+ * 省份
+ */
+ private String province;
+
+ /**
+ * 城市
+ */
+ private String city;
+
+ /**
+ * 语言
+ */
+ private String language;
+
+}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/CustomerUserExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/CustomerUserExcel.java
new file mode 100644
index 0000000000..e1d2bc9aec
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/CustomerUserExcel.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 居民用户信息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-16
+ */
+@Data
+public class CustomerUserExcel {
+
+ @Excel(name = "唯一标识")
+ private String id;
+
+ @Excel(name = "客户Id CUSTOMER.id")
+ private String customerId;
+
+ @Excel(name = "微信openId")
+ private String wxOpenId;
+
+ @Excel(name = "手机号")
+ private String mobile;
+
+ @Excel(name = "昵称")
+ private String nickname;
+
+ @Excel(name = "性别:0.未知 1.男性2女性")
+ private Integer sex;
+
+ @Excel(name = "头像")
+ private String headImgUrl;
+
+ @Excel(name = "国家")
+ private String country;
+
+ @Excel(name = "省份")
+ private String province;
+
+ @Excel(name = "城市")
+ private String city;
+
+ @Excel(name = "语言")
+ private String language;
+
+ @Excel(name = "删除标识:0.未删除 1.已删除")
+ private String delFlag;
+
+ @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;
+
+
+}
\ No newline at end of file
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/CustomerUserRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/CustomerUserRedis.java
new file mode 100644
index 0000000000..f70ed57881
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/CustomerUserRedis.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.redis;
+
+import com.epmet.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 居民用户信息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-16
+ */
+@Component
+public class CustomerUserRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerUserService.java
new file mode 100644
index 0000000000..39ebe54c91
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerUserService.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.CustomerUserDTO;
+import com.epmet.entity.CustomerUserEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 居民用户信息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-16
+ */
+public interface CustomerUserService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-03-16
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-03-16
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return CustomerUserDTO
+ * @author generator
+ * @date 2020-03-16
+ */
+ CustomerUserDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-16
+ */
+ void save(CustomerUserDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-16
+ */
+ void update(CustomerUserDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-03-16
+ */
+ void delete(String[] ids);
+}
\ No newline at end of file
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerUserServiceImpl.java
new file mode 100644
index 0000000000..59e3ccafaa
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerUserServiceImpl.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.dao.CustomerUserDao;
+import com.epmet.dto.CustomerUserDTO;
+import com.epmet.entity.CustomerUserEntity;
+import com.epmet.redis.CustomerUserRedis;
+import com.epmet.service.CustomerUserService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 居民用户信息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-16
+ */
+@Service
+public class CustomerUserServiceImpl extends BaseServiceImpl implements CustomerUserService {
+
+ @Autowired
+ private CustomerUserRedis customerUserRedis;
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, CustomerUserDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, CustomerUserDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public CustomerUserDTO get(String id) {
+ CustomerUserEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, CustomerUserDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(CustomerUserDTO dto) {
+ CustomerUserEntity entity = ConvertUtils.sourceToTarget(dto, CustomerUserEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(CustomerUserDTO dto) {
+ CustomerUserEntity entity = ConvertUtils.sourceToTarget(dto, CustomerUserEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml b/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000000..f7070de4b7
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml
@@ -0,0 +1,117 @@
+server:
+ port: @server.port@
+ servlet:
+ context-path: /epmetuser
+
+spring:
+ main:
+ allow-bean-definition-overriding: true
+ application:
+ name: epmet-user-server
+ #环境 dev|test|prod
+ profiles:
+ active: dev
+ messages:
+ encoding: UTF-8
+ basename: i18n/messages_common
+ jackson:
+ time-zone: GMT+8
+ date-format: yyyy-MM-dd HH:mm:ss
+ redis:
+ database: @spring.redis.index@
+ host: @spring.redis.host@
+ port: @spring.redis.port@
+ password: @spring.redis.password@
+ timeout: 30s
+ datasource:
+ druid:
+ #MySQL
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: @spring.datasource.druid.url@
+ username: @spring.datasource.druid.username@
+ password: @spring.datasource.druid.password@
+ initial-size: 10
+ max-active: 100
+ min-idle: 10
+ max-wait: 60000
+ pool-prepared-statements: true
+ max-pool-prepared-statement-per-connection-size: 20
+ time-between-eviction-runs-millis: 60000
+ min-evictable-idle-time-millis: 300000
+ #Oracle需要打开注释
+ #validation-query: SELECT 1 FROM DUAL
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ filter:
+ stat:
+ log-slow-sql: true
+ slow-sql-millis: 1000
+ merge-sql: false
+ wall:
+ config:
+ multi-statement-allow: true
+ cloud:
+ nacos:
+ discovery:
+ server-addr: @nacos.server-addr@
+ #nacos的命名空间ID,默认是public
+ namespace: @nacos.discovery.namespace@
+ #不把自己注册到注册中心的地址
+ register-enabled: @nacos.register-enabled@
+ ip: @nacos.ip@
+ config:
+ enabled: @nacos.config-enabled@
+ server-addr: @nacos.server-addr@
+ namespace: @nacos.config.namespace@
+ group: @nacos.config.group@
+ file-extension: yaml
+management:
+ endpoints:
+ web:
+ exposure:
+ include: "*"
+ endpoint:
+ health:
+ show-details: ALWAYS
+
+mybatis-plus:
+ mapper-locations: classpath:/mapper/**/*.xml
+ #实体扫描,多个package用逗号或者分号分隔
+ typeAliasesPackage: com.epmet.entity
+ global-config:
+ #数据库相关配置
+ db-config:
+ #主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
+ id-type: ID_WORKER
+ banner: false
+ #原生配置
+ configuration:
+ map-underscore-to-camel-case: true
+ cache-enabled: false
+ call-setters-on-nulls: true
+ jdbc-type-for-null: 'null'
+
+feign:
+ hystrix:
+ enabled: true
+ client:
+ config:
+ default:
+ loggerLevel: BASIC
+ httpclient:
+ enabled: true
+ max-connections: 200
+ max-connections-per-route: 50
+
+hystrix:
+ command:
+ default:
+ execution:
+ isolation:
+ thread:
+ timeoutInMilliseconds: 60000 #缺省为1000
+
+ribbon:
+ ReadTimeout: 300000
+ ConnectTimeout: 300000
diff --git a/epmet-user/epmet-user-server/src/main/resources/logback-spring.xml b/epmet-user/epmet-user-server/src/main/resources/logback-spring.xml
new file mode 100644
index 0000000000..c34321a409
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/resources/logback-spring.xml
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ debug
+
+
+ ${CONSOLE_LOG_PATTERN}
+
+ UTF-8
+
+
+
+
+
+
+
+ ${log.path}/debug.log
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
+ UTF-8
+
+
+
+
+ ${log.path}/debug-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 15
+
+
+
+ debug
+ ACCEPT
+ DENY
+
+
+
+
+
+
+ ${log.path}/info.log
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
+ UTF-8
+
+
+
+
+ ${log.path}/info-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 15
+
+
+
+ info
+ ACCEPT
+ DENY
+
+
+
+
+
+
+ ${log.path}/warn.log
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
+ UTF-8
+
+
+
+ ${log.path}/warn-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 15
+
+
+
+ warn
+ ACCEPT
+ DENY
+
+
+
+
+
+
+ ${log.path}/error.log
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
+ UTF-8
+
+
+
+ ${log.path}/error-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 15
+
+
+
+ ERROR
+ ACCEPT
+ DENY
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerUserDao.xml
new file mode 100644
index 0000000000..14a5b36bc6
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerUserDao.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-user/pom.xml b/epmet-user/pom.xml
new file mode 100644
index 0000000000..9e06fd4e2f
--- /dev/null
+++ b/epmet-user/pom.xml
@@ -0,0 +1,21 @@
+
+
+ 4.0.0
+
+
+ com.epmet
+ epmet-cloud
+ 2.0.0
+
+
+ com.epmet
+ epmet-user
+ pom
+
+
+ epmet-user-client
+ epmet-user-server
+
+
+
diff --git a/pom.xml b/pom.xml
index 5f1a213922..741f491b12 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,6 +26,7 @@
epmet-auth
epmet-admin
epmet-module
+ epmet-user