记得上下班打卡 | 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
ff33c406
Commit
ff33c406
authored
May 08, 2026
by
姜秀龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/dev-1.6-shouqianba' into container-test
parents
a2deeba5
e106aec9
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
176 additions
and
68 deletions
+176
-68
GoblinSqbOrderParam.java
...uidnet/service/goblin/dto/manage/GoblinSqbOrderParam.java
+1
-1
GoblinGoodsSkuInfoDetailVo.java
...net/service/goblin/dto/vo/GoblinGoodsSkuInfoDetailVo.java
+0
-3
GoblinSqbPerfListRespVo.java
...uidnet/service/goblin/dto/vo/GoblinSqbPerfListRespVo.java
+1
-1
GoblinSqbPerformanceGoodsInfoVo.java
...ervice/goblin/dto/vo/GoblinSqbPerformanceGoodsInfoVo.java
+4
-0
SqbPerformanceGoodsController.java
...roller/zhengzai/goblin/SqbPerformanceGoodsController.java
+1
-1
index.html
...n/resources/templates/zhengzai/goblin/sqbGoods/index.html
+2
-1
ISqbPerformanceGoodsService.java
.../zhengzai/goblin/service/ISqbPerformanceGoodsService.java
+1
-1
GoblinSqbPerformanceConfig.java
...net/service/goblin/entity/GoblinSqbPerformanceConfig.java
+1
-1
pom.xml
...dnet-service-goblin/liquidnet-service-goblin-impl/pom.xml
+6
-0
GoblinSqbController.java
...uidnet/service/goblin/controller/GoblinSqbController.java
+1
-1
GoblinFrontServiceImpl.java
...t/service/goblin/service/impl/GoblinFrontServiceImpl.java
+88
-49
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+28
-0
GoblinSqbOrderServiceImpl.java
...service/order/service/impl/GoblinSqbOrderServiceImpl.java
+42
-9
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinSqbOrderParam.java
View file @
ff33c406
...
...
@@ -23,7 +23,7 @@ public class GoblinSqbOrderParam {
@NotNull
(
message
=
"购买数量不能为空"
)
private
Integer
quantity
;
@ApiModelProperty
(
required
=
true
,
value
=
"关联演出ID"
)
@ApiModelProperty
(
required
=
true
,
value
=
"关联演出ID
(须与后台演出-商品关联一致;有换购价时按换购价计价)
"
)
@NotBlank
(
message
=
"关联演出ID不能为空"
)
private
String
performancesId
;
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsSkuInfoDetailVo.java
View file @
ff33c406
...
...
@@ -48,9 +48,6 @@ public class GoblinGoodsSkuInfoDetailVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
51
,
value
=
"是否实名[0-否|1-是,表示该商品需要实名关联]"
)
private
Integer
isTrueName
;
@ApiModelProperty
(
position
=
52
,
value
=
"关联演出ID"
)
private
String
performancesId
;
private
static
final
GoblinGoodsSkuInfoDetailVo
obj
=
new
GoblinGoodsSkuInfoDetailVo
();
public
static
GoblinGoodsSkuInfoDetailVo
getNew
()
{
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinSqbPerfListRespVo.java
View file @
ff33c406
...
...
@@ -8,7 +8,7 @@ import java.util.List;
public
class
GoblinSqbPerfListRespVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 演出结束
自动下架 0-否 1-是(全局配置
) */
/** 演出结束
后不在前台列表展示 0-否 1-是(全局配置,仅列表隐藏
) */
private
Integer
autoOffline
;
/** 关联商品列表 */
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinSqbPerformanceGoodsInfoVo.java
View file @
ff33c406
...
...
@@ -6,6 +6,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* 收钱吧-演出关联商品前端展示VO
...
...
@@ -20,4 +21,7 @@ public class GoblinSqbPerformanceGoodsInfoVo extends GoblinGoodsInfoVo {
@ApiModelProperty
(
value
=
"换购价(不设置则按正常价)"
)
private
BigDecimal
settlementPrice
;
@ApiModelProperty
(
value
=
"已上架 SKU 明细(含 restStock、stockLess、canBuy 等,与商品详情接口字段一致)"
)
private
List
<
GoblinGoodsSkuInfoDetailVo
>
goblinGoodsSkuInfoVolist
;
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/SqbPerformanceGoodsController.java
View file @
ff33c406
...
...
@@ -65,7 +65,7 @@ public class SqbPerformanceGoodsController extends BaseController {
@ApiOperation
(
"批量绑定演出与商品(含换购价、演出级自动下架全局配置)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
required
=
true
,
dataType
=
"String"
,
name
=
"performancesId"
,
value
=
"演出ID"
),
@ApiImplicitParam
(
type
=
"query"
,
required
=
false
,
dataType
=
"int"
,
name
=
"autoOffline"
,
value
=
"
自动下架开关 0-否 1-是
"
),
@ApiImplicitParam
(
type
=
"query"
,
required
=
false
,
dataType
=
"int"
,
name
=
"autoOffline"
,
value
=
"
演出结束后不在前台列表展示 0-否 1-是(不取消关联、不改商品上下架)
"
),
})
public
AjaxResult
bind
(
@RequestParam
(
"performancesId"
)
String
performancesId
,
@RequestParam
(
value
=
"autoOffline"
,
required
=
false
,
defaultValue
=
"0"
)
Integer
autoOffline
,
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/goblin/sqbGoods/index.html
View file @
ff33c406
...
...
@@ -39,8 +39,9 @@
<div
class=
"auto-offline-bar"
>
<label>
<input
type=
"checkbox"
id=
"globalAutoOffline"
onchange=
"toggleGlobalAutoOffline(this)"
/>
演出结束
商品自动下架
演出结束
后不在前台推荐列表展示
</label>
<span
class=
"tip"
>
开启后仅隐藏 APP/小程序演出关联商品列表,不取消关联、不修改商品上下架
</span>
</div>
<div
class=
"table-responsive"
>
<table
class=
"table table-bordered"
id=
"linkedGoodsTable"
>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/ISqbPerformanceGoodsService.java
View file @
ff33c406
...
...
@@ -18,7 +18,7 @@ public interface ISqbPerformanceGoodsService {
*
* @param performancesId 演出ID
* @param items 绑定项列表(仅含 SKU ID、排序、换购价)
* @param autoOffline 演出结束
自动下架 0-否 1-是(全局配置
)
* @param autoOffline 演出结束
后不在前台列表展示 0-否 1-是(全局配置,仅列表隐藏
)
* @return 操作结果
*/
ResponseDto
<
Boolean
>
bind
(
String
performancesId
,
List
<
SqbPerfGoodsBindItemParam
>
items
,
Integer
autoOffline
);
...
...
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinSqbPerformanceConfig.java
View file @
ff33c406
...
...
@@ -30,7 +30,7 @@ public class GoblinSqbPerformanceConfig implements Serializable {
private
String
performancesId
;
/**
* 演出结束
自动下架 0-否 1-是
* 演出结束
后不在前台关联商品列表展示 0-否 1-是(仅列表隐藏,不取消关联、不修改商品上下架)
*/
private
Integer
autoOffline
;
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/pom.xml
View file @
ff33c406
...
...
@@ -82,6 +82,12 @@
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.liquidnet
</groupId>
<artifactId>
liquidnet-service-kylin-api
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinSqbController.java
View file @
ff33c406
...
...
@@ -102,7 +102,7 @@ public class GoblinSqbController {
}
@GetMapping
(
"/performance/selectGoods"
)
@ApiOperation
(
"按演出ID获得已关联商品列表(pageNumber从0开始)"
)
@ApiOperation
(
"按演出ID获得已关联商品列表(pageNumber从0开始)
;若后台开启「演出结束后不在前台列表展示」且演出已结束则返回空列表
"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
required
=
true
,
dataType
=
"String"
,
name
=
"performancesId"
,
value
=
"演出ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
,
name
=
"pageSize"
,
value
=
"分页大小"
),
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinFrontServiceImpl.java
View file @
ff33c406
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
ff33c406
...
...
@@ -28,9 +28,14 @@ import com.liquidnet.service.goblin.entity.GoblinSqbPerformanceGoods;
import
com.liquidnet.service.goblin.mapper.GoblinBraceletOrderMapper
;
import
com.liquidnet.service.goblin.mapper.GoblinSqbPerformanceGoodsMapper
;
import
com.liquidnet.service.goblin.service.impl.inner.GoblinNftJobServiceImpl
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.DigestUtils
;
...
...
@@ -52,6 +57,8 @@ public class GoblinRedisUtils {
@Autowired
public
RedisUtil
redisUtil
;
@Autowired
private
MongoTemplate
mongoTemplate
;
@Autowired
GoblinMongoUtils
goblinMongoUtils
;
@Autowired
GoblinNftJobServiceImpl
goblinNftJobService
;
...
...
@@ -3064,6 +3071,27 @@ public class GoblinRedisUtils {
/* --------------------------------收钱吧相关--------------------------------- */
/**
* 根据演出 id 获取演出详情(与 order 模块 {@code com.liquidnet.service.order.utils.DataUtils#getPerformanceVo} 逻辑一致)
*/
public
KylinPerformanceVo
getPerformanceVo
(
String
performanceId
)
{
if
(!
StringUtils
.
hasText
(
performanceId
))
{
return
null
;
}
String
id
=
performanceId
.
trim
();
Object
obj
=
redisUtil
.
get
(
KylinRedisConst
.
PERFORMANCES
+
id
);
if
(
obj
!=
null
)
{
return
(
KylinPerformanceVo
)
obj
;
}
KylinPerformanceVo
performanceData
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
id
)),
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
redisUtil
.
set
(
KylinRedisConst
.
PERFORMANCES
+
id
,
performanceData
);
return
performanceData
;
}
public
void
setSqbPerformanceGoodsListCache
(
String
performancesId
,
List
<
GoblinSqbPerformanceGoods
>
relations
)
{
String
key
=
GoblinRedisConst
.
SQB_PERFORMANCE_GOODS
.
concat
(
performancesId
);
redisUtil
.
set
(
key
,
relations
,
RedisKeyExpireConst
.
SQB_PERFORMANCE_GOODS_EXPIRE
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinSqbOrderServiceImpl.java
View file @
ff33c406
...
...
@@ -67,6 +67,9 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService {
String
performancesId
=
orderParam
.
getPerformancesId
();
Integer
quantity
=
orderParam
.
getQuantity
();
String
openId
=
orderParam
.
getOpenId
();
if
(
StringUtil
.
isBlank
(
performancesId
))
{
return
ResponseDto
.
failure
(
"关联演出ID不能为空"
);
}
if
(
openId
==
null
||
openId
.
trim
().
isEmpty
())
{
return
ResponseDto
.
failure
(
"微信 openId 不能为空"
);
}
...
...
@@ -86,15 +89,15 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService {
return
ResponseDto
.
failure
(
"商品与演出关联不存在"
);
}
boolean
skuIdExists
=
false
;
GoblinSqbPerformanceGoods
matchedPerfRel
=
null
;
for
(
GoblinSqbPerformanceGoods
goblinSqbPerformanceGoods
:
performanceGoodsListCache
)
{
if
(
skuId
.
equals
(
goblinSqbPerformanceGoods
.
getSkuId
()))
{
skuIdExists
=
true
;
matchedPerfRel
=
goblinSqbPerformanceGoods
;
break
;
}
}
if
(
!
skuIdExists
)
{
if
(
matchedPerfRel
==
null
)
{
log
.
error
(
"[收钱吧下单] 演出-商品关联不存在或已禁用,performancesId={}, skuId={}"
,
performancesId
,
skuId
);
return
ResponseDto
.
failure
(
"商品与演出关联不存在"
);
}
...
...
@@ -121,6 +124,11 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService {
}
log
.
info
(
"[收钱吧下单] 扣减库存成功,skuId={}, 剩余库存={}"
,
skuId
,
remaining
);
BigDecimal
unitPriceYuan
=
resolveSqbUnitPriceYuan
(
skuVo
,
matchedPerfRel
);
log
.
info
(
"[收钱吧下单] 单价(元) performancesId={}, skuId={}, settlementPrice={}, 实际计价={}"
,
performancesId
,
skuId
,
matchedPerfRel
!=
null
?
matchedPerfRel
.
getSettlementPrice
()
:
null
,
unitPriceYuan
);
// 获取该商品对应的商城的编号和密码
GoblinSqbGoodsExtVo
sqbGoodsExt
=
goblinSqbRedisUtils
.
getSqbGoodsExt
(
spuId
,
skuId
);
if
(
sqbGoodsExt
==
null
)
{
...
...
@@ -133,7 +141,7 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService {
sqbGoodsExt
.
getSignature
(),
userId
,
Collections
.
singletonList
(
buildSqbCheckOutItem
(
skuVo
,
quantity
,
sqbGoodsExt
.
getSqbSkuId
(),
sqbGoodsExt
.
getSqbSpuId
())));
quantity
,
sqbGoodsExt
.
getSqbSkuId
(),
sqbGoodsExt
.
getSqbSpuId
()
,
unitPriceYuan
)));
if
(
settlementData
==
null
)
{
goblinRedisUtils
.
incrSkuStock
(
null
,
skuId
,
quantity
);
return
ResponseDto
.
failure
(
"创建结算明细失败"
);
...
...
@@ -231,10 +239,10 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService {
storeOrderVo
.
setUserName
(
""
);
storeOrderVo
.
setUserMobile
(
""
);
BigDecimal
skuPrice
=
skuInfo
!=
null
?
skuInfo
.
getPrice
()
:
BigDecimal
.
ZERO
;
BigDecimal
skuPrice
=
unitPriceYuan
;
BigDecimal
priceTotal
=
skuPrice
.
multiply
(
new
BigDecimal
(
quantity
));
storeOrderVo
.
setPriceTotal
(
priceTotal
);
storeOrderVo
.
setPriceActual
(
priceTotal
);
//
收钱吧暂无运费及优惠逻辑,实际价格等于总价
storeOrderVo
.
setPriceActual
(
priceTotal
);
//
演出关联换购价或 SKU 售价,无额外运费/券
storeOrderVo
.
setPriceRefund
(
BigDecimal
.
ZERO
);
storeOrderVo
.
setPriceExpress
(
BigDecimal
.
ZERO
);
storeOrderVo
.
setPriceCoupon
(
BigDecimal
.
ZERO
);
...
...
@@ -389,15 +397,40 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService {
* @param sqbSpuId
* @return
*/
/**
* 演出入口下单:后台为该 SKU 配置了换购价且大于 0 时用换购价(元),否则用 SKU 销售价,再否则现价;换购价高于售价时按售价避免多收。
*/
private
BigDecimal
resolveSqbUnitPriceYuan
(
GoblinGoodsSkuInfoVo
skuVo
,
GoblinSqbPerformanceGoods
perfRel
)
{
if
(
skuVo
==
null
)
{
return
BigDecimal
.
ZERO
;
}
BigDecimal
base
=
skuVo
.
getSellPrice
()
!=
null
?
skuVo
.
getSellPrice
()
:
skuVo
.
getPrice
();
if
(
base
==
null
)
{
base
=
BigDecimal
.
ZERO
;
}
if
(
perfRel
==
null
||
perfRel
.
getSettlementPrice
()
==
null
)
{
return
base
;
}
BigDecimal
sp
=
perfRel
.
getSettlementPrice
();
if
(
sp
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
return
base
;
}
if
(
sp
.
compareTo
(
base
)
>
0
)
{
return
base
;
}
return
sp
;
}
private
SettlementCreateRequest
.
CheckoutItem
buildSqbCheckOutItem
(
GoblinGoodsSkuInfoVo
skuVo
,
Integer
quantity
,
String
sqbSkuId
,
String
sqbSpuId
)
{
String
sqbSpuId
,
BigDecimal
unitPriceYuan
)
{
// 获取商品与收钱吧商品对应的关联的skuId、spuId
SettlementCreateRequest
.
CheckoutItem
checkoutItem
=
new
SettlementCreateRequest
.
CheckoutItem
();
checkoutItem
.
setSpuId
(
sqbSpuId
);
checkoutItem
.
setSkuId
(
sqbSkuId
);
checkoutItem
.
setPrice
(
GoblinSqbConvertUtils
.
yuanToFen
(
skuVo
.
getPrice
()
));
checkoutItem
.
setPrice
(
GoblinSqbConvertUtils
.
yuanToFen
(
unitPriceYuan
));
checkoutItem
.
setQuantity
(
String
.
valueOf
(
quantity
));
checkoutItem
.
setType
((
byte
)
0
);
checkoutItem
.
setTitle
(
skuVo
.
getName
());
...
...
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