Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
f966fca6
Commit
f966fca6
authored
Feb 07, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
4e061369
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
ValidityConstants.java
.../plus/v1/yifu/common/core/constant/ValidityConstants.java
+2
-2
OrderConstants.java
...fu/cloud/plus/v1/yifu/order/constants/OrderConstants.java
+4
-4
ValidityUtil.java
.../com/yifu/cloud/plus/v1/yifu/order/util/ValidityUtil.java
+2
-2
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+8
-8
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/ValidityConstants.java
View file @
f966fca6
...
...
@@ -64,8 +64,8 @@ public class ValidityConstants {
public
static
final
String
PATTERN_50
=
"^.{1,50}$"
;
/** 最多60位 规则 */
public
static
final
String
PATTERN_60
=
"^.{1,60}$"
;
/** 最多20
0
位 规则 */
public
static
final
String
PATTERN_20
0
=
"[\\s\\S]{1,200
}$"
;
/** 最多20
48
位 规则 */
public
static
final
String
PATTERN_20
48
=
"[\\s\\S]{1,2048
}$"
;
public
static
String
NUMBER_OF_DECIMAL_PLACE
=
"^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*$"
;
...
...
yifu-order/yifu-order-api/src/main/java/com/yifu/cloud/plus/v1/yifu/order/constants/OrderConstants.java
View file @
f966fca6
...
...
@@ -79,9 +79,9 @@ public class OrderConstants {
*/
public
static
final
String
ORDER_CONTENT_IS_EMPTY
=
"订单内容不能为空"
;
/**
* 订单内容,20
0
字以内
* 订单内容,20
48
字以内
*/
public
static
final
String
ORDER_CONTENT_MORE_THAN_20
0
=
"订单内容,200
字以内"
;
public
static
final
String
ORDER_CONTENT_MORE_THAN_20
48
=
"订单内容,2048
字以内"
;
/**
* 处理人不能为空
*/
...
...
@@ -99,9 +99,9 @@ public class OrderConstants {
*/
public
static
final
String
REPLY_CONTENT_AND_ENCLOSURE_IS_EMPTY
=
"回复内容和附件,两者必填其一"
;
/**
* “回复内容”,20
0
字以内
* “回复内容”,20
48
字以内
*/
public
static
final
String
REPLY_CONTENT_MORE_THAN_20
0
=
"“回复内容”,200
字以内"
;
public
static
final
String
REPLY_CONTENT_MORE_THAN_20
48
=
"“回复内容”,2048
字以内"
;
/**
* 非法的附件类型
*/
...
...
yifu-order/yifu-order-api/src/main/java/com/yifu/cloud/plus/v1/yifu/order/util/ValidityUtil.java
View file @
f966fca6
...
...
@@ -17,10 +17,10 @@ public class ValidityUtil {
* @param str
* @return {@link boolean}
*/
public
static
boolean
validate20
0
(
final
String
str
){
public
static
boolean
validate20
48
(
final
String
str
){
if
(
Common
.
isEmpty
(
str
)){
return
Boolean
.
FALSE
;
}
return
str
.
matches
(
ValidityConstants
.
PATTERN_20
0
)
;
return
str
.
matches
(
ValidityConstants
.
PATTERN_20
48
)
;
}
}
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
f966fca6
...
...
@@ -285,9 +285,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
Common
.
isEmpty
(
replyContent
)
&&
ArrayUtils
.
isEmpty
(
file
)){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_AND_ENCLOSURE_IS_EMPTY
);
}
// 校验回复内容20
0
字以内
if
(!
Common
.
isEmpty
(
replyContent
)
&&
!
ValidityUtil
.
validate20
0
(
replyContent
)){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_MORE_THAN_20
0
);
// 校验回复内容20
48
字以内
if
(!
Common
.
isEmpty
(
replyContent
)
&&
!
ValidityUtil
.
validate20
48
(
replyContent
)){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_MORE_THAN_20
48
);
}
if
(
ArrayUtils
.
isNotEmpty
(
file
)){
...
...
@@ -427,8 +427,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
Common
.
isEmpty
(
vo
.
getOrderContent
())){
return
R
.
failed
(
OrderConstants
.
ORDER_CONTENT_IS_EMPTY
);
}
if
(!
Common
.
isEmpty
(
vo
.
getOrderContent
())
&&
!
ValidityUtil
.
validate20
0
(
vo
.
getOrderContent
())){
return
R
.
failed
(
OrderConstants
.
ORDER_CONTENT_MORE_THAN_20
0
);
if
(!
Common
.
isEmpty
(
vo
.
getOrderContent
())
&&
!
ValidityUtil
.
validate20
48
(
vo
.
getOrderContent
())){
return
R
.
failed
(
OrderConstants
.
ORDER_CONTENT_MORE_THAN_20
48
);
}
if
(
CollectionUtils
.
isEmpty
(
vo
.
getHandleUserList
())){
return
R
.
failed
(
OrderConstants
.
HANDLE_USER_IS_EMPTY
);
...
...
@@ -528,9 +528,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
Common
.
isEmpty
(
vo
.
getReplyContent
())
&&
ArrayUtils
.
isEmpty
(
vo
.
getFile
())){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_AND_ENCLOSURE_IS_EMPTY
);
}
// 校验回复内容20
0
字以内
if
(!
Common
.
isEmpty
(
vo
.
getReplyContent
())
&&
!
ValidityUtil
.
validate20
0
(
vo
.
getReplyContent
())){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_MORE_THAN_20
0
);
// 校验回复内容20
48
字以内
if
(!
Common
.
isEmpty
(
vo
.
getReplyContent
())
&&
!
ValidityUtil
.
validate20
48
(
vo
.
getReplyContent
())){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_MORE_THAN_20
48
);
}
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
())){
...
...
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