jyy
2021-07-10 47c1501159bfcda84a70bfb2a8ceb286c9b157a7
新增美度正式环境配置
5 files modified
37 ■■■■■ changed files
zq-erp/src/main/java/com/matrix/system/common/dao/SysCompanyDao.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java 25 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/mdprd/application.properties 6 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/prd/application.properties 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/common/SysCompanyDao.xml 3 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/dao/SysCompanyDao.java
@@ -40,4 +40,5 @@
    public SysCompany selectForUpdate(Long comId);
    List<SysCompany> selectAll();
}
zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java
@@ -1,23 +1,19 @@
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 com.matrix.system.common.dao.SysCompanyDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
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;
/**
 * 
@@ -39,7 +35,8 @@
    @Autowired
    private SysCompanyService sysCompanyService;
    private SysCompanyDao sysCompanyDao;
@@ -68,7 +65,7 @@
        // 初始化语言环境
        initLanguage();
        //初始化公司
        initParams();
        //initParams();
        LogUtil.info("\r\n\r\n**********************************************\r\n"
                + "* =========== Matrix启动成功 ===========\r\n" 
                + "* DEBUG模式:" + debug+"*\r\n"
@@ -113,7 +110,7 @@
    public  void initParams() {
        //初始化所有的公司
        List<SysCompany> company=sysCompanyService.findByModel(null);
        List<SysCompany> company=sysCompanyDao.selectAll();
        Map<String, SysCompany> companyMap=new HashMap<>();
        for (SysCompany sysCompany : company) {
            companyMap.put(sysCompany.getComWebUrl(), sysCompany);
zq-erp/src/main/resources/config/mdprd/application.properties
@@ -26,8 +26,9 @@
spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
spring.thymeleaf.prefix: classpath:/templates/views/
spring.thymeleaf.cache=false
mybatis.config-location=classpath:mybatis/mybatis-config.xml
mybatis.mapper-locations=classpath*:mybatis/mapper/*/*.xml
mybatis-plus.global-config.db-config.id-type=auto
mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml
mybatis-plus.mapper-locations=classpath*:mybatis/mapper/**/*.xml
#设置全局时间返回格式 第三行设置为true表示返回时间戳
#spring.jackson.date-format=yyyy-MM-dd
#spring.jackson.time-zone=GMT+8
@@ -68,3 +69,4 @@
#默认头像
default.vip.photo.woman=https://filehive2.jyymatrix.cc/uploadeFile/20210125/db53552e688040afb286686f081e1e68f3fe946f75624598828f01898635152e.png
default.vip.photo.man=https://filehive2.jyymatrix.cc/uploadeFile/20210125/3642f1d827c44c76832fea106c85e0f89e089c16cbcc4dd0a82bb52b9ac700f4.png
zq-erp/src/main/resources/config/prd/application.properties
@@ -26,6 +26,7 @@
spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
spring.thymeleaf.prefix: classpath:/templates/views/
spring.thymeleaf.cache=false
mybatis-plus.global-config.db-config.id-type=auto
mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml
mybatis-plus.mapper-locations=classpath*:mybatis/mapper/**/*.xml
#设置全局时间返回格式 第三行设置为true表示返回时间戳
@@ -68,3 +69,4 @@
#默认头像
default.vip.photo.woman=https://filehive2.jyymatrix.cc/uploadeFile/20210125/db53552e688040afb286686f081e1e68f3fe946f75624598828f01898635152e.png
default.vip.photo.man=https://filehive2.jyymatrix.cc/uploadeFile/20210125/3642f1d827c44c76832fea106c85e0f89e089c16cbcc4dd0a82bb52b9ac700f4.png
zq-erp/src/main/resources/mybatis/mapper/common/SysCompanyDao.xml
@@ -852,4 +852,7 @@
            </if>
        </where>
    </select>
    <select id="selectAll" resultMap="SysCompanyMap">
        select * from sys_company
    </select>
</mapper>