|
@@ -4,8 +4,6 @@ import com.its.app.utils.Elapsed;
|
|
|
import com.its.vds.dao.mapper.BatchDaoService;
|
|
|
import com.its.vds.entity.voVdsDtctClct;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.apache.ibatis.session.ExecutorType;
|
|
|
-import org.apache.ibatis.session.SqlSession;
|
|
|
import org.apache.ibatis.session.SqlSessionFactory;
|
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
|
@@ -47,23 +45,8 @@ public class VdsDtctDao extends BatchDaoService {
|
|
|
public int updateClct(List<voVdsDtctClct> req, boolean isHistory) {
|
|
|
log.info("{}.updateStts: START. {} EA. History {}", this.serviceName, req.size(), isHistory);
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
- int total = 0;
|
|
|
- SqlSession sqlSession = null;
|
|
|
- try {
|
|
|
- sqlSession = this.sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
|
-
|
|
|
- this.mapper = this.mapperName + "batchUpdateVdsDtctClctPnst";
|
|
|
- total += updateBatch(this.mapper, getClctList(req));
|
|
|
-
|
|
|
- sqlSession.commit();
|
|
|
- } catch(Exception e) {
|
|
|
- log.error("updateClct: Exception, {}, {}", req, e.getMessage());
|
|
|
- }
|
|
|
- finally {
|
|
|
- if (sqlSession != null) {
|
|
|
- sqlSession.close();
|
|
|
- }
|
|
|
- }
|
|
|
+ this.mapper = this.mapperName + "batchUpdateVdsDtctClctPnst";
|
|
|
+ int total = updateBatch(this.mapper, getClctList(req));
|
|
|
log.info("{}.updateStts: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
return total;
|
|
|
}
|
|
@@ -71,23 +54,8 @@ public class VdsDtctDao extends BatchDaoService {
|
|
|
public int insertClct(List<voVdsDtctClct> req) {
|
|
|
log.info("{}.insertStts: START. {} EA.", this.serviceName, req.size());
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
- int total = 0;
|
|
|
- SqlSession sqlSession = null;
|
|
|
- try {
|
|
|
- sqlSession = this.sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
|
-
|
|
|
- this.mapper = this.mapperName + "batchInsertVdsDtctClct";
|
|
|
- total += insertBatch(this.mapper, getClctList(req));
|
|
|
-
|
|
|
- sqlSession.commit();
|
|
|
- } catch(Exception e) {
|
|
|
- log.error("insertClct: Exception, {}, {}", req, e.getMessage());
|
|
|
- }
|
|
|
- finally {
|
|
|
- if (sqlSession != null) {
|
|
|
- sqlSession.close();
|
|
|
- }
|
|
|
- }
|
|
|
+ this.mapper = this.mapperName + "batchInsertVdsDtctClct";
|
|
|
+ int total = insertBatch(this.mapper, getClctList(req));
|
|
|
log.info("{}.insertStts: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
return total;
|
|
|
}
|