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
df1f427f
Commit
df1f427f
authored
Apr 27, 2025
by
kk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
刷数据:16342-高首批新品匹配透明计划账号
parent
f40fd0cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
6 deletions
+47
-6
2025-04-16_vlrd_高首批新品匹配透明计划账号.xlsx
2025-04-16_vlrd_高首批新品匹配透明计划账号.xlsx
+0
-0
DealInputUtils.java
...a/cn/kk/spring_simple_operation/utils/DealInputUtils.java
+26
-0
ApplicationTest.java
...t/java/cn/kk/spring_simple_operation/ApplicationTest.java
+21
-6
No files found.
2025-04-16_vlrd_高首批新品匹配透明计划账号.xlsx
0 → 100644
View file @
df1f427f
File added
src/main/java/cn/kk/spring_simple_operation/utils/DealInputUtils.java
0 → 100644
View file @
df1f427f
package
cn
.
kk
.
spring_simple_operation
.
utils
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Scanner
;
/**
* @author kk
* @date 2025/3/19
*/
public
class
DealInputUtils
{
public
static
void
main
(
String
[]
args
)
{
Scanner
scanner
=
new
Scanner
(
System
.
in
);
List
<
String
>
inputList
=
new
LinkedList
<>();
while
(
scanner
.
hasNext
())
{
String
input
=
scanner
.
next
();
if
(
input
.
equals
(
";"
))
break
;
inputList
.
add
(
input
);
}
for
(
String
s
:
inputList
)
{
System
.
out
.
println
(
s
+
","
);
}
}
}
src/test/java/cn/kk/spring_simple_operation/ApplicationTest.java
View file @
df1f427f
...
...
@@ -42,7 +42,9 @@ public class ApplicationTest {
//setAPlusProductUploadInfo();
updateBrandId
();
//updateBrandId();
updateBrandTransparencyPlan
();
}
//private void setUploadStatusIsDeleted() throws Exception {
...
...
@@ -62,11 +64,24 @@ public class ApplicationTest {
//}
private
void
updateBrandId
()
throws
Exception
{
File
file
=
new
File
(
"2025-04-01_vpq0_品牌Brand ID核对.xlsx"
);
ExcelUtil
<
BrandAccountDto
>
util
=
new
ExcelUtil
<>(
BrandAccountDto
.
class
);
List
<
BrandAccountDto
>
list
=
util
.
importExcel
(
Files
.
newInputStream
(
file
.
toPath
()));
brandRecordToolService
.
updateBrandId
(
list
);
//private void updateBrandId() throws Exception {
// File file = new File("2025-04-01_vpq0_品牌Brand ID核对.xlsx");
// ExcelUtil<BrandAccountDto> util = new ExcelUtil<>(BrandAccountDto.class);
// List<BrandAccountDto> list = util.importExcel(Files.newInputStream(file.toPath()));
// brandRecordToolService.updateBrandId(list);
//}
private
void
updateBrandTransparencyPlan
()
throws
Exception
{
File
file
=
new
File
(
"2025-04-16_vlrd_高首批新品匹配透明计划账号.xlsx"
);
ExcelUtil
<
BrandAccountDto
>
util
=
new
ExcelUtil
<>(
BrandAccountDto
.
class
);
List
<
BrandAccountDto
>
list
=
util
.
importExcel
(
Files
.
newInputStream
(
file
.
toPath
()));
list
.
forEach
(
dto
->
{
System
.
out
.
printf
(
"update brand_record_tool set is_transparency_plan = 1 where record_brand = '%s' and account = '%s' and is_delete = 0;\n"
,
dto
.
getBrand
(),
dto
.
getAccount
());
});
}
}
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