Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-goods-listing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7e962b35
authored
May 11, 2026
by
zhoulm
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
分账对账规则不再支持商品分类配置
1 parent
71f45971
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
rpc-dj-goods-listing/src/main/java/cn/com/glsx/dj/goods/listing/service/GoodsListingGoodsTypeGroupRelationService.java
rpc-dj-goods-listing/src/main/java/cn/com/glsx/dj/goods/listing/service/GoodsListingGoodsTypeGroupRelationService.java
View file @
7e962b3
...
...
@@ -193,12 +193,7 @@ public class GoodsListingGoodsTypeGroupRelationService {
RpcAssert
.
assertNotEmpty
(
relationList
,
DefaultErrorEnum
.
SERVER_ERROR
,
"分账品类数据不能为空"
);
Set
<
String
>
relationKeySet
=
new
HashSet
<>();
for
(
GoodsListingGoodsTypeGroupRelation
item:
relationList
)
{
if
(
Objects
.
equals
(
group
.
getCategoryType
(),
GoodsGroupCategoryTypeEnum
.
GOODS_TYPE
.
getValue
()))
{
RpcAssert
.
assertNotNull
(
item
.
getGoodsType
(),
DefaultErrorEnum
.
PARAMETER_NULL
,
"goodsTypeGroupRelation.goodsType is null"
);
RpcAssert
.
assertNotEmpty
(
item
.
getGoodsTypeName
(),
DefaultErrorEnum
.
PARAMETER_NULL
,
"goodsTypeGroupRelation.goodsTypeName is null"
);
RpcAssert
.
assertIsTrue
(!
relationKeySet
.
contains
(
String
.
valueOf
(
item
.
getGoodsType
())),
DefaultErrorEnum
.
SERVER_ERROR
,
"按商品品类存在重复数据"
);
relationKeySet
.
add
(
String
.
valueOf
(
item
.
getGoodsType
()));
}
else
if
(
Objects
.
equals
(
group
.
getCategoryType
(),
GoodsGroupCategoryTypeEnum
.
UPGRADE_GOODS
.
getValue
()))
{
if
(
Objects
.
equals
(
group
.
getCategoryType
(),
GoodsGroupCategoryTypeEnum
.
UPGRADE_GOODS
.
getValue
()))
{
RpcAssert
.
assertNotNull
(
item
.
getUpgradeGoodsId
(),
DefaultErrorEnum
.
PARAMETER_NULL
,
"goodsTypeGroupRelation.upgradeGoodsId is null"
);
RpcAssert
.
assertNotEmpty
(
item
.
getUpgradeGoodsName
(),
DefaultErrorEnum
.
PARAMETER_NULL
,
"goodsTypeGroupRelation.upgradeGoodsName is null"
);
RpcAssert
.
assertNotEmpty
(
item
.
getUpgradeCommodityCode
(),
DefaultErrorEnum
.
PARAMETER_NULL
,
"goodsTypeGroupRelation.upgradeCommodityCode is null"
);
...
...
@@ -221,16 +216,12 @@ public class GoodsListingGoodsTypeGroupRelationService {
RpcAssert
.
assertNotEmpty
(
allRelationList
,
DefaultErrorEnum
.
SERVER_ERROR
,
"分账品类数据不能为空"
);
Map
<
Integer
,
List
<
GoodsListingGoodsTypeGroupRelation
>>
relationMap
=
allRelationList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
GoodsListingGoodsTypeGroupRelation:
:
getGoodsTypeGroupId
));
Set
<
Integer
>
goodsTypeSet
=
new
HashSet
<>();
Set
<
String
>
merchantGoodsCodeSet
=
new
HashSet
<>();
Set
<
String
>
packageCodeSet
=
new
HashSet
<>();
for
(
GoodsListingGoodsTypeGroup
group:
allGroupList
)
{
List
<
GoodsListingGoodsTypeGroupRelation
>
relationList
=
relationMap
.
get
(
group
.
getId
());
for
(
GoodsListingGoodsTypeGroupRelation
item:
relationList
)
{
if
(
Objects
.
equals
(
group
.
getCategoryType
(),
GoodsGroupCategoryTypeEnum
.
GOODS_TYPE
.
getValue
()))
{
RpcAssert
.
assertIsTrue
(!
goodsTypeSet
.
contains
(
item
.
getGoodsType
()),
DefaultErrorEnum
.
SERVER_ERROR
,
"按商品品类存在重复数据"
);
goodsTypeSet
.
add
(
item
.
getGoodsType
());
}
else
if
(
Objects
.
equals
(
group
.
getCategoryType
(),
GoodsGroupCategoryTypeEnum
.
UPGRADE_GOODS
.
getValue
()))
{
if
(
Objects
.
equals
(
group
.
getCategoryType
(),
GoodsGroupCategoryTypeEnum
.
UPGRADE_GOODS
.
getValue
()))
{
RpcAssert
.
assertIsTrue
(!
merchantGoodsCodeSet
.
contains
(
item
.
getMerchantGoodsCode
()),
DefaultErrorEnum
.
SERVER_ERROR
,
"按具体商品存在重复数据"
);
merchantGoodsCodeSet
.
add
(
item
.
getMerchantGoodsCode
());
}
else
if
(
Objects
.
equals
(
group
.
getCategoryType
(),
GoodsGroupCategoryTypeEnum
.
GOODS_PACKAGE
.
getValue
()))
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment