记得上下班打卡 | 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
9d6fdcc2
Commit
9d6fdcc2
authored
Mar 31, 2026
by
姜秀龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收钱 admin
parent
cb751a2d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
32 deletions
+88
-32
sqb_goods_integration.sql
docu/sqb_goods_integration.sql
+1
-0
GoblinSqbPerfLinkedGoodsVo.java
...net/service/goblin/dto/vo/GoblinSqbPerfLinkedGoodsVo.java
+45
-0
GoblinSqbPerfListRespVo.java
...uidnet/service/goblin/dto/vo/GoblinSqbPerfListRespVo.java
+1
-1
index.html
...n/resources/templates/zhengzai/goblin/sqbGoods/index.html
+24
-14
SqbPerformanceGoodsServiceImpl.java
...i/goblin/service/impl/SqbPerformanceGoodsServiceImpl.java
+17
-17
No files found.
docu/sqb_goods_integration.sql
View file @
9d6fdcc2
...
@@ -33,6 +33,7 @@ CREATE TABLE `goblin_sqb_performance_goods` (
...
@@ -33,6 +33,7 @@ CREATE TABLE `goblin_sqb_performance_goods` (
`spu_id`
VARCHAR
(
64
)
NOT
NULL
COMMENT
'商品ID'
,
`spu_id`
VARCHAR
(
64
)
NOT
NULL
COMMENT
'商品ID'
,
`sku_id`
VARCHAR
(
64
)
NOT
NULL
COMMENT
'SKU ID'
,
`sku_id`
VARCHAR
(
64
)
NOT
NULL
COMMENT
'SKU ID'
,
`sort`
INT
NOT
NULL
DEFAULT
0
COMMENT
'排序权重'
,
`sort`
INT
NOT
NULL
DEFAULT
0
COMMENT
'排序权重'
,
`settlement_price`
DECIMAL
(
10
,
2
)
DEFAULT
NULL
COMMENT
'换购价格(不设置则按商品售价售卖)'
,
`status`
TINYINT
NOT
NULL
DEFAULT
1
COMMENT
'0-禁用 1-启用'
,
`status`
TINYINT
NOT
NULL
DEFAULT
1
COMMENT
'0-禁用 1-启用'
,
`created_at`
timestamp
NULL
DEFAULT
NULL
,
`created_at`
timestamp
NULL
DEFAULT
NULL
,
`updated_at`
timestamp
NULL
DEFAULT
NULL
,
`updated_at`
timestamp
NULL
DEFAULT
NULL
,
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinSqbPerfLinkedGoodsVo.java
0 → 100644
View file @
9d6fdcc2
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* 演出关联收钱吧商品列表项(本地关联视图)
*/
@Data
public
class
GoblinSqbPerfLinkedGoodsVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"商品skuId(本地)"
)
private
String
skuId
;
@ApiModelProperty
(
value
=
"商品spuId(本地)"
)
private
String
spuId
;
@ApiModelProperty
(
value
=
"商品spu名称(本地)"
)
private
String
spuName
;
@ApiModelProperty
(
value
=
"商品sku名称(本地)"
)
private
String
skuName
;
@ApiModelProperty
(
value
=
"商品头图(本地)"
)
private
String
coverPic
;
@ApiModelProperty
(
value
=
"商品售价(分,本地)"
)
private
Long
price
;
@ApiModelProperty
(
value
=
"商品库存(本地)"
)
private
Integer
stock
;
@ApiModelProperty
(
value
=
"排序权重"
)
private
Integer
sort
;
@ApiModelProperty
(
value
=
"换购价格"
)
private
BigDecimal
settlementPrice
;
@ApiModelProperty
(
value
=
"状态 0-禁用 1-启用"
)
private
Integer
status
;
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinSqbPerfListRespVo.java
View file @
9d6fdcc2
...
@@ -12,5 +12,5 @@ public class GoblinSqbPerfListRespVo implements Serializable {
...
@@ -12,5 +12,5 @@ public class GoblinSqbPerfListRespVo implements Serializable {
private
Integer
autoOffline
;
private
Integer
autoOffline
;
/** 关联商品列表 */
/** 关联商品列表 */
private
List
<
GoblinSqbPerfGoodsVo
>
goodsList
;
private
List
<
GoblinSqbPerf
Linked
GoodsVo
>
goodsList
;
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/goblin/sqbGoods/index.html
View file @
9d6fdcc2
...
@@ -158,7 +158,8 @@
...
@@ -158,7 +158,8 @@
skuId
:
item
.
skuId
,
spuId
:
item
.
spuId
,
skuId
:
item
.
skuId
,
spuId
:
item
.
spuId
,
spuName
:
item
.
spuName
||
item
.
skuName
,
skuName
:
item
.
skuName
,
spuName
:
item
.
spuName
||
item
.
skuName
,
skuName
:
item
.
skuName
,
coverPic
:
item
.
coverPic
||
''
,
price
:
item
.
price
,
stock
:
item
.
stock
,
coverPic
:
item
.
coverPic
||
''
,
price
:
item
.
price
,
stock
:
item
.
stock
,
settlementPrice
:
item
.
settlementPrice
||
''
settlementPrice
:
(
item
.
settlementPrice
!=
null
?
item
.
settlementPrice
:
''
),
persisted
:
true
};
};
});
});
renderLinkedGoods
();
renderLinkedGoods
();
...
@@ -207,7 +208,7 @@
...
@@ -207,7 +208,7 @@
coverPic
:
item
.
skuPic
||
item
.
coverPic
||
''
,
coverPic
:
item
.
skuPic
||
item
.
coverPic
||
''
,
price
:
item
.
price
,
price
:
item
.
price
,
stock
:
(
item
.
skuStock
!=
null
?
item
.
skuStock
:
item
.
stock
),
stock
:
(
item
.
skuStock
!=
null
?
item
.
skuStock
:
item
.
stock
),
settlementPrice
:
null
,
autoOffline
:
0
settlementPrice
:
null
,
autoOffline
:
0
,
persisted
:
false
});
});
renderLinkedGoods
();
renderLinkedGoods
();
layer
.
msg
(
'已添加,可配置换购价后保存'
);
layer
.
msg
(
'已添加,可配置换购价后保存'
);
...
@@ -227,21 +228,29 @@
...
@@ -227,21 +228,29 @@
}
}
function
removeLinked
(
idx
)
{
function
removeLinked
(
idx
)
{
var
skuId
=
linkedGoods
[
idx
].
skuId
;
var
item
=
linkedGoods
[
idx
];
// mock 数据直接从内存移除,无需请求接口
if
(
!
item
)
{
if
(
skuId
.
startsWith
(
'SKU_MOCK_'
))
{
return
;
}
// 未入库(本次新增、未保存)直接从页面移除
if
(
!
item
.
persisted
||
(
item
.
skuId
&&
item
.
skuId
.
startsWith
(
'SKU_MOCK_'
)))
{
linkedGoods
.
splice
(
idx
,
1
);
linkedGoods
.
splice
(
idx
,
1
);
renderLinkedGoods
();
renderLinkedGoods
();
layer
.
msg
(
'已从待保存列表移除'
);
return
;
return
;
}
}
if
(
!
confirm
(
'确定取消关联该商品?'
))
return
;
$
.
post
(
prefix
+
'/unbind'
,
{
performancesId
:
performancesId
,
skuId
:
skuId
},
function
(
resp
)
{
$
.
modal
.
confirm
(
'确认要取消关联该商品吗?'
,
function
()
{
if
(
resp
.
code
===
0
)
{
$
.
post
(
prefix
+
'/unbind'
,
{
performancesId
:
performancesId
,
skuId
:
item
.
skuId
},
function
(
resp
)
{
linkedGoods
.
splice
(
idx
,
1
);
if
(
resp
.
code
===
0
)
{
renderLinkedGoods
();
linkedGoods
.
splice
(
idx
,
1
);
}
else
{
renderLinkedGoods
();
alert
(
resp
.
msg
||
resp
.
message
||
'操作失败'
);
layer
.
msg
(
'已取消关联'
);
}
}
else
{
layer
.
msg
(
resp
.
msg
||
resp
.
message
||
'操作失败'
,
{
icon
:
2
});
}
});
});
});
}
}
...
@@ -250,7 +259,7 @@
...
@@ -250,7 +259,7 @@
var
items
=
linkedGoods
.
map
(
function
(
item
)
{
var
items
=
linkedGoods
.
map
(
function
(
item
)
{
return
{
return
{
skuId
:
item
.
skuId
,
sort
:
0
,
skuId
:
item
.
skuId
,
sort
:
0
,
settlementPrice
:
item
.
settlementPrice
||
null
settlementPrice
:
(
item
.
settlementPrice
===
''
||
item
.
settlementPrice
==
null
)
?
null
:
item
.
settlementPrice
};
};
});
});
$
.
ajax
({
$
.
ajax
({
...
@@ -261,6 +270,7 @@
...
@@ -261,6 +270,7 @@
success
:
function
(
resp
)
{
success
:
function
(
resp
)
{
if
(
resp
.
code
===
0
)
{
if
(
resp
.
code
===
0
)
{
layer
.
msg
(
'保存成功'
);
layer
.
msg
(
'保存成功'
);
loadLinkedGoods
();
}
else
{
}
else
{
layer
.
msg
(
resp
.
msg
||
resp
.
message
||
'保存失败'
,
{
icon
:
2
});
layer
.
msg
(
resp
.
msg
||
resp
.
message
||
'保存失败'
,
{
icon
:
2
});
}
}
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/SqbPerformanceGoodsServiceImpl.java
View file @
9d6fdcc2
...
@@ -7,7 +7,7 @@ import com.liquidnet.client.admin.zhengzai.goblin.service.ISqbPerformanceGoodsSe
...
@@ -7,7 +7,7 @@ import com.liquidnet.client.admin.zhengzai.goblin.service.ISqbPerformanceGoodsSe
import
com.liquidnet.client.admin.zhengzai.goblin.utils.GoblinRedisUtils
;
import
com.liquidnet.client.admin.zhengzai.goblin.utils.GoblinRedisUtils
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.vo.GoblinAdminSqbGoodsVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinAdminSqbGoodsVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSqbPerfGoodsVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSqbPerf
Linked
GoodsVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSqbPerfListRespVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSqbPerfListRespVo
;
import
com.liquidnet.service.goblin.entity.GoblinGoodsSku
;
import
com.liquidnet.service.goblin.entity.GoblinGoodsSku
;
import
com.liquidnet.service.goblin.entity.GoblinSqbPerformanceConfig
;
import
com.liquidnet.service.goblin.entity.GoblinSqbPerformanceConfig
;
...
@@ -200,23 +200,23 @@ public class SqbPerformanceGoodsServiceImpl implements ISqbPerformanceGoodsServi
...
@@ -200,23 +200,23 @@ public class SqbPerformanceGoodsServiceImpl implements ISqbPerformanceGoodsServi
Map
<
String
,
GoblinGoodsSku
>
skuMap
=
goblinGoodsSkuMapper
.
selectList
(
skuQuery
)
Map
<
String
,
GoblinGoodsSku
>
skuMap
=
goblinGoodsSkuMapper
.
selectList
(
skuQuery
)
.
stream
().
collect
(
Collectors
.
toMap
(
GoblinGoodsSku:
:
getSkuId
,
Function
.
identity
(),
(
a
,
b
)
->
a
));
.
stream
().
collect
(
Collectors
.
toMap
(
GoblinGoodsSku:
:
getSkuId
,
Function
.
identity
(),
(
a
,
b
)
->
a
));
List
<
GoblinSqbPerfGoodsVo
>
goodsList
=
new
ArrayList
<>();
List
<
GoblinSqbPerf
Linked
GoodsVo
>
goodsList
=
new
ArrayList
<>();
for
(
GoblinSqbPerformanceGoods
rel
:
relations
)
{
for
(
GoblinSqbPerformanceGoods
rel
:
relations
)
{
GoblinSqbPerf
GoodsVo
vo
=
new
GoblinSqbPerf
GoodsVo
();
GoblinSqbPerf
LinkedGoodsVo
vo
=
new
GoblinSqbPerfLinked
GoodsVo
();
//
vo.setSkuId(rel.getSkuId());
vo
.
setSkuId
(
rel
.
getSkuId
());
//
vo.setSpuId(rel.getSpuId());
vo
.
setSpuId
(
rel
.
getSpuId
());
//
vo.setSort(rel.getSort());
vo
.
setSort
(
rel
.
getSort
());
//
vo.setSettlementPrice(rel.getSettlementPrice());
vo
.
setSettlementPrice
(
rel
.
getSettlementPrice
());
//
vo.setStatus(rel.getStatus());
vo
.
setStatus
(
rel
.
getStatus
());
//
//
GoblinGoodsSku sku = skuMap.get(rel.getSkuId());
GoblinGoodsSku
sku
=
skuMap
.
get
(
rel
.
getSkuId
());
//
if (sku != null) {
if
(
sku
!=
null
)
{
//
vo.setSkuName(sku.getName());
vo
.
setSkuName
(
sku
.
getName
());
//
vo.setSpuName(sku.getName());
vo
.
setSpuName
(
sku
.
getName
());
//
vo.setCoverPic(sku.getSkuPic());
vo
.
setCoverPic
(
sku
.
getSkuPic
());
//
vo.setPrice(sku.getPrice() != null ? sku.getPrice().longValue() : null);
vo
.
setPrice
(
sku
.
getPrice
()
!=
null
?
sku
.
getPrice
().
longValue
()
:
null
);
//
vo.setStock(sku.getSkuStock());
vo
.
setStock
(
sku
.
getSkuStock
());
//
}
}
goodsList
.
add
(
vo
);
goodsList
.
add
(
vo
);
}
}
resp
.
setGoodsList
(
goodsList
);
resp
.
setGoodsList
(
goodsList
);
...
...
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