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

xignzi006 发布系统代码

上级 721260ee
......@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-app-crm.jar
EXPOSE 10324
EXPOSE 8080
ADD businesscentral-app-crm.jar /businesscentral-app-crm.jar
......@@ -3,23 +3,9 @@ services:
businesscentral-app-crm:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-app-crm:latest
ports:
- "10324:10324"
- "8080:8080"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10324
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
deploy:
resources:
limits:
......
......@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-app-website.jar
EXPOSE 10324
EXPOSE 8080
ADD businesscentral-app-website.jar /businesscentral-app-website.jar
......@@ -3,23 +3,9 @@ services:
businesscentral-app-website:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-app-website:latest
ports:
- "10324:10324"
- "8080:8080"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10324
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
deploy:
resources:
limits:
......
package cn.ibizlab.businesscentral.core.base.service.logic;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import cn.ibizlab.businesscentral.core.base.domain.Account;
/**
* 关系型数据实体[Active] 对象
*/
public interface IAccountActiveLogic {
void execute(Account account ) ;
}
package cn.ibizlab.businesscentral.core.base.service.logic;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import cn.ibizlab.businesscentral.core.base.domain.Account;
/**
* 关系型数据实体[Inactive] 对象
*/
public interface IAccountInactiveLogic {
void execute(Account account ) ;
}
package cn.ibizlab.businesscentral.core.base.service.logic.impl;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.KieContainer;
import cn.ibizlab.businesscentral.core.base.service.logic.IAccountActiveLogic;
import cn.ibizlab.businesscentral.core.base.domain.Account;
/**
* 关系型数据实体[Active] 对象
*/
@Slf4j
@Service
public class AccountActiveLogicImpl implements IAccountActiveLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private cn.ibizlab.businesscentral.core.base.service.IAccountService iBzSysDefaultService;
public cn.ibizlab.businesscentral.core.base.service.IAccountService getIBzSysDefaultService() {
return this.iBzSysDefaultService;
}
public void execute(Account et){
KieSession kieSession = null;
try{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("accountactivedefault",et);
kieSession.setGlobal("iBzSysAccountDefaultService",iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.businesscentral.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.businesscentral.core.base.service.logic.accountactive");
}catch(Exception e){
throw new RuntimeException("执行[激活]处理逻辑发生异常"+e);
}finally {
if(kieSession!=null)
kieSession.destroy();
}
}
}
package cn.ibizlab.businesscentral.core.base.service.logic.impl;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.KieContainer;
import cn.ibizlab.businesscentral.core.base.service.logic.IAccountInactiveLogic;
import cn.ibizlab.businesscentral.core.base.domain.Account;
/**
* 关系型数据实体[Inactive] 对象
*/
@Slf4j
@Service
public class AccountInactiveLogicImpl implements IAccountInactiveLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private cn.ibizlab.businesscentral.core.base.service.IAccountService accountservice;
public cn.ibizlab.businesscentral.core.base.service.IAccountService getAccountService() {
return this.accountservice;
}
@Autowired
private cn.ibizlab.businesscentral.core.base.service.IAccountService iBzSysDefaultService;
public cn.ibizlab.businesscentral.core.base.service.IAccountService getIBzSysDefaultService() {
return this.iBzSysDefaultService;
}
public void execute(Account et){
KieSession kieSession = null;
try{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("accountinactivedefault",et);
kieSession.setGlobal("accountservice",accountservice);
kieSession.setGlobal("iBzSysAccountDefaultService",iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.businesscentral.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.businesscentral.core.base.service.logic.accountinactive");
}catch(Exception e){
throw new RuntimeException("执行[停用]处理逻辑发生异常"+e);
}finally {
if(kieSession!=null)
kieSession.destroy();
}
}
}
......@@ -4,7 +4,7 @@
<!--输出实体[ACCOUNT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-account-403-1">
<changeSet author="a_LAB01_e85d8801c" id="tab-account-422-1">
<createTable tableName="ACCOUNT">
<column name="ADDRESS1_PRIMARYCONTACTNAME" remarks="" type="VARCHAR(100)">
</column>
......@@ -10978,31 +10978,31 @@
</changeSet>
<!--输出实体[ACCOUNT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-account-403-132">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-132">
<addForeignKeyConstraint baseColumnNames="PARENTACCOUNTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__ACCOUNT__PARENT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-403-133">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-133">
<addForeignKeyConstraint baseColumnNames="PRIMARYCONTACTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__CONTACT__PRIMAR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONTACTID" referencedTableName="CONTACT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-403-134">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-134">
<addForeignKeyConstraint baseColumnNames="PREFERREDEQUIPMENTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__EQUIPMENT__PREF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EQUIPMENTID" referencedTableName="EQUIPMENT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-403-135">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-135">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__LEAD__ORIGINATI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-403-136">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-136">
<addForeignKeyConstraint baseColumnNames="DEFAULTPRICELEVELID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__PRICELEVEL__DEF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-403-137">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-137">
<addForeignKeyConstraint baseColumnNames="PREFERREDSERVICEID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__SERVICE__PREFER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-403-138">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-138">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-403-139">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-139">
<addForeignKeyConstraint baseColumnNames="TERRITORYID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__TERRITORY__TERR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TERRITORYID" referencedTableName="TERRITORY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-403-140">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-140">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[ACTIVITYMIMEATTACHMENT]外键关系 -->
......
package cn.ibizlab.businesscentral.base.logic.accountlogic.active;
import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.base.domain.Account accountactivedefault;
global cn.ibizlab.businesscentral.core.base.service.IAccountService iBzSysAccountDefaultService;
global cn.ibizlab.businesscentral.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "accountactivebegin"
when
then
end
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:g="http://www.jboss.org/drools/flow/gpd" xmlns:tns="http://www.jboss.org/drools" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.mvel.org/2.0" id="Definition" name="" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">
<process id="cn.ibizlab.businesscentral.core.base.service.logic.accountactive" isClosed="false" isExecutable="true" name="ScoreRule" processType="Private" tns:packageName="cn.ibizlab.businesscentral.core.base.service.logic.accountactive">
<extensionElements>
<tns:import name="java.util.Map" />
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.businesscentral.util.helper.RuleUtils"/>
<tns:global identifier="accountactivedefault" type="cn.ibizlab.businesscentral.core.base.domain.Account" />
</extensionElements>
<startEvent id="BEBE0B69-F45C-4F13-94CF-B99C8EBC1958" isInterrupting="true"/>
<endEvent id="BEBE0B69-F45C-4F13-94CF-B99C8EBC1958_End" name="End"/>
<sequenceFlow id="BEBE0B69-F45C-4F13-94CF-B99C8EBC1958_End_Line" sourceRef="BEBE0B69-F45C-4F13-94CF-B99C8EBC1958" targetRef="BEBE0B69-F45C-4F13-94CF-B99C8EBC1958_End"/>
</process>
</definitions>
package cn.ibizlab.businesscentral.base.logic.accountlogic.inactive;
import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.base.domain.Account accountinactivedefault;
global cn.ibizlab.businesscentral.core.base.service.IAccountService accountservice;
global cn.ibizlab.businesscentral.core.base.service.IAccountService iBzSysAccountDefaultService;
global cn.ibizlab.businesscentral.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "accountinactivebegin"
when
then
end
//逻辑处理节点[准备参数]
rule "prepareparam1"
ruleflow-group "accountinactiveprepareparam1"
when
then
accountinactivedefault.set("statuscode","2");
update(accountinactivedefault);//更新fact中变量值
end
//逻辑处理节点[更新客户状态]
rule "deaction1"
ruleflow-group "accountinactivedeaction1"
when
then
accountservice.update(accountinactivedefault);
update(accountinactivedefault);//更新fact中变量值
end
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:g="http://www.jboss.org/drools/flow/gpd" xmlns:tns="http://www.jboss.org/drools" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.mvel.org/2.0" id="Definition" name="" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">
<process id="cn.ibizlab.businesscentral.core.base.service.logic.accountinactive" isClosed="false" isExecutable="true" name="ScoreRule" processType="Private" tns:packageName="cn.ibizlab.businesscentral.core.base.service.logic.accountinactive">
<extensionElements>
<tns:import name="java.util.Map" />
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.businesscentral.util.helper.RuleUtils"/>
<tns:global identifier="accountinactivedefault" type="cn.ibizlab.businesscentral.core.base.domain.Account" />
</extensionElements>
<startEvent id="63D03E37-0794-4554-BBF9-6C0A60307A78" isInterrupting="true"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="accountinactiveprepareparam1" id="79BFB90E-EBE5-4C91-98CE-F07CE05CADD2" implementation="http://www.jboss.org/drools/rule" name="准备参数"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="accountinactivedeaction1" id="470E9D72-5DAF-42C7-B0BD-0E48BB6D0801" implementation="http://www.jboss.org/drools/rule" name="更新客户状态"/>
<endEvent id="470E9D72-5DAF-42C7-B0BD-0E48BB6D0801_End" name="End"/>
<sequenceFlow id="470E9D72-5DAF-42C7-B0BD-0E48BB6D0801_End_Line" sourceRef="470E9D72-5DAF-42C7-B0BD-0E48BB6D0801" targetRef="470E9D72-5DAF-42C7-B0BD-0E48BB6D0801_End"/>
<sequenceFlow id="B7F973AD-9B45-4B02-96E9-208F1F62BA87" sourceRef="63D03E37-0794-4554-BBF9-6C0A60307A78" targetRef="79BFB90E-EBE5-4C91-98CE-F07CE05CADD2">
</sequenceFlow>
<sequenceFlow id="F5EEBA12-E0B4-4D57-A3FA-C4FE306F24F4" sourceRef="79BFB90E-EBE5-4C91-98CE-F07CE05CADD2" targetRef="470E9D72-5DAF-42C7-B0BD-0E48BB6D0801">
</sequenceFlow>
</process>
</definitions>
......@@ -37,11 +37,6 @@
git clone -b master $para2 ibizbusinesscentral/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizbusinesscentral/
mvn clean package -Pwebsite
cd businesscentral-app/businesscentral-app-website
mvn -Pwebsite docker:build
mvn -Pwebsite docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/businesscentral-app-website.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册