记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
f9e504be
Commit
f9e504be
authored
Feb 04, 2024
by
zz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/20240123_COUPON_SPU' into 阶梯退票_羊毛券_合并分支
parents
9b9d96ef
fdd73c4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
34 deletions
+72
-34
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+72
-34
No files found.
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
f9e504be
...
@@ -124,6 +124,44 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -124,6 +124,44 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
if
(!
skuParam
.
getSpuId
().
equals
(
skuVo
.
getSpuId
()))
{
if
(!
skuParam
.
getSpuId
().
equals
(
skuVo
.
getSpuId
()))
{
throw
new
Exception
(
"参数异常"
);
throw
new
Exception
(
"参数异常"
);
}
}
if
(
Objects
.
equals
(
skuVo
.
getSkuType
(),
2
))
{
// 券类商品
if
(
Objects
.
equals
(
skuVo
.
getIsTrueName
(),
1
))
{
// 需关联实名人
if
(
Objects
.
isNull
(
skuParam
.
getIdType
())
||
Objects
.
isNull
(
skuParam
.
getIdName
())
||
Objects
.
isNull
(
skuParam
.
getIdNo
()))
{
throw
new
LiquidnetServiceException
(
"-1"
,
"关联人信息缺失,请核实"
);
}
switch
(
skuParam
.
getIdType
())
{
// 证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照
case
1
:
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_HANZI
,
skuParam
.
getIdName
()))
{
throw
new
LiquidnetServiceException
(
"-1"
,
"身份证姓名不合规"
);
}
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_REF
,
skuParam
.
getIdNo
()))
{
throw
new
LiquidnetServiceException
(
"-1"
,
"身份证号码不合规"
);
}
adamRedisUtils
.
identityHandler1
(
uid
,
skuParam
.
getIdName
(),
skuParam
.
getIdNo
());
break
;
case
2
:
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_HM
,
skuParam
.
getIdNo
()))
{
throw
new
LiquidnetServiceException
(
"-1"
,
"港澳居民来往内地通行证号码不合规"
);
}
break
;
case
3
:
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_TW
,
skuParam
.
getIdNo
()))
{
throw
new
LiquidnetServiceException
(
"-1"
,
"台湾居民来往大陆通行证号码不合规"
);
}
break
;
case
4
:
if
(
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_PP
,
skuParam
.
getIdNo
()))
{
throw
new
LiquidnetServiceException
(
"-1"
,
"不支持中国大陆护照"
);
}
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_PP_NON
,
skuParam
.
getIdNo
()))
{
throw
new
LiquidnetServiceException
(
"-1"
,
"护照号码不合规"
);
}
break
;
default
:
throw
new
LiquidnetServiceException
(
"-1"
,
"无效证件类型,请重新选择"
);
}
}
}
int
limitCount
=
skuVo
.
getBuyLimit
()
==
0
?
Integer
.
MAX_VALUE
:
skuVo
.
getBuyLimit
();
int
limitCount
=
skuVo
.
getBuyLimit
()
==
0
?
Integer
.
MAX_VALUE
:
skuVo
.
getBuyLimit
();
//判断限购
//判断限购
if
(
orderUtils
.
noZhengzaiOrder
(
uid
))
{
if
(
orderUtils
.
noZhengzaiOrder
(
uid
))
{
...
@@ -281,40 +319,40 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -281,40 +319,40 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
}
if
(
Objects
.
equals
(
skuVo
.
getSkuType
(),
2
))
{
// 券类商品
if
(
Objects
.
equals
(
skuVo
.
getSkuType
(),
2
))
{
// 券类商品
if
(
Objects
.
equals
(
skuVo
.
getIsTrueName
(),
1
))
{
// 需关联实名人
if
(
Objects
.
equals
(
skuVo
.
getIsTrueName
(),
1
))
{
// 需关联实名人
if
(
Objects
.
isNull
(
skuParam
.
getIdType
())
||
Objects
.
isNull
(
skuParam
.
getIdName
())
||
Objects
.
isNull
(
skuParam
.
getIdNo
()))
{
//
if (Objects.isNull(skuParam.getIdType()) || Objects.isNull(skuParam.getIdName()) || Objects.isNull(skuParam.getIdNo())) {
throw
new
LiquidnetServiceException
(
"-1"
,
"关联人信息缺失,请核实"
);
//
throw new LiquidnetServiceException("-1", "关联人信息缺失,请核实");
}
//
}
switch
(
skuParam
.
getIdType
())
{
// 证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照
//
switch (skuParam.getIdType()) {// 证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照
case
1
:
//
case 1:
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_HANZI
,
skuParam
.
getIdName
()))
{
//
if (!Pattern.matches(LnsRegex.Valid.CN_HANZI, skuParam.getIdName())) {
throw
new
LiquidnetServiceException
(
"-1"
,
"身份证姓名不合规"
);
//
throw new LiquidnetServiceException("-1", "身份证姓名不合规");
}
//
}
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_REF
,
skuParam
.
getIdNo
()))
{
//
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_REF, skuParam.getIdNo())) {
throw
new
LiquidnetServiceException
(
"-1"
,
"身份证号码不合规"
);
//
throw new LiquidnetServiceException("-1", "身份证号码不合规");
}
//
}
adamRedisUtils
.
identityHandler1
(
uid
,
skuParam
.
getIdName
(),
skuParam
.
getIdNo
());
//
adamRedisUtils.identityHandler1(uid, skuParam.getIdName(), skuParam.getIdNo());
break
;
//
break;
case
2
:
//
case 2:
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_HM
,
skuParam
.
getIdNo
()))
{
//
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_HM, skuParam.getIdNo())) {
throw
new
LiquidnetServiceException
(
"-1"
,
"港澳居民来往内地通行证号码不合规"
);
//
throw new LiquidnetServiceException("-1", "港澳居民来往内地通行证号码不合规");
}
//
}
break
;
//
break;
case
3
:
//
case 3:
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_TW
,
skuParam
.
getIdNo
()))
{
//
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_TW, skuParam.getIdNo())) {
throw
new
LiquidnetServiceException
(
"-1"
,
"台湾居民来往大陆通行证号码不合规"
);
//
throw new LiquidnetServiceException("-1", "台湾居民来往大陆通行证号码不合规");
}
//
}
break
;
//
break;
case
4
:
//
case 4:
if
(
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_PP
,
skuParam
.
getIdNo
()))
{
//
if (Pattern.matches(LnsRegex.Valid.CN_ID_CARD_PP, skuParam.getIdNo())) {
throw
new
LiquidnetServiceException
(
"-1"
,
"不支持中国大陆护照"
);
//
throw new LiquidnetServiceException("-1", "不支持中国大陆护照");
}
//
}
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_PP_NON
,
skuParam
.
getIdNo
()))
{
//
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_PP_NON, skuParam.getIdNo())) {
throw
new
LiquidnetServiceException
(
"-1"
,
"护照号码不合规"
);
//
throw new LiquidnetServiceException("-1", "护照号码不合规");
}
//
}
break
;
//
break;
default
:
//
default:
throw
new
LiquidnetServiceException
(
"-1"
,
"无效证件类型,请重新选择"
);
//
throw new LiquidnetServiceException("-1", "无效证件类型,请重新选择");
}
//
}
orderSkuParamMap
.
put
(
skuParam
.
getSkuId
(),
skuParam
);
orderSkuParamMap
.
put
(
skuParam
.
getSkuId
(),
skuParam
);
}
}
...
...
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