Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
9fc56f2d
Commit
9fc56f2d
authored
Dec 30, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):处理使用登记证顺延问题
parent
9de456eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
12 deletions
+33
-12
JgUseRegistrationManageMapper.xml
...c/main/resources/mapper/JgUseRegistrationManageMapper.xml
+20
-10
JgUseRegistrationManageServiceImpl.java
.../biz/service/impl/JgUseRegistrationManageServiceImpl.java
+12
-1
GenerateCodeServiceImpl.java
.../module/ymt/biz/service/impl/GenerateCodeServiceImpl.java
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationManageMapper.xml
View file @
9fc56f2d
...
...
@@ -216,16 +216,26 @@
</select>
<select
id=
"initUseRegistrationCodeIntoRedis"
resultType=
"java.util.Map"
>
SELECT SUBSTR(t.use_registration_code, 1, 5) AS prefix,
SUBSTR(MAX(t.use_registration_code), 6, 5) AS code
FROM tzs_jg_use_registration_manage t
LEFT JOIN tzs_jg_use_registration tjur on tjur.use_registration_code = t.use_registration_code
WHERE LENGTH(t.use_registration_code) = 14
AND SUBSTR(t.use_registration_code, 1, 1) IN ('容', '锅', '管', '瓶', '梯', '起', '索', '游', '车')
AND TRIM(t.use_registration_code) LIKE concat('%(',#{year},')')
AND (tjur.reg_type IS NULL OR tjur.reg_type = '2' OR tjur.reg_type = '0')
AND tjur.is_delete = 0
GROUP BY SUBSTR(t.use_registration_code, 1, 5)
SELECT
SUBSTR(t.use_registration_code, 1, 5) AS prefix,
SUBSTR(MAX(t.use_registration_code), 6, 5) AS code
FROM
tzs_jg_use_registration_manage t
LEFT JOIN
tzs_jg_use_registration tjur
ON tjur.use_registration_code = t.use_registration_code
AND (tjur.reg_type IS NULL OR tjur.reg_type = '2' OR tjur.reg_type = '0')
AND tjur.is_delete = 0
LEFT JOIN
tzs_jg_vehicle_information v
ON v.use_registration_code = t.use_registration_code
and v.reg_type = '0'
WHERE
LENGTH(t.use_registration_code) = 14
AND SUBSTR(t.use_registration_code, 1, 1) IN ('容', '锅', '管', '瓶', '梯', '起', '索', '游', '车')
AND TRIM(t.use_registration_code) LIKE concat('%(',#{year},')')
GROUP BY
SUBSTR(t.use_registration_code, 1, 5)
HAVING code
<![CDATA[ <> ]]>
'00000'
ORDER BY prefix
</select>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationManageServiceImpl.java
View file @
9fc56f2d
...
...
@@ -774,11 +774,22 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
jgUseRegistrationManageMapper
.
initUseRegistrationCodeIntoRedis
(
currentYearSuffix
)
.
forEach
(
resultMap
->
Optional
.
ofNullable
(
resultMap
)
.
ifPresent
(
map
->
setValueWith
Expiration
(
map
.
get
(
"prefix"
),
map
.
get
(
"code"
),
endOfYear
))
.
ifPresent
(
map
->
setValueWith
outExpiration
(
map
.
get
(
"prefix"
),
map
.
get
(
"code"
)
))
);
}
/**
* redis 设置不过期的 key
*
* @param key key
* @param value value
*/
public
void
setValueWithoutExpiration
(
String
key
,
String
value
)
{
ValueOperations
<
String
,
String
>
valueOps
=
redisTemplate
.
opsForValue
();
valueOps
.
set
(
key
,
value
);
}
/**
* redis设置key
*
* @param key key
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/GenerateCodeServiceImpl.java
View file @
9fc56f2d
...
...
@@ -249,7 +249,7 @@ public class GenerateCodeServiceImpl implements IGenerateCodeService {
if
(
lockKey
.
equals
(
LOCK_KEY_DR
))
{
setValueWithMonthlyExpiration
(
sequenceKey
,
String
.
valueOf
(
formattedSequence
));
}
else
{
setValueWith
Yearly
Expiration
(
sequenceKey
,
String
.
valueOf
(
formattedSequence
));
setValueWith
out
Expiration
(
sequenceKey
,
String
.
valueOf
(
formattedSequence
));
}
String
generatedSequence
=
sequenceKey
+
formattedSequence
;
...
...
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