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
ce71272a
Commit
ce71272a
authored
Feb 02, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查询方案接口
parent
84d87902
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
SchemeServiceImpl.java
...java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
+1
-1
UserLimitServiceImpl.java
...a/cn/wisenergy/service/app/impl/UserLimitServiceImpl.java
+4
-1
VolunteerManager.java
...in/java/cn/wisenergy/service/common/VolunteerManager.java
+11
-0
PayController.java
.../cn/wisenergy/web/admin/controller/app/PayController.java
+2
-1
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
View file @
ce71272a
...
...
@@ -241,7 +241,7 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
list
=
getVolunteerList
(
list
,
totalResult
);
}
//6保存用户方案记录、志愿之间的关联关系
//6保存用户方案记录、志愿之间的关联关系
,扣减查询次数
boolean
bool
=
volunteerManager
.
saveUserVolunteer
(
user
,
list
,
scoreInfo
,
queryVo
.
getBigMajorNames
());
if
(!
bool
)
{
return
R
.
error
(
"保存方案查询记录失败!"
);
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserLimitServiceImpl.java
View file @
ce71272a
...
...
@@ -142,6 +142,9 @@ public class UserLimitServiceImpl extends ServiceImpl<UserLimitMapper, UserLimit
//更新用户查询信息并保存扣减记录
boolean
bool
=
volunteerManager
.
updateLimitSaveRecord
(
userLimit
);
return
R
.
ok
(
bool
);
if
(
bool
)
{
return
R
.
ok
(
0
,
true
);
}
return
R
.
ok
(
1
,
false
);
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/common/VolunteerManager.java
View file @
ce71272a
...
...
@@ -6,6 +6,7 @@ import cn.wisenergy.model.app.*;
import
cn.wisenergy.model.enums.CardStatus
;
import
cn.wisenergy.model.enums.PayType
;
import
cn.wisenergy.model.vo.AddLimitVo
;
import
cn.wisenergy.service.app.UserLimitService
;
import
cn.wisenergy.service.app.UserVolunteerService
;
import
cn.wisenergy.service.app.VolunteerService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -62,6 +63,11 @@ public class VolunteerManager {
@Autowired
private
VolunteerMapper
volunteerMapper
;
@Autowired
private
UserLimitService
userLimitService
;
private
static
final
int
ERROR_CODE
=
1
;
/**
* 更新用户查询信息并保存扣减记录
*
...
...
@@ -184,6 +190,11 @@ public class VolunteerManager {
volunteerList
.
add
(
userVolunteer
);
}
//调用扣减查询次数接口
R
<
Boolean
>
result
=
userLimitService
.
minusLimit
(
user
.
getId
());
if
(
null
!=
result
&&
result
.
getCode
()
==
ERROR_CODE
)
{
return
false
;
}
boolean
bool
=
userVolunteerService
.
saveBatch
(
volunteerList
);
if
(!
bool
)
{
return
false
;
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/PayController.java
View file @
ce71272a
...
...
@@ -49,13 +49,14 @@ public class PayController {
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
Common
.
PAY_URL_CS
,
Common
.
APP_ID_CS
,
Common
.
PRIVATE_KEY_CS
,
"json"
,
"GBK"
,
Common
.
ALIPAY_PUBLIC_KEY_CS
,
"RSA2"
);
AlipayTradePagePayRequest
alipayRequest
=
new
AlipayTradePagePayRequest
();
String
tradeNo
=
"21"
+
System
.
currentTimeMillis
();
//创建API对应的request
alipayRequest
.
setReturnUrl
(
"http://domain.com/CallBack/return_url.jsp"
);
//在公共参数中设置回跳和通知地址
alipayRequest
.
setNotifyUrl
(
"http://domain.com/CallBack/notify_url.jsp"
);
alipayRequest
.
setBizContent
(
"{"
+
"\"out_trade_no\":\"
20210320010101001
\","
+
"\"out_trade_no\":\"
"
+
tradeNo
+
"
\","
+
"\"product_code\":\"FAST_INSTANT_TRADE_PAY\","
+
"\"total_amount\":"
+
payPageDto
.
getPrice
()
+
","
+
"\"subject\":\"充值\","
+
...
...
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