java110 před 4 roky
rodič
revize
b047995d94

+ 1 - 0
pom.xml

@@ -28,6 +28,7 @@
         <module>service-front</module>
         <module>java110-generator</module>
         <module>service-acct</module>
+        <module>service-oa</module>
 
     </modules>
 

+ 114 - 0
service-oa/pom.xml

@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>MicroCommunity</artifactId>
+        <groupId>com.java110</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>service-oa</artifactId>
+
+    <name>service-oa</name>
+    <!-- FIXME change it to the project's website -->
+    <url>http://www.example.com</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.java110</groupId>
+            <artifactId>java110-service</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-bpmn-layout</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-spring-boot-starter-basic</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-json-converter</artifactId>
+            <version>6.0.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.activiti</groupId>
+                    <artifactId>activiti-bpmn-model</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xmlgraphics</groupId>
+            <artifactId>batik-codec</artifactId>
+            <version>1.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xmlgraphics</groupId>
+            <artifactId>batik-css</artifactId>
+            <version>1.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xmlgraphics</groupId>
+            <artifactId>batik-svg-dom</artifactId>
+            <version>1.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xmlgraphics</groupId>
+            <artifactId>batik-svggen</artifactId>
+            <version>1.7</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <finalName>service-oa</finalName>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.10</version>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>com.java110</groupId>
+                                    <artifactId>java110-interface</artifactId>
+                                    <version>${microcommunity.version}</version>
+                                    <type>jar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <mainClass>com.java110.oa.OaServiceApplicationStart</mainClass>
+                </configuration>
+            </plugin>
+        </plugins>
+
+    </build>
+</project>

+ 106 - 0
service-oa/src/main/java/com/java110/oa/OaServiceApplicationStart.java

@@ -0,0 +1,106 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.oa;
+
+import com.java110.core.annotation.Java110ListenerDiscovery;
+import com.java110.core.client.RestTemplate;
+import com.java110.core.event.service.BusinessServiceDataFlowEventPublishing;
+import com.java110.service.init.ServiceStartInit;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
+import org.springframework.boot.web.client.RestTemplateBuilder;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.client.loadbalancer.LoadBalanced;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.http.converter.StringHttpMessageConverter;
+
+import java.nio.charset.Charset;
+
+
+/**
+ * spring boot 初始化启动类
+ *
+ * @version v0.1
+ * @auther com.java110.wuxw
+ * @mail 928255095@qq.com
+ * @date 2016年8月6日
+ * @tag
+ */
+@SpringBootApplication(scanBasePackages = {
+        "com.java110.service",
+        "com.java110.common",
+        "com.java110.core",
+        "com.java110.config.properties.code",
+        "com.java110.db"},
+        exclude = {LiquibaseAutoConfiguration.class,
+                org.activiti.spring.boot.SecurityAutoConfiguration.class,
+                org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class}
+        )
+@EnableDiscoveryClient
+@Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class,
+        basePackages = {"com.java110.oa.listener"})
+@EnableFeignClients(basePackages = {
+        "com.java110.intf.user",
+        "com.java110.intf.store",
+        "com.java110.intf.fee",
+        "com.java110.intf.community",
+        "com.java110.intf.job",
+        "com.java110.intf.order",
+        "com.java110.intf.report"
+})
+public class OaServiceApplicationStart {
+
+    private static Logger logger = LoggerFactory.getLogger(OaServiceApplicationStart.class);
+
+
+    /**
+     * 实例化RestTemplate,通过@LoadBalanced注解开启均衡负载能力.
+     *
+     * @return restTemplate
+     */
+    @Bean
+    @LoadBalanced
+    public RestTemplate restTemplate() {
+        StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
+        RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(RestTemplate.class);
+        return restTemplate;
+    }
+
+    /**
+     * 实例化RestTemplate
+     *
+     * @return restTemplate
+     */
+    @Bean
+    public RestTemplate outRestTemplate() {
+        StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
+        com.java110.core.client.RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(RestTemplate.class);
+        return restTemplate;
+    }
+
+    public static void main(String[] args) throws Exception {
+        ApplicationContext context = SpringApplication.run(OaServiceApplicationStart.class, args);
+        ServiceStartInit.initSystemConfig(context);
+
+        //初始化 activity 流程
+        //DeploymentActivity.deploymentProcess();
+    }
+}

