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
752e79ce
Commit
752e79ce
authored
Sep 04, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户更新藏品,预估价设置null
parent
c242477a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/SupplierItemDao.java
...java/com/wwdz/ch/db/dao/distribution/SupplierItemDao.java
+2
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
...com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
+7
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+4
-1
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/SupplierItemDao.java
View file @
752e79ce
...
@@ -45,6 +45,8 @@ public interface SupplierItemDao {
...
@@ -45,6 +45,8 @@ public interface SupplierItemDao {
int
update
(
SupplierItem
supplierItem
);
int
update
(
SupplierItem
supplierItem
);
int
updateNullValue
(
SupplierItem
supplierItem
);
/**
/**
* 更新库存
* 更新库存
* @param itemId
* @param itemId
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
View file @
752e79ce
...
@@ -105,6 +105,13 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
...
@@ -105,6 +105,13 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
return
supplierItemMapper
.
updateByPrimaryKeySelective
(
supplierItem
);
return
supplierItemMapper
.
updateByPrimaryKeySelective
(
supplierItem
);
}
}
@Override
public
int
updateNullValue
(
SupplierItem
supplierItem
)
{
supplierItem
.
setUpdateTime
(
new
Date
());
return
supplierItemMapper
.
updateByPrimaryKey
(
supplierItem
);
}
@Override
@Override
public
int
updateStock
(
long
itemId
,
int
stock
)
{
public
int
updateStock
(
long
itemId
,
int
stock
)
{
SupplierItem
supplierItem
=
new
SupplierItem
();
SupplierItem
supplierItem
=
new
SupplierItem
();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
752e79ce
...
@@ -807,10 +807,13 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -807,10 +807,13 @@ public class SupplierItemServiceImpl implements SupplierItemService {
@Override
@Override
public
Result
update
(
SupplierItemRequestDto
dto
)
{
public
Result
update
(
SupplierItemRequestDto
dto
)
{
try
{
try
{
SupplierItem
oldItem
=
supplierItemDao
.
findById
(
dto
.
getId
());
SupplierItem
supplierItem
=
new
SupplierItem
();
SupplierItem
supplierItem
=
new
SupplierItem
();
EntityMapper
.
copyAttribute
(
oldItem
,
supplierItem
);
EntityMapper
.
copyAttribute
(
dto
,
supplierItem
);
EntityMapper
.
copyAttribute
(
dto
,
supplierItem
);
supplierItem
.
setDistributionPrice
(
PriceUtil
.
convertPriceFromStr
(
StringUtils
.
isEmpty
(
dto
.
getDistributionPrice
())?
"0"
:
dto
.
getDistributionPrice
()));
supplierItem
.
setDistributionPrice
(
PriceUtil
.
convertPriceFromStr
(
StringUtils
.
isEmpty
(
dto
.
getDistributionPrice
())?
"0"
:
dto
.
getDistributionPrice
()));
supplierItem
.
setImages
(
dto
.
getImages
());
supplierItem
.
setImages
(
dto
.
getImages
());
supplierItem
.
setOfficialEstimatedPrice
(
null
);
if
(
StringUtils
.
hasLength
(
dto
.
getVideos
()))
{
if
(
StringUtils
.
hasLength
(
dto
.
getVideos
()))
{
supplierItem
.
setVideos
(
getVideosImage
(
dto
.
getVideos
()));
supplierItem
.
setVideos
(
getVideosImage
(
dto
.
getVideos
()));
}
}
...
@@ -821,7 +824,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -821,7 +824,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
supplierItem
.
setStock
(
1
);
supplierItem
.
setStock
(
1
);
supplierItem
.
setIsOnSale
(
false
);
supplierItem
.
setIsOnSale
(
false
);
}
}
supplierItemDao
.
update
(
supplierItem
);
supplierItemDao
.
update
NullValue
(
supplierItem
);
//更新相关的收藏册
//更新相关的收藏册
if
(
StringUtils
.
hasLength
(
dto
.
getCollectionBookId
()))
{
if
(
StringUtils
.
hasLength
(
dto
.
getCollectionBookId
()))
{
CollectionItemsRelationRequestDto
collectionItemsRelationRequestDto
=
new
CollectionItemsRelationRequestDto
();
CollectionItemsRelationRequestDto
collectionItemsRelationRequestDto
=
new
CollectionItemsRelationRequestDto
();
...
...
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