1
jyy
2021-07-11 2957623eed5fabb83b8f64dc106ec9b6d129c09d
1
3 files added
2 files deleted
6 files modified
515 ■■■■■ changed files
zq-erp/pom.xml 121 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/core/tools/MatrixFileAppender.java 8 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/core/tools/MdcUtil.java 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/core/tools/PropertiesUtil.java 39 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java 18 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/application-dev.yml 25 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/application.yml 104 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/banner.txt 5 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/application.properties 82 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/system.properties 107 ●●●●● patch | view | raw | blame | history
zq-erp/pom.xml
@@ -24,54 +24,6 @@
        <java.version>1.8</java.version>
    </properties>
    <profiles>
        <profile>
            <id>dev</id>
            <properties>
                <env>dev</env>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>test</id>
            <properties>
                <env>test</env>
            </properties>
        </profile>
        <profile>
            <id>prd</id>
            <properties>
                <env>prd</env>
            </properties>
        </profile>
        <profile>
            <id>mdPrd</id>
            <properties>
                <env>mdPrd</env>
            </properties>
        </profile>
        <profile>
            <id>xcx</id>
            <properties>
                <env>xcx</env>
            </properties>
        </profile>
        <profile>
            <id>lhx</id>
            <properties>
                <env>lhx</env>
            </properties>
        </profile>
        <profile>
            <id>xcshop</id>
            <properties>
                <env>xcshop</env>
            </properties>
        </profile>
    </profiles>
    <dependencies>
        <!--        <dependency>-->
@@ -200,11 +152,6 @@
            <artifactId>poi</artifactId>
            <version>3.8</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
@@ -308,13 +255,6 @@
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>RELEASE</version>
            <scope>compile</scope>
        </dependency>
        <!--文件传输-->
        <dependency>
            <groupId>com.jcraft</groupId>
@@ -395,47 +335,22 @@
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>config/dev/*</exclude>
                    <exclude>config/prd/*</exclude>
                    <exclude>config/mdPrd/*</exclude>
                    <exclude>config/test/*</exclude>
                    <exclude>config/xcx/*</exclude>
                    <exclude>config/xcshop/*</exclude>
                    <!---->
                    <exclude>config/config.json</exclude>
                    <exclude>config/application.properties</exclude>
                    <exclude>config/system.properties</exclude>
                    <exclude>**/*.woff</exclude>
                    <exclude>**/*.woff2</exclude>
                    <exclude>**/*.ttf</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.woff</include>
                    <include>**/*.woff2</include>
                    <include>**/*.ttf</include>
                    <include>**/*.xls</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources/config/${env}</directory>
                <targetPath>BOOT-INF/classes/config</targetPath>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <nonFilteredFileExtensions>
                        <nonFilteredFileExtension>woff</nonFilteredFileExtension>
                        <nonFilteredFileExtension>eot</nonFilteredFileExtension>
                        <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
                        <nonFilteredFileExtension>svg</nonFilteredFileExtension>
                        <nonFilteredFileExtension>xls</nonFilteredFileExtension>
                        <nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
                    </nonFilteredFileExtensions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
@@ -466,12 +381,8 @@
                </configuration>
            </plugin>
            <!-- 热部署插件 -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java
@@ -11,7 +11,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@@ -21,7 +20,6 @@
 * @date 2019-06-14 15:50
 */
