Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-simple-operation
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
guokunkun
spring-simple-operation
Commits
4ba9028d
Commit
4ba9028d
authored
Mar 18, 2025
by
kk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
刷数据:根据文件指定sku刷A+产品的上传人,同策划的也刷
parent
498fa6be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
21 deletions
+31
-21
APlusProductServiceImpl.java
...imple_operation/service/impl/APlusProductServiceImpl.java
+31
-21
No files found.
src/main/java/cn/kk/spring_simple_operation/service/impl/APlusProductServiceImpl.java
View file @
4ba9028d
...
...
@@ -49,23 +49,30 @@ public class APlusProductServiceImpl extends ServiceImpl<APlusProductMapper, APl
List
<
APlusProduct
>
aPlusProducts
=
baseMapper
.
selectList
(
Wrappers
.<
APlusProduct
>
lambdaQuery
()
.
eq
(
APlusProduct:
:
getSku
,
skuPeopleNameDto
.
getSku
())
.
eq
(
APlusProduct:
:
getSite
,
"Amazon.com"
)
.
select
(
APlusProduct:
:
getId
,
APlusProduct:
:
getSku
,
APlusProduct:
:
getSite
)
.
select
(
APlusProduct:
:
getId
,
APlusProduct:
:
getSku
,
APlusProduct:
:
getSite
,
APlusProduct:
:
getAPlusPlanId
)
);
if
(
CollectionUtils
.
isEmpty
(
aPlusProducts
))
{
log
.
error
(
"sku:{}, site:{}, 未找到对应的A+产品"
,
skuPeopleNameDto
.
getSku
(),
"Amazon.com"
);
continue
;
}
APlusProduct
aPlusProduct
=
aPlusProducts
.
get
(
0
);
List
<
SyncProductPublish
>
syncProductPublishes
=
syncProductPublishMapper
.
selectList
(
Wrappers
.<
SyncProductPublish
>
lambdaQuery
()
.
eq
(
SyncProductPublish:
:
getSku
,
aPlusProduct
.
getSku
())
.
eq
(
SyncProductPublish:
:
getSite
,
aPlusProduct
.
getSite
())
.
select
(
SyncProductPublish:
:
getThirtyDaySales
)
);
if
(
CollectionUtils
.
isEmpty
(
syncProductPublishes
))
{
log
.
error
(
"sku:{}, site:{}, 未找到对应的销量数据"
,
skuPeopleNameDto
.
getSku
(),
"Amazon.com"
);
continue
;
List
<
APlusProduct
>
aPlusProductList
=
baseMapper
.
selectList
(
Wrappers
.<
APlusProduct
>
lambdaQuery
()
.
eq
(
APlusProduct:
:
getAPlusPlanId
,
aPlusProduct
.
getAPlusPlanId
())
.
select
(
APlusProduct:
:
getId
,
APlusProduct:
:
getSku
,
APlusProduct:
:
getSite
));
aPlusProductList
.
add
(
aPlusProduct
);
for
(
APlusProduct
plusProduct
:
aPlusProductList
)
{
List
<
SyncProductPublish
>
syncProductPublishes
=
syncProductPublishMapper
.
selectList
(
Wrappers
.<
SyncProductPublish
>
lambdaQuery
()
.
eq
(
SyncProductPublish:
:
getSku
,
plusProduct
.
getSku
())
.
eq
(
SyncProductPublish:
:
getSite
,
plusProduct
.
getSite
())
.
select
(
SyncProductPublish:
:
getThirtyDaySales
)
);
if
(
CollectionUtils
.
isEmpty
(
syncProductPublishes
))
{
log
.
error
(
"sku:{}, site:{}, 未找到对应的销量数据"
,
skuPeopleNameDto
.
getSku
(),
"Amazon.com"
);
continue
;
}
SyncProductPublish
syncProductPublish
=
syncProductPublishes
.
get
(
0
);
plusProduct
.
setSale30
(
syncProductPublish
.
getThirtyDaySales
());
}
SyncProductPublish
syncProductPublish
=
syncProductPublishes
.
get
(
0
);
List
<
VisualDesigner
>
visualDesigners
=
visualDesignerMapper
.
selectList
(
Wrappers
.<
VisualDesigner
>
lambdaQuery
()
.
eq
(
VisualDesigner:
:
getUserName
,
skuPeopleNameDto
.
getPeopleName
())
.
in
(
VisualDesigner:
:
getDepartmentKey
,
"a_plus_plan"
)
...
...
@@ -76,17 +83,20 @@ public class APlusProductServiceImpl extends ServiceImpl<APlusProductMapper, APl
}
VisualDesigner
visualDesigner
=
visualDesigners
.
get
(
0
);
aPlusProduct
.
setSale30
(
syncProductPublish
.
getThirtyDaySales
())
.
setIsUploadBackstage
(
2
)
.
setUploadBackstageId
(
Long
.
valueOf
(
visualDesigner
.
getUserId
()))
.
setUploadBackstageUser
(
visualDesigner
.
getUserName
())
.
setUploadBackstageTime
(
currentTimeSecond
)
;
baseMapper
.
updateById
(
aPlusProduct
);
visualDesignLogService
.
addLog
(
"a_plus_product"
,
String
.
format
(
"sku:%s, site:%s, 上传A+产品信息修改为:上传人:%s,上传时间:%s"
,
aPlusProduct
.
getSku
(),
aPlusProduct
.
getSite
(),
visualDesigner
.
getUserName
(),
DateUtils
.
format10YMD
(
currentTimeSecond
)),
aPlusProduct
.
getId
());
count
++;
for
(
APlusProduct
plusProduct
:
aPlusProductList
)
{
plusProduct
.
setIsUploadBackstage
(
2
)
.
setUploadBackstageId
(
Long
.
valueOf
(
visualDesigner
.
getUserId
()))
.
setUploadBackstageUser
(
visualDesigner
.
getUserName
())
.
setUploadBackstageTime
(
currentTimeSecond
)
;
baseMapper
.
updateById
(
plusProduct
);
visualDesignLogService
.
addLog
(
"a_plus_product"
,
String
.
format
(
"sku:%s, site:%s, 上传A+产品信息修改为:上传人:%s,上传时间:%s"
,
plusProduct
.
getSku
(),
plusProduct
.
getSite
(),
visualDesigner
.
getUserName
(),
DateUtils
.
format10YMD
(
currentTimeSecond
)),
plusProduct
.
getId
());
count
++;
}
}
log
.
info
(
"共上传{}个A+产品信息"
,
count
);
...
...
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