Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
site-project
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
hqzhdj
site-project
Commits
0bf5d79e
Commit
0bf5d79e
authored
Dec 18, 2024
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
投稿编号自动生产
parent
c3ec8696
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletions
+7
-1
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/PublicationMapper.java
+2
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PublicationServiceImpl.java
+1
-1
cloud-site-service/src/main/resources/mapper/PublicationMapper.xml
+4
-0
No files found.
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/PublicationMapper.java
View file @
0bf5d79e
...
@@ -51,6 +51,8 @@ public interface PublicationMapper extends BaseMapper<Publication> {
...
@@ -51,6 +51,8 @@ public interface PublicationMapper extends BaseMapper<Publication> {
Integer
querypublicationByTypeTwo
(
@Param
(
"id"
)
Long
id
);
Integer
querypublicationByTypeTwo
(
@Param
(
"id"
)
Long
id
);
String
getNumberByCode
(
@Param
(
"code"
)
String
code
);
/**
/**
* ---------------------分割线---------------
* ---------------------分割线---------------
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PublicationServiceImpl.java
View file @
0bf5d79e
...
@@ -475,7 +475,7 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi
...
@@ -475,7 +475,7 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi
formatter
.
setMinimumIntegerDigits
(
4
);
formatter
.
setMinimumIntegerDigits
(
4
);
formatter
.
setGroupingUsed
(
false
);
formatter
.
setGroupingUsed
(
false
);
String
idStr
=
formatter
.
format
(
numVal
);
String
idStr
=
formatter
.
format
(
numVal
);
return
String
.
join
(
DateUtil
.
format
(
new
Date
(),
"yyyy"
),
"TG"
,
idStr
);
return
String
.
join
(
DateUtil
.
format
(
new
Date
(),
"yyyy"
),
publicationMapper
.
getNumberByCode
(
"publication_number"
)
,
idStr
);
}
}
/**
/**
...
...
cloud-site-service/src/main/resources/mapper/PublicationMapper.xml
View file @
0bf5d79e
...
@@ -431,4 +431,7 @@
...
@@ -431,4 +431,7 @@
a.submit_time DESC,
a.submit_time DESC,
a.id
a.id
</select>
</select>
<select
id=
"getNumberByCode"
resultType=
"java.lang.String"
>
SELECT value FROM cloud_system.dictionary where code=#{code}
</select>
</mapper>
</mapper>
\ 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