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
168e0ed8
Commit
168e0ed8
authored
Dec 12, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建寄售单校验
parent
3f77b1e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
...main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
+6
-7
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
View file @
168e0ed8
...
...
@@ -92,7 +92,7 @@ public class ItemEsDao {
});
Query
sourceQuery
=
QueryBuilders
.
terms
(
s
->
s
.
field
(
"source"
).
terms
(
t
->
t
.
value
(
sourceQueryList
)));
//展示
待
处理和已发布状态的商品
//展示
暂不
处理和已发布状态的商品
List
<
FieldValue
>
stateQueryList
=
new
ArrayList
<>();
stateQueryList
.
add
(
FieldValue
.
of
(
1
));
stateQueryList
.
add
(
FieldValue
.
of
(
10
));
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
View file @
168e0ed8
...
...
@@ -94,20 +94,19 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
@Override
public
Result
saleReleaseItem
(
ConsignSaleRequestDto
dto
)
{
try
{
//修改商品状态为寄售中
Item
item
=
new
Item
();
item
.
setId
(
dto
.
getItemId
());
item
.
setIsOnSale
(
true
);
itemDao
.
updateById
(
item
);
Item
itemInfo
=
itemDao
.
findById
(
dto
.
getItemId
());
if
(!
ObjectUtils
.
isEmpty
(
itemInfo
.
getPrice
()))
{
dto
.
setUserPrice
((
int
)
(
itemInfo
.
getPrice
()/
100
));
}
Result
result
=
createConsignSaleOrder
(
dto
);
if
(!
result
.
getSuccess
())
{
throw
new
RuntimeException
(
"创建寄售单失败"
)
;
return
result
;
}
//修改商品状态为寄售中
Item
item
=
new
Item
();
item
.
setId
(
dto
.
getItemId
());
item
.
setIsOnSale
(
true
);
itemDao
.
updateById
(
item
);
return
result
;
}
catch
(
Exception
e
)
{
logger
.
info
(
"商品id: {}, 寄售已发布商品失败 : {}"
,
dto
.
getItemId
(),
e
);
...
...
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