Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
b14a29df
Commit
b14a29df
authored
May 12, 2020
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
非空参数校验
parent
da581850
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletions
+4
-1
order-application-service/src/main/java/cn/freemud/entities/vo/AppCreateOrderVo.java
+1
-0
order-application-service/src/main/java/cn/freemud/entities/vo/OrderProductVo.java
+2
-0
order-application-service/src/main/java/cn/freemud/service/impl/AppOrderServiceImpl.java
+1
-1
No files found.
order-application-service/src/main/java/cn/freemud/entities/vo/AppCreateOrderVo.java
View file @
b14a29df
...
@@ -69,6 +69,7 @@ public class AppCreateOrderVo {
...
@@ -69,6 +69,7 @@ public class AppCreateOrderVo {
@Builder
.
Default
@Builder
.
Default
private
String
menuType
=
"saas"
;
private
String
menuType
=
"saas"
;
@Valid
private
List
<
OrderProductVo
>
orderProducts
;
private
List
<
OrderProductVo
>
orderProducts
;
/**
/**
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/OrderProductVo.java
View file @
b14a29df
...
@@ -3,6 +3,7 @@ package cn.freemud.entities.vo;
...
@@ -3,6 +3,7 @@ package cn.freemud.entities.vo;
import
lombok.Data
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.NotEmpty
;
import
org.hibernate.validator.constraints.NotEmpty
;
import
javax.validation.constraints.Min
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -34,6 +35,7 @@ public class OrderProductVo {
...
@@ -34,6 +35,7 @@ public class OrderProductVo {
/**
/**
* 数量
* 数量
*/
*/
@Min
(
value
=
1
,
message
=
"数量不能小于1"
)
private
Integer
qty
;
private
Integer
qty
;
/**
/**
...
...
order-application-service/src/main/java/cn/freemud/service/impl/AppOrderServiceImpl.java
View file @
b14a29df
...
@@ -263,7 +263,7 @@ public class AppOrderServiceImpl implements AppOrderService {
...
@@ -263,7 +263,7 @@ public class AppOrderServiceImpl implements AppOrderService {
}
}
if
(
CollectionUtils
.
isEmpty
(
spuIds
))
{
if
(
CollectionUtils
.
isEmpty
(
spuIds
))
{
throw
new
ServiceException
(
ResponseResult
.
SYSTEM_BUSINESS_ERROR
);
throw
new
ServiceException
(
ResponseResult
.
PARAMETER_MISSING
);
}
}
//去重
//去重
List
<
String
>
result
=
spuIds
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
result
=
spuIds
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
...
...
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