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
8499e9fb
Commit
8499e9fb
authored
Aug 03, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增减日
parent
c282dc98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
DateUtil.java
...om/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
+21
-0
SysBaseSetInfoServiceImpl.java
...1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
+1
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
View file @
8499e9fb
...
...
@@ -1247,6 +1247,12 @@ public class DateUtil {
return
sdf
.
format
(
cal
.
getTime
());
}
/**
* @Description: 增减(月)
* @Author: hgw
* @Date: 2022/8/3 9:17
* @return: java.util.Date
**/
public
static
Date
addMonthByDate
(
Date
date
,
int
mnt
)
{
Calendar
cal
=
Calendar
.
getInstance
();
if
(
date
!=
null
)
{
...
...
@@ -1256,6 +1262,21 @@ public class DateUtil {
return
cal
.
getTime
();
}
/**
* @Description: 增减(日)
* @Author: hgw
* @Date: 2022/8/3 9:17
* @return: java.util.Date
**/
public
static
Date
addDayByDate
(
Date
date
,
int
mnt
)
{
Calendar
cal
=
Calendar
.
getInstance
();
if
(
date
!=
null
)
{
cal
.
setTime
(
date
);
}
cal
.
add
(
Calendar
.
DATE
,
mnt
);
return
cal
.
getTime
();
}
/**
* @param mnt 增减日的 值
* @Description: 增减日
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
View file @
8499e9fb
...
...
@@ -140,7 +140,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
// 将上一个无截止月的增加截止月(本次起始月的上一个月)
if
(
lastBase
!=
null
)
{
lastBase
.
setApplyEndDate
(
DateUtil
.
add
Month
ByDate
(
sysBaseSetInfo
.
getApplyStartDate
(),
-
1
));
lastBase
.
setApplyEndDate
(
DateUtil
.
add
Day
ByDate
(
sysBaseSetInfo
.
getApplyStartDate
(),
-
1
));
this
.
updateById
(
lastBase
);
}
this
.
saveOrUpdateBaseAndFundPro
(
sysBaseSetInfo
);
...
...
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