记得上下班打卡 | 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
a7860f8d
Commit
a7860f8d
authored
Jul 30, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sweet
parent
878b8e0a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
16 deletions
+101
-16
SweetConstant.java
...a/com/liquidnet/service/sweet/constant/SweetConstant.java
+2
-0
SweetAppletController.java
...idnet/service/sweet/controller/SweetAppletController.java
+42
-9
RedisDataUtils.java
...ava/com/liquidnet/service/sweet/utils/RedisDataUtils.java
+28
-7
SweetManualShopAllVo.java
.../com/liquidnet/service/sweet/vo/SweetManualShopAllVo.java
+29
-0
No files found.
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/constant/SweetConstant.java
View file @
a7860f8d
...
@@ -12,6 +12,8 @@ public class SweetConstant {
...
@@ -12,6 +12,8 @@ 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_SHOP
=
"sweet:artists:shop:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_REMIND
=
"sweet:remind:unionId:"
;
public
final
static
String
REDIS_KEY_SWEET_REMIND
=
"sweet:remind:unionId:"
;
public
static
final
String
REDIS_KEY_SWEET_REMIND_ALL
=
"sweet:remind:unionId*"
;
public
static
final
String
REDIS_KEY_SWEET_REMIND_ALL
=
"sweet:remind:unionId*"
;
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetAppletController.java
View file @
a7860f8d
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.service.base.ResponseDto
;
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.SweetManualNotify
;
import
com.liquidnet.service.sweet.entity.SweetManualNotify
;
import
com.liquidnet.service.sweet.entity.SweetManualShop
;
import
com.liquidnet.service.sweet.entity.SweetRichtext
;
import
com.liquidnet.service.sweet.entity.SweetRichtext
;
import
com.liquidnet.service.sweet.entity.SweetStage
;
import
com.liquidnet.service.sweet.utils.RedisDataUtils
;
import
com.liquidnet.service.sweet.utils.RedisDataUtils
;
import
com.liquidnet.service.sweet.vo.SweetArtistsRelationVo
;
import
com.liquidnet.service.sweet.vo.SweetArtistsRelationVo
;
import
com.liquidnet.service.sweet.vo.SweetManualShopAllVo
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -69,7 +69,7 @@ public class SweetAppletController {
...
@@ -69,7 +69,7 @@ public class SweetAppletController {
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"size"
,
value
=
"数量"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"size"
,
value
=
"数量"
,
required
=
true
),
})
})
public
ResponseDto
<
SweetManualArtistList2Dto
>
timeList
(
@RequestParam
(
)
String
manualId
,
public
ResponseDto
<
SweetManualArtistList2Dto
>
timeList
(
@RequestParam
(
)
String
manualId
,
@RequestParam
()
String
dateTime
,
@RequestParam
()
String
dateTime
,
@RequestParam
()
String
stage
,
@RequestParam
()
String
stage
,
@RequestParam
()
Integer
isSign
,
@RequestParam
()
Integer
isSign
,
...
@@ -119,15 +119,15 @@ public class SweetAppletController {
...
@@ -119,15 +119,15 @@ public class SweetAppletController {
item
.
setIsWatch
(
0
);
item
.
setIsWatch
(
0
);
item
.
setIsSign
(
0
);
item
.
setIsSign
(
0
);
for
(
String
artistsId:
relationData
.
getWatchList
())
{
for
(
String
artistsId
:
relationData
.
getWatchList
())
{
if
(
artistsId
.
equalsIgnoreCase
(
item
.
getArtistId
()))
{
if
(
artistsId
.
equalsIgnoreCase
(
item
.
getArtistId
()))
{
item
.
setIsWatch
(
1
);
item
.
setIsWatch
(
1
);
break
;
break
;
}
}
}
}
for
(
String
artistsId:
relationData
.
getSignList
())
{
for
(
String
artistsId
:
relationData
.
getSignList
())
{
if
(
artistsId
.
equalsIgnoreCase
(
item
.
getArtistId
()))
{
if
(
artistsId
.
equalsIgnoreCase
(
item
.
getArtistId
()))
{
item
.
setIsSign
(
1
);
item
.
setIsSign
(
1
);
break
;
break
;
}
}
...
@@ -153,7 +153,7 @@ public class SweetAppletController {
...
@@ -153,7 +153,7 @@ public class SweetAppletController {
return
ResponseDto
.
success
(
redisDataUtils
.
getRichTextRedisData
(
manualId
,
type
));
return
ResponseDto
.
success
(
redisDataUtils
.
getRichTextRedisData
(
manualId
,
type
));
}
}
@
Ge
tMapping
(
"artistsWatch"
)
@
Pos
tMapping
(
"artistsWatch"
)
@ApiOperation
(
"艺人-想看"
)
@ApiOperation
(
"艺人-想看"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
),
...
@@ -165,7 +165,7 @@ public class SweetAppletController {
...
@@ -165,7 +165,7 @@ public class SweetAppletController {
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
}
@
Ge
tMapping
(
"artistsSign"
)
@
Pos
tMapping
(
"artistsSign"
)
@ApiOperation
(
"艺人-签售"
)
@ApiOperation
(
"艺人-签售"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
),
...
@@ -176,4 +176,37 @@ public class SweetAppletController {
...
@@ -176,4 +176,37 @@ public class SweetAppletController {
redisDataUtils
.
setArtistsRelationRedisVo
(
uid
,
artistsId
,
"watch"
);
redisDataUtils
.
setArtistsRelationRedisVo
(
uid
,
artistsId
,
"watch"
);
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
}
@GetMapping
(
"manualShop"
)
@ApiOperation
(
"吃喝玩乐"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"artistsId"
,
value
=
"艺人id"
,
required
=
true
)
})
public
ResponseDto
<
SweetManualShopAllVo
>
manualShop
(
@RequestParam
String
manualId
)
{
List
<
SweetManualShop
>
shopList
=
redisDataUtils
.
getManualShopRedisData
(
manualId
);
List
<
SweetManualShop
>
recommend
=
new
ArrayList
<>();
List
<
SweetManualShop
>
eat
=
new
ArrayList
<>();
List
<
SweetManualShop
>
play
=
new
ArrayList
<>();
SweetManualShopAllVo
vo
=
SweetManualShopAllVo
.
getNew
();
for
(
SweetManualShop
item
:
shopList
)
{
if
(
item
.
getIsRecommend
().
equals
(
1
)){
recommend
.
add
(
item
);
}
if
(
item
.
getType
().
equals
(
1
)){
eat
.
add
(
item
);
}
if
(
item
.
getType
().
equals
(
2
)){
play
.
add
(
item
);
}
}
vo
.
setRecommend
(
recommend
);
vo
.
setEat
(
eat
);
vo
.
setPlay
(
play
);
return
ResponseDto
.
success
(
vo
);
}
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/utils/RedisDataUtils.java
View file @
a7860f8d
...
@@ -11,6 +11,7 @@ import com.liquidnet.service.sweet.dto.SweetManualArtistList2Dto;
...
@@ -11,6 +11,7 @@ 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.dto.SweetManualArtistStageListDto
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistStageListDto
;
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.SweetManualSort
;
import
com.liquidnet.service.sweet.entity.SweetManualSort
;
import
com.liquidnet.service.sweet.entity.SweetRichtext
;
import
com.liquidnet.service.sweet.entity.SweetRichtext
;
import
com.liquidnet.service.sweet.mapper.*
;
import
com.liquidnet.service.sweet.mapper.*
;
...
@@ -36,6 +37,8 @@ public class RedisDataUtils {
...
@@ -36,6 +37,8 @@ public class RedisDataUtils {
private
SweetManualSortMapper
sweetManualSortMapper
;
private
SweetManualSortMapper
sweetManualSortMapper
;
@Autowired
@Autowired
private
SweetManualNotifyMapper
sweetManualNotifyMapper
;
private
SweetManualNotifyMapper
sweetManualNotifyMapper
;
@Autowired
private
SweetManualShopMapper
sweetManualShopMapper
;
public
List
<
SweetManualAppletDto
>
setPushList
()
{
public
List
<
SweetManualAppletDto
>
setPushList
()
{
...
@@ -193,20 +196,20 @@ public class RedisDataUtils {
...
@@ -193,20 +196,20 @@ public class RedisDataUtils {
redisUtil
.
del
(
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_SORT
.
concat
(
manualId
));
//列表
redisUtil
.
del
(
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_SORT
.
concat
(
manualId
));
//列表
}
}
public
void
setArtistsRelationRedisVo
(
String
uid
,
String
artistsId
,
String
type
)
{
public
void
setArtistsRelationRedisVo
(
String
uid
,
String
artistsId
,
String
type
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_ARTISTS_RELATION
.
concat
(
uid
);
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_ARTISTS_RELATION
.
concat
(
uid
);
SweetArtistsRelationVo
vo
=
getArtistsRelationRedisVo
(
uid
);
SweetArtistsRelationVo
vo
=
getArtistsRelationRedisVo
(
uid
);
vo
.
setUid
(
uid
);
vo
.
setUid
(
uid
);
if
(
type
.
equalsIgnoreCase
(
"sign"
))
{
if
(
type
.
equalsIgnoreCase
(
"sign"
))
{
if
(
vo
.
getSignList
().
contains
(
artistsId
))
{
if
(
vo
.
getSignList
().
contains
(
artistsId
))
{
vo
.
getSignList
().
remove
(
artistsId
);
vo
.
getSignList
().
remove
(
artistsId
);
}
else
{
}
else
{
vo
.
getSignList
().
add
(
artistsId
);
vo
.
getSignList
().
add
(
artistsId
);
}
}
}
else
if
(
type
.
equalsIgnoreCase
(
"watch"
))
{
}
else
if
(
type
.
equalsIgnoreCase
(
"watch"
))
{
if
(
vo
.
getWatchList
().
contains
(
artistsId
))
{
if
(
vo
.
getWatchList
().
contains
(
artistsId
))
{
vo
.
getWatchList
().
remove
(
artistsId
);
vo
.
getWatchList
().
remove
(
artistsId
);
}
else
{
}
else
{
vo
.
getWatchList
().
add
(
artistsId
);
vo
.
getWatchList
().
add
(
artistsId
);
}
}
}
}
...
@@ -225,6 +228,24 @@ public class RedisDataUtils {
...
@@ -225,6 +228,24 @@ public class RedisDataUtils {
}
}
}
}
//获取 商铺
public
List
<
SweetManualShop
>
setManualShopRedisData
(
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_SHOP
.
concat
(
manualId
);
List
<
SweetManualShop
>
list
=
sweetManualShopMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
SweetManualShop
.
class
).
eq
(
SweetManualShop:
:
getManualId
,
manualId
).
orderBy
(
true
,
false
,
SweetManualShop:
:
getSort
));
redisUtil
.
set
(
redisKey
,
list
);
return
list
;
}
public
List
<
SweetManualShop
>
getManualShopRedisData
(
String
manualId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_SHOP
.
concat
(
manualId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
setManualShopRedisData
(
manualId
);
}
else
{
return
(
List
<
SweetManualShop
>)
obj
;
}
}
// // 小程序演出提醒
// // 小程序演出提醒
// public void setSweetRemind(String openId, String unionId, String performancesId, KylinPerformanceVo performanceInfo) {
// public void setSweetRemind(String openId, String unionId, String performancesId, KylinPerformanceVo performanceInfo) {
// String redisKey = SweetConstant.REDIS_KEY_SWEET_REMIND.concat(unionId);
// String redisKey = SweetConstant.REDIS_KEY_SWEET_REMIND.concat(unionId);
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/vo/SweetManualShopAllVo.java
0 → 100644
View file @
a7860f8d
package
com
.
liquidnet
.
service
.
sweet
.
vo
;
import
com.liquidnet.service.sweet.entity.SweetManualShop
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
@ApiModel
public
class
SweetManualShopAllVo
implements
Serializable
,
Cloneable
{
@ApiModelProperty
(
"推荐"
)
private
List
<
SweetManualShop
>
recommend
;
@ApiModelProperty
(
"吃喝"
)
private
List
<
SweetManualShop
>
eat
;
@ApiModelProperty
(
"玩乐"
)
private
List
<
SweetManualShop
>
play
;
private
static
final
SweetManualShopAllVo
obj
=
new
SweetManualShopAllVo
();
public
static
SweetManualShopAllVo
getNew
()
{
try
{
return
(
SweetManualShopAllVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetManualShopAllVo
();
}
}
}
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