+ 91 - 0
service-oa/src/main/java/com/java110/oa/activity/ActivitiConfig.java

@@ -0,0 +1,91 @@
+package com.java110.oa.activity;
+
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.RepositoryService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.TaskService;
+import org.activiti.spring.ProcessEngineFactoryBean;
+import org.activiti.spring.SpringProcessEngineConfiguration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.transaction.PlatformTransactionManager;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+
+/**
+ * @ClassName ActivitiConfig
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2019/10/22 21:55
+ * @Version 1.0
+ * add by wuxw 2019/10/22
+ **/
+@Configuration
+public class ActivitiConfig  {
+
+
+    @Autowired
+    private DataSource dataSource;
+
+    @Autowired
+    private PlatformTransactionManager platformTransactionManager;
+
+   /* @Override
+    public void configure(SpringProcessEngineConfiguration springProcessEngineConfiguration) {
+        springProcessEngineConfiguration.setIdGenerator(new ActivityIdGenerator());
+    }*/
+
+
+    @Bean
+    public SpringProcessEngineConfiguration springProcessEngineConfiguration() {
+        SpringProcessEngineConfiguration spec = new SpringProcessEngineConfiguration();
+        spec.setDataSource(dataSource);
+        spec.setTransactionManager(platformTransactionManager);
+        spec.setDatabaseSchemaUpdate("true");
+        spec.setActivityFontName("宋体");
+        spec.setAnnotationFontName("宋体");
+        spec.setLabelFontName("宋体");
+        Resource[] resources = null;
+        // 启动自动部署流程
+        try {
+            resources = new PathMatchingResourcePatternResolver().getResources("classpath*:processes/*.bpmn");
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        spec.setDeploymentResources(resources);
+        return spec;
+    }
+
+    @Bean
+    public ProcessEngineFactoryBean processEngine() {
+        ProcessEngineFactoryBean processEngineFactoryBean = new ProcessEngineFactoryBean();
+        processEngineFactoryBean.setProcessEngineConfiguration(springProcessEngineConfiguration());
+        return processEngineFactoryBean;
+    }
+
+
+    @Bean
+    public RepositoryService repositoryService() throws Exception {
+        return processEngine().getObject().getRepositoryService();
+    }
+
+    @Bean
+    public RuntimeService runtimeService() throws Exception {
+        return processEngine().getObject().getRuntimeService();
+    }
+
+    @Bean
+    public TaskService taskService() throws Exception {
+        return processEngine().getObject().getTaskService();
+    }
+
+    @Bean
+    public HistoryService historyService() throws Exception {
+        return processEngine().getObject().getHistoryService();
+    }
+
+}

+ 31 - 0
service-oa/src/main/java/com/java110/oa/activity/ActivityIdGenerator.java

@@ -0,0 +1,31 @@
+package com.java110.oa.activity;
+
+import org.activiti.engine.impl.cfg.IdGenerator;
+
+import java.util.UUID;
+
+/**
+ * @ClassName ActivityIdGenerator
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2019/10/22 21:56
+ * @Version 1.0
+ * add by wuxw 2019/10/22
+ **/
+public class ActivityIdGenerator implements IdGenerator {
+    /**
+     * 封装JDK自带的UUID, 通过Random数字生成, 中间无-分割.
+     */
+    public static String uuid() {
+        return UUID.randomUUID().toString().replaceAll("-", "");
+    }
+
+    /**
+     * Activiti ID 生成
+     */
+    @Override
+    public String getNextId() {
+        return uuid();
+    }
+
+}

+ 23 - 0
service-oa/src/main/java/com/java110/oa/activity/DeploymentActivity.java

@@ -0,0 +1,23 @@
+package com.java110.oa.activity;
+
+import com.java110.utils.factory.ApplicationContextFactory;
+import org.activiti.engine.ProcessEngine;
+import org.activiti.engine.RepositoryService;
+
+/**
+ * 初始化 activity 流程信息
+ */
+public class DeploymentActivity {
+
+    public static void deploymentProcess() {
+
+        ProcessEngine processEngine = ApplicationContextFactory.getBean("processEngine", ProcessEngine.class);
+
+        RepositoryService repositoryService = processEngine.getRepositoryService();
+        repositoryService.createDeployment()
+                .name("采购申请流程")
+                .addClasspathResource("processes/resourceEntryStore.bpmn").deploy();
+
+
+    }
+}

+ 82 - 0
service-oa/src/main/java/com/java110/oa/dao/IAuditUserServiceDao.java

@@ -0,0 +1,82 @@
+package com.java110.oa.dao;
+
+
+import com.java110.utils.exception.DAOException;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 审核人员组件内部之间使用,没有给外围系统提供服务能力
+ * 审核人员服务接口类,要求全部以字符串传输,方便微服务化
+ * 新建客户,修改客户,删除客户,查询客户等功能
+ *
+ * Created by wuxw on 2016/12/27.
+ */
+public interface IAuditUserServiceDao {
+
+    /**
+     * 保存 审核人员信息
+     * @param businessAuditUserInfo 审核人员信息 封装
+     * @throws DAOException 操作数据库异常
+     */
+    void saveBusinessAuditUserInfo(Map businessAuditUserInfo) throws DAOException;
+
+
+
+    /**
+     * 查询审核人员信息(business过程)
+     * 根据bId 查询审核人员信息
+     * @param info bId 信息
+     * @return 审核人员信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getBusinessAuditUserInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 保存 审核人员信息 Business数据到 Instance中
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void saveAuditUserInfoInstance(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询审核人员信息(instance过程)
+     * 根据bId 查询审核人员信息
+     * @param info bId 信息
+     * @return 审核人员信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getAuditUserInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改审核人员信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updateAuditUserInfoInstance(Map info) throws DAOException;
+
+
+    /**
+     * 查询审核人员总数
+     *
+     * @param info 审核人员信息
+     * @return 审核人员数量
+     */
+    int queryAuditUsersCount(Map info);
+
+    /**
+     * 刷新表 委托人
+     * @param info
+     */
+    void freshActHiTaskInstAssignee(Map info);
+
+}

+ 34 - 0
service-oa/src/main/java/com/java110/oa/package-info.java

@@ -0,0 +1,34 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 公共信息 包
+ * <p>
+ * 包括:
+ * 评价 属性管理 日志记录 设备管理 文档记录 工作流 系统异常 等信息
+ * <p>
+ * api 请写 对外提供接口信息
+ * bmo 业务相关内容
+ * dao 数据库操作相关内容
+ * kafka 为订单调度异步处理
+ * listener 为方式一开发中的 业务处理
+ * smo 内部服务调用接口能力开放
+ * <p>
+ * add by 吴学文 2020-12-23
+ * <p>
+ * 文档参考 : http://www.homecommunity.cn/
+ */
+package com.java110.oa;

+ 17 - 0
service-oa/src/main/java/com/java110/oa/smo/IOaServiceSMO.java

@@ -0,0 +1,17 @@
+package com.java110.oa.smo;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.context.BusinessServiceDataFlow;
+import com.java110.utils.exception.SMOException;
+
+/**
+ *
+ * 用户信息管理,服务
+ * Created by wuxw on 2017/4/5.
+ */
+public interface IOaServiceSMO {
+
+
+    public JSONObject service(BusinessServiceDataFlow businessServiceDataFlow) throws SMOException;
+
+}

+ 112 - 0
service-oa/src/main/java/com/java110/oa/smo/impl/OaServiceSMOImpl.java

@@ -0,0 +1,112 @@
+package com.java110.oa.smo.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.core.context.BusinessServiceDataFlow;
+import com.java110.core.event.service.BusinessServiceDataFlowEventPublishing;
+import com.java110.core.factory.DataFlowFactory;
+import com.java110.entity.center.DataFlowLinksCost;
+import com.java110.entity.center.DataFlowLog;
+import com.java110.oa.smo.IOaServiceSMO;
+import com.java110.utils.cache.MappingCache;
+import com.java110.utils.constant.KafkaConstant;
+import com.java110.utils.constant.MappingConstant;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.SMOException;
+import com.java110.utils.kafka.KafkaFactory;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.DateUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 用户服务信息管理业务信息实现
+ * Created by wuxw on 2017/4/5.
+ */
+@Service("oaServiceSMOImpl")
+@Transactional
+public class OaServiceSMOImpl extends BaseServiceSMO implements IOaServiceSMO {
+
+    private static Logger logger = LoggerFactory.getLogger(OaServiceSMOImpl.class);
+
+    @Override
+    public JSONObject service(BusinessServiceDataFlow businessServiceDataFlow) throws SMOException {
+        try {
+            Assert.hasLength(businessServiceDataFlow.getbId(), "bId 不能为空");
+
+            BusinessServiceDataFlowEventPublishing.multicastEvent(businessServiceDataFlow);
+            Assert.notEmpty(businessServiceDataFlow.getResJson(), "oa服务[" + businessServiceDataFlow.getCurrentBusiness().getServiceCode() + "]没有返回内容");
+        } catch (Exception e) {
+            logger.error("oa服务处理异常", e);
+            throw new SMOException(ResponseConstant.RESULT_PARAM_ERROR, "oa服务处理异常" + e.getMessage());
+        } finally {
+            if (businessServiceDataFlow == null) {
+                return null;
+            }
+
+            //这里记录日志
+            Date endDate = DateUtil.getCurrentDate();
+
+            businessServiceDataFlow.setEndDate(endDate);
+            //添加耗时
+            DataFlowFactory.addCostTime(businessServiceDataFlow, "service", "业务处理总耗时",
+                    businessServiceDataFlow.getStartDate(), businessServiceDataFlow.getEndDate());
+            //保存耗时
+            saveCostTimeLogMessage(businessServiceDataFlow);
+            //保存日志
+            saveLogMessage(businessServiceDataFlow);
+        }
+        return businessServiceDataFlow.getResJson();
+    }
+
+    /**
+     * 保存日志信息
+     *
+     * @param businessServiceDataFlow
+     */
+    private void saveLogMessage(BusinessServiceDataFlow businessServiceDataFlow) {
+
+        try {
+            if (MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_LOG_ON_OFF))) {
+                for (DataFlowLog dataFlowLog : businessServiceDataFlow.getLogDatas()) {
+                    KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_LOG_NAME, "", JSONObject.toJSONString(dataFlowLog));
+                }
+            }
+        } catch (Exception e) {
+            logger.error("报错日志出错了,", e);
+        }
+    }
+
+    /**
+     * 保存耗时信息
+     *
+     * @param businessServiceDataFlow
+     */
+    private void saveCostTimeLogMessage(BusinessServiceDataFlow businessServiceDataFlow) {
+        try {
+            if (MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_COST_TIME_ON_OFF))) {
+                List<DataFlowLinksCost> dataFlowLinksCosts = businessServiceDataFlow.getLinksCostDates();
+                JSONObject costDate = new JSONObject();
+                JSONArray costDates = new JSONArray();
+                JSONObject newObj = null;
+                for (DataFlowLinksCost dataFlowLinksCost : dataFlowLinksCosts) {
+                    newObj = JSONObject.parseObject(JSONObject.toJSONString(dataFlowLinksCost));
+                    newObj.put("dataFlowId", businessServiceDataFlow.getDataFlowId());
+                    newObj.put("transactionId", businessServiceDataFlow.getTransactionId());
+                    costDates.add(newObj);
+                }
+                costDate.put("costDates", costDates);
+
+                KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_COST_TIME_LOG_NAME, "", costDate.toJSONString());
+            }
+        } catch (Exception e) {
+            logger.error("报错日志出错了,", e);
+        }
+    }
+}

