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
078b4ae0
Commit
078b4ae0
authored
Mar 26, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改方案上传 不是文化类,无最低位次
parent
805089bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
User.java
...ergy-model/src/main/java/cn/wisenergy/model/app/User.java
+0
-1
AliPayServiceImpl.java
...java/cn/wisenergy/service/app/impl/AliPayServiceImpl.java
+3
-1
VolunteerManager.java
...in/java/cn/wisenergy/service/common/VolunteerManager.java
+14
-9
No files found.
wisenergy-model/src/main/java/cn/wisenergy/model/app/User.java
View file @
078b4ae0
package
cn
.
wisenergy
.
model
.
app
;
import
cn.wisenergy.model.common.BaseEntity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/AliPayServiceImpl.java
View file @
078b4ae0
...
...
@@ -3,7 +3,6 @@ package cn.wisenergy.service.app.impl;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.mapper.PayRecordMapper
;
import
cn.wisenergy.model.app.PayRecord
;
import
cn.wisenergy.model.app.User
;
import
cn.wisenergy.model.dto.PayPageDto
;
import
cn.wisenergy.model.dto.PayQueryDto
;
import
cn.wisenergy.model.vo.AddLimitVo
;
...
...
@@ -26,6 +25,9 @@ import java.util.HashMap;
import
java.util.Iterator
;
import
java.util.Map
;
/**
* @author 86187
*/
@Slf4j
@Service
public
class
AliPayServiceImpl
implements
AliPayService
{
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/common/VolunteerManager.java
View file @
078b4ae0
...
...
@@ -7,6 +7,7 @@ import cn.wisenergy.model.app.*;
import
cn.wisenergy.model.enums.CardStatus
;
import
cn.wisenergy.model.enums.OperationTypeEnum
;
import
cn.wisenergy.model.enums.PayType
;
import
cn.wisenergy.model.enums.SchemeTypeEnums
;
import
cn.wisenergy.model.vo.AddLimitVo
;
import
cn.wisenergy.model.vo.UserInfoVo
;
import
cn.wisenergy.service.app.UserLimitService
;
...
...
@@ -166,13 +167,13 @@ public class VolunteerManager {
payRecord
.
setUserId
(
addLimitVo
.
getUserId
());
payRecord
.
setTradeNo
(
addLimitVo
.
getTradeNo
());
QueryWrapper
<
PayRecord
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"trade_no"
,
payRecord
.
getTradeNo
());
queryWrapper
.
eq
(
"trade_no"
,
payRecord
.
getTradeNo
());
PayRecord
byTradeNo
=
payRecordMapper
.
selectOne
(
queryWrapper
);
int
pay
=
0
;
if
(
null
!=
byTradeNo
)
{
pay
=
payRecordMapper
.
updateById
(
payRecord
);
}
else
{
pay
=
payRecordMapper
.
add
(
payRecord
);
int
pay
=
0
;
if
(
null
!=
byTradeNo
)
{
pay
=
payRecordMapper
.
updateById
(
payRecord
);
}
else
{
pay
=
payRecordMapper
.
add
(
payRecord
);
}
if
(
pay
==
0
)
{
return
false
;
...
...
@@ -317,7 +318,7 @@ public class VolunteerManager {
* @return true or false
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
updateAndSaveUserVipInfo
(
User
user
,
ScoreInfo
scoreInfo
,
Integer
flag
,
Integer
staffId
)
{
public
boolean
updateAndSaveUserVipInfo
(
User
user
,
ScoreInfo
scoreInfo
,
Integer
flag
,
Integer
staffId
)
{
//添加vip客户信息
//1、更新用户信息
...
...
@@ -355,7 +356,7 @@ public class VolunteerManager {
int
add
=
staffUserVipMapper
.
add
(
staffUserVip
);
//判断数据是否添加成功
if
(
add
==
0
)
{
if
(
add
==
0
)
{
return
false
;
}
return
true
;
...
...
@@ -403,6 +404,10 @@ public class VolunteerManager {
for
(
Volunteer
volunteer
:
list
)
{
volunteer
.
setSchemeId
(
schemeInfo
.
getId
());
volunteer
.
setType
(
schemeInfo
.
getType
());
if
(!
SchemeTypeEnums
.
UNDERGRADUATE_CULTURE
.
getCode
().
equals
(
volunteer
.
getType
())
||
!
SchemeTypeEnums
.
JUNIOR_COLLEGE_MAJOR
.
getCode
().
equals
(
volunteer
.
getType
()))
{
volunteer
.
setLowestRank
(
null
);
}
}
boolean
bool
=
volunteerService
.
saveBatch
(
list
);
if
(!
bool
)
{
...
...
@@ -528,6 +533,6 @@ public class VolunteerManager {
UserInfoVo
userInfoVo
=
new
UserInfoVo
();
userInfoVo
.
setUserId
(
userInfo
.
getId
());
userInfoVo
.
setPhone
(
userInfo
.
getPhone
());
return
R
.
ok
(
0
,
userInfoVo
);
return
R
.
ok
(
0
,
userInfoVo
);
}
}
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