记得上下班打卡 | 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
6b08a2be
Commit
6b08a2be
authored
Nov 12, 2024
by
姜秀龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
给用户添加入场人
parent
2231d2b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
8 deletions
+89
-8
AdamController.java
...service/platform/controller/A_fskfsfs/AdamController.java
+86
-7
sqlmap.properties
...ervice-platform-impl/src/main/resources/sqlmap.properties
+3
-1
No files found.
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/A_fskfsfs/AdamController.java
View file @
6b08a2be
...
@@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.JsonNode;
...
@@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.JsonNode;
import
com.liquidnet.common.cache.redis.util.AbstractRedisUtil
;
import
com.liquidnet.common.cache.redis.util.AbstractRedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
com.liquidnet.commons.lang.core.JwtValidator
;
import
com.liquidnet.commons.lang.core.JwtValidator
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.service.adam.constant.AdamRedisConst
;
import
com.liquidnet.service.adam.constant.AdamRedisConst
;
...
@@ -28,6 +29,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -28,6 +29,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
...
@@ -36,13 +38,11 @@ import org.springframework.util.DigestUtils;
...
@@ -36,13 +38,11 @@ import org.springframework.util.DigestUtils;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
javax.validation.constraints.Pattern
;
import
javax.validation.constraints.Pattern
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.IntStream
;
import
java.util.stream.IntStream
;
/**
/**
...
@@ -184,10 +184,10 @@ public class AdamController {
...
@@ -184,10 +184,10 @@ public class AdamController {
// 退出登陆
// 退出登陆
String
key
=
AdamRedisConst
.
IDENTITY_MOBILE
.
concat
(
mobile
);
String
key
=
AdamRedisConst
.
IDENTITY_MOBILE
.
concat
(
mobile
);
String
uid
=
(
String
)
redisDataSourceUtil
.
getRedisAdamUtil
().
get
(
key
);
String
uid
=
(
String
)
redisDataSourceUtil
.
getRedisAdamUtil
().
get
(
key
);
if
(
null
!=
uid
)
{
if
(
null
!=
uid
)
{
redisDataSourceUtil
.
getRedisAdamUtil
().
del
(
jwtValidator
.
getSsoRedisKey
().
concat
(
uid
));
redisDataSourceUtil
.
getRedisAdamUtil
().
del
(
jwtValidator
.
getSsoRedisKey
().
concat
(
uid
));
}
else
{
}
else
{
uid
=
adamUserMapper
.
selectByPhones
(
mobile
).
get
(
0
).
getUid
();
uid
=
adamUserMapper
.
selectByPhones
(
mobile
).
get
(
0
).
getUid
();
}
}
// 更改状态
// 更改状态
...
@@ -299,6 +299,85 @@ public class AdamController {
...
@@ -299,6 +299,85 @@ public class AdamController {
return
ResponseDto
.
success
(
token
);
return
ResponseDto
.
success
(
token
);
}
}
@ApiOperation
(
value
=
"添加入场人"
,
notes
=
"~"
)
@PostMapping
(
value
=
{
"A007"
})
public
ResponseDto
<
String
>
A007
(
@RequestBody
@Valid
AdamEntersParam
parameter
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
String
rkMobile
=
AdamRedisConst
.
IDENTITY_MOBILE
.
concat
(
parameter
.
getMobile
());
String
uid
=
(
String
)
redisDataSourceUtil
.
getRedisAdamUtil
().
get
(
rkMobile
);
if
(
StringUtils
.
isEmpty
(
uid
))
{
return
ResponseDto
.
failure
(
"该手机号未注册"
);
}
switch
(
parameter
.
getType
())
{
// 证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证
case
1
:
if
(!
java
.
util
.
regex
.
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_HANZI
,
parameter
.
getName
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10103"
));
}
if
(!
java
.
util
.
regex
.
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_REF
,
parameter
.
getIdCard
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10104"
));
}
break
;
case
2
:
if
(!
java
.
util
.
regex
.
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_HM
,
parameter
.
getIdCard
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10107"
));
}
break
;
case
3
:
if
(!
java
.
util
.
regex
.
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_TW
,
parameter
.
getIdCard
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10108"
));
}
break
;
case
4
:
break
;
case
5
:
if
(!
java
.
util
.
regex
.
Pattern
.
matches
(
LnsRegex
.
Valid
.
CN_ID_CARD_MO
,
parameter
.
getIdCard
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10111"
));
}
break
;
}
String
rkEnters
=
AdamRedisConst
.
INFO_ENTERS
.
concat
(
uid
);
List
<
AdamEntersVo
>
vos
=
(
List
<
AdamEntersVo
>)
redisDataSourceUtil
.
getRedisAdamUtil
().
get
(
rkEnters
);
if
(!
CollectionUtils
.
isEmpty
(
vos
))
{
Optional
<
AdamEntersVo
>
any
=
vos
.
stream
().
filter
(
r
->
(
r
.
getIdCard
().
equals
(
parameter
.
getIdCard
()))
&&
r
.
getType
().
equals
(
parameter
.
getType
())).
findAny
();
if
(
any
.
isPresent
())
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10019"
));
}
if
(
reviewLimitEnters
>
0
&&
vos
.
size
()
>=
reviewLimitEnters
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10025"
));
}
}
if
(
1
==
parameter
.
getType
())
{
this
.
identityHandler1
(
uid
,
parameter
.
getName
(),
parameter
.
getIdCard
());
}
AdamEntersVo
vo
=
AdamEntersVo
.
getNew
();
BeanUtils
.
copyProperties
(
parameter
,
vo
);
vo
.
setEntersId
(
IDGenerator
.
nextSnowId
());
vo
.
setUid
(
uid
);
vo
.
setIsDefault
(
CollectionUtils
.
isEmpty
(
vos
));
vo
.
setState
(
1
);
vo
.
setCreatedAt
(
now
);
if
(
null
==
vos
)
{
vos
=
new
ArrayList
<>();
}
vos
.
add
(
0
,
vo
);
redisDataSourceUtil
.
getRedisAdamUtil
().
set
(
AdamRedisConst
.
INFO_ENTERS
+
uid
,
vos
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
AdamQueue
.
SQL_UCENTER
.
getKey
(),
SqlMapping
.
get
(
"adam_enters.add"
,
vo
.
getEntersId
(),
uid
,
vo
.
getType
(),
vo
.
getName
(),
""
,
vo
.
getIdCard
(),
vo
.
getIsDefault
(),
vo
.
getState
(),
now
)
);
return
ResponseDto
.
success
(
vo
.
getEntersId
());
}
/**
/**
* 身份证实名处理
* 身份证实名处理
*
*
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/resources/sqlmap.properties
View file @
6b08a2be
...
@@ -11,4 +11,6 @@ kylin_camera_record.insert=INSERT INTO kylin_camera_record (camera_record_id, ca
...
@@ -11,4 +11,6 @@ kylin_camera_record.insert=INSERT INTO kylin_camera_record (camera_record_id, ca
adam_enters.edit
=
UPDATE adam_enters SET `type`=?, `name`=?, mobile=?, id_card=?, is_default=?, updated_at=? WHERE enters_id=?
adam_enters.edit
=
UPDATE adam_enters SET `type`=?, `name`=?, mobile=?, id_card=?, is_default=?, updated_at=? WHERE enters_id=?
adam_user.close
=
UPDATE adam_user SET `state`=2, updated_at=?, closed_at=? WHERE `uid`=?
adam_user.close
=
UPDATE adam_user SET `state`=2, updated_at=?, closed_at=? WHERE `uid`=?
\ No newline at end of file
adam_enters.add
=
INSERT INTO adam_enters (enters_id, `uid`, `type`,`name`, mobile, id_card, is_default, `state`, created_at) VALUES (?,?,?,?,?,?,?,?,?)
\ No newline at end of file
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