+ 88 - 0
service-oa/src/main/resources/application-dev.yml

@@ -0,0 +1,88 @@
+jedis:
+  pool:
+    config:
+      maxTotal: 100
+      maxIdle: 20
+      maxWaitMillis: 20000
+    host: dev.redis.java110.com
+    port: 6379
+    timeout: 3000
+    password: hc
+
+eureka:
+  instance:
+    leaseRenewalIntervalInSeconds: 10
+    leaseExpirationDurationInSeconds: 30
+    preferIpAddress: true
+    instanceId: ${spring.cloud.client.ip-address}:${server.port}
+  client:
+    serviceUrl:
+      defaultZone: http://dev.java110.com:8761/eureka/
+      #defaultZone: http://localhost:8761/eureka/
+server:
+  port: 8011
+  tomcat:
+    uri-encoding: UTF-8
+
+spring:
+  profiles:
+    active: share
+  http:
+    encoding:
+      charset: UTF-8
+      enabled: true
+      force: true
+  application:
+    name: oa-service
+  redis:
+    database: 0
+    host: dev.redis.java110.com
+    port: 6379
+    password: hc
+    pool:
+      max-active: 300
+      max-wait: 10000
+      max-idle: 100
+      min-idle: 0
+      timeout: 0
+  activiti:
+    database-schema-update: false
+
+feign:
+  client:
+    config:
+      default:
+        connect-timeout: 10000
+        read-timeout: 10000
+
+#============== kafka ===================
+kafka:
+  consumer:
+    zookeeper:
+      connect: dev.zk.java110.com:2181
+    servers: dev.kafka.java110.com:9092
+    enable:
+      auto:
+        commit: true
+    session:
+      timeout: 6000
+    auto:
+      commit:
+        interval: 100
+      offset:
+        reset: latest
+    topic: test
+    group:
+      id: oaBusinessStatus
+    concurrency: 10
+
+  producer:
+    zookeeper:
+      connect: dev.zk.java110.com:2181
+    servers: dev.kafka.java110.com:9092
+    retries: 0
+    batch:
+      size: 4096
+    linger: 1
+    buffer:
+      memory: 40960

