提交 f8b00bc2 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 cef3be9e
......@@ -63,5 +63,13 @@ zuul:
path: /net-disk/**
serviceId: ${ibiz.ref.service.disk:ibzdisk-api}
stripPrefix: false
ou_sys_org:
path: /sysorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou_sys_dept:
path: /sysdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
......@@ -44,5 +44,13 @@ zuul:
path: /net-disk/**
serviceId: ${ibiz.ref.service.disk:ibzdisk-api}
stripPrefix: false
ou_sys_org:
path: /sysorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou_sys_dept:
path: /sysdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
......@@ -86,6 +86,7 @@
<!-- 阿里seata分布式事务 -->
<alibaba-seata.version>1.3.0</alibaba-seata.version>
<oracle.version>11.2.0.3</oracle.version>
</properties>
......@@ -330,6 +331,12 @@
<version>${eureka-client.version}</version>
</dependency>
<!-- Oracle驱动包 -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>${oracle.version}</version>
</dependency>
<!-- MySQL驱动包 -->
<dependency>
<groupId>mysql</groupId>
......
......@@ -18,6 +18,9 @@ import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.lang.reflect.Field;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
/**
......@@ -109,7 +112,8 @@ public class VersionCheckAspect
*/
@SneakyThrows
private Object getDBVersion(VersionCheck versionCheck,Object service,Object id){
Object dbVersion=null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Timestamp dbVersion=null;
String versionField=versionCheck.versionfield();
if(!ObjectUtils.isEmpty(service)){
EvaluationContext oldContext = new StandardEvaluationContext();
......@@ -117,7 +121,12 @@ public class VersionCheckAspect
oldContext.setVariable("id",id);
Expression oldExp = parser.parseExpression("#service.get(#id)");
EntityBase oldEntity =oldExp.getValue(oldContext, EntityBase.class);
return oldEntity.get(versionField);
Object oldDate=oldEntity.get(versionField);
if(oldDate!=null && oldDate instanceof Timestamp){
Timestamp db_time= (Timestamp) oldDate;
Date db_date = sdf.parse(sdf.format(db_time));
dbVersion=new Timestamp(db_date.getTime());
}
}
return dbVersion;
}
......
......@@ -15,7 +15,7 @@ public interface IBZOUFeignClient
* @param userId
* @return
*/
@GetMapping("/ibzemployees/{userId}/oumaps")
@GetMapping("/sysemployees/{userId}/oumaps")
Map<String, Set<String>> getOUMapsByUserId(@PathVariable("userId") String userId);
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册