记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
db20e679
Commit
db20e679
authored
May 20, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改收藏删除接口:支持删除多个;
kylin build pom config;
parent
2fe3ce9c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
IAdamCollectionService.java
...iquidnet/service/adam/service/IAdamCollectionService.java
+1
-1
AdamCollectionController.java
...net/service/adam/controller/AdamCollectionController.java
+3
-3
AdamCollectionServiceImpl.java
.../service/adam/service/impl/AdamCollectionServiceImpl.java
+2
-2
pom.xml
...uidnet-service-kylin/liquidnet-service-kylin-impl/pom.xml
+8
-1
No files found.
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-api/src/main/java/com/liquidnet/service/adam/service/IAdamCollectionService.java
View file @
db20e679
...
@@ -20,7 +20,7 @@ public interface IAdamCollectionService extends IService<AdamCollection> {
...
@@ -20,7 +20,7 @@ public interface IAdamCollectionService extends IService<AdamCollection> {
AdamCollectBaseVo
query
(
String
uid
,
String
type
,
String
contentId
);
AdamCollectBaseVo
query
(
String
uid
,
String
type
,
String
contentId
);
void
del
(
String
uid
,
String
type
,
String
contentId
);
void
del
(
String
uid
,
String
type
,
String
...
contentIds
);
boolean
queryState
(
String
uid
,
String
type
,
String
contentId
);
boolean
queryState
(
String
uid
,
String
type
,
String
contentId
);
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamCollectionController.java
View file @
db20e679
...
@@ -56,13 +56,13 @@ public class AdamCollectionController {
...
@@ -56,13 +56,13 @@ public class AdamCollectionController {
@ApiOperation
(
value
=
"删除收藏"
)
@ApiOperation
(
value
=
"删除收藏"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"type"
,
value
=
"收藏类型"
,
allowableValues
=
"VIDEO,TICKET,SITE,ARTIST,BAND,BRAND,STYLE,GOODS,MUSIC,SONG"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"type"
,
value
=
"收藏类型"
,
allowableValues
=
"VIDEO,TICKET,SITE,ARTIST,BAND,BRAND,STYLE,GOODS,MUSIC,SONG"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"contentId
"
,
value
=
"内容ID[64
]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"contentId
s"
,
value
=
"内容ID[多个ID用','分隔
]"
),
})
})
@PostMapping
(
"del"
)
@PostMapping
(
"del"
)
public
ResponseDto
<
Object
>
del
(
@RequestParam
String
type
,
@RequestParam
String
contentId
)
{
public
ResponseDto
<
Object
>
del
(
@RequestParam
String
type
,
@RequestParam
String
contentId
s
)
{
// TODO: 2021/4/28 数据校验
// TODO: 2021/4/28 数据校验
adamCollectionService
.
del
(
CurrentUtil
.
getCurrentUid
(),
type
,
contentId
);
adamCollectionService
.
del
(
CurrentUtil
.
getCurrentUid
(),
type
,
contentId
s
.
split
(
","
)
);
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
}
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/impl/AdamCollectionServiceImpl.java
View file @
db20e679
...
@@ -91,13 +91,13 @@ public class AdamCollectionServiceImpl extends ServiceImpl<AdamCollectionMapper,
...
@@ -91,13 +91,13 @@ public class AdamCollectionServiceImpl extends ServiceImpl<AdamCollectionMapper,
}
}
@Override
@Override
public
void
del
(
String
uid
,
String
type
,
String
contentId
)
{
public
void
del
(
String
uid
,
String
type
,
String
...
contentIds
)
{
AdamCollectBaseVo
delVo
=
AdamCollectBaseVo
.
getNew
();
AdamCollectBaseVo
delVo
=
AdamCollectBaseVo
.
getNew
();
delVo
.
setState
(
2
);
delVo
.
setState
(
2
);
delVo
.
setUpdatedAt
(
DateUtil
.
getNowTime
());
delVo
.
setUpdatedAt
(
DateUtil
.
getNowTime
());
mongoTemplate
.
getCollection
(
AdamCollectBaseVo
.
class
.
getSimpleName
()).
updateOne
(
mongoTemplate
.
getCollection
(
AdamCollectBaseVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"type"
).
is
(
type
)
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"type"
).
is
(
type
)
.
and
(
"contentId"
).
i
s
(
contentId
).
and
(
"state"
).
is
(
1
)).
getQueryObject
(),
.
and
(
"contentId"
).
i
n
(
contentIds
).
and
(
"state"
).
is
(
1
)).
getQueryObject
(),
new
BasicDBObject
(
"$set"
,
mongoConverter
.
convertToMongoType
(
delVo
)));
new
BasicDBObject
(
"$set"
,
mongoConverter
.
convertToMongoType
(
delVo
)));
}
}
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/pom.xml
View file @
db20e679
...
@@ -36,7 +36,14 @@
...
@@ -36,7 +36,14 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-mongodb
</artifactId>
<artifactId>
spring-boot-starter-data-mongodb
</artifactId>
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
</project>
\ No newline at end of file
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