+ 3 - 0
service-oa/src/main/resources/application.yml

@@ -0,0 +1,3 @@
+spring:
+  profiles:
+    active: dev

+ 15 - 0
service-oa/src/main/resources/banner.txt

@@ -0,0 +1,15 @@
+${AnsiColor.BRIGHT_RED}
+     __                    ____ ___________
+    |__|____ ___  _______ /_   /_   \   _  \
+    |  \__  \\  \/ /\__  \ |   ||   /  /_\  \
+    |  |/ __ \\   /  / __ \|   ||   \  \_/   \
+/\__|  (____  /\_/  (____  /___||___|\_____  /
+\______|    \/           \/                \/
+ ____ ___                    _________                  .__
+|    |   \______ ___________/   _____/ ______________  _|__| ____  ____
+|    |   /  ___// __ \_  __ \_____  \_/ __ \_  __ \  \/ /  |/ ___\/ __ \
+|    |  /\___ \\  ___/|  | \/        \  ___/|  | \/\   /|  \  \__\  ___/
+|______//____  >\___  >__| /_______  /\___  >__|    \_/ |__|\___  >___  >
+             \/     \/             \/     \/                    \/    \/
+
+ java110 UserService starting, more information scan https://github.com/java110/MicroCommunity

+ 44 - 0
service-oa/src/main/resources/dataSource.yml

@@ -0,0 +1,44 @@
+dataSources:
+  ds0: !!com.alibaba.druid.pool.DruidDataSource
+    driverClassName: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
+    username: hc_community
+    password: hc_community@12345678
+    minIdle: 5
+    validationQuery: SELECT 1 FROM DUAL
+    initialSize: 5
+    maxWait: 60000
+    filters: stat,wall,log4j
+    poolPreparedStatements: true
+  ds1: !!com.alibaba.druid.pool.DruidDataSource
+    driverClassName: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
+    username: TT
+    password: TT@12345678
+    minIdle: 5
+    validationQuery: SELECT 1 FROM DUAL
+    initialSize: 5
+    maxWait: 60000
+    filters: stat,wall,log4j
+    poolPreparedStatements: true
+
+shardingRule:
+  tables:
+    business_xxx:
+      actualDataNodes: ds${0..1}.business_community
+      databaseStrategy:
+        inline:
+          shardingColumn: community_id
+          algorithmExpression: ds${Long.parseLong(community_id) % 2}
+
+  bindingTables:
+    - business_xxx
+
+  defaultDataSourceName: ds1
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+
+props:
+  sql.show: true

+ 14 - 0
service-oa/src/main/resources/java110.properties

@@ -0,0 +1,14 @@
+java110.mappingPath=classpath:mapper/*/*.xml
+
+
+# Single file max size
+java110.ftp.multipart.maxFileSize=100Mb
+# All files max size
+java110.ftp.multipart.maxRequestSize=100Mb
+
+#ftp use
+java110.ftpServer = 121.4.123.73
+java110.ftpPort = 6069
+java110.ftpUserName = hcftp
+java110.ftpUserPassword = 123456
+java110.ftpPath = hc/

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 66 - 0
service-oa/src/main/resources/processes/complaint.bpmn