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
03a0d007
Commit
03a0d007
authored
Apr 09, 2021
by
cy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vip用户方案查询,客户端方案修改
parent
f6cc3205
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
46 deletions
+78
-46
StringUtil.java
...n/src/main/java/cn/wisenergy/common/utils/StringUtil.java
+13
-0
VolunteerMapper.xml
...ergy-mapper/src/main/resources/mapper/VolunteerMapper.xml
+8
-3
SchemeRecordServiceImpl.java
...n/wisenergy/service/app/impl/SchemeRecordServiceImpl.java
+11
-0
SchemeServiceImpl.java
...java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
+45
-35
SendSmsSerViceImpl.java
...ava/cn/wisenergy/service/app/impl/SendSmsSerViceImpl.java
+0
-1
VolunteerListener.java
...n/java/cn/wisenergy/service/common/VolunteerListener.java
+0
-3
VolunteerManager.java
...in/java/cn/wisenergy/service/common/VolunteerManager.java
+1
-4
No files found.
wisenergy-common/src/main/java/cn/wisenergy/common/utils/StringUtil.java
View file @
03a0d007
...
...
@@ -562,4 +562,17 @@ public class StringUtil {
}
return
result
;
}
public
static
List
<
String
>
strToArrayStr
(
String
s
)
{
if
(
StringUtils
.
isEmpty
(
s
))
{
return
new
ArrayList
<>();
}
List
<
String
>
result
=
new
ArrayList
<>();
String
[]
str
=
s
.
split
(
","
);
for
(
String
string
:
str
)
{
result
.
add
(
string
);
}
return
result
;
}
}
wisenergy-mapper/src/main/resources/mapper/VolunteerMapper.xml
View file @
03a0d007
...
...
@@ -199,10 +199,15 @@
<if
test=
"total != null"
>
and lowest_mark=#{total}
</if>
<if
test=
"local != null"
>
and nature LIKE CONCAT('%',#{local},'%')
<if
test=
"locals != null and (locals.size)>0"
>
and
<foreach
collection=
"locals"
index=
"index"
item=
"local"
separator=
"or"
open=
"("
close=
")"
>
nature LIKE CONCAT('%',#{local},'%')
</foreach>
</if>
<if
test=
"professionNames != null"
>
<if
test=
"professionNames != null and (professionNames.size)>0"
>
and
<foreach
collection=
"professionNames"
index=
"index"
item=
"id"
separator=
"or"
open=
"("
close=
")"
>
major_name LIKE CONCAT('%',#{id},'%')
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/SchemeRecordServiceImpl.java
View file @
03a0d007
...
...
@@ -124,6 +124,12 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
volunteer
.
setQueryTime
(
schemeQueryRecord
.
getCreateTime
());
}
result
.
sort
(
Comparator
.
comparing
(
Volunteer:
:
getLowestMark
).
reversed
());
//最低位次为空,则用--代替
for
(
Volunteer
info
:
result
){
if
(
info
.
getLowestRank
()
==
null
){
info
.
setLowestRank
(
"--"
);
}
}
return
R
.
ok
(
result
);
}
...
...
@@ -169,6 +175,11 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
List
<
Integer
>
ids
=
list
.
stream
().
map
(
UserVolunteer:
:
getVolunteerId
).
collect
(
Collectors
.
toList
());
List
<
Volunteer
>
result
=
volunteerMapper
.
getListByIds
(
ids
);
for
(
Volunteer
info
:
result
){
if
(
null
==
info
.
getLowestRank
()){
info
.
setLowestRank
(
"0"
);
}
}
result
.
sort
(
Comparator
.
comparing
(
Volunteer:
:
getLowestMark
).
reversed
());
//调用工具生成PDF
try
{
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
View file @
03a0d007
This diff is collapsed.
Click to expand it.
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/SendSmsSerViceImpl.java
View file @
03a0d007
...
...
@@ -115,7 +115,6 @@ public class SendSmsSerViceImpl implements SendSmsSerVice {
public
R
<
Boolean
>
valid
(
String
phone
,
String
code
,
Integer
type
,
String
source
)
{
String
value
=
SceneType
.
getNameByCode
(
type
);
//获取短信验证码key
//String key = CachePrefix.SMS_CODE.getPrefix() + value + "_" + source + "_" + phone;
String
key
=
CachePrefix
.
SMS_CODE
.
getPrefix
()
+
"_"
+
source
+
"_"
+
phone
;
//判断缓存是否过期
long
time
=
redisService
.
getExpire
(
key
);
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/common/VolunteerListener.java
View file @
03a0d007
...
...
@@ -56,9 +56,6 @@ public class VolunteerListener extends AnalysisEventListener<Volunteer> {
if
(
StringUtils
.
isEmpty
(
volunteer
.
getAcademy
()))
{
throw
new
RuntimeException
(
"院校不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
volunteer
.
getLowestRank
()))
{
volunteer
.
setLowestRank
(
"--"
);
}
if
(
StringUtils
.
isEmpty
(
volunteer
.
getCourseDemand
()))
{
throw
new
RuntimeException
(
"选考科目要求不能为空!"
);
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/common/VolunteerManager.java
View file @
03a0d007
...
...
@@ -386,10 +386,7 @@ 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
)
{
...
...
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