Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
V
volunteer_service
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
licc
volunteer_service
Commits
196e8c29
Commit
196e8c29
authored
Mar 26, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改方案上传 不是文化类,无最低位次
parent
078b4ae0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
32 deletions
+8
-32
VolunteerManager.java
...in/java/cn/wisenergy/service/common/VolunteerManager.java
+8
-32
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/common/VolunteerManager.java
View file @
196e8c29
package
cn
.
wisenergy
.
service
.
common
;
package
cn
.
wisenergy
.
service
.
common
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.StringUtil
;
import
cn.wisenergy.mapper.*
;
import
cn.wisenergy.mapper.*
;
import
cn.wisenergy.model.app.*
;
import
cn.wisenergy.model.app.*
;
import
cn.wisenergy.model.enums.CardStatus
;
import
cn.wisenergy.model.enums.CardStatus
;
...
@@ -15,7 +14,6 @@ import cn.wisenergy.service.app.UserVolunteerService;
...
@@ -15,7 +14,6 @@ import cn.wisenergy.service.app.UserVolunteerService;
import
cn.wisenergy.service.app.VolunteerService
;
import
cn.wisenergy.service.app.VolunteerService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -107,10 +105,7 @@ public class VolunteerManager {
...
@@ -107,10 +105,7 @@ public class VolunteerManager {
userLimitRecord
.
setUserId
(
userLimit
.
getUserId
());
userLimitRecord
.
setUserId
(
userLimit
.
getUserId
());
int
record
=
userLimitRecordMapper
.
add
(
userLimitRecord
);
int
record
=
userLimitRecordMapper
.
add
(
userLimitRecord
);
if
(
record
==
0
)
{
return
record
!=
0
;
return
false
;
}
return
true
;
}
}
/**
/**
...
@@ -147,9 +142,7 @@ public class VolunteerManager {
...
@@ -147,9 +142,7 @@ public class VolunteerManager {
payRecord
.
setType
(
addLimitVo
.
getPayType
());
payRecord
.
setType
(
addLimitVo
.
getPayType
());
payRecord
.
setUserId
(
addLimitVo
.
getUserId
());
payRecord
.
setUserId
(
addLimitVo
.
getUserId
());
int
pay
=
payRecordMapper
.
add
(
payRecord
);
int
pay
=
payRecordMapper
.
add
(
payRecord
);
if
(
pay
==
0
)
{
return
pay
!=
0
;
return
false
;
}
}
else
{
}
else
{
//1、更新用户查询次数信息
//1、更新用户查询次数信息
int
limit
=
userLimitMapper
.
edit
(
userLimit
);
int
limit
=
userLimitMapper
.
edit
(
userLimit
);
...
@@ -169,18 +162,15 @@ public class VolunteerManager {
...
@@ -169,18 +162,15 @@ public class VolunteerManager {
QueryWrapper
<
PayRecord
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PayRecord
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"trade_no"
,
payRecord
.
getTradeNo
());
queryWrapper
.
eq
(
"trade_no"
,
payRecord
.
getTradeNo
());
PayRecord
byTradeNo
=
payRecordMapper
.
selectOne
(
queryWrapper
);
PayRecord
byTradeNo
=
payRecordMapper
.
selectOne
(
queryWrapper
);
int
pay
=
0
;
int
pay
;
if
(
null
!=
byTradeNo
)
{
if
(
null
!=
byTradeNo
)
{
pay
=
payRecordMapper
.
updateById
(
payRecord
);
pay
=
payRecordMapper
.
updateById
(
payRecord
);
}
else
{
}
else
{
pay
=
payRecordMapper
.
add
(
payRecord
);
pay
=
payRecordMapper
.
add
(
payRecord
);
}
}
if
(
pay
==
0
)
{
return
pay
!=
0
;
return
false
;
}
}
}
return
true
;
}
}
/**
/**
...
@@ -257,7 +247,6 @@ public class VolunteerManager {
...
@@ -257,7 +247,6 @@ public class VolunteerManager {
}
}
schemeQueryRecord
.
setScore
(
scoreInfo
.
getCultureGrade
().
toString
());
schemeQueryRecord
.
setScore
(
scoreInfo
.
getCultureGrade
().
toString
());
List
<
Integer
>
ids
=
list
.
stream
().
map
(
Volunteer:
:
getId
).
collect
(
Collectors
.
toList
());
//保存方案查询记录
//保存方案查询记录
int
count
=
schemeRecordMapper
.
add
(
schemeQueryRecord
);
int
count
=
schemeRecordMapper
.
add
(
schemeQueryRecord
);
if
(
count
==
0
)
{
if
(
count
==
0
)
{
...
@@ -303,9 +292,7 @@ public class VolunteerManager {
...
@@ -303,9 +292,7 @@ public class VolunteerManager {
//flag =2 编辑
//flag =2 编辑
if
(
null
!=
flag
&&
flag
==
2
)
{
if
(
null
!=
flag
&&
flag
==
2
)
{
int
edit
=
scoreInfoMapper
.
edit
(
scoreInfo
);
int
edit
=
scoreInfoMapper
.
edit
(
scoreInfo
);
if
(
edit
==
0
)
{
return
edit
!=
0
;
return
false
;
}
}
}
return
true
;
return
true
;
}
}
...
@@ -356,10 +343,7 @@ public class VolunteerManager {
...
@@ -356,10 +343,7 @@ public class VolunteerManager {
int
add
=
staffUserVipMapper
.
add
(
staffUserVip
);
int
add
=
staffUserVipMapper
.
add
(
staffUserVip
);
//判断数据是否添加成功
//判断数据是否添加成功
if
(
add
==
0
)
{
return
add
!=
0
;
return
false
;
}
return
true
;
}
}
/**
/**
...
@@ -379,11 +363,7 @@ public class VolunteerManager {
...
@@ -379,11 +363,7 @@ public class VolunteerManager {
//2、保存用户成绩信息
//2、保存用户成绩信息
int
save
=
scoreInfoMapper
.
edit
(
scoreInfo
);
int
save
=
scoreInfoMapper
.
edit
(
scoreInfo
);
if
(
save
==
0
)
{
return
save
!=
0
;
return
false
;
}
return
true
;
}
}
/**
/**
...
@@ -434,11 +414,7 @@ public class VolunteerManager {
...
@@ -434,11 +414,7 @@ public class VolunteerManager {
//更行志愿状态为删除
//更行志愿状态为删除
int
count
=
volunteerMapper
.
updateBySchemeId
(
schemeId
);
int
count
=
volunteerMapper
.
updateBySchemeId
(
schemeId
);
if
(
size
!=
count
)
{
return
size
==
count
;
return
false
;
}
return
true
;
}
}
/**
/**
...
...
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