Commit 58071f30 by huluobin

# 数据中心 prod

parent 778b7488
...@@ -2,7 +2,3 @@ driver=com.mysql.jdbc.Driver ...@@ -2,7 +2,3 @@ driver=com.mysql.jdbc.Driver
url=jdbc:mysql://gz-cdb-kp7s5i79.sql.tencentcdb.com:61691/bailun_datacenter?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true url=jdbc:mysql://gz-cdb-kp7s5i79.sql.tencentcdb.com:61691/bailun_datacenter?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true
username=root username=root
password=#7kfnymAM$Y9-Ntf password=#7kfnymAM$Y9-Ntf
readonly-url=jdbc:mysql://gz-cdbrg-qdyec2j3.sql.tencentcdb.com:59667/bailun_datacenter?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
readonly-username=root
readonly-password=#7kfnymAM$Y9-Ntf
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<configuration> <configuration>
<!--<properties resource="db-tj.properties"/>--> <!--<properties resource="db-tj.properties"/>-->
<properties resource="db-dev.properties"/> <!-- <properties resource="db-dev.properties"/>-->
<!-- <properties resource="db-prod.properties"/>--> <properties resource="db-prod.properties"/>
<settings> <settings>
<setting name="mapUnderscoreToCamelCase" value="true"/> <setting name="mapUnderscoreToCamelCase" value="true"/>
</settings> </settings>
......
<!--<?xml version="1.0" encoding="UTF-8" ?>-->
<!--<!DOCTYPE configuration-->
<!-- PUBLIC "-//mybatis.org//DTD Config 3.0//EN"-->
<!-- "http://mybatis.org/dtd/mybatis-3-config.dtd">-->
<!--<configuration>-->
<!-- &lt;!&ndash;<properties resource="db-tj.properties"/>&ndash;&gt;-->
<!-- <properties resource="readonly-db-dev.properties"/>-->
<!-- &lt;!&ndash; <properties resource="readonly-db-prod.properties"/>&ndash;&gt;-->
<!-- <settings>-->
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/>-->
<!-- </settings>-->
<!-- <typeAliases>-->
<!-- <typeAlias type="com.bailuntec.support.DruidDataSourceFactory" alias="DRUID"/>-->
<!-- <package name="com.bailuntec.domain"/>-->
<!-- </typeAliases>-->
<!-- &lt;!&ndash; <plugins>&ndash;&gt;-->
<!-- &lt;!&ndash; <plugin interceptor="com.bailuntec.support.SqlCostInterceptor"/>&ndash;&gt;-->
<!-- &lt;!&ndash; </plugins>&ndash;&gt;-->
<!-- <environments default="work">-->
<!-- <environment id="work">-->
<!-- <transactionManager type="JDBC"/>-->
<!-- <dataSource type="DRUID">-->
<!-- <property name="driver" value="${driver}"/>-->
<!-- <property name="url" value="${url}"/>-->
<!-- <property name="username" value="${username}"/>-->
<!-- <property name="password" value="${password}"/>-->
<!-- </dataSource>-->
<!-- </environment>-->
<!-- </environments>-->
<!-- <mappers>-->
<!-- <package name="com.bailuntec.mapper"/>-->
<!-- </mappers>-->
<!--</configuration>-->
...@@ -31,9 +31,8 @@ public class AutoTurnoverServiceImpl implements AutoTurnoverService { ...@@ -31,9 +31,8 @@ public class AutoTurnoverServiceImpl implements AutoTurnoverService {
@Override @Override
public List<BigDecimal> getAutoTurnoverSaleDetails(DcAutoTurnover dcAutoTurnover, int turnoverDays, int autoForecastDay) { public List<BigDecimal> getAutoTurnoverSaleDetails(DcAutoTurnover dcAutoTurnover, int turnoverDays, int autoForecastDay) {
SqlSession session = SessionUtil.getFactory().openSession(true); try (SqlSession session = SessionUtil.getFactory().openSession(true)) {
// SqlSession readOnlySession = ReadSessionUtil.getFactory().openSession(true);
try {
Queue<BigDecimal> forecastSalesDetails = new LinkedList<>(); Queue<BigDecimal> forecastSalesDetails = new LinkedList<>();
...@@ -140,8 +139,6 @@ public class AutoTurnoverServiceImpl implements AutoTurnoverService { ...@@ -140,8 +139,6 @@ public class AutoTurnoverServiceImpl implements AutoTurnoverService {
} }
return new ArrayList<>(forecastSalesDetails); return new ArrayList<>(forecastSalesDetails);
} finally {
session.close();
} }
} }
......
...@@ -268,8 +268,8 @@ public class AutoTurnoverTest { ...@@ -268,8 +268,8 @@ public class AutoTurnoverTest {
public void testXX2() { public void testXX2() {
DcBaseStock dcBaseStock = SessionUtil.getSession().getMapper(DcBaseStockMapper.class) DcBaseStock dcBaseStock = SessionUtil.getSession().getMapper(DcBaseStockMapper.class)
.selectOneByExample(DcBaseStockExample.newAndCreateCriteria() .selectOneByExample(DcBaseStockExample.newAndCreateCriteria()
.andBailunSkuEqualTo("223723301") .andBailunSkuEqualTo("944870001")
.andWarehouseCodeEqualTo("ESFBABLEM") .andWarehouseCodeEqualTo("GB4PXBL")
.example()); .example());
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment