Commit 03c1de42 authored by hezhuozhi's avatar hezhuozhi

人大金仓适配

parent 5d8f10ac
package com.yeejoin.equipmanage.config;
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.core.config.GlobalConfig;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.yeejoin.amos.boot.biz.config.MetaHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* @description: 分页插件
* @author: duanwei
* @create: 2020-06-30 13:57
**/
@EnableTransactionManagement
@Configuration("MybatisPlusConfigPrecontrol")
@Primary
public class MybatisPlusConfig {
/**
* plus分页插件支持
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor page = new PaginationInterceptor();
//设置方言类型
page.setDialectType("mysql");
//不限制
page.setLimit(-1);
return page;
}
/**
* pageHelper插件支持
*
* @return
*/
@Bean
ConfigurationCustomizer mybatisConfigurationCustomizer() {
return new ConfigurationCustomizer() {
@Override
public void customize(MybatisConfiguration configuration) {
configuration.addInterceptor(new com.github.pagehelper.PageInterceptor());
}
};
}
/**
* mp参数切面
*
* @return
*/
@Bean
public GlobalConfig globalConfig() {
GlobalConfig globalConfig = new GlobalConfig();
globalConfig.setMetaObjectHandler(new MetaHandler());
return globalConfig;
}
}
\ No newline at end of file
...@@ -54,19 +54,19 @@ public class PersonIdentifyAspect { ...@@ -54,19 +54,19 @@ public class PersonIdentifyAspect {
if (reginParam.getPersonIdentity() == null || StringUtils.isEmpty(reginParam.getPersonIdentity().getBizOrgCode()) || StringUtils.isEmpty(reginParam.getPersonIdentity().getCompanyBizOrgCode())) { if (reginParam.getPersonIdentity() == null || StringUtils.isEmpty(reginParam.getPersonIdentity().getBizOrgCode()) || StringUtils.isEmpty(reginParam.getPersonIdentity().getCompanyBizOrgCode())) {
String userId = reginParam.getUserModel().getUserId(); String userId = reginParam.getUserModel().getUserId();
if (userId != null) { if (userId != null) {
FeignClientResult responseModel = jcsFeignClient.selectById(userId); // FeignClientResult responseModel = jcsFeignClient.selectById(userId);
if (ObjectUtils.isEmpty(responseModel.getResult()) || responseModel.getStatus() != HttpStatus.OK.value()) { // if (ObjectUtils.isEmpty(responseModel.getResult()) || responseModel.getStatus() != HttpStatus.OK.value()) {
throw new RuntimeException(responseModel.getDevMessage()); // throw new RuntimeException(responseModel.getDevMessage());
} // }
// ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) responseModel.getResult(), ReginParams.PersonIdentity.class); // ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) responseModel.getResult(), ReginParams.PersonIdentity.class);
String s = JSONObject.toJSONString(responseModel.getResult()); // String s = JSONObject.toJSONString(responseModel.getResult());
ReginParams.PersonIdentity personIdentity = JSONObject.parseObject(s, ReginParams.PersonIdentity.class); // ReginParams.PersonIdentity personIdentity = JSONObject.parseObject(s, ReginParams.PersonIdentity.class);
//电力默认走公司权限 //电力默认走公司权限
if (!logic){ // if (!logic){
personIdentity.setBizOrgCode(StringUtils.isEmpty(personIdentity.getCompanyBizOrgCode()) ? "-1" : personIdentity.getCompanyBizOrgCode()); // personIdentity.setBizOrgCode(StringUtils.isEmpty(personIdentity.getCompanyBizOrgCode()) ? "-1" : personIdentity.getCompanyBizOrgCode());
} // }
reginParam.setPersonIdentity(personIdentity); reginParam.setPersonIdentity(new ReginParams.PersonIdentity());
redisUtils.set(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()), JSONObject.toJSONString(reginParam)); redisUtils.set(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()), JSONObject.toJSONString(reginParam));
} }
} }
......
...@@ -39,7 +39,7 @@ spring.redis.expire.time=30000 ...@@ -39,7 +39,7 @@ spring.redis.expire.time=30000
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.234:18083 emqx.broker=tcp://172.16.10.234:1883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
mqtt.scene.host=mqtt://172.16.10.234:8083/mqtt mqtt.scene.host=mqtt://172.16.10.234:8083/mqtt
......
...@@ -306,17 +306,17 @@ ...@@ -306,17 +306,17 @@
<repository> <repository>
<id>public</id> <id>public</id>
<name>public</name> <name>public</name>
<url>http://113.142.68.105:8081/nexus/content/repositories/public/</url> <url>http://47.92.103.240:8081/nexus/content/repositories/public/</url>
</repository> </repository>
<repository> <repository>
<id>Releases</id> <id>Releases</id>
<name>Releases</name> <name>Releases</name>
<url>http://113.142.68.105:8081/nexus/content/repositories/releases/</url> <url>http://47.92.103.240:8081/nexus/content/repositories/releases/</url>
</repository> </repository>
<repository> <repository>
<id>Snapshots</id> <id>Snapshots</id>
<name>Snapshots</name> <name>Snapshots</name>
<url>http://113.142.68.105:8081/nexus/content/repositories/snapshots/</url> <url>http://47.92.103.240:8081/nexus/content/repositories/snapshots/</url>
</repository> </repository>
<repository> <repository>
<id>com.e-iceblue</id> <id>com.e-iceblue</id>
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
<repository> <repository>
<id>thirdparty</id> <id>thirdparty</id>
<name>thirdparty</name> <name>thirdparty</name>
<url>http://113.142.68.105:8081/nexus/content/repositories/thirdparty/</url> <url>http://47.92.103.240:8081/nexus/content/repositories/thirdparty/</url>
</repository> </repository>
</repositories> </repositories>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment