Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
364edcbe
Commit
364edcbe
authored
Aug 29, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-special' into dev
parents
9f7337c6
e18e4476
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
OrderApprovalServiceImpl.java
...dule/order/service/approval/OrderApprovalServiceImpl.java
+6
-11
OrderController.java
.../module/order/controller/admin/order/OrderController.java
+2
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/approval/OrderApprovalServiceImpl.java
View file @
364edcbe
...
@@ -20,6 +20,7 @@ import cn.iocoder.yudao.module.order.enums.ErrorCodeConstants;
...
@@ -20,6 +20,7 @@ import cn.iocoder.yudao.module.order.enums.ErrorCodeConstants;
import
cn.iocoder.yudao.module.order.enums.OrderApprovalTypeEnum
;
import
cn.iocoder.yudao.module.order.enums.OrderApprovalTypeEnum
;
import
cn.iocoder.yudao.module.order.vo.approval.*
;
import
cn.iocoder.yudao.module.order.vo.approval.*
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -181,20 +182,14 @@ public class OrderApprovalServiceImpl extends AbstractService<OrderApprovalMappe
...
@@ -181,20 +182,14 @@ public class OrderApprovalServiceImpl extends AbstractService<OrderApprovalMappe
OrderApprovalDO
orderApprovalDO
=
approvalMapper
.
selectProcessingApproval
(
orderId
,
Arrays
.
asList
(
OrderApprovalTypeEnum
.
DISCOUNT_APPLY_BATCH
.
getValue
(),
OrderApprovalTypeEnum
.
ADMIN_DISCOUNT_BATCH
.
getValue
()));
OrderApprovalDO
orderApprovalDO
=
approvalMapper
.
selectProcessingApproval
(
orderId
,
Arrays
.
asList
(
OrderApprovalTypeEnum
.
DISCOUNT_APPLY_BATCH
.
getValue
(),
OrderApprovalTypeEnum
.
ADMIN_DISCOUNT_BATCH
.
getValue
()));
if
(
orderApprovalDO
!=
null
&&
StringUtils
.
isNotEmpty
(
orderApprovalDO
.
getDetails
()))
{
if
(
orderApprovalDO
!=
null
&&
StringUtils
.
isNotEmpty
(
orderApprovalDO
.
getDetails
()))
{
List
<
OrderSpecialBatchApplyVO
>
orderSpecialBatchApplyVOList
=
JSON
.
parseArray
(
orderApprovalDO
.
getDetails
(),
OrderSpecialBatchApplyVO
.
class
);
OrderSpecialBatchApplyVO
orderSpecialBatchApplyVO
=
JSONObject
.
parseObject
(
orderApprovalDO
.
getDetails
(),
OrderSpecialBatchApplyVO
.
class
);
if
(
CollectionUtil
.
isNotEmpty
(
orderSpecialBatchApplyVOList
))
{
for
(
OrderSpecialBatchApplyVO
orderSpecialBatchApplyVO
:
orderSpecialBatchApplyVOList
)
{
List
<
OrderSpecialBatchApplyOrderItemDetailVO
>
batchApplyOrderItemDetailVOList
=
orderSpecialBatchApplyVO
.
getBatchApplyOrderItemDetailVOList
();
List
<
OrderSpecialBatchApplyOrderItemDetailVO
>
batchApplyOrderItemDetailVOList
=
orderSpecialBatchApplyVO
.
getBatchApplyOrderItemDetailVOList
();
if
(
CollectionUtil
.
isNotEmpty
(
batchApplyOrderItemDetailVOList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
batchApplyOrderItemDetailVOList
))
{
if
(
batchApplyOrderItemDetailVOList
.
stream
().
anyMatch
(
t
->
Objects
.
equals
(
t
.
getOrderItemId
(),
orderItemId
)))
{
if
(
batchApplyOrderItemDetailVOList
.
stream
().
anyMatch
(
t
->
Objects
.
equals
(
t
.
getOrderItemId
(),
orderItemId
)))
{
return
orderApprovalDO
;
return
orderApprovalDO
;
}
}
}
}
}
}
}
}
return
null
;
return
null
;
}
}
}
}
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/order/OrderController.java
View file @
364edcbe
...
@@ -423,6 +423,7 @@ public class OrderController {
...
@@ -423,6 +423,7 @@ public class OrderController {
@PutMapping
(
"/special/apply"
)
@PutMapping
(
"/special/apply"
)
@ApiOperation
(
"特价申请"
)
@ApiOperation
(
"特价申请"
)
@Idempotent
(
timeout
=
10
)
// @PreAuthorize("@ss.hasPermission('ecw:order:update')")
// @PreAuthorize("@ss.hasPermission('ecw:order:update')")
public
CommonResult
<
Boolean
>
specialApplyOrder
(
@Valid
@RequestBody
OrderSpecialApplyVO
specialApplyVO
)
{
public
CommonResult
<
Boolean
>
specialApplyOrder
(
@Valid
@RequestBody
OrderSpecialApplyVO
specialApplyVO
)
{
orderService
.
specialApplyOrder
(
specialApplyVO
);
orderService
.
specialApplyOrder
(
specialApplyVO
);
...
@@ -431,6 +432,7 @@ public class OrderController {
...
@@ -431,6 +432,7 @@ public class OrderController {
@PutMapping
(
"/special/apply/batch"
)
@PutMapping
(
"/special/apply/batch"
)
@ApiOperation
(
"特价申请-批量特价"
)
@ApiOperation
(
"特价申请-批量特价"
)
@Idempotent
(
timeout
=
10
)
// @PreAuthorize("@ss.hasPermission('ecw:order:update')")
// @PreAuthorize("@ss.hasPermission('ecw:order:update')")
public
CommonResult
<
Boolean
>
specialBatchApplyOrder
(
@Valid
@RequestBody
OrderSpecialBatchApplyVO
orderSpecialBatchApplyVO
)
{
public
CommonResult
<
Boolean
>
specialBatchApplyOrder
(
@Valid
@RequestBody
OrderSpecialBatchApplyVO
orderSpecialBatchApplyVO
)
{
orderService
.
specialBatchApplyOrder
(
orderSpecialBatchApplyVO
);
orderService
.
specialBatchApplyOrder
(
orderSpecialBatchApplyVO
);
...
...
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