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
30965215
Commit
30965215
authored
Dec 08, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
寄售单详情
parent
b72ab684
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ConsignSaleController.java
...a/com/wwdz/ch/admin/controller/ConsignSaleController.java
+13
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ConsignSaleServiceImpl.java
...n/java/com/wwdz/ch/admin/impl/ConsignSaleServiceImpl.java
+10
-2
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ConsignSaleController.java
View file @
30965215
...
@@ -7,6 +7,7 @@ import com.wwdz.ch.core.type.Result;
...
@@ -7,6 +7,7 @@ import com.wwdz.ch.core.type.Result;
import
com.wwdz.ch.db.dto.request.ConsignSaleRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
import
com.xxdxxs.service.FormHandler
;
import
com.xxdxxs.service.FormHandler
;
import
com.xxdxxs.utils.StringUtils
;
import
com.xxdxxs.validation.Validator
;
import
com.xxdxxs.validation.Validator
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -65,6 +66,9 @@ public class ConsignSaleController {
...
@@ -65,6 +66,9 @@ public class ConsignSaleController {
if
(!
validator
.
isValid
())
{
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
}
if
(
StringUtils
.
isEmpty
(
dto
.
getRemark
()))
{
return
Result
.
failed
(
"理由必填"
);
}
return
consignSaleService
.
imgValuate
(
dto
);
return
consignSaleService
.
imgValuate
(
dto
);
}
}
...
@@ -80,6 +84,9 @@ public class ConsignSaleController {
...
@@ -80,6 +84,9 @@ public class ConsignSaleController {
if
(!
validator
.
isValid
())
{
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
}
if
(
StringUtils
.
isEmpty
(
dto
.
getRemark
()))
{
return
Result
.
failed
(
"理由必填"
);
}
return
consignSaleService
.
identify
(
dto
);
return
consignSaleService
.
identify
(
dto
);
}
}
...
@@ -95,6 +102,9 @@ public class ConsignSaleController {
...
@@ -95,6 +102,9 @@ public class ConsignSaleController {
if
(!
validator
.
isValid
())
{
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
}
if
(
StringUtils
.
isEmpty
(
dto
.
getRemark
()))
{
return
Result
.
failed
(
"成交平台必填"
);
}
return
consignSaleService
.
finish
(
dto
);
return
consignSaleService
.
finish
(
dto
);
}
}
...
@@ -109,6 +119,9 @@ public class ConsignSaleController {
...
@@ -109,6 +119,9 @@ public class ConsignSaleController {
if
(!
validator
.
isValid
())
{
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
}
if
(
StringUtils
.
isEmpty
(
dto
.
getRemark
()))
{
return
Result
.
failed
(
"理由必填"
);
}
return
consignSaleService
.
cancel
(
dto
);
return
consignSaleService
.
cancel
(
dto
);
}
}
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ConsignSaleServiceImpl.java
View file @
30965215
...
@@ -26,6 +26,8 @@ import org.slf4j.LoggerFactory;
...
@@ -26,6 +26,8 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -95,14 +97,20 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
...
@@ -95,14 +97,20 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
@Override
@Override
public
Result
findDetail
(
ConsignSaleRequestDto
dto
)
{
public
Result
findDetail
(
ConsignSaleRequestDto
dto
)
{
try
{
try
{
ConsignSaleDetailVo
consignSaleDetailVo
=
new
ConsignSaleDetailVo
();
ConsignSale
consignSale
=
consignSaleDao
.
findById
(
dto
.
getSaleId
());
if
(
ObjectUtils
.
isEmpty
(
consignSale
))
{
return
Result
.
failed
(
"寄售单不存在"
);
}
long
itemId
=
consignSale
.
getItemId
();
CoinRequestDto
coinRequestDto
=
new
CoinRequestDto
();
CoinRequestDto
coinRequestDto
=
new
CoinRequestDto
();
coinRequestDto
.
setId
(
dto
.
getItemId
()
);
coinRequestDto
.
setId
(
itemId
);
Result
<
ItemVo
>
itemResult
=
itemService
.
findDetails
(
coinRequestDto
);
Result
<
ItemVo
>
itemResult
=
itemService
.
findDetails
(
coinRequestDto
);
if
(!
itemResult
.
getSuccess
())
{
if
(!
itemResult
.
getSuccess
())
{
return
itemResult
;
return
itemResult
;
}
}
ConsignSaleDetailVo
consignSaleDetailVo
=
new
ConsignSaleDetailVo
();
consignSaleDetailVo
.
setItemVo
(
itemResult
.
getData
());
consignSaleDetailVo
.
setItemVo
(
itemResult
.
getData
());
//查询寄售单信息
//查询寄售单信息
List
<
ConsignSaleRecord
>
consignSaleRecords
=
consignSaleRecordDao
.
find
(
dto
.
getSaleId
());
List
<
ConsignSaleRecord
>
consignSaleRecords
=
consignSaleRecordDao
.
find
(
dto
.
getSaleId
());
List
<
ConsignSaleRecordVo
>
consignSaleRecordVoList
=
new
ArrayList
<>();
List
<
ConsignSaleRecordVo
>
consignSaleRecordVoList
=
new
ArrayList
<>();
...
...
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