Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
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
d274d9b4
Commit
d274d9b4
authored
Sep 28, 2026
by
kk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
25517
parent
ba2e76fe
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
231 additions
and
2 deletions
+231
-2
photo_progress_simple_video_deleted.sql
photo_progress_simple_video_deleted.sql
+148
-0
VideoProductServiceImpl.java
...imple_operation/service/impl/VideoProductServiceImpl.java
+1
-1
VideoProductMapper.xml
src/main/resources/mapper/VideoProductMapper.xml
+3
-1
InfringementCheckDataTest.java
...kk/spring_simple_operation/InfringementCheckDataTest.java
+79
-0
video_is_upload_backstage_deleted.sql
video_is_upload_backstage_deleted.sql
+0
-0
No files found.
photo_progress_simple_video_deleted.sql
0 → 100644
View file @
d274d9b4
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1988182436424454145
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514177
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1988182436424454145
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1977947500790681602
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514178
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1977947500790681602
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1798182962261397505
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514179
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1798182962261397505
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1965976087808708609
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514180
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1965976087808708609
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1993869905966927873
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514181
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1993869905966927873
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2047258500974776322
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514182
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2047258500974776322
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2047261716974145537
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514183
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2047261716974145537
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2047261720551886850
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514184
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2047261720551886850
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2041433364019286017
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514185
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2041433364019286017
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2027269981468626945
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514186
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2027269981468626945
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1915334904820797442
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514187
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1915334904820797442
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1889253053618458625
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514188
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1889253053618458625
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1965950921955348482
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514189
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1965950921955348482
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2031278900885065730
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514190
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2031278900885065730
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1956254543440252929
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514191
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1956254543440252929
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2018985404249673729
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514192
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2018985404249673729
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1947954844278984706
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514193
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1947954844278984706
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1940988951405793281
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514194
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1940988951405793281
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1892876924976369665
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514195
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1892876924976369665
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2016768273466527745
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514196
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2016768273466527745
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1831270982308859906
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514197
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1831270982308859906
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1976107873721126913
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514198
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1976107873721126913
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1979069869286494209
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514199
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1979069869286494209
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2002929590602829826
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514200
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2002929590602829826
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2042535560882425857
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514201
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2042535560882425857
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1960283593011892226
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514202
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1960283593011892226
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1995701975215247362
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514203
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1995701975215247362
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2016438649897357313
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514204
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2016438649897357313
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1840688037541974018
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514205
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1840688037541974018
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
2010647964229308418
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514206
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
2010647964229308418
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1904435585196494850
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514207
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1904435585196494850
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1997976971463626753
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514208
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1997976971463626753
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1997976973359452161
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514209
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1997976973359452161
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1997976975456604161
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514210
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1997976975456604161
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1997976977365012481
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514211
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1997976977365012481
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1998953656765911042
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514212
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1998953656765911042
,
''
,
'job'
);
UPDATE
photo_progress
SET
simple_video_upload_status
=
5
WHERE
id
=
1999418958444236802
;
INSERT
INTO
visual_design_log
(
id
,
operation_key
,
create_time
,
create_id
,
create_name
,
operation_content
,
relation_id
,
file_url
,
operation_type
)
VALUES
(
2104419939822514213
,
'photo_progress'
,
1790567778
,
0
,
'系统'
,
'需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除'
,
1999418958444236802
,
''
,
'job'
);
src/main/java/cn/kk/spring_simple_operation/service/impl/VideoProductServiceImpl.java
View file @
d274d9b4
...
@@ -31,7 +31,7 @@ public class VideoProductServiceImpl extends ServiceImpl<VideoProductMapper, Vid
...
@@ -31,7 +31,7 @@ public class VideoProductServiceImpl extends ServiceImpl<VideoProductMapper, Vid
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
setUploadStatusIsDeleted
(
List
<
SkuSiteDTO
>
list
)
{
public
void
setUploadStatusIsDeleted
(
List
<
SkuSiteDTO
>
list
)
{
List
<
VideoProduct
>
listVideoProduct
=
baseMapper
.
getListBySkuAndSite
(
list
);
List
<
VideoProduct
>
listVideoProduct
=
baseMapper
.
getListBySkuAndSite
(
list
,
null
);
List
<
Long
>
ids
=
listVideoProduct
.
stream
()
List
<
Long
>
ids
=
listVideoProduct
.
stream
()
.
filter
(
videoProduct
->
videoProduct
.
getVideoIsUploadBackstage
()
!=
5
)
.
filter
(
videoProduct
->
videoProduct
.
getVideoIsUploadBackstage
()
!=
5
)
.
map
(
VideoProduct:
:
getId
)
.
map
(
VideoProduct:
:
getId
)
...
...
src/main/resources/mapper/VideoProductMapper.xml
View file @
d274d9b4
...
@@ -22,7 +22,9 @@
...
@@ -22,7 +22,9 @@
select id, video_is_upload_backstage
select id, video_is_upload_backstage
from video_product
from video_product
where is_delete = 0
where is_delete = 0
and optimize_type = #{optimizeType}
<if
test=
"optimizeType != null"
>
and optimize_type = #{optimizeType}
</if>
and (sku, site) in
and (sku, site) in
<foreach
collection=
"list"
item=
"item"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"list"
item=
"item"
open=
"("
separator=
","
close=
")"
>
(#{item.sku}, #{item.site})
(#{item.sku}, #{item.site})
...
...
src/test/java/cn/kk/spring_simple_operation/InfringementCheckDataTest.java
View file @
d274d9b4
package
cn
.
kk
.
spring_simple_operation
;
package
cn
.
kk
.
spring_simple_operation
;
import
cn.kk.spring_simple_operation.entity.PhotoProgress
;
import
cn.kk.spring_simple_operation.entity.VideoProduct
;
import
cn.kk.spring_simple_operation.entity.VideoProduct
;
import
cn.kk.spring_simple_operation.entity.VisualDesignLog
;
import
cn.kk.spring_simple_operation.entity.VisualDesignLog
;
import
cn.kk.spring_simple_operation.mapper.PhotoProgressMapper
;
import
cn.kk.spring_simple_operation.mapper.VideoProductMapper
;
import
cn.kk.spring_simple_operation.mapper.VideoProductMapper
;
import
cn.kk.spring_simple_operation.model.dto.FineVideoUploadedNoVideoDTO
;
import
cn.kk.spring_simple_operation.model.dto.FineVideoUploadedNoVideoDTO
;
import
cn.kk.spring_simple_operation.model.dto.SimpleVideoUploadedDTO
;
import
cn.kk.spring_simple_operation.model.dto.SimpleVideoUploadedDTO
;
...
@@ -46,6 +48,9 @@ public class InfringementCheckDataTest {
...
@@ -46,6 +48,9 @@ public class InfringementCheckDataTest {
@Resource
@Resource
private
VideoProductMapper
videoProductMapper
;
private
VideoProductMapper
videoProductMapper
;
@Resource
private
PhotoProgressMapper
photoProgressMapper
;
@Test
@Test
public
void
readAllSheets
()
throws
Exception
{
public
void
readAllSheets
()
throws
Exception
{
List
<
FineVideoUploadedNoVideoDTO
>
fineVideoList
;
List
<
FineVideoUploadedNoVideoDTO
>
fineVideoList
;
...
@@ -134,6 +139,80 @@ public class InfringementCheckDataTest {
...
@@ -134,6 +139,80 @@ public class InfringementCheckDataTest {
}
}
/**
/**
* 简易视频(photo_progress表)已上传但后台无视频,将simple_video_upload_status设为5(已删除),
* 数据库只读,改为生成update+日志insert的sql文件。
*/
@Test
public
void
generateSimpleVideoUploadStatusDeletedSql
()
throws
Exception
{
List
<
SimpleVideoUploadedDTO
>
simpleVideoList
;
try
(
InputStream
is
=
Files
.
newInputStream
(
INPUT_PATH
))
{
simpleVideoList
=
new
ExcelUtil
<>(
SimpleVideoUploadedDTO
.
class
)
.
importExcel
(
"简易视频系统为已上传数据"
,
is
);
}
List
<
String
>
skuList
=
simpleVideoList
.
stream
()
.
map
(
SimpleVideoUploadedDTO:
:
getSku
)
.
filter
(
sku
->
!
StringUtils
.
isEmpty
(
sku
))
.
distinct
()
.
collect
(
Collectors
.
toList
());
int
currentTime
=
DateUtils
.
getCurrentTimeSecond
();
List
<
String
>
sqlList
=
buildPhotoProgressUpdateSqlList
(
skuList
,
"需求:25517,简易视频系统已上传但后台无视频,设置简易视频上传状态为已删除"
,
currentTime
);
Path
outputPath
=
Paths
.
get
(
"photo_progress_simple_video_deleted.sql"
);
try
(
BufferedWriter
writer
=
Files
.
newBufferedWriter
(
outputPath
))
{
for
(
String
sql
:
sqlList
)
{
writer
.
write
(
sql
);
writer
.
write
(
"\n"
);
}
}
log
.
info
(
"共生成 {} 条sql, 输出文件: {}"
,
sqlList
.
size
(),
outputPath
.
toAbsolutePath
());
}
/**
* 按sku分批查询photo_progress中对应的记录,对simple_video_upload_status != 5 的记录
* 生成update sql,并配套生成一条visual_design_log的insert sql。
*/
private
List
<
String
>
buildPhotoProgressUpdateSqlList
(
List
<
String
>
skuList
,
String
operationContent
,
int
currentTime
)
{
List
<
String
>
sqlList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
skuList
))
{
return
sqlList
;
}
Lists
.
partition
(
skuList
,
500
).
forEach
(
partition
->
{
List
<
PhotoProgress
>
products
=
photoProgressMapper
.
getListBySku
(
partition
);
for
(
PhotoProgress
photoProgress
:
products
)
{
if
(
Objects
.
equals
(
photoProgress
.
getSimpleVideoUploadStatus
(),
5
))
{
continue
;
}
PhotoProgress
update
=
new
PhotoProgress
();
update
.
setId
(
photoProgress
.
getId
());
update
.
setSimpleVideoUploadStatus
(
5
);
VisualDesignLog
designLog
=
new
VisualDesignLog
();
designLog
.
setOperationKey
(
"photo_progress"
)
.
setCreateId
(
0
)
.
setCreateTime
(
currentTime
)
.
setCreateName
(
"系统"
)
.
setOperationContent
(
operationContent
)
.
setRelationId
(
update
.
getId
())
.
setFileUrl
(
""
)
.
setOperationType
(
"job"
);
sqlList
.
add
(
SqlGenerator
.
generateUpdateSql
(
update
));
sqlList
.
add
(
SqlGenerator
.
generateInsertSql
(
designLog
));
}
});
return
sqlList
;
}
/**
* 按(sku,site)分批查询video_product中对应的记录((sku,site) in (...)),
* 按(sku,site)分批查询video_product中对应的记录((sku,site) in (...)),
* 对video_is_upload_backstage != 5 的记录生成update sql,并配套生成一条visual_design_log的insert sql。
* 对video_is_upload_backstage != 5 的记录生成update sql,并配套生成一条visual_design_log的insert sql。
*/
*/
...
...
video_is_upload_backstage_deleted.sql
View file @
d274d9b4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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