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

zhouweidong@lab.ibiz5.com 部署微服务接口

上级 b4c295de
......@@ -37,6 +37,11 @@
git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/
mvn clean package -Papi
cd ibzou-provider/ibzou-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-provider-api.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -28,6 +28,7 @@ import cn.ibizlab.core.ou.filter.IBZDepartmentSearchContext;
import cn.ibizlab.core.ou.service.IIBZDepartmentService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -179,6 +180,9 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
this.remove(new QueryWrapper<IBZDepartment>().eq("orgid",orgid));
}
@Autowired
@Lazy
IIBZDepartmentService proxyService;
@Override
public void saveByOrgid(String orgid,List<IBZDepartment> list) {
if(list==null)
......@@ -201,11 +205,11 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
_create.add(sub);
}
if(_update.size()>0)
this.updateBatch(_update);
proxyService.updateBatch(_update);
if(_create.size()>0)
this.createBatch(_create);
proxyService.createBatch(_create);
if(delIds.size()>0)
this.removeBatch(delIds);
proxyService.removeBatch(delIds);
}
......@@ -297,3 +301,4 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
}
......@@ -28,6 +28,7 @@ import cn.ibizlab.core.ou.filter.IBZDeptMemberSearchContext;
import cn.ibizlab.core.ou.service.IIBZDeptMemberService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -268,3 +269,4 @@ public class IBZDeptMemberServiceImpl extends ServiceImpl<IBZDeptMemberMapper, I
}
......@@ -28,6 +28,7 @@ import cn.ibizlab.core.ou.filter.IBZEmployeeSearchContext;
import cn.ibizlab.core.ou.service.IIBZEmployeeService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -308,3 +309,4 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
}
......@@ -28,6 +28,7 @@ import cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext;
import cn.ibizlab.core.ou.service.IIBZOrganizationService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -249,3 +250,4 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
}
......@@ -28,6 +28,7 @@ import cn.ibizlab.core.ou.filter.IBZPostSearchContext;
import cn.ibizlab.core.ou.service.IIBZPostService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -194,3 +195,4 @@ public class IBZPostServiceImpl extends ServiceImpl<IBZPostMapper, IBZPost> impl
}
......@@ -28,6 +28,7 @@ import cn.ibizlab.core.ou.filter.IBZTeamMemberSearchContext;
import cn.ibizlab.core.ou.service.IIBZTeamMemberService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -267,3 +268,4 @@ public class IBZTeamMemberServiceImpl extends ServiceImpl<IBZTeamMemberMapper, I
}
......@@ -28,6 +28,7 @@ import cn.ibizlab.core.ou.filter.IBZTeamSearchContext;
import cn.ibizlab.core.ou.service.IIBZTeamService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -188,3 +189,4 @@ public class IBZTeamServiceImpl extends ServiceImpl<IBZTeamMapper, IBZTeam> impl
}
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar
EXPOSE 8081
EXPOSE 40001
ADD ibzou-provider-api.jar /ibzou-provider-api.jar
......@@ -3,9 +3,22 @@ services:
ibzou-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest
ports:
- "8081:8081"
- "40001:40001"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=40001
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
- SPRING_REDIS_HOST=172.16.100.243
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
- SPRING_DATASOURCE_PASSWORD=@6dEfb3@
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- NACOS=172.16.102.211:8848
deploy:
resources:
limits:
......
......@@ -95,9 +95,9 @@ public class DEFieldDefaultValueAspect
for(Object item:(List)obj) {
if(item instanceof EntityBase) {
if(deFields==null) {
deFields = DEFieldCacheMap.getDEFields(obj.getClass());
deFields = DEFieldCacheMap.getDEFields(item.getClass());
curUser = AuthenticationUser.getAuthenticationUser();
keyField=DEFieldCacheMap.getDEKeyField(obj.getClass());
keyField=DEFieldCacheMap.getDEKeyField(item.getClass());
if(StringUtils.isEmpty(keyField))
return true;
}
......
......@@ -47,14 +47,16 @@ public class VersionCheckAspect
@Before("execution(* cn.ibizlab.*.rest.*.updateBy*(..)) && @annotation(versionCheck)")
public void BeforeUpdateBy(JoinPoint point, VersionCheck versionCheck){
Object[] args = point.getArgs();
Object id=args[1];
Object dto=args[2];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto))
return;
String versionField=versionCheck.versionfield();
if(StringUtils.isEmpty(versionField))
return;
versionCheck(versionCheck,point.getTarget(),dto,id);
if(args.length>=2){
Object id=args[args.length-2];
Object dto=args[args.length-1];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto))
return;
String versionField=versionCheck.versionfield();
if(StringUtils.isEmpty(versionField))
return;
versionCheck(versionCheck,point.getTarget(),dto,id);
}
}
private void versionCheck(VersionCheck versionCheck,Object resource,Object dto,Object id ){
......
......@@ -29,6 +29,8 @@ public class FeignRequestInterceptor implements RequestInterceptor {
if (headerNames != null) {
while (headerNames.hasMoreElements()) {
String name = headerNames.nextElement();
if(name.equalsIgnoreCase("transfer-encoding"))
continue;
String values = request.getHeader(name);
requestTemplate.header(name, values);
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册