问题: - 导入成功条数显示为负数 - 原因:成功数量计算使用 validRecords.size() - failures.size() - 但没有使用实际的数据库操作返回值 修复: - saveBatchWithUpsert 和 saveBatch 方法现在返回 int - 累加实际的数据库影响行数 - 使用 actualSuccessCount 变量跟踪真实成功数量 影响范围: - CcdiIntermediaryPersonImportServiceImpl - CcdiIntermediaryEntityImportServiceImpl
29 lines
777 B
PowerShell
29 lines
777 B
PowerShell
#!/usr/bin/env pwsh
|
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
|
|
$exe=""
|
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
# Fix case when both the Windows and Linux builds of Node
|
|
# are installed in the same directory
|
|
$exe=".exe"
|
|
}
|
|
$ret=0
|
|
if (Test-Path "$basedir/node$exe") {
|
|
# Support pipeline input
|
|
if ($MyInvocation.ExpectingInput) {
|
|
$input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
|
|
} else {
|
|
& "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
|
|
}
|
|
$ret=$LASTEXITCODE
|
|
} else {
|
|
# Support pipeline input
|
|
if ($MyInvocation.ExpectingInput) {
|
|
$input | & "node$exe" "$basedir/../rimraf/bin.js" $args
|
|
} else {
|
|
& "node$exe" "$basedir/../rimraf/bin.js" $args
|
|
}
|
|
$ret=$LASTEXITCODE
|
|
}
|
|
exit $ret
|