记得上下班打卡 | 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
f0462edb
Commit
f0462edb
authored
Aug 04, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sweet
parent
4f4cd6c4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
SweetConstant.java
...a/com/liquidnet/service/sweet/constant/SweetConstant.java
+1
-0
SweetAppletController.java
...idnet/service/sweet/controller/SweetAppletController.java
+10
-0
RedisDataUtils.java
...ava/com/liquidnet/service/sweet/utils/RedisDataUtils.java
+19
-0
No files found.
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/constant/SweetConstant.java
View file @
f0462edb
...
@@ -12,6 +12,7 @@ public class SweetConstant {
...
@@ -12,6 +12,7 @@ public class SweetConstant {
public
final
static
String
REDIS_KEY_SWEET_MANUAL_SORT
=
"sweet:manual:sort:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_SORT
=
"sweet:manual:sort:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_ARTISTS_RELATION
=
"sweet:artists:relation:uid:"
;
public
final
static
String
REDIS_KEY_SWEET_ARTISTS_RELATION
=
"sweet:artists:relation:uid:"
;
public
final
static
String
REDIS_KEY_SWEET_ARTISTS_DETAILS
=
"sweet:artists:details:"
;
public
final
static
String
REDIS_KEY_SWEET_SHOP
=
"sweet:artists:shop:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_SHOP
=
"sweet:artists:shop:manual:"
;
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetAppletController.java
View file @
f0462edb
...
@@ -5,6 +5,7 @@ import com.liquidnet.service.base.ResponseDto;
...
@@ -5,6 +5,7 @@ import com.liquidnet.service.base.ResponseDto;
import
com.liquidnet.service.sweet.dto.SweetManualAppletDto
;
import
com.liquidnet.service.sweet.dto.SweetManualAppletDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistList2Dto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistList2Dto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistListDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistListDto
;
import
com.liquidnet.service.sweet.entity.SweetArtists
;
import
com.liquidnet.service.sweet.entity.SweetManualNotify
;
import
com.liquidnet.service.sweet.entity.SweetManualNotify
;
import
com.liquidnet.service.sweet.entity.SweetManualShop
;
import
com.liquidnet.service.sweet.entity.SweetManualShop
;
import
com.liquidnet.service.sweet.entity.SweetRichtext
;
import
com.liquidnet.service.sweet.entity.SweetRichtext
;
...
@@ -213,6 +214,15 @@ public class SweetAppletController {
...
@@ -213,6 +214,15 @@ public class SweetAppletController {
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
}
@PostMapping
(
"artistsDetails"
)
@ApiOperation
(
"艺人-详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"artistsId"
,
value
=
"艺人id"
,
required
=
true
)
})
public
ResponseDto
<
SweetArtists
>
artistsDetails
(
@RequestParam
String
artistsId
)
{
return
ResponseDto
.
success
(
redisDataUtils
.
getArtistsDetails
(
artistsId
));
}
@GetMapping
(
"manualShop"
)
@GetMapping
(
"manualShop"
)
@ApiOperation
(
"吃喝玩乐"
)
@ApiOperation
(
"吃喝玩乐"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/utils/RedisDataUtils.java
View file @
f0462edb
...
@@ -37,6 +37,8 @@ public class RedisDataUtils {
...
@@ -37,6 +37,8 @@ public class RedisDataUtils {
private
SweetManualNotifyMapper
sweetManualNotifyMapper
;
private
SweetManualNotifyMapper
sweetManualNotifyMapper
;
@Autowired
@Autowired
private
SweetManualShopMapper
sweetManualShopMapper
;
private
SweetManualShopMapper
sweetManualShopMapper
;
@Autowired
private
SweetArtistsMapper
sweetArtistsMapper
;
public
List
<
SweetManualAppletDto
>
setPushList
()
{
public
List
<
SweetManualAppletDto
>
setPushList
()
{
...
@@ -289,4 +291,21 @@ public class RedisDataUtils {
...
@@ -289,4 +291,21 @@ public class RedisDataUtils {
return
(
SweetWechatUser
)
redisUtil
.
get
(
redisKey
);
return
(
SweetWechatUser
)
redisUtil
.
get
(
redisKey
);
}
}
// 艺人详情
public
SweetArtists
setArtistsDetails
(
String
artistsId
){
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_ARTISTS_DETAILS
.
concat
(
artistsId
);
SweetArtists
sweetArtists
=
sweetArtistsMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetArtists
.
class
).
eq
(
SweetArtists:
:
getArtistsId
,
artistsId
).
eq
(
SweetArtists:
:
getStatus
,
1
));
redisUtil
.
set
(
redisKey
,
sweetArtists
);
return
sweetArtists
;
}
public
SweetArtists
getArtistsDetails
(
String
artistsId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_ARTISTS_DETAILS
.
concat
(
artistsId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
setArtistsDetails
(
artistsId
);
}
else
{
return
(
SweetArtists
)
obj
;
}
}
}
}
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