Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
ebb11b6a
Commit
ebb11b6a
authored
Oct 22, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除盲盒转换的商品时,恢复原始类型
parent
75d2de84
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
ch-dao/src/main/java/com/wwdz/ch/db/dao/ItemTagOperateRecordDao.java
...main/java/com/wwdz/ch/db/dao/ItemTagOperateRecordDao.java
+8
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+11
-1
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/ItemTagOperateRecordDao.java
View file @
ebb11b6a
...
@@ -21,4 +21,12 @@ public interface ItemTagOperateRecordDao {
...
@@ -21,4 +21,12 @@ public interface ItemTagOperateRecordDao {
*/
*/
List
<
ItemTagOperateRecord
>
findByPage
(
ItemTagOperateRecordRequestDto
dto
);
List
<
ItemTagOperateRecord
>
findByPage
(
ItemTagOperateRecordRequestDto
dto
);
/**
* 查询是否存在该商品的制作标签记录
* @param itemId
* @return
*/
boolean
isExisted
(
long
itemId
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
ebb11b6a
...
@@ -157,6 +157,8 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -157,6 +157,8 @@ public class SupplierItemServiceImpl implements SupplierItemService {
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
ItemTagOperateRecordDao
itemTagOperateRecordDao
;
@Override
@Override
public
Result
findList
(
SupplierItemRequestDto
dto
)
{
public
Result
findList
(
SupplierItemRequestDto
dto
)
{
...
@@ -1164,6 +1166,14 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -1164,6 +1166,14 @@ public class SupplierItemServiceImpl implements SupplierItemService {
public
Result
delete
(
SupplierItemRequestDto
dto
)
{
public
Result
delete
(
SupplierItemRequestDto
dto
)
{
try
{
try
{
supplierItemDao
.
delete
(
dto
.
getId
());
supplierItemDao
.
delete
(
dto
.
getId
());
//判断是否是盲盒标签制作的商品,如果是盲盒商品,则恢复商品类型为盲盒,以便重新扫码
if
(
itemTagOperateRecordDao
.
isExisted
(
dto
.
getId
()))
{
SupplierItem
supplierItem
=
new
SupplierItem
();
supplierItem
.
setId
(
dto
.
getId
());
supplierItem
.
setType
(
DistributionEnum
.
DistributionTypeEnum
.
BLACK
.
getCode
());
supplierItem
.
setCreatorId
(
CommConsts
.
PRINT_ITEM_TAG_CREATOR_ID
);
supplierItemDao
.
update
(
supplierItem
);
}
//删除标签关联
//删除标签关联
CollectionItemsRelationRequestDto
collectionItemsRelationRequestDto
=
new
CollectionItemsRelationRequestDto
();
CollectionItemsRelationRequestDto
collectionItemsRelationRequestDto
=
new
CollectionItemsRelationRequestDto
();
collectionItemsRelationRequestDto
.
setItemId
(
dto
.
getId
());
collectionItemsRelationRequestDto
.
setItemId
(
dto
.
getId
());
...
@@ -1364,7 +1374,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -1364,7 +1374,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
try
{
try
{
//判断是否已经上架过
//判断是否已经上架过
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
dto
.
getItemId
());
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
dto
.
getItemId
());
if
(
supplierItem
.
getCreatorId
()
!=
null
&&
!
supplierItem
.
getIsDeleted
())
{
if
(
supplierItem
.
getCreatorId
()
!=
CommConsts
.
PRINT_ITEM_TAG_CREATOR_ID
&&
!
supplierItem
.
getIsDeleted
())
{
return
Result
.
failed
(
ResultCode
.
ITEM_UPLOADED
);
return
Result
.
failed
(
ResultCode
.
ITEM_UPLOADED
);
}
}
SupplierItemVo
supplierItemVo
=
new
SupplierItemVo
();
SupplierItemVo
supplierItemVo
=
new
SupplierItemVo
();
...
...
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