Merge remote-tracking branch 'origin/dev' into dev

yun-zuoyi
汪云昊 6 years ago
commit bb80706032

@ -136,6 +136,8 @@ public interface IPersonnelService {
List<SysRefUserInfoDepartment> findSysRefUserInfoDepartmentByDepartmentIdList(List<Long> departmentIdList);
List<SysDepartment> findSysDepartmentByOrganizeIdList(List<Long> organizeIdList);
@ApiOperation(value = "查询用户部门关系")
List<SysDepartment> findSysUserInfoDepartmentByInfoId(Long infoId);

@ -74,9 +74,6 @@ public class WhiteController extends CoreBaseController {
private ISysDictionaryService dictionaryService;
@Autowired
private FastDFSClient dfsClient;
@Autowired
private ISysOrderNoRuleService sysOrderNoRuleService;
@Autowired
@ -116,7 +113,8 @@ public class WhiteController extends CoreBaseController {
@GetMapping(value="/auth/login")
@ApiOperation(value="登陆",notes="登陆")
public ResultBean login(HttpServletRequest request, String loginName, String loginPwd, String languageCode,
public ResultBean login(HttpServletRequest request, String loginName, String loginPwd,
@RequestParam(required = false) String languageCode,
@RequestParam(required = false) String ipAddr,
@RequestParam(required = false) String deviceId){
startMultiService();

@ -695,6 +695,7 @@ public class PersonnelController extends CoreBaseController {
user.setDepartmentId(Long.parseLong(model.getUserDepartmentId()));
user.setUserEmail(model.getUserEmail());
user.setUserPhone(model.getUserPhone());
user.setLanguageCode(model.getUserLanguageCode());
if (!StringUtils.isAnyBlank(model.getUserLoginPassword())) { // 使用新密码
user.setUserLoginPassword(EncryptTool.hexMD5(model.getUserLoginPassword()));

@ -109,13 +109,19 @@ public class SysDepartmentController extends CoreBaseController {
.notNull("departmentCode", department.getDepartmentCode())
.checkNotZero("organizeId",department.getOrganizeId());
SysDepartment sysDepartment = departmentService.getSysDepartmentById(department.getId());
sysDepartment.setName(department.getName());
sysDepartment.setDepartmentCode(department.getDepartmentCode());
sysDepartment.setDepartmentSort(department.getDepartmentSort());
sysDepartment.setParentId(department.getParentId());
ConvertBean.modelUpdate(department, user);
if(department.getParentId() == null || department.getParentId() <= 0){
department.setParentId(CommonEnumUtil.PARENT.DEFAULT.getValue());
department.setParentNameRdd("顶级部门");
if(sysDepartment.getParentId() == null || department.getParentId() <= 0){
sysDepartment.setParentId(CommonEnumUtil.PARENT.DEFAULT.getValue());
sysDepartment.setParentNameRdd("顶级部门");
}
departmentService.updateSysDepartment(department);
departmentService.updateSysDepartment(sysDepartment);
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
} catch (ImppBusiException busExcep) {
return ResultBean.fail(busExcep);

@ -106,14 +106,19 @@ public class SysPositionController extends CoreBaseController {
.notNull("name", position.getName())
.notNull("positionCode", position.getPositionCode());
SysPosition sysPosition = positionService.getSysPositionById(position.getId());
sysPosition.setName(position.getName());
sysPosition.setPositionCode(position.getPositionCode());
sysPosition.setParentId(position.getParentId());
//修改初始化
ConvertBean.modelUpdate(position, user);
if (position.getParentId() == null || position.getParentId() <= 0) {
position.setParentId(CommonEnumUtil.PARENT.DEFAULT.getValue());
position.setParentNameRdd("顶级岗位");
ConvertBean.modelUpdate(sysPosition, user);
if (sysPosition.getParentId() == null || position.getParentId() <= 0) {
sysPosition.setParentId(CommonEnumUtil.PARENT.DEFAULT.getValue());
sysPosition.setParentNameRdd("顶级岗位");
}
positionService.updateSysPosition(position);
positionService.updateSysPosition(sysPosition);
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
} catch (ImppBusiException busExcep) {
return ResultBean.fail(busExcep);

@ -399,10 +399,10 @@ public class CoreMemTreeService implements ICoreMemTreeService {
// 通过组织获取部门信息
if (organizeId != null && organizeId > 0) {
List<Long> organizeIdList = findSysOrganizeChildIdList(organizeId);
List<SysRefUserDepartment> refUserDepartmentList = personnelService.findSysRefUserDepartmentByOrganizeIdList(organizeIdList);
if (refUserDepartmentList != null && refUserDepartmentList.size() > 0) {
for (SysRefUserDepartment ref : refUserDepartmentList) {
refIdList.add(ref.getDepartmentId());
List<SysDepartment> departmentList = personnelService.findSysDepartmentByOrganizeIdList(organizeIdList);
if (departmentList != null && departmentList.size() > 0) {
for (SysDepartment department : departmentList) {
refIdList.add(department.getId());
}
}
}

@ -446,6 +446,16 @@ public class PersonnelServiceService implements IPersonnelService {
}
@Override
public List<SysDepartment> findSysDepartmentByOrganizeIdList(List<Long> organizeIdList) {
LOGGER.info("平台账号部门 SysRefUserInfoDepartment organizeIdList:{}", organizeIdList);
DdlPackBean packBean = DdlPackBean.getDdlPackBean();
DdlPreparedPack.getInPackList(organizeIdList,"organizeId",packBean);
return departmentRDao.findByHqlWhere(packBean);
}
@Override
@ApiOperation(value = "查询用户部门关系")
public List<SysDepartment> findSysUserInfoDepartmentByInfoId(Long infoId) {
LOGGER.info("平台用户部门 SysDepartment infoId:{}", infoId);

@ -69,6 +69,7 @@ public class SysDepartmentService implements ISysDepartmentService {
SysOrganize organize = organizeRDao.getById(department.getOrganizeId());
ValidatorBean.checkNotNull(organize);
department.setOrganizeCode(organize.getOrganizeCode());
department.setOrganizeNameRdd(organize.getName());
LOGGER.info("部门信息 DEPARTMENT {}", department);
@ -158,9 +159,10 @@ public class SysDepartmentService implements ISysDepartmentService {
// 查询所属组织名称
LOGGER.info("组织信息 ORGANIZE organizeId:{}", department.getOrganizeId());
SysOrganize organize = organizeRDao.getById(department.getOrganizeId());
ValidatorBean.checkNotNull(organize);
ValidatorBean.checkNotNull(organize,"不存的组织信息");
department.setOrganizeNameRdd(organize.getName());
department.setOrganizeCode(organize.getOrganizeCode());
// 新增部门
LOGGER.info("部门信息 DEPARTMENT department:{}", department);

@ -599,6 +599,8 @@ public class SysUserService implements ISysUserService {
sessionUser.setToken(AuthUtil.getSession().getId().toString());
sessionUser.setUser(user);
AuthUtil.setDeviceId(deviceId);
return sessionUser;
}

@ -0,0 +1,189 @@
#本机ip
impp.server.ip=imppcore
#项目端口
server.port=8100
#链路追踪zipkin控制台ip地址
impp.console.ip=http://console:8010
#服务注册中心(多注册中心逗号分隔)
impp.cluster.regist.center=http://register:8000/eureka/
#日志默认使用log4j2
logging.config=classpath:log4j2-spring.xml
########平台相关参数##########
#是否开启redis缓存
impp.config.redis=true
#是否开启rabbitMQ
impp.config.rabbitmq=true
#是否开启swagger
impp.config.swagger=true
#是否开启websocket
impp.config.websocket=true
#是否开启文件服务
impp.config.fastdfs=true
#是否对发布服务进行详细日志分析
impp.log.detail.controller=true
#是否对调用服务进行详细日志分析
impp.log.detail.service=true
#是否开启微服
eureka.client.enabled=true
#打开feign的熔断
feign.hystrix.enabled=true
################ 队列处理 ################
#站内信
impp.mq.queue.letter=true
#邮件
impp.mq.queue.mail=true
#定时任务
impp.mq.queue.schedule=true
#SWEB通知处理队列
impp.mq.queue.sweb.notice=true
################################ 数据库相关设置 ################################
# mysql
spring.datasource.validationQuery=SELECT 1
################ 数据池设置 ################
spring.datasource.maximum-pool-size=10
spring.datasource.max-active=5
spring.datasource.max-idle=5
spring.datasource.min-idle=1
spring.datasource.initial-size=1
spring.datasource.max-wait=10000
spring.datasource.validation-query=SELECT 1
spring.datasource.test-on-borrow=false
spring.datasource.test-while-idle=true
spring.datasource.time-between-eviction-runs-millis=300000
##主数据源,读写
#impp.write.datasource.type=com.zaxxer.hikari.HikariDataSource
impp.write.datasource.driver-class-name=com.mysql.jdbc.Driver
impp.write.datasource.jdbc-url=jdbc:mysql://dbmaster:3306/impp_i3_core?autoReconnect=true&useSSL=false&characterEncoding=utf-8
impp.write.datasource.username=wmslogin
impp.write.datasource.password=Wmslogin$%^&7654
#impp.read.datasource.type=com.zaxxer.hikari.HikariDataSource
#主从复制时自动修改表结构会有问题,暂时改成同一个数据源
impp.read.datasource.driver-class-name=com.mysql.jdbc.Driver
impp.read.datasource.jdbc-url=jdbc:mysql://dbmaster:3306/impp_i3_core?autoReconnect=true&useSSL=false&characterEncoding=utf-8
impp.read.datasource.username=wmslogin
impp.read.datasource.password=Wmslogin$%^&7654
##############定时任务持久化##############
impp.schedule.open=true
impp.schedule.datasource.driver-class-name=com.mysql.jdbc.Driver
impp.schedule.datasource.jdbc-url=jdbc:mysql://dbmaster:3306/impp_i3_schedule?autoReconnect=true&useSSL=false&characterEncoding=utf-8
impp.schedule.datasource.username=wmslogin
impp.schedule.datasource.password=Wmslogin$%^&7654
impp.schedule.datasource.max-connections=50
################ 日志数据源 ################
spring.data.mongodb.database=mongoDBSource
spring.data.mongodb.uri=mongodb:27017
spring.data.mongodb.username=sa
spring.data.mongodb.password=i3plus
spring.data.mongodb.port=27017
################ JPA设置设置 ################
# mysql
spring.jpa.database=MYSQL
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
#是否显示sql
spring.jpa.show-sql=true
#表关系create,create-drop,update,validate
spring.jpa.properties.hibernate.hbm2ddl.auto=update
#定时任务在服务启动后多少秒执行
impp.schedule.start.after-second=20
#是否集群部署
impp.schedule.datasource.is-clustered=true
#执行检测(毫秒),若宕机由其他定时器执行
impp.schedule.datasource.cluster-checkin-interval=30000
#线程数
impp.schedule.thread-count=50
#线程优先级1-10默认为5
impp.schedule.thread-priority=5
################################ 其他功能设置 ################################
#redisIP
redis.hostName=redis
#端口号
redis.port=6379
#如果有密码
redis.password=
##其他redis配置需要调整的加在此处
################## rabbitMQ配置 ####################
spring.rabbitmq.vhost=/
spring.rabbitmq.host=rabbitmq
spring.rabbitmq.port=5672
spring.rabbitmq.username=estsh
spring.rabbitmq.password=estsh123
##其他rabbitMq配置需要调整的加在此处
################ 微服配置 ################
#是否进行健康检查
eureka.client.healthcheck.enabled=true
#若无法连接注册中心,是否需要一直检测加入
impp.cluster.fetch=true
#集群名
eureka.instance.metadata-map.cluster=impp_cluster
#(参数配置)注册中心地址 -》 i3plus-ics多个用逗号分隔
eureka.client.service-url.defaultZone=${impp.cluster.regist.center}
#本服务主机ip若多个网卡则需要设置本服务ip
eureka.instance.ip-address=${impp.server.ip}
#本服务实例ID
eureka.instance.instance-id=${impp.server.ip}:${server.port}
#本服务主机名
eureka.instance.hostname=${impp.server.ip}
#本服务状态页面
eureka.instance.status-page-url=http://${impp.server.ip}:${server.port}/swagger-ui.html
#将自己的IP注册到Eureka Server。若不配置或设置为false表示注册微服务所在操作系统的hostname到Eureka Server
eureka.instance.prefer-ip-address=true
################ 检测机制 ################
#心跳间隔周期宕机限制30秒没反应视为宕机
eureka.instance.lease-expiration-duration-in-seconds=30
#心跳周期
eureka.instance.lease-renewal-interval-in-seconds=20
################ 熔断配置 ################
#重试
ribbon.maxAutoRetries=2
#读取数据时长
ribbon.ReadTimeout=30000
#连接时长
ribbon.ConnectTimeout=50000
#响应超过时长,进行熔断(熔断超时需要大于读取时长及连接时长)
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=60000
################ 链路追踪 ################
#使用web方式传输信息
spring.zipkin.sender.type=web
#链路追踪服务的地址
spring.zipkin.base-url=${impp.console.ip}
#追踪深度百分比1是全部
spring.sleuth.sampler.probability=1.0
################ FastDfs 配置 ################
#tracker服务器ip
fastdfs.tracker_servers=tracker:22122
# tracker的http端口
fastdfs.http_tracker_http_port=22122
# 使用自定义工具获取文件展示地址
fastdfs.http.ui.host=http://tracker:22122
#密码
#fastdfs.http.secret_key=
#连接超时
fastdfs.connect_timeout_in_seconds=10000
#传输超时
fastdfs.network_timeout_in_seconds=10000
fastdfs.charset=UTF-8
# token 防盗链功能
fastdfs.http_anti_steal_token=no
################ 授权配置 ################
slm.api.password=4C9479EBEFA6FA6E232EF25EFA49C4D2
slm.app.id=10000
Loading…
Cancel
Save