fix: 修复中介导入成功条数计算错误
问题: - 导入成功条数显示为负数 - 原因:成功数量计算使用 validRecords.size() - failures.size() - 但没有使用实际的数据库操作返回值 修复: - saveBatchWithUpsert 和 saveBatch 方法现在返回 int - 累加实际的数据库影响行数 - 使用 actualSuccessCount 变量跟踪真实成功数量 影响范围: - CcdiIntermediaryPersonImportServiceImpl - CcdiIntermediaryEntityImportServiceImpl
This commit is contained in:
80
doc/test-data/purchase_transaction/node_modules/binary/perf/small.js
generated
vendored
Normal file
80
doc/test-data/purchase_transaction/node_modules/binary/perf/small.js
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
var Seq = require('seq');
|
||||
var Hash = require('hashish');
|
||||
|
||||
var Bin = require('binary');
|
||||
var Buf = require('bufferlist/binary');
|
||||
var BufferList = require('bufferlist');
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
|
||||
function binary (buf, cb) {
|
||||
Bin(buf)
|
||||
.word32le('x')
|
||||
.word16be('y')
|
||||
.word16be('z')
|
||||
.word32le('w')
|
||||
.tap(cb)
|
||||
;
|
||||
};
|
||||
|
||||
function stream (buf, cb) {
|
||||
var em = new EventEmitter;
|
||||
Bin(em)
|
||||
.word32le('x')
|
||||
.word16be('y')
|
||||
.word16be('z')
|
||||
.word32le('w')
|
||||
.tap(cb)
|
||||
;
|
||||
em.emit('data', buf);
|
||||
};
|
||||
|
||||
function parse (buf, cb) {
|
||||
cb(Bin.parse(buf)
|
||||
.word32le('x')
|
||||
.word16be('y')
|
||||
.word16be('z')
|
||||
.word32le('w')
|
||||
.vars
|
||||
);
|
||||
};
|
||||
|
||||
function bufferlist (buf, cb) {
|
||||
var blist = new BufferList;
|
||||
blist.push(buf);
|
||||
Buf(blist)
|
||||
.getWord32le('x')
|
||||
.getWord16be('y')
|
||||
.getWord16be('z')
|
||||
.getWord32le('w')
|
||||
.tap(cb)
|
||||
.end()
|
||||
;
|
||||
};
|
||||
|
||||
|
||||
var buffers = [];
|
||||
for (var i = 0; i < 200; i++) {
|
||||
buffers.push(new Buffer(12));
|
||||
}
|
||||
|
||||
console.log('small');
|
||||
Seq(binary, stream, parse, bufferlist)
|
||||
.seqEach(function (f) {
|
||||
var t = this;
|
||||
var t0 = Date.now();
|
||||
Seq()
|
||||
.extend(buffers)
|
||||
.seqEach(function (buf) {
|
||||
f(buf, this.bind(this, null));
|
||||
})
|
||||
.seq(function () {
|
||||
var tf = Date.now();
|
||||
console.log(' ' + f.name + ': ' + (tf - t0));
|
||||
t(null);
|
||||
})
|
||||
;
|
||||
})
|
||||
.seq(function () {
|
||||
this(null);
|
||||
})
|
||||
;
|
||||
Reference in New Issue
Block a user