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
6fa0878a
Commit
6fa0878a
authored
Mar 30, 2020
by
yinyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据中心--sku资料百伦分类过滤掉c_name不包含New
parent
2c740a69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
BailunCategoryJob.java
...ku/src/main/java/com/bailuntec/job/BailunCategoryJob.java
+7
-2
const.properties
data-base/base-sync-sku/src/main/resources/const.properties
+2
-2
No files found.
data-base/base-sync-sku/src/main/java/com/bailuntec/job/BailunCategoryJob.java
View file @
6fa0878a
...
@@ -2,6 +2,7 @@ package com.bailuntec.job;
...
@@ -2,6 +2,7 @@ package com.bailuntec.job;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.bailuntec.domain.entity.DcBaseBailuncategory
;
import
com.bailuntec.domain.entity.DcBaseBailuncategory
;
import
com.bailuntec.domain.example.DcBaseBailuncategoryExample
;
import
com.bailuntec.domain.pojo.BailunCategoryResult
;
import
com.bailuntec.domain.pojo.BailunCategoryResult
;
import
com.bailuntec.mapper.DcBaseBailuncategoryMapper
;
import
com.bailuntec.mapper.DcBaseBailuncategoryMapper
;
import
com.bailuntec.utils.OkHttpUtil
;
import
com.bailuntec.utils.OkHttpUtil
;
...
@@ -39,15 +40,19 @@ public class BailunCategoryJob implements SimpleJob {
...
@@ -39,15 +40,19 @@ public class BailunCategoryJob implements SimpleJob {
if
(
bailunCategoryResult
.
getResult
()
!=
null
&&
bailunCategoryResult
.
getResult
().
size
()
>
0
)
{
if
(
bailunCategoryResult
.
getResult
()
!=
null
&&
bailunCategoryResult
.
getResult
().
size
()
>
0
)
{
DcBaseBailuncategory
dcBaseBailuncategory
=
new
DcBaseBailuncategory
();
DcBaseBailuncategory
dcBaseBailuncategory
=
new
DcBaseBailuncategory
();
DcBaseBailuncategoryMapper
mapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseBailuncategoryMapper
.
class
);
DcBaseBailuncategoryMapper
mapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseBailuncategoryMapper
.
class
);
LocalDateTime
startTime
=
LocalDateTime
.
now
();
for
(
DcBaseBailuncategory
baseBailuncategory
:
bailunCategoryResult
.
getResult
())
{
for
(
DcBaseBailuncategory
baseBailuncategory
:
bailunCategoryResult
.
getResult
())
{
try
{
try
{
BeanUtils
.
copyProperties
(
dcBaseBailuncategory
,
baseBailuncategory
);
BeanUtils
.
copyProperties
(
dcBaseBailuncategory
,
baseBailuncategory
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"BeanUtils.copyProperties失败"
,
e
);
throw
new
RuntimeException
(
"BeanUtils.copyProperties失败"
,
e
);
}
}
dcBaseBailuncategory
.
setGmtModified
(
LocalDateTime
.
now
());
if
(
dcBaseBailuncategory
.
getCName
()
!=
null
&&
dcBaseBailuncategory
.
getCName
().
contains
(
"New"
))
{
mapper
.
upsertSelective
(
dcBaseBailuncategory
);
dcBaseBailuncategory
.
setGmtModified
(
startTime
);
mapper
.
upsertSelective
(
dcBaseBailuncategory
);
}
}
}
mapper
.
deleteByExample
(
DcBaseBailuncategoryExample
.
newAndCreateCriteria
().
andGmtModifiedLessThan
(
startTime
).
example
());
}
}
}
else
{
}
else
{
throw
new
RuntimeException
(
"调用百伦分类接口返回错误"
);
throw
new
RuntimeException
(
"调用百伦分类接口返回错误"
);
...
...
data-base/base-sync-sku/src/main/resources/const.properties
View file @
6fa0878a
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
SKU_URL
=
http://10.0.8.13:8000/api/sku/productsku/gmtproductskus
SKU_URL
=
http://10.0.8.13:8000/api/sku/productsku/gmtproductskus
SKU_SIMPLE_CATEGORY_URL
=
http://10.0.8.13:8000/api/category/simplecategory/categoriessimplebylevel?level=0
SKU_SIMPLE_CATEGORY_URL
=
http://10.0.8.13:8000/api/category/simplecategory/categoriessimplebylevel?level=0
SKU_MAPPING_URL
=
http://172.31.255.108:6039/skumapping/getpageskumappings
SKU_MAPPING_URL
=
http://172.31.255.108:6039/skumapping/getpageskumappings
BAILUN_CATEGORY_URL
=
http://10.0.8.13:8000/api/category/categorybailun/gmtbailuncategoriesbylevel
#
BAILUN_CATEGORY_URL=http://10.0.8.13:8000/api/category/categorybailun/gmtbailuncategoriesbylevel
#
BAILUN_CATEGORY_URL=http://doc.bailuntec.com:6001/categorybailun/gmtbailuncategoriesbylevel
BAILUN_CATEGORY_URL
=
http://doc.bailuntec.com:6001/categorybailun/gmtbailuncategoriesbylevel
# SKU_MAPPING_URL=http://doc.bailuntec.com:6021/skumapping/getpageskumappings
# SKU_MAPPING_URL=http://doc.bailuntec.com:6021/skumapping/getpageskumappings
# \u7EBF\u4E0B\u73AF\u5883
# \u7EBF\u4E0B\u73AF\u5883
#SKU_URL=http://api.skums.bailuntec.com/api/sku/productsku/gmtproductskus
#SKU_URL=http://api.skums.bailuntec.com/api/sku/productsku/gmtproductskus
...
...
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