@Configuration()
@PropertySource("classpath:config/system.properties")
public class MvcCoreConfig implements WebMvcConfigurer {
    @Autowired
zq-erp/src/main/java/com/matrix/core/tools/MatrixFileAppender.java
@@ -1,6 +1,8 @@
package com.matrix.core.tools;
import org.apache.log4j.DailyRollingFileAppender;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
 * 日志记录适配器
@@ -9,7 +11,11 @@
 * @email 935090232@qq.com
 * @date 2017年11月27日
 */
@Component
public class MatrixFileAppender extends DailyRollingFileAppender {
    @Value("${log_path}")
    String log_path;
    /**
     * 设置相对服务器的日志路径
@@ -17,6 +23,6 @@
    @Override
    public void setFile(String file) {
        String val = file.trim();
        fileName = PropertiesUtil.getString("log_path") + val;
        fileName = log_path + val;
    }
}
zq-erp/src/main/java/com/matrix/core/tools/MdcUtil.java
@@ -13,12 +13,12 @@
    private static final String TR_KEY = "Tr";
    public static void setRequestId() {
        MDC.clear();
        MDC.remove(TR_KEY);
        MDC.put(TR_KEY, "TR = " + StringUtils.getRandomString(16) + "");
    }
    public static void clearRequestId() {
        MDC.clear();
        MDC.remove(TR_KEY);
    }
    public static String getMdc() {
zq-erp/src/main/java/com/matrix/core/tools/PropertiesUtil.java
@@ -1,50 +1,17 @@
package com.matrix.core.tools;
import java.io.IOException;
import java.util.Properties;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.EncodedResource;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.core.env.Environment;
/**
 * 读取定义的属性文件
 *
 * @author JIANGYOUYAO
 * @email 935090232@qq.com
 * @date 2017年11月28日
 */
public class PropertiesUtil {
    private static final String SYSTEM_PROPERTIES_FILE = "config/core/system.properties";
    private static final String SYSTEM_PROPERTIES_FILE_BOOT = "config/system.properties";
    /**
     * 获取system.properties中定义信息
     *
     * @author JIANGYOUYAO
     * @email 935090232@qq.com
     * @date 2017年11月28日
     * @param key
     * @return
     */
    public static String getString(String key) {
        Properties prop = null;
        try {
            Resource resource = new ClassPathResource(SYSTEM_PROPERTIES_FILE);
            if (!resource.exists()) {
                resource = new ClassPathResource(SYSTEM_PROPERTIES_FILE_BOOT);
            }
            EncodedResource encodedResource = new EncodedResource(resource, "UTF-8");
            prop = PropertiesLoaderUtils.loadProperties(encodedResource);
        } catch (IOException e) {
            LogUtil.error(e.getMessage(), e);
        }
        if (prop != null) {
            return prop.getProperty(key);
        }
        return null;
        Environment environment= WebUtil.getApplicationContext().getBean(Environment.class);
        return environment.getProperty(key);
    }
}
zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java
@@ -1,15 +1,7 @@
package com.matrix.system.common.init;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.servlet.ServletContext;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.tools.LogUtil;
import com.matrix.core.tools.StringUtils;
import com.matrix.system.common.bean.SysCompany;
import com.matrix.system.common.service.SysCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -17,7 +9,11 @@
import org.springframework.stereotype.Controller;
import org.springframework.web.context.ServletContextAware;
import com.matrix.core.constance.MatrixConstance;
import javax.servlet.ServletContext;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
/**
 * 
@@ -47,8 +43,10 @@
     * 是否为debug模式
     */
    @Value("${debug}")
    private String debug;
    @Value("${system_language}")
    private String systemLanguage;
zq-erp/src/main/resources/application-dev.yml
New file
@@ -0,0 +1,25 @@
debug: true
evn: dev
spring:
  datasource:
    url: jdbc:mysql://120.27.238.55:3306/hive_test_meidu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
    username: ct_test
    password: 123456
static_resource_url: http://localhost:1088/
swagger:
  enable: true
useRabbit: false
wx_pay_debug_onoff: false
ali:
  sms:
    accessKeyId: LTAI4FrjY9R9iDfC6YQTHfne
    accessKeySecret: eSvQslpHpDSGlI9Hxm4y5MynNgLbCp
    regionId: cn-hangzhou
    signName: 肽妍
showExcptionUrl: http://test.hive.jyymatrix.cc/showException
log_path: /Users/jiangyouyao/logs/zqerp
zq-erp/src/main/resources/application.yml
New file
@@ -0,0 +1,104 @@
spring:
  application:
    # 应用名称
    name: zqerp
  profiles:
    # 环境配置
    active: dev
  datasource:
    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
    filters: stat,wall,log4j
    initialSize: 3
    maxActive: 20
    maxWait: 60000
    minEvictableIdleTimeMillis: 300000
    minIdle: 3
    testOnBorrow: true
    testOnReturn: true
    testWhileIdle: true
    timeBetweenEvictionRunsMillis: 60000
    type: com.alibaba.druid.pool.DruidDataSource
    validationQuery: SELECT 1 FROM DUAL
  servlet:
    multipart:
      max-file-size: 100MB
      max-request-size: 100MB
  thymeleaf:
    cache: false
    prefix: classpath:/templates/views/
swagger:
  security:
    password: admin
    username: admin
system_language: zh
activities:
  groupBuy:
    limit: 24
cookie_time_out: 36000
default:
  vip:
    photo:
      man: https://filehive2.jyymatrix.cc/uploadeFile/20210125/3642f1d827c44c76832fea106c85e0f89e089c16cbcc4dd0a82bb52b9ac700f4.png
      woman: https://filehive2.jyymatrix.cc/uploadeFile/20210125/db53552e688040afb286686f081e1e68f3fe946f75624598828f01898635152e.png
default_password: 123
error_password_times: 5
file_storage_path: D:\test\
groupBuy:
  pay:
    timeLimit: 30
is_open_exception_report: false
log_clear_day: 5
log_max: 20
login_private_key: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJa8rpRYK1Kn/yqdOrJR87TBuDgK7E57sh6INICYBN8edaoE+dtnvepDgD3S8ajAHuanleeYG+BPB9e0OHTzJ3hu2UfBIPdKFtHIZ8Z9XyVzjtlMuIkfTG643aId+d+PzNDmRyqKN6i2CCjasXxS7spJHcfFXI32Y7bYLqnWvnBVAgMBAAECgYBNzQFGq+NgfDllo1WCaG4jI8GTm3+wWoPq4l5G6S/KgYw1vu+/YOJTIZf1UQVOFitc3a6vpIDu25uup+Rj6IS8B4V8NDfc8P+iMNwdIKqqBj8wHu0/SaxYdW1uqlU5+XkJMxsNMgNRRGPSIQhla5OPHtBzIa7t4lmypETMZtXEmQJBAMsa1OIQzAKU05GweCnNNSoqo/nAQLqp8zfbJypxRx24uaCyS7C+KxN+O4FyaYmM9n0X+cgkr+RYHAIa7mg3gccCQQC9/nJvRBum8+4TINnz6QrvTmTlhi8QKW/CiRYpGgmo5PtQYw4BkRQbYO8ktFDM2yeO75XBv09qnGQaivDCeL0DAkEAisFg8LSy+4x7YcvivAQirxUEg2qRjjTvIZjKEBflkuuRfbRxO2Uf/qg9tPjaGwu/lcScc9yEggaj09hcSbyqHwJAN8QLiqUPCL3oTy0BTBpG316/Nq9f+Ppwl0TtgDroQu6S5VFttwACStb02m0imj5pKgcgibHBeaVVrITDjhEqSQJAaCHD/ytTzgtgLoVVyZZxOB272W7PI3mnzL8qQSldx1/QOBs1NmmEZuo7ELFMrfTmlxa1qR4gsq/ImfIdUdXewQ==
login_public_key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWvK6UWCtSp/8qnTqyUfO0wbg4CuxOe7IeiDSAmATfHnWqBPnbZ73qQ4A90vGowB7mp5XnmBvgTwfXtDh08yd4btlHwSD3ShbRyGfGfV8lc47ZTLiJH0xuuN2iHfnfj8zQ5kcqijeotggo2rF8Uu7KSR3HxVyN9mO22C6p1r5wVQIDAQAB
logistics:
  appKey: f1cf9777-26fb-4e3f-a14d-896075e6384e
  eBusinessID: 1530881
  requestType: 1002
  url: http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx
maxUploadSize: 10485760
mybatis-plus:
  config-location: classpath:mybatis/mybatis-config.xml
  global-config:
    db-config:
      id-type: auto
  mapper-locations: classpath*:mybatis/mapper/**/*.xml
pay_notify_url: https://xcxhive2.jyymatrix.cc/wxCommon/wxpayCallback
platform_app_code: wx_shop
platform_secret_key: b21e309f07964e4fae5b156d74b5d66z
platform_verity_url: http://stg1-xcerp-ca.xc.jyymatrix.cc/platform/getUserInfo
qrcodeBackgroundImgPath: /mnt/xcshop/webresource/static/xcxresource/bj1.png
qrcodeFrontImgPath: /mnt/xcshop/webresource/static/xcxresource/qj2.png
rabbitmq:
  host: 47.111.134.136
  password: hivequeueadmin
  port: 5672
  username: hivequeue
redis:
  database: 2
  hostname: 120.27.238.55
  password: xcong123
  port: 6379
  timeOut: 10000
redis_time_out: 1800000
scheduling:
  enabled: true
sms:
  login_account: M7315130
  login_accountNe: N4617160
  login_password: J7FAoehPkv63e3
  login_passwordNe: rb1cxLitRB83e0
  request_url: http://smssh1.253.com
zq-erp/src/main/resources/banner.txt
New file
@@ -0,0 +1,5 @@
+++++++++++++++++++++++++++++++++ZQERP+++++++++++++++++++++++++++++
+                                                                 +
+                              加油打工人!                          +
+                                                                 +
+++++++++++++++++++++++++++++++++ZQERP+++++++++++++++++++++++++++++
zq-erp/src/main/resources/config/application.properties
File was deleted
zq-erp/src/main/resources/config/system.properties
File was deleted