Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
dc-java
Commits
8ff8da3d
Commit
8ff8da3d
authored
Apr 01, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复同步SKU降序查漏最大页数的问题
parent
3e6b8c55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
SkuJsonHandle.java
...nc-sku/src/main/java/com/bailuntec/job/SkuJsonHandle.java
+3
-7
No files found.
data-base/base-sync-sku/src/main/java/com/bailuntec/job/SkuJsonHandle.java
View file @
8ff8da3d
...
@@ -99,7 +99,7 @@ public class SkuJsonHandle {
...
@@ -99,7 +99,7 @@ public class SkuJsonHandle {
}
}
//如果是0, 则保存总页数, 降序查
//如果是0, 则保存总页数, 降序查
if
(
jobPointLog
.
getPageIndex
().
equals
(
0
))
{
if
(
jobPointLog
.
getPageIndex
().
equals
(
0
))
{
jobPointLog
.
setPageIndex
(
jsonObject1
.
getIntValue
(
"TotalPages"
));
jobPointLog
.
setPageIndex
(
jsonObject1
.
getIntValue
(
"TotalPages"
)
+
1
);
}
}
/*
/*
* 转化JSON,
* 转化JSON,
...
@@ -117,13 +117,11 @@ public class SkuJsonHandle {
...
@@ -117,13 +117,11 @@ public class SkuJsonHandle {
throw
new
RuntimeException
(
"调用同步SKU信息接口失败"
);
throw
new
RuntimeException
(
"调用同步SKU信息接口失败"
);
}
}
jobPointLog
.
setPageIndex
(
jobPointLog
.
getPageIndex
()
-
1
);
jobPointLog
.
setPageIndex
(
jobPointLog
.
getPageIndex
()
-
1
);
if
(
jobPointLog
.
getPageIndex
()
%
10
==
0
)
{
if
(
jobPointLog
.
getPageIndex
()
%
5
==
0
)
{
try
{
try
{
JobPointLogMapper
jobPointLogMapper
=
SessionUtil
.
getSession
().
getMapper
(
JobPointLogMapper
.
class
);
JobPointLogMapper
jobPointLogMapper
=
SessionUtil
.
getSession
().
getMapper
(
JobPointLogMapper
.
class
);
jobPointLogMapper
.
upsertSelective
(
jobPointLog
);
jobPointLogMapper
.
upsertSelective
(
jobPointLog
);
SessionUtil
.
getSession
().
commit
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"MYBATIS操作DB失败"
,
e
);
throw
new
RuntimeException
(
"MYBATIS操作DB失败"
,
e
);
}
finally
{
}
finally
{
SessionUtil
.
closeSession
();
SessionUtil
.
closeSession
();
...
@@ -143,8 +141,7 @@ public class SkuJsonHandle {
...
@@ -143,8 +141,7 @@ public class SkuJsonHandle {
try
{
try
{
BeanUtils
.
copyProperties
(
dcBaseSku
,
skuProductInfo
);
BeanUtils
.
copyProperties
(
dcBaseSku
,
skuProductInfo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"BeanUtils.copyProperties失败"
);
throw
new
RuntimeException
();
}
}
if
(
StringUtils
.
isNotBlank
(
dcBaseSku
.
getWarehouseCode
()))
{
if
(
StringUtils
.
isNotBlank
(
dcBaseSku
.
getWarehouseCode
()))
{
DcBaseWarehouseMapper
dcBaseWarehouseMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseWarehouseMapper
.
class
);
DcBaseWarehouseMapper
dcBaseWarehouseMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseWarehouseMapper
.
class
);
...
@@ -167,7 +164,6 @@ public class SkuJsonHandle {
...
@@ -167,7 +164,6 @@ public class SkuJsonHandle {
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"MYBATIS操作DB失败"
,
e
);
throw
new
RuntimeException
(
"MYBATIS操作DB失败"
,
e
);
}
finally
{
}
finally
{
SessionUtil
.
closeSession
();
SessionUtil
.
closeSession
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment