Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
micro_app
gk
Commits
bbdef601
Commit
bbdef601
authored
Sep 14, 2020
by
yangshuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
赛事信息
parent
703f8852
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
5 deletions
+20
-5
TemplateController.java
...va/com/dlbridge/jadp/plugins/cmpt/TemplateController.java
+1
-1
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+1
-0
CmptSettingMapper.xml
...bridge/jadp/plugins/cmpt/dao/mapper/CmptSettingMapper.xml
+3
-0
RemoteService.java
...com/dlbridge/jadp/plugins/cmpt/service/RemoteService.java
+4
-2
ScoreSettingController.java
...lbridge/jadp/plugins/cmpt/web/ScoreSettingController.java
+11
-2
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/TemplateController.java
View file @
bbdef601
...
@@ -26,7 +26,7 @@ public class TemplateController {
...
@@ -26,7 +26,7 @@ public class TemplateController {
Result
result
=
Result
.
fail
();
Result
result
=
Result
.
fail
();
Optional
.
of
(
cmptTemplates
).
ifPresent
(
r
->
{
Optional
.
of
(
cmptTemplates
).
ifPresent
(
r
->
{
if
(
r
.
size
()>
0
){
if
(
r
.
size
()>
0
){
result
.
setCode
(
200
).
setContent
(
cmptTemplates
);
result
.
set
Msg
(
"成功"
).
set
Code
(
200
).
setContent
(
cmptTemplates
);
}
}
});
});
return
Mono
.
just
(
result
);
return
Mono
.
just
(
result
);
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
bbdef601
...
@@ -173,6 +173,7 @@
...
@@ -173,6 +173,7 @@
</if>
</if>
<if
test=
"cmptName != null"
>
<if
test=
"cmptName != null"
>
a.cmpt_name = #{cmptName},
a.cmpt_name = #{cmptName},
c.cmptName = #{cmptName},
</if>
</if>
<if
test=
"startTime != null"
>
<if
test=
"startTime != null"
>
a.start_time = #{startTime},
a.start_time = #{startTime},
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptSettingMapper.xml
View file @
bbdef601
...
@@ -82,6 +82,9 @@
...
@@ -82,6 +82,9 @@
<update
id=
"update"
>
<update
id=
"update"
>
UPDATE gk_cmptsetting
UPDATE gk_cmptsetting
<set>
<set>
<if
test=
"func.name != null"
>
`name` = #{func.name},
</if>
<if
test=
"func.nameWeb != null"
>
<if
test=
"func.nameWeb != null"
>
name_web = #{func.nameWeb},
name_web = #{func.nameWeb},
</if>
</if>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/RemoteService.java
View file @
bbdef601
...
@@ -65,8 +65,10 @@ public class RemoteService {
...
@@ -65,8 +65,10 @@ public class RemoteService {
}
}
public
EnrollInfo
getUserInfoByPhone
(
String
phone
,
Integer
cmptId
)
{
public
EnrollInfo
getUserInfoByPhone
(
String
phone
,
Integer
cmptId
)
{
ResponseEntity
<
String
>
forEntity
=
restTemplate
.
getForEntity
(
timerURL
+
"getEnrollInfo.do?cmptId="
String
url
=
timerURL
+
"getEnrollInfo.do?cmptId="
+
cmptId
+
"&phone="
+
phone
,
String
.
class
);
+
cmptId
+
"&phone="
+
phone
;
ResponseEntity
<
String
>
forEntity
=
restTemplate
.
getForEntity
(
url
,
String
.
class
);
log
.
info
(
"requet get url:"
+
url
);
if
(
forEntity
.
getStatusCode
()
==
HttpStatus
.
OK
)
{
if
(
forEntity
.
getStatusCode
()
==
HttpStatus
.
OK
)
{
String
resultString
=
forEntity
.
getBody
();
String
resultString
=
forEntity
.
getBody
();
log
.
info
(
"resultString:"
+
resultString
);
log
.
info
(
"resultString:"
+
resultString
);
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ScoreSettingController.java
View file @
bbdef601
...
@@ -64,6 +64,7 @@ public class ScoreSettingController {
...
@@ -64,6 +64,7 @@ public class ScoreSettingController {
}
}
@RequestMapping
(
"test/{cmptId}"
)
@RequestMapping
(
"test/{cmptId}"
)
@ResponseBody
@ResponseBody
@HystrixCommand
(
fallbackMethod
=
"testFallBack"
)
@HystrixCommand
(
fallbackMethod
=
"testFallBack"
)
...
@@ -87,7 +88,7 @@ public class ScoreSettingController {
...
@@ -87,7 +88,7 @@ public class ScoreSettingController {
List
<
CmptScoreRule
>
rules
=
scoreRuleService
.
getRules
(
cmptId
);
List
<
CmptScoreRule
>
rules
=
scoreRuleService
.
getRules
(
cmptId
);
if
(
rules
!=
null
||
rules
.
size
()
>
0
){
if
(
rules
!=
null
&&
rules
.
size
()
>
0
){
scoreRuleService
.
deleteRuleByCmptId
(
cmptId
);
scoreRuleService
.
deleteRuleByCmptId
(
cmptId
);
}
}
...
@@ -104,7 +105,7 @@ public class ScoreSettingController {
...
@@ -104,7 +105,7 @@ public class ScoreSettingController {
rule
.
setUpdateTime
(
LocalDateTime
.
now
());
rule
.
setUpdateTime
(
LocalDateTime
.
now
());
rule
.
setScoreRule
(
type
);
rule
.
setScoreRule
(
type
);
rule
.
setScoreUploadTimes
(
999
);
rule
.
setScoreUploadTimes
(
999
);
rule
.
setOrderRule
(
rules
.
get
(
0
).
getOrderRule
()
);
rule
.
setOrderRule
(
rules
.
size
()
>
0
?
rules
.
get
(
0
).
getOrderRule
():
4
);
lists
.
add
(
rule
);
lists
.
add
(
rule
);
}
}
...
@@ -113,4 +114,12 @@ public class ScoreSettingController {
...
@@ -113,4 +114,12 @@ public class ScoreSettingController {
return
Result
.
success
().
setContent
(
lists
);
return
Result
.
success
().
setContent
(
lists
);
}
}
@RequestMapping
(
"currentRule/{cmptId}"
)
@ResponseBody
public
Result
currentRule
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
)
{
int
currentRuleType
=
scoreRuleService
.
getCurrentRuleType
(
cmptId
);
return
Result
.
success
().
setContent
(
currentRuleType
);
}
}
}
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