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

zoo457790531 部署微服务接口 [ibz-ou,microservice]

上级 e9a2e395
...@@ -37,6 +37,11 @@ ...@@ -37,6 +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 -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> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -112,10 +112,10 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -112,10 +112,10 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter {
"/**/svg/**", "/**/svg/**",
"/" "/"
).permitAll() ).permitAll()
//放行登录请求 // 放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll() .antMatchers( HttpMethod.POST, "/"+loginPath).permitAll()
//放行注销请求 // 放行注销请求
.antMatchers( HttpMethod.GET,"/"+logoutPath).permitAll() .antMatchers( HttpMethod.GET, "/"+logoutPath).permitAll()
// 文件操作 // 文件操作
.antMatchers("/"+downloadpath+"/**").permitAll() .antMatchers("/"+downloadpath+"/**").permitAll()
.antMatchers("/"+uploadpath).permitAll() .antMatchers("/"+uploadpath).permitAll()
......
...@@ -30,13 +30,13 @@ import java.util.List; ...@@ -30,13 +30,13 @@ import java.util.List;
@SpringBootApplication(exclude = { @SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
}) })
public class webApplication extends WebMvcConfigurerAdapter{ public class webApplication extends WebMvcConfigurerAdapter {
@Autowired @Autowired
SearchContextHandlerMethodArgumentResolver resolver; SearchContextHandlerMethodArgumentResolver resolver;
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(webApplication.class,args); SpringApplication.run(webApplication.class, args);
} }
@Override @Override
......
...@@ -25,8 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -25,8 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
@SpringBootApplication(exclude = { @SpringBootApplication(exclude = {
}) })
@ComponentScan(basePackages = {"cn.ibizlab"} @ComponentScan(basePackages = {"cn.ibizlab"}
// ,excludeFilters={ // ,excludeFilters = {
// @ComponentScan.Filter(type= org.springframework.context.annotation.FilterType.REGEX,pattern="cn.ibizlab.xxx.rest.xxx"), // @ComponentScan.Filter(type= org.springframework.context.annotation.FilterType.REGEX, pattern="cn.ibizlab.xxx.rest.xxx"),
// } // }
) )
@Import({ @Import({
...@@ -34,13 +34,13 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -34,13 +34,13 @@ import org.springframework.beans.factory.annotation.Autowired;
}) })
@EnableAsync @EnableAsync
@EnableScheduling @EnableScheduling
public class DevBootApplication extends WebMvcConfigurerAdapter{ public class DevBootApplication extends WebMvcConfigurerAdapter {
@Autowired @Autowired
SearchContextHandlerMethodArgumentResolver resolver; SearchContextHandlerMethodArgumentResolver resolver;
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(DevBootApplication.class,args); SpringApplication.run(DevBootApplication.class, args);
} }
@Override @Override
......
...@@ -22,7 +22,7 @@ public class SysEmployeeExService extends SysEmployeeServiceImpl { ...@@ -22,7 +22,7 @@ public class SysEmployeeExService extends SysEmployeeServiceImpl {
} }
/** /**
* 自定义行为[InitPwd]用户扩展 * [InitPwd:初始化密码] 行为扩展
* @param et * @param et
* @return * @return
*/ */
......
package cn.ibizlab.core.ou.service.logic.impl; package cn.ibizlab.core.ou.service.logic.impl;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.HashMap; import java.util.HashMap;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.kie.api.runtime.KieSession; import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.KieContainer;
import cn.ibizlab.core.ou.service.logic.ISysEmployeesaveDeptMemberLogic; import cn.ibizlab.core.ou.service.logic.ISysEmployeesaveDeptMemberLogic;
import cn.ibizlab.core.ou.domain.SysEmployee; import cn.ibizlab.core.ou.domain.SysEmployee;
...@@ -44,26 +38,25 @@ public class SysEmployeesaveDeptMemberLogicImpl implements ISysEmployeesaveDeptM ...@@ -44,26 +38,25 @@ public class SysEmployeesaveDeptMemberLogicImpl implements ISysEmployeesaveDeptM
@Override @Override
public void execute(SysEmployee et) { public void execute(SysEmployee et) {
KieSession kieSession = null; KieSession kieSession = null;
try{ try {
kieSession = kieContainer.newKieSession(); kieSession = kieContainer.newKieSession();
kieSession.insert(et); kieSession.insert(et);
kieSession.setGlobal("sysemployeesavedeptmemberdefault", et); kieSession.setGlobal("sysemployeesavedeptmemberdefault", et);
cn.ibizlab.core.ou.domain.SysDeptMember sysemployeesavedeptmembermember = new cn.ibizlab.core.ou.domain.SysDeptMember(); cn.ibizlab.core.ou.domain.SysDeptMember sysemployeesavedeptmembermember = new cn.ibizlab.core.ou.domain.SysDeptMember();
kieSession.insert(sysemployeesavedeptmembermember); kieSession.insert(sysemployeesavedeptmembermember);
kieSession.setGlobal("sysemployeesavedeptmembermember", sysemployeesavedeptmembermember); kieSession.setGlobal("sysemployeesavedeptmembermember", sysemployeesavedeptmembermember);
kieSession.setGlobal("sysdeptmemberservice", sysdeptmemberservice); kieSession.setGlobal("sysdeptmemberservice", sysdeptmemberservice);
kieSession.setGlobal("iBzSysSysemployeeDefaultService", iBzSysDefaultService); kieSession.setGlobal("iBzSysSysemployeeDefaultService", iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.util.security.AuthenticationUser.getAuthenticationUser()); kieSession.setGlobal("curuser", cn.ibizlab.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.core.ou.service.logic.sysemployeesavedeptmember"); kieSession.startProcess("cn.ibizlab.core.ou.service.logic.sysemployeesavedeptmember");
}catch(Exception e) { } catch (Exception e) {
throw new RuntimeException("执行[保存人事关系]处理逻辑发生异常"+e); throw new RuntimeException("执行[保存人事关系]处理逻辑发生异常" + e);
}finally { } finally {
if(kieSession!=null) { if(kieSession != null) {
kieSession.destroy(); kieSession.destroy();
} }
} }
} }
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--输出实体[SYS_DEPT]数据结构 --> <!--输出实体[SYS_DEPT]数据结构 -->
<changeSet author="root" id="tab-sys_dept-58-1"> <changeSet author="a_A_5d9d78509" id="tab-sys_dept-58-1">
<createTable tableName="IBZDEPT"> <createTable tableName="IBZDEPT">
<column name="DEPTID" remarks="" type="VARCHAR(100)"> <column name="DEPTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_DEPT_DEPTID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_DEPT_DEPTID"/>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<!--输出实体[SYS_DEPTMEMBER]数据结构 --> <!--输出实体[SYS_DEPTMEMBER]数据结构 -->
<changeSet author="root" id="tab-sys_deptmember-27-2"> <changeSet author="a_A_5d9d78509" id="tab-sys_deptmember-27-2">
<createTable tableName="IBZDEPTMEMBER"> <createTable tableName="IBZDEPTMEMBER">
<column name="MEMBERID" remarks="" type="VARCHAR(100)"> <column name="MEMBERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_DEPTMEMBER_MEMBERID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_DEPTMEMBER_MEMBERID"/>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<!--输出实体[SYS_EMP]数据结构 --> <!--输出实体[SYS_EMP]数据结构 -->
<changeSet author="root" id="tab-sys_emp-75-3"> <changeSet author="a_A_5d9d78509" id="tab-sys_emp-75-3">
<createTable tableName="IBZEMP"> <createTable tableName="IBZEMP">
<column name="USERID" remarks="" type="VARCHAR(100)"> <column name="USERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_EMP_USERID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_EMP_USERID"/>
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<!--输出实体[SYS_ORG]数据结构 --> <!--输出实体[SYS_ORG]数据结构 -->
<changeSet author="root" id="tab-sys_org-33-4"> <changeSet author="a_A_5d9d78509" id="tab-sys_org-33-4">
<createTable tableName="IBZORG"> <createTable tableName="IBZORG">
<column name="ORGID" remarks="" type="VARCHAR(100)"> <column name="ORGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ORG_ORGID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_ORG_ORGID"/>
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
<!--输出实体[SYS_POST]数据结构 --> <!--输出实体[SYS_POST]数据结构 -->
<changeSet author="root" id="tab-sys_post-21-5"> <changeSet author="a_A_5d9d78509" id="tab-sys_post-21-5">
<createTable tableName="IBZPOST"> <createTable tableName="IBZPOST">
<column name="POSTID" remarks="" type="VARCHAR(100)"> <column name="POSTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_POST_POSTID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_POST_POSTID"/>
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
<!--输出实体[SYS_TEAM]数据结构 --> <!--输出实体[SYS_TEAM]数据结构 -->
<changeSet author="root" id="tab-sys_team-21-6"> <changeSet author="a_A_5d9d78509" id="tab-sys_team-21-6">
<createTable tableName="IBZTEAM"> <createTable tableName="IBZTEAM">
<column name="TEAMID" remarks="" type="VARCHAR(100)"> <column name="TEAMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_TEAM_TEAMID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_TEAM_TEAMID"/>
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
<!--输出实体[SYS_TEAMMEMBER]数据结构 --> <!--输出实体[SYS_TEAMMEMBER]数据结构 -->
<changeSet author="root" id="tab-sys_teammember-27-7"> <changeSet author="a_A_5d9d78509" id="tab-sys_teammember-27-7">
<createTable tableName="IBZTEAMMEMBER"> <createTable tableName="IBZTEAMMEMBER">
<column name="TEAMMEMBERID" remarks="" type="VARCHAR(100)"> <column name="TEAMMEMBERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_TEAMMEMBER_TEAMMEMBERID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_TEAMMEMBER_TEAMMEMBERID"/>
...@@ -221,46 +221,46 @@ ...@@ -221,46 +221,46 @@
</changeSet> </changeSet>
<!--输出实体[SYS_DEPT]外键关系 --> <!--输出实体[SYS_DEPT]外键关系 -->
<changeSet author="root" id="fk-sys_dept-58-8"> <changeSet author="a_A_5d9d78509" id="fk-sys_dept-58-8">
<addForeignKeyConstraint baseColumnNames="PDEPTID" baseTableName="IBZDEPT" constraintName="DER1N_SYS_DEPT_SYS_DEPT_PDEPTI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/> <addForeignKeyConstraint baseColumnNames="PDEPTID" baseTableName="IBZDEPT" constraintName="DER1N_SYS_DEPT_SYS_DEPT_PDEPTI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="root" id="fk-sys_dept-58-9"> <changeSet author="a_A_5d9d78509" id="fk-sys_dept-58-9">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZDEPT" constraintName="DER1N_SYS_DEPT_SYS_ORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZDEPT" constraintName="DER1N_SYS_DEPT_SYS_ORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[SYS_DEPTMEMBER]外键关系 --> <!--输出实体[SYS_DEPTMEMBER]外键关系 -->
<changeSet author="root" id="fk-sys_deptmember-27-10"> <changeSet author="a_A_5d9d78509" id="fk-sys_deptmember-27-10">
<addForeignKeyConstraint baseColumnNames="DEPTID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_SYS_DEPTMEMBER_SYS_DEPT_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/> <addForeignKeyConstraint baseColumnNames="DEPTID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_SYS_DEPTMEMBER_SYS_DEPT_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="root" id="fk-sys_deptmember-27-11"> <changeSet author="a_A_5d9d78509" id="fk-sys_deptmember-27-11">
<addForeignKeyConstraint baseColumnNames="USERID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_SYS_DEPTMEMBER_SYS_EMP_U" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZEMP" validate="true"/> <addForeignKeyConstraint baseColumnNames="USERID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_SYS_DEPTMEMBER_SYS_EMP_U" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZEMP" validate="true"/>
</changeSet> </changeSet>
<changeSet author="root" id="fk-sys_deptmember-27-12"> <changeSet author="a_A_5d9d78509" id="fk-sys_deptmember-27-12">
<addForeignKeyConstraint baseColumnNames="POSTID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_SYS_DEPTMEMBER_SYS_POST_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="POSTID" referencedTableName="IBZPOST" validate="true"/> <addForeignKeyConstraint baseColumnNames="POSTID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_SYS_DEPTMEMBER_SYS_POST_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="POSTID" referencedTableName="IBZPOST" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[SYS_EMP]外键关系 --> <!--输出实体[SYS_EMP]外键关系 -->
<changeSet author="root" id="fk-sys_emp-75-13"> <changeSet author="a_A_5d9d78509" id="fk-sys_emp-75-13">
<addForeignKeyConstraint baseColumnNames="MDEPTID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_DEPT_MDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/> <addForeignKeyConstraint baseColumnNames="MDEPTID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_DEPT_MDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="root" id="fk-sys_emp-75-14"> <changeSet author="a_A_5d9d78509" id="fk-sys_emp-75-14">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_ORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_ORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet> </changeSet>
<changeSet author="root" id="fk-sys_emp-75-15"> <changeSet author="a_A_5d9d78509" id="fk-sys_emp-75-15">
<addForeignKeyConstraint baseColumnNames="POSTID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_POST_POSTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="POSTID" referencedTableName="IBZPOST" validate="true"/> <addForeignKeyConstraint baseColumnNames="POSTID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_POST_POSTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="POSTID" referencedTableName="IBZPOST" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[SYS_ORG]外键关系 --> <!--输出实体[SYS_ORG]外键关系 -->
<changeSet author="root" id="fk-sys_org-33-16"> <changeSet author="a_A_5d9d78509" id="fk-sys_org-33-16">
<addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_SYS_ORG_SYS_ORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_SYS_ORG_SYS_ORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[SYS_POST]外键关系 --> <!--输出实体[SYS_POST]外键关系 -->
<!--输出实体[SYS_TEAM]外键关系 --> <!--输出实体[SYS_TEAM]外键关系 -->
<!--输出实体[SYS_TEAMMEMBER]外键关系 --> <!--输出实体[SYS_TEAMMEMBER]外键关系 -->
<changeSet author="root" id="fk-sys_teammember-27-17"> <changeSet author="a_A_5d9d78509" id="fk-sys_teammember-27-17">
<addForeignKeyConstraint baseColumnNames="USERID" baseTableName="IBZTEAMMEMBER" constraintName="DER1N_SYS_TEAMMEMBER_SYS_EMP_U" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZEMP" validate="true"/> <addForeignKeyConstraint baseColumnNames="USERID" baseTableName="IBZTEAMMEMBER" constraintName="DER1N_SYS_TEAMMEMBER_SYS_EMP_U" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZEMP" validate="true"/>
</changeSet> </changeSet>
<changeSet author="root" id="fk-sys_teammember-27-18"> <changeSet author="a_A_5d9d78509" id="fk-sys_teammember-27-18">
<addForeignKeyConstraint baseColumnNames="POSTID" baseTableName="IBZTEAMMEMBER" constraintName="DER1N_SYS_TEAMMEMBER_SYS_POST_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="POSTID" referencedTableName="IBZPOST" validate="true"/> <addForeignKeyConstraint baseColumnNames="POSTID" baseTableName="IBZTEAMMEMBER" constraintName="DER1N_SYS_TEAMMEMBER_SYS_POST_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="POSTID" referencedTableName="IBZPOST" validate="true"/>
</changeSet> </changeSet>
<changeSet author="root" id="fk-sys_teammember-27-19"> <changeSet author="a_A_5d9d78509" id="fk-sys_teammember-27-19">
<addForeignKeyConstraint baseColumnNames="TEAMID" baseTableName="IBZTEAMMEMBER" constraintName="DER1N_SYS_TEAMMEMBER_SYS_TEAM_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TEAMID" referencedTableName="IBZTEAM" validate="true"/> <addForeignKeyConstraint baseColumnNames="TEAMID" baseTableName="IBZTEAMMEMBER" constraintName="DER1N_SYS_TEAMMEMBER_SYS_TEAM_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TEAMID" referencedTableName="IBZTEAM" validate="true"/>
</changeSet> </changeSet>
......
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_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,23 @@ services: ...@@ -3,9 +3,23 @@ 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.100.243: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&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- NACOS=172.16.100.243:8848
- SPRING_CLOUD_NACOS_DISCOVERY_GROUP=ibizdev
deploy: deploy:
resources: resources:
limits: limits:
......
...@@ -19,7 +19,7 @@ import org.springframework.context.annotation.Import; ...@@ -19,7 +19,7 @@ import org.springframework.context.annotation.Import;
@ConditionalOnClass(apiRestConfiguration.class) @ConditionalOnClass(apiRestConfiguration.class)
@ConditionalOnWebApplication @ConditionalOnWebApplication
@EnableConfigurationProperties(apiServiceProperties.class) @EnableConfigurationProperties(apiServiceProperties.class)
public class apiAutoConfiguration implements ApplicationContextAware{ public class apiAutoConfiguration implements ApplicationContextAware {
protected ApplicationContext applicationContext; protected ApplicationContext applicationContext;
......
...@@ -15,12 +15,12 @@ public interface AuthenticationUserService extends UserDetailsService { ...@@ -15,12 +15,12 @@ public interface AuthenticationUserService extends UserDetailsService {
@Override @Override
@Cacheable( value="ibzuaa_users",key = "'getByUsername:'+#p0") @Cacheable( value="ibzuaa_users", key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByUsername(String username); AuthenticationUser loadUserByUsername(String username);
@Cacheable( value="ibzuaa_users",key = "'getByUsername:'+#p0") @Cacheable( value="ibzuaa_users", key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByLogin(String username,String password); AuthenticationUser loadUserByLogin(String username,String password);
@CacheEvict( value="ibzuaa_users",key = "'getByUsername:'+#p0") @CacheEvict( value="ibzuaa_users", key = "'getByUsername:'+#p0")
void resetByUsername(String username); void resetByUsername(String username);
} }
...@@ -26,39 +26,39 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im ...@@ -26,39 +26,39 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@Value("${ibiz.admin.userid:0100}") @Value("${ibiz.admin.userid:0100}")
private String adminuserid; private String adminuserid;
@Cacheable( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2") @Cacheable(value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public JSONObject getConfig(String cfgType,String targetType,String userId) public JSONObject getConfig(String cfgType,String targetType,String userId)
{ {
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){ if(StringUtils.isEmpty(userId) || StringUtils.isEmpty(cfgType) || StringUtils.isEmpty(targetType)) {
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",cfgType); throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",cfgType);
} }
IBZConfig config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()),false); IBZConfig config = this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()), false);
if(config==null) { if(config == null) {
config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(adminuserid).build()),false); config = this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(adminuserid).build()), false);
if(config==null) { if(config == null) {
return new JSONObject(); return new JSONObject();
} }
} }
return JSON.parseObject(config.getCfg()); return JSON.parseObject(config.getCfg());
} }
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2") @CacheEvict(value="ibzrt_configs", key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public boolean saveConfig(String cfgType,String targetType,String userId,JSONObject config) public boolean saveConfig(String cfgType, String targetType, String userId, JSONObject config)
{ {
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){ if(StringUtils.isEmpty(userId) || StringUtils.isEmpty(cfgType) || StringUtils.isEmpty(targetType)) {
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",cfgType); throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",cfgType);
} }
String cfg="{}"; String cfg = "{}";
if(config!=null){ if(config != null) {
cfg=JSONObject.toJSONString(config); cfg = JSONObject.toJSONString(config);
} }
return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build()); return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build());
} }
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2") @CacheEvict(value = "ibzrt_configs", key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public void resetConfig(String cfgType,String targetType,String userId) public void resetConfig(String cfgType, String targetType, String userId)
{ {
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){ if(StringUtils.isEmpty(userId) || StringUtils.isEmpty(cfgType) || StringUtils.isEmpty(targetType)) {
throw new BadRequestAlertException("重置配置失败,参数缺失","IBZConfig",cfgType); throw new BadRequestAlertException("重置配置失败,参数缺失","IBZConfig",cfgType);
} }
this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build())); this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()));
......
...@@ -11,9 +11,9 @@ import java.util.Map; ...@@ -11,9 +11,9 @@ import java.util.Map;
*/ */
public interface IBZDataAuditService { public interface IBZDataAuditService {
@Async("asyncExecutor") @Async("asyncExecutor")
void createAudit(HttpServletRequest request,EntityBase entity,Object idValue,Map<String, Audit> auditFields); void createAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields);
@Async("asyncExecutor") @Async("asyncExecutor")
void updateAudit(HttpServletRequest request, EntityBase beforeEntity, Object serviceObj, Object idValue, Map<String, Audit> auditFields); void updateAudit(HttpServletRequest request, EntityBase beforeEntity, Object serviceObj, Object idValue, Map<String, Audit> auditFields);
@Async("asyncExecutor") @Async("asyncExecutor")
void removeAudit(HttpServletRequest request,EntityBase entity,Object idValue,Map<String, Audit> auditFields); void removeAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields);
} }
\ No newline at end of file
...@@ -26,8 +26,8 @@ public class IBZUAAUserService implements AuthenticationUserService{ ...@@ -26,8 +26,8 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override @Override
public AuthenticationUser loadUserByUsername(String username) { public AuthenticationUser loadUserByUsername(String username) {
AuthenticationUser user=uaaFeignClient.loginByUsername(username); AuthenticationUser user = uaaFeignClient.loginByUsername(username);
if(user==null){ if(user == null) {
throw new BadRequestAlertException("登录失败","IBZUAAUser",username); throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
} }
return user; return user;
...@@ -35,9 +35,9 @@ public class IBZUAAUserService implements AuthenticationUserService{ ...@@ -35,9 +35,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override @Override
public AuthenticationUser loadUserByLogin(String username, String password) { public AuthenticationUser loadUserByLogin(String username, String password) {
String[] data=username.split("[|]"); String[] data = username.split("[|]");
String loginname=username; String loginname = username;
String domains=""; String domains = "";
if(data.length==2) { if(data.length==2) {
loginname=data[0].trim(); loginname=data[0].trim();
...@@ -47,9 +47,9 @@ public class IBZUAAUserService implements AuthenticationUserService{ ...@@ -47,9 +47,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
logininfo.setDomain(domains); logininfo.setDomain(domains);
logininfo.setLoginname(loginname); logininfo.setLoginname(loginname);
logininfo.setPassword(password); logininfo.setPassword(password);
AuthenticationUser user=uaaFeignClient.login(logininfo); AuthenticationUser user = uaaFeignClient.login(logininfo);
if(user==null){ if(user == null){
throw new BadRequestAlertException("登录失败","IBZUAAUser",username); throw new BadRequestAlertException("登录失败","IBZUAAUser", username);
} }
return user; return user;
} }
......
...@@ -28,22 +28,23 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl ...@@ -28,22 +28,23 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
@Override @Override
public AuthenticationUser loadUserByUsername(String username) { public AuthenticationUser loadUserByUsername(String username) {
if(StringUtils.isEmpty(username)) if(StringUtils.isEmpty(username)) {
throw new UsernameNotFoundException("用户名为空"); throw new UsernameNotFoundException("用户名为空");
QueryWrapper<IBZUSER> conds=new QueryWrapper<IBZUSER>();
String[] data=username.split("[|]");
String loginname="";
String domains="";
if(data.length>0){
loginname=data[0].trim();
} }
if(data.length>1){ QueryWrapper<IBZUSER> conds = new QueryWrapper<IBZUSER>();
domains=data[1].trim(); String[] data = username.split("[|]");
String loginname = "";
String domains = "";
if(data.length>0) {
loginname = data[0].trim();
} }
if(!StringUtils.isEmpty(loginname)){ if(data.length>1) {
domains = data[1].trim();
}
if(!StringUtils.isEmpty(loginname)) {
conds.eq("loginname",loginname); conds.eq("loginname",loginname);
} }
if(!StringUtils.isEmpty(domains)){ if(!StringUtils.isEmpty(domains)) {
conds.eq("domains",domains); conds.eq("domains",domains);
} }
IBZUSER user = this.getOne(conds); IBZUSER user = this.getOne(conds);
...@@ -59,13 +60,13 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl ...@@ -59,13 +60,13 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
@Override @Override
public AuthenticationUser loadUserByLogin(String username, String password){ public AuthenticationUser loadUserByLogin(String username, String password){
AuthenticationUser authuserdetail = loadUserByUsername(username); AuthenticationUser authuserdetail = loadUserByUsername(username);
if(pwencrymode==1){ if(pwencrymode == 1){
password = DigestUtils.md5DigestAsHex(password.getBytes()); password = DigestUtils.md5DigestAsHex(password.getBytes());
} }
else if(pwencrymode==2){ else if(pwencrymode == 2){
password = DigestUtils.md5DigestAsHex(String.format("%1$s||%2$s", username, password).getBytes()); password = DigestUtils.md5DigestAsHex(String.format("%1$s||%2$s", username, password).getBytes());
} }
if(!authuserdetail.getPassword().equals( password )){ if(!authuserdetail.getPassword().equals(password)) {
throw new BadRequestAlertException("用户名密码错误","IBZUSER",username); throw new BadRequestAlertException("用户名密码错误","IBZUSER",username);
} }
return authuserdetail; return authuserdetail;
...@@ -79,7 +80,7 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl ...@@ -79,7 +80,7 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
public AuthenticationUser createUserDetails(IBZUSER user) { public AuthenticationUser createUserDetails(IBZUSER user) {
AuthenticationUser userdatail = new AuthenticationUser(); AuthenticationUser userdatail = new AuthenticationUser();
CachedBeanCopier.copy(user,userdatail); CachedBeanCopier.copy(user,userdatail);
if(userdatail.getSuperuser()==1){ if(userdatail.getSuperuser() == 1){
userdatail.setAuthorities(AuthorityUtils.createAuthorityList("ROLE_SUPERADMIN")); userdatail.setAuthorities(AuthorityUtils.createAuthorityList("ROLE_SUPERADMIN"));
} }
return userdatail; return userdatail;
......
...@@ -49,19 +49,19 @@ public class RemoteService { ...@@ -49,19 +49,19 @@ public class RemoteService {
*/ */
public interface RemoteFeignClient { public interface RemoteFeignClient {
@RequestMapping(method = RequestMethod.POST, value = "/{path}") @RequestMapping(method = RequestMethod.POST, value = "/{path}")
JSONObject post( @PathVariable("path") String path, @RequestHeader("Authorization") String token,@RequestBody Map param); JSONObject post( @PathVariable("path") String path, @RequestHeader("Authorization") String token, @RequestBody Map param);
@RequestMapping(method = RequestMethod.GET, value = "/{path}") @RequestMapping(method = RequestMethod.GET, value = "/{path}")
JSONObject request( @PathVariable("path") String path, @RequestHeader("Authorization") String token,Map param); JSONObject request( @PathVariable("path") String path, @RequestHeader("Authorization") String token, Map param);
@RequestMapping(method = RequestMethod.GET, value = "/{path}") @RequestMapping(method = RequestMethod.GET, value = "/{path}")
JSONObject get( @PathVariable("path") String path, @RequestHeader("Authorization") String token); JSONObject get( @PathVariable("path") String path, @RequestHeader("Authorization") String token);
@RequestMapping(method = RequestMethod.PUT, value = "/{path}") @RequestMapping(method = RequestMethod.PUT, value = "/{path}")
JSONObject put( @PathVariable("path") String path, @RequestHeader("Authorization") String token,@RequestBody Map param); JSONObject put( @PathVariable("path") String path, @RequestHeader("Authorization") String token,@RequestBody Map param);
@RequestMapping(method = RequestMethod.DELETE, value = "/{path}") @RequestMapping(method = RequestMethod.DELETE, value = "/{path}")
JSONObject delete( @PathVariable("path") String path, @RequestHeader("Authorization") String token); JSONObject delete(@PathVariable("path") String path, @RequestHeader("Authorization") String token);
} }
/** /**
...@@ -115,6 +115,4 @@ public class RemoteService { ...@@ -115,6 +115,4 @@ public class RemoteService {
final HttpMessageConverters httpMessageConverters = new HttpMessageConverters(jsonConverter); final HttpMessageConverters httpMessageConverters = new HttpMessageConverters(jsonConverter);
return () -> httpMessageConverters; return () -> httpMessageConverters;
} }
} }
\ No newline at end of file
...@@ -68,7 +68,7 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -68,7 +68,7 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
public void createAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields) { public void createAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields) {
IBZDataAudit dataAudit = new IBZDataAudit(); IBZDataAudit dataAudit = new IBZDataAudit();
dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid()); dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid());
dataAudit.setOppersonname(String.format("%s[%s]",AuthenticationUser.getAuthenticationUser().getPersonname(),AuthenticationUser.getAuthenticationUser().getOrgname())); dataAudit.setOppersonname(String.format("%s[%s]", AuthenticationUser.getAuthenticationUser().getPersonname(), AuthenticationUser.getAuthenticationUser().getOrgname()));
dataAudit.setAudittype("CREATE"); dataAudit.setAudittype("CREATE");
dataAudit.setAuditobject(entity.getClass().getSimpleName()); dataAudit.setAuditobject(entity.getClass().getSimpleName());
dataAudit.setAuditobjectdata(idValue); dataAudit.setAuditobjectdata(idValue);
......
...@@ -27,7 +27,7 @@ public class SimpleFileService implements FileService { ...@@ -27,7 +27,7 @@ public class SimpleFileService implements FileService {
// 获取文件名 // 获取文件名
String fileName = multipartFile.getOriginalFilename(); String fileName = multipartFile.getOriginalFilename();
// 获取文件后缀 // 获取文件后缀
String extname ="."+getExtensionName(fileName); String extname = "."+getExtensionName(fileName);
try { try {
String fileid = DigestUtils.md5DigestAsHex(multipartFile.getInputStream()); String fileid = DigestUtils.md5DigestAsHex(multipartFile.getInputStream());
String fileFullPath = this.fileRoot+"ibizutil"+File.separator+fileid+File.separator+fileName; String fileFullPath = this.fileRoot+"ibizutil"+File.separator+fileid+File.separator+fileName;
......
...@@ -31,14 +31,14 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod ...@@ -31,14 +31,14 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception {
Map<String, String[]> params = webRequest.getParameterMap(); Map<String, String[]> params = webRequest.getParameterMap();
LinkedHashMap<String,Object> set=new LinkedHashMap<>(); LinkedHashMap<String,Object> set = new LinkedHashMap<>();
for (String key : params.keySet()) { for (String key : params.keySet()) {
set.put(key,params.get(key)[0]); set.put(key,params.get(key)[0]);
} }
if((!set.containsKey("size")) ){ if((!set.containsKey("size")) ){
set.put("size",pageLimit); set.put("size", pageLimit);
} }
String json=objectMapper.writeValueAsString(set); String json = objectMapper.writeValueAsString(set);
return objectMapper.readValue(json,parameter.getParameterType()); return objectMapper.readValue(json, parameter.getParameterType());
} }
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册