记得上下班打卡 | 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
2508891b
Commit
2508891b
authored
Jun 30, 2026
by
姜秀龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c端完善
parent
8d996bc9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
19 deletions
+56
-19
liquidnet-service-kylin.yml
...t-bus-config/liquidnet-config/liquidnet-service-kylin.yml
+2
-0
KylinArtistFrontServiceImpl.java
...rvice/kylin/service/impl/KylinArtistFrontServiceImpl.java
+54
-19
No files found.
liquidnet-bus-config/liquidnet-config/liquidnet-service-kylin.yml
View file @
2508891b
...
...
@@ -161,6 +161,8 @@ global-auth:
-
${liquidnet.info.context}/health
# 演出阵容
-
${liquidnet.info.context}/performance/artists/**
# 艺人详情 C 端(无需登录)
-
${liquidnet.info.context}/artist/**
oncheck-url-pattern
:
-
${liquidnet.info.context}/order/details
-
${liquidnet.info.context}/order/transfer*
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinArtistFrontServiceImpl.java
View file @
2508891b
...
...
@@ -19,6 +19,7 @@ import com.liquidnet.service.kylin.service.IKylinArtistFrontService;
import
com.liquidnet.service.kylin.utils.DataUtils
;
import
com.liquidnet.service.kylin.utils.GoblinRedisUtils
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -28,6 +29,7 @@ import java.util.ArrayList;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigDecimal
;
import
java.util.stream.Collectors
;
@Slf4j
...
...
@@ -73,9 +75,6 @@ public class KylinArtistFrontServiceImpl implements IKylinArtistFrontService {
@Override
public
List
<
String
>
getArtistAlbum
(
String
artistId
)
{
if
(
loadArtistForFront
(
artistId
)
==
null
)
{
return
new
ArrayList
<>();
}
String
cacheKey
=
KylinRedisConst
.
ARTIST_ALBUM
+
artistId
;
List
<
String
>
cached
=
dataUtils
.
getArtistFrontCache
(
cacheKey
);
if
(
cached
!=
null
)
{
...
...
@@ -92,9 +91,6 @@ public class KylinArtistFrontServiceImpl implements IKylinArtistFrontService {
@Override
public
List
<
KylinArtistPerformanceFrontVo
>
getArtistPerformances
(
String
artistId
)
{
if
(
loadArtistForFront
(
artistId
)
==
null
)
{
return
new
ArrayList
<>();
}
String
cacheKey
=
KylinRedisConst
.
ARTIST_PERFORMANCES
+
artistId
;
List
<
KylinArtistPerformanceDao
>
baseList
=
dataUtils
.
getArtistFrontCache
(
cacheKey
);
if
(
baseList
==
null
)
{
...
...
@@ -106,17 +102,21 @@ public class KylinArtistFrontServiceImpl implements IKylinArtistFrontService {
@Override
public
List
<
KylinArtistProductFrontVo
>
getArtistProducts
(
String
artistId
)
{
if
(
loadArtistForFront
(
artistId
)
==
null
)
{
return
new
ArrayList
<>();
}
String
cacheKey
=
KylinRedisConst
.
ARTIST_PRODUCTS
+
artistId
;
List
<
KylinArtistProductFrontVo
>
cached
=
dataUtils
.
getArtistFrontCache
(
cacheKey
);
if
(
cached
!=
null
)
{
return
cached
;
List
<
KylinArtistProduct
>
baseList
=
dataUtils
.
getArtistFrontCache
(
cacheKey
);
if
(
baseList
==
null
)
{
baseList
=
loadProductRelationBaseList
(
artistId
);
dataUtils
.
setArtistFrontCache
(
cacheKey
,
baseList
);
}
return
buildProductFrontList
(
baseList
);
}
private
List
<
KylinArtistProduct
>
loadProductRelationBaseList
(
String
artistId
)
{
List
<
KylinArtistProduct
>
relations
=
kylinArtistProductMapper
.
selectByArtistId
(
artistId
);
if
(
CollectionUtils
.
isEmpty
(
relations
))
{
return
new
ArrayList
<>();
}
List
<
KylinArtistProductFrontVo
>
list
=
loadProductFrontList
(
artistId
);
dataUtils
.
setArtistFrontCache
(
cacheKey
,
list
);
return
list
;
return
relations
;
}
private
List
<
KylinArtistPerformanceDao
>
loadPerformanceBaseList
(
String
artistId
)
{
...
...
@@ -161,8 +161,7 @@ public class KylinArtistFrontServiceImpl implements IKylinArtistFrontService {
return
result
;
}
private
List
<
KylinArtistProductFrontVo
>
loadProductFrontList
(
String
artistId
)
{
List
<
KylinArtistProduct
>
relations
=
kylinArtistProductMapper
.
selectByArtistId
(
artistId
);
private
List
<
KylinArtistProductFrontVo
>
buildProductFrontList
(
List
<
KylinArtistProduct
>
relations
)
{
List
<
KylinArtistProductFrontVo
>
result
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
relations
))
{
return
result
;
...
...
@@ -176,7 +175,7 @@ public class KylinArtistFrontServiceImpl implements IKylinArtistFrontService {
vo
.
setSpuId
(
goods
.
getSpuId
());
vo
.
setName
(
goods
.
getName
());
vo
.
setCoverPic
(
goods
.
getCoverPic
());
vo
.
setSellPrice
(
goods
.
getSellPrice
(
));
vo
.
setSellPrice
(
resolveGoodsSellPrice
(
goods
));
vo
.
setSort
(
relation
.
getSort
());
result
.
add
(
vo
);
}
...
...
@@ -184,7 +183,43 @@ public class KylinArtistFrontServiceImpl implements IKylinArtistFrontService {
}
/**
* 按 ID 取艺人(不按 status 过滤;列表/选艺人场景在各自入口筛 status=1)
* SPU sellPrice 常为空,与 goblin 前台一致:SKU 最低价 → priceGe → priceLe
*/
private
BigDecimal
resolveGoodsSellPrice
(
GoblinGoodsInfoVo
goodsInfoVo
)
{
if
(
goodsInfoVo
==
null
)
{
return
null
;
}
if
(
goodsInfoVo
.
getSellPrice
()
!=
null
)
{
return
goodsInfoVo
.
getSellPrice
();
}
BigDecimal
minSkuPrice
=
null
;
if
(!
CollectionUtils
.
isEmpty
(
goodsInfoVo
.
getSkuIdList
()))
{
for
(
String
skuId
:
goodsInfoVo
.
getSkuIdList
())
{
GoblinGoodsSkuInfoVo
skuInfoVo
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
skuId
);
if
(
skuInfoVo
==
null
)
{
continue
;
}
BigDecimal
skuShowPrice
=
skuInfoVo
.
getSellPrice
()
!=
null
?
skuInfoVo
.
getSellPrice
()
:
skuInfoVo
.
getPrice
();
if
(
skuShowPrice
==
null
)
{
continue
;
}
if
(
minSkuPrice
==
null
||
skuShowPrice
.
compareTo
(
minSkuPrice
)
<
0
)
{
minSkuPrice
=
skuShowPrice
;
}
}
}
if
(
minSkuPrice
!=
null
)
{
return
minSkuPrice
;
}
if
(
goodsInfoVo
.
getPriceGe
()
!=
null
)
{
return
goodsInfoVo
.
getPriceGe
();
}
return
goodsInfoVo
.
getPriceLe
();
}
/**
* 简介详情用:按 artist_id 查 kylin_artist(不按 status 过滤)
*/
private
KylinArtist
loadArtistForFront
(
String
artistId
)
{
if
(
artistId
==
null
||
artistId
.
isEmpty
())
{
...
...
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