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

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

上级 401e61d6
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
git clone -b master $para2 ibzou/ git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/ cd ibzou/
mvn clean package -Pweb mvn clean package -Papi
cd ibzou-app/ibzou-app-web cd ibzou-provider/ibzou-provider-api
mvn -Pweb docker:build mvn -Papi docker:build
mvn -Pweb docker:push mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-app-web.yaml ibzlab-rt --with-registry-auth docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-provider-api.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar
EXPOSE 30001 EXPOSE 8080
ADD ibzou-app-web.jar /ibzou-app-web.jar ADD ibzou-app-web.jar /ibzou-app-web.jar
...@@ -3,21 +3,9 @@ services: ...@@ -3,21 +3,9 @@ services:
ibzou-app-web: ibzou-app-web:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest
ports: ports:
- "30001:30001" - "8080:8080"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=30001
- 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
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 1
......
...@@ -107,6 +107,13 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I ...@@ -107,6 +107,13 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
} }
} }
@Override
public boolean saveBatch(Collection<IBZDepartment> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<IBZDepartment> list) { public void saveBatch(List<IBZDepartment> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
......
...@@ -105,6 +105,13 @@ public class IBZDeptMemberServiceImpl extends ServiceImpl<IBZDeptMemberMapper, I ...@@ -105,6 +105,13 @@ public class IBZDeptMemberServiceImpl extends ServiceImpl<IBZDeptMemberMapper, I
} }
} }
@Override
public boolean saveBatch(Collection<IBZDeptMember> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<IBZDeptMember> list) { public void saveBatch(List<IBZDeptMember> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
......
...@@ -138,6 +138,13 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm ...@@ -138,6 +138,13 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
} }
} }
@Override
public boolean saveBatch(Collection<IBZEmployee> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<IBZEmployee> list) { public void saveBatch(List<IBZEmployee> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
......
...@@ -114,6 +114,13 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe ...@@ -114,6 +114,13 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
} }
} }
@Override
public boolean saveBatch(Collection<IBZOrganization> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<IBZOrganization> list) { public void saveBatch(List<IBZOrganization> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar 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 ADD ibzou-provider-api.jar /ibzou-provider-api.jar
...@@ -3,9 +3,21 @@ services: ...@@ -3,9 +3,21 @@ services:
ibzou-provider-api: ibzou-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest
ports: ports:
- "8081:8081" - "40001:40001"
networks: networks:
- agent_network - 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
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 1
......
...@@ -190,7 +190,7 @@ public class IBZEmployeeResource { ...@@ -190,7 +190,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "初始化密码ByIBZDepartment", tags = {"IBZEmployee" }, notes = "初始化密码ByIBZDepartment") @ApiOperation(value = "初始化密码ByIBZDepartment", tags = {"IBZEmployee" }, notes = "初始化密码ByIBZDepartment")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployeeuserid}/initpwd") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> initPwdByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> initPwdByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto); IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
...@@ -336,7 +336,7 @@ public class IBZEmployeeResource { ...@@ -336,7 +336,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "初始化密码ByIBZOrganization", tags = {"IBZEmployee" }, notes = "初始化密码ByIBZOrganization") @ApiOperation(value = "初始化密码ByIBZOrganization", tags = {"IBZEmployee" }, notes = "初始化密码ByIBZOrganization")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployeeuserid}/initpwd") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> initPwdByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> initPwdByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto); IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
...@@ -482,7 +482,7 @@ public class IBZEmployeeResource { ...@@ -482,7 +482,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "初始化密码ByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "初始化密码ByIBZOrganizationIBZDepartment") @ApiOperation(value = "初始化密码ByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "初始化密码ByIBZOrganizationIBZDepartment")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployeeuserid}/initpwd") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> initPwdByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> initPwdByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto); IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
......
...@@ -183,7 +183,7 @@ public class DEFieldCacheMap { ...@@ -183,7 +183,7 @@ public class DEFieldCacheMap {
Field field = DEFieldCacheMap.getField(clazz,fieldname); Field field = DEFieldCacheMap.getField(clazz,fieldname);
if(field!=null) { if(field!=null) {
DEField deField=field.getAnnotation(DEField.class); DEField deField=field.getAnnotation(DEField.class);
if(deField!=null&&deField.name()!=null) if(deField!=null&& !StringUtils.isEmpty(deField.name()))
return deField.name(); return deField.name();
} }
return fieldname; return fieldname;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册