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
90bf9e2c
Commit
90bf9e2c
authored
Sep 09, 2020
by
yangshuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排行榜
parent
b9720d15
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
536 additions
and
47 deletions
+536
-47
CmptScoreRule.java
src/main/java/com/dlbridge/feign/bean/CmptScoreRule.java
+1
-0
CmptScoreRule.java
...va/com/dlbridge/jadp/plugins/cmpt/bean/CmptScoreRule.java
+4
-1
CmptMapper.java
...com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.java
+2
-2
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+37
-13
CmptScoreRuleMapper.java
...dge/jadp/plugins/cmpt/dao/mapper/CmptScoreRuleMapper.java
+2
-0
CmptScoreRuleMapper.xml
...idge/jadp/plugins/cmpt/dao/mapper/CmptScoreRuleMapper.xml
+7
-1
PartnerMapper.java
.../dlbridge/jadp/plugins/cmpt/dao/mapper/PartnerMapper.java
+12
-0
PartnerMapper.xml
...m/dlbridge/jadp/plugins/cmpt/dao/mapper/PartnerMapper.xml
+11
-0
CmptScoreRuleService.java
...ridge/jadp/plugins/cmpt/service/CmptScoreRuleService.java
+4
-0
CmptService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
+2
-2
PartnerService.java
...om/dlbridge/jadp/plugins/cmpt/service/PartnerService.java
+19
-0
FuncController.java
...va/com/dlbridge/jadp/plugins/cmpt/web/FuncController.java
+23
-0
MicroApiController.java
...om/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
+16
-8
RankSettingController.java
...dlbridge/jadp/plugins/cmpt/web/RankSettingController.java
+56
-0
ScoreSettingController.java
...lbridge/jadp/plugins/cmpt/web/ScoreSettingController.java
+3
-0
application-dev.properties
src/main/resources/application-dev.properties
+1
-1
bootstrap.yml
src/main/resources/bootstrap.yml
+4
-4
rankSetting.jsp
src/main/webapp/WEB-INF/views/cmpt/rankSetting.jsp
+310
-0
sure-letter.jsp
src/main/webapp/WEB-INF/views/cmpt/sure-letter.jsp
+14
-14
menu.jsp
src/main/webapp/WEB-INF/views/common/menu.jsp
+8
-1
No files found.
src/main/java/com/dlbridge/feign/bean/CmptScoreRule.java
View file @
90bf9e2c
...
...
@@ -51,5 +51,6 @@ public class CmptScoreRule{
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
insertTime
;
private
Integer
orderRule
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/CmptScoreRule.java
View file @
90bf9e2c
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
bean
;
import
com.dlbridge.jadp.plugins.cmpt.utils.date.DateDeserializers
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
...
...
@@ -27,4 +26,8 @@ public class CmptScoreRule {
@JsonDeserialize
(
using
=
DateDeserializers
.
ISO8601Long
.
class
)
private
Date
endTime
;
private
Integer
scoreRule
;
private
Integer
orderRule
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.java
View file @
90bf9e2c
...
...
@@ -76,9 +76,9 @@ public interface CmptMapper {
int
isUploadProfile
(
Integer
cmptId
);
Map
<
String
,
String
>
getPhotoLocation
(
@Param
(
"cmptId"
)
Integer
cmptId
,
@Param
(
"roadId"
)
Integer
roadId
);
Map
<
String
,
String
>
getPhotoLocation
(
@Param
(
"cmptId"
)
Integer
cmptId
,
@Param
(
"roadId"
)
Integer
roadId
);
Map
<
String
,
String
>
getAllStatistic
();
Map
<
String
,
String
>
getAllStatistic
(
@Param
(
"userId"
)
int
userId
);
Map
<
String
,
String
>
getEnrollUsersByUserMapId
(
int
userMapId
);
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
90bf9e2c
...
...
@@ -159,28 +159,32 @@
</sql>
<update
id=
"updateCmpt"
>
update gk_cmpt
update gk_cmpt a
left join common.neucmpt b on a.cmpt_id=b.gtcmptid
left join raceenroll.competition c on b.gcmptid=c.cmptid
<set>
<if
test=
"logo != null"
>
logo = #{logo},
a.
logo = #{logo},
</if>
<if
test=
"cmptbgColor != null"
>
bg_color = #{cmptbgColor},
a.
bg_color = #{cmptbgColor},
</if>
<if
test=
"cmptName != null"
>
cmpt_name = #{cmptName},
a.
cmpt_name = #{cmptName},
</if>
<if
test=
"startTime != null"
>
start_time = #{startTime},
a.start_time = #{startTime},
c.startTime = #{startTime},
</if>
<if
test=
"cmptType != null"
>
cmpt_type = #{cmptType},
a.
cmpt_type = #{cmptType},
</if>
<if
test=
"endTime != null"
>
end_time = #{endTime}
a.end_time = #{endTime},
c.endTime = #{endTime}
</if>
</set>
where cmpt_id = #{cmptId}
where
a.
cmpt_id = #{cmptId}
</update>
<select
id=
"getCommonUserId"
resultType=
"java.lang.Integer"
>
...
...
@@ -263,21 +267,41 @@
</select>
<select
id=
"getAllStatistic"
resultType=
"java.util.HashMap"
>
<![CDATA[
select
select
(SELECT count(1) from gk_cmpt a
left join common.neucmpt b on a.cmpt_id=b.gtcmptid
left join raceenroll.competition c on b.gcmptid=c.cmptId where cmpt_status=2 and del_flag=0 and c.createUserId <>
427744) `all`,
left join raceenroll.competition c on b.gcmptid=c.cmptId where cmpt_status=2 and del_flag=0
<if
test=
"0 > userId"
>
and c.createUserId
<![CDATA[ <> ]]>
427744
</if>
<if
test=
"userId > 0"
>
and c.createUserId = #{userId}
</if>
) `all`,
(SELECT count(1) from gk_cmpt a
left join common.neucmpt b on a.cmpt_id=b.gtcmptid
left join raceenroll.competition c on b.gcmptid=c.cmptId
where a.cmpt_status=2 and a.del_flag=0 and c.opentime
< now
()
and
c.deadline
>
now() and c.createUserId
<
> 427744) enroll,
where a.cmpt_status=2 and a.del_flag=0 and now() > c.opentime and c.deadline > now()
<if
test=
"userId lt 0"
>
and c.createUserId
<![CDATA[ <> ]]>
427744
</if>
<if
test=
"userId > 0"
>
and c.createUserId = #{userId}
</if>
) enroll,
(
SELECT count(1) from gk_cmpt a
left join common.neucmpt b on a.cmpt_id=b.gtcmptid
left join raceenroll.competition c on b.gcmptid=c.cmptId
where a.cmpt_status=2 and a.del_flag=0 and c.startTime
< now
()
and
c.endTime
>
now() and c.createUserId
<
> 427744) race
where a.cmpt_status=2 and a.del_flag=0 and now() > c.startTime and c.endTime > now()
<if
test=
"userId lt 0"
>
and c.createUserId
<![CDATA[ <> ]]>
427744
</if>
<if
test=
"userId > 0"
>
and c.createUserId = #{userId}
</if>
) race
from dual
]]>
</select>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptScoreRuleMapper.java
View file @
90bf9e2c
...
...
@@ -62,4 +62,6 @@ public interface CmptScoreRuleMapper {
int
countByStartAndEnd
(
@Param
(
"cmptId"
)
int
cmptId
,
@Param
(
"start"
)
String
start
,
@Param
(
"end"
)
String
end
);
int
deleteBatch
(
@Param
(
"cmptId"
)
int
cmptId
,
@Param
(
"start"
)
String
start
,
@Param
(
"end"
)
String
end
);
void
updateOrderRule
(
@Param
(
"cmptId"
)
Integer
cmptId
,
@Param
(
"orderRule"
)
Integer
orderRule
);
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptScoreRuleMapper.xml
View file @
90bf9e2c
...
...
@@ -4,7 +4,7 @@
<select
id=
"getCmptScoreRuleByCmptId"
resultType=
"CmptScoreRule"
>
select id,`index`,cmpt_id as cmptId,start_time as startTime,end_time as endTime
select id,`index`,cmpt_id as cmptId,start_time as startTime,end_time as endTime
,order_rule orderRule
from gk_cmpt_score_rule where cmpt_id=#{cmptId} order by `index`
</select>
...
...
@@ -147,4 +147,10 @@
set a.isDelete=1, a.updateTime=now(),b.isDelete=1,b.updateTime=now()
where a.cmptId=#{cmptId} and a.insertTime >= #{start} and #{end} >= a.insertTime
</update>
<update
id=
"updateOrderRule"
>
update gk_cmpt_score_rule
set order_rule = #{orderRule}
where cmpt_id=#{cmptId}
</update>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/PartnerMapper.java
0 → 100644
View file @
90bf9e2c
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
mapper
;
import
com.dlbridge.jadp.plugins.cmpt.bean.Partner
;
public
interface
PartnerMapper
{
Partner
getPartnerById
(
String
partnerId
);
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/PartnerMapper.xml
0 → 100644
View file @
90bf9e2c
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.dlbridge.jadp.plugins.cmpt.dao.mapper.PartnerMapper"
>
<select
id=
"getPartnerById"
resultType=
"com.dlbridge.jadp.plugins.cmpt.bean.Partner"
>
select app_id appId,app_secret appSecret,user_id userId,partner_id partnerId
from gk_app_info
where partner_id = #{partnerId}
</select>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/CmptScoreRuleService.java
View file @
90bf9e2c
...
...
@@ -98,4 +98,8 @@ public class CmptScoreRuleService {
public
int
deleteBatch
(
int
cmptId
,
String
start
,
String
end
)
{
return
cmptScoreRuleMapper
.
deleteBatch
(
cmptId
,
start
,
end
);
}
public
void
updateOrderRule
(
Integer
cmptId
,
Integer
orderRule
)
{
cmptScoreRuleMapper
.
updateOrderRule
(
cmptId
,
orderRule
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
View file @
90bf9e2c
...
...
@@ -204,8 +204,8 @@ public class CmptService {
return
cmptMapper
.
getPhotoLocation
(
cmptId
,
roadId
);
}
public
Map
<
String
,
String
>
getAllStatistic
()
{
return
cmptMapper
.
getAllStatistic
();
public
Map
<
String
,
String
>
getAllStatistic
(
int
userId
)
{
return
cmptMapper
.
getAllStatistic
(
userId
);
}
public
Map
<
String
,
String
>
getEnrollUsersByUserMapId
(
int
userMapId
)
{
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/PartnerService.java
0 → 100644
View file @
90bf9e2c
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
service
;
import
com.dlbridge.jadp.plugins.cmpt.bean.Partner
;
import
com.dlbridge.jadp.plugins.cmpt.dao.mapper.PartnerMapper
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
@Service
public
class
PartnerService
{
@Resource
PartnerMapper
partnerMapper
;
public
Partner
getPartnerById
(
String
partnerId
)
{
return
partnerMapper
.
getPartnerById
(
partnerId
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/FuncController.java
0 → 100644
View file @
90bf9e2c
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
web
;
import
com.dlbridge.jadp.plugins.cmpt.bean.Func
;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptSettingService
;
import
com.neusoft.www.utils.web.Result
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"gk/func"
)
public
class
FuncController
{
@Autowired
CmptSettingService
cmptSettingService
;
@RequestMapping
(
"updateName"
)
public
Result
updateName
(
Func
func
){
cmptSettingService
.
saveOrUpdate
(
func
);
return
Result
.
success
().
setContent
(
"更新成功!"
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
View file @
90bf9e2c
...
...
@@ -84,6 +84,10 @@ public class MicroApiController {
@Resource
private
ValueOperations
valueOperations
;
@Resource
PartnerService
partnerService
;
@Value
(
"${geexek.cmpt.url}"
)
private
String
timerURL
;
...
...
@@ -148,10 +152,10 @@ public class MicroApiController {
}
}
RoadUser
user
=
remoteService
.
getEnrollUsersByPhone
(
cmptId
,
phone
);
if
(
user
=
=
null
){
return
Result
.
fail
().
setMsg
(
"未找到报名信息!"
).
setContent
(
info
);
if
(
user
!
=
null
){
info
.
setUserMapId
(
user
.
getUserMapId
()
);
}
info
.
setUserMapId
(
user
.
getUserMapId
());
return
Result
.
success
().
setMsg
(
"绑定成功!"
).
setContent
(
info
);
}
...
...
@@ -211,10 +215,9 @@ public class MicroApiController {
}
}
RoadUser
user
=
remoteService
.
getEnrollUsersByPhone
(
cmptId
,
purePhoneNumber
);
if
(
user
=
=
null
){
return
Result
.
fail
().
setMsg
(
"未找到报名信息!"
).
setContent
(
info
);
if
(
user
!
=
null
){
info
.
setUserMapId
(
user
.
getUserMapId
()
);
}
info
.
setUserMapId
(
user
.
getUserMapId
());
return
Result
.
success
().
setMsg
(
"绑定成功!"
).
setContent
(
info
);
}
catch
(
Exception
e
)
{
...
...
@@ -1205,8 +1208,13 @@ public class MicroApiController {
*/
@GetMapping
(
value
=
"/cmpt/statistic"
)
@ResponseBody
public
Result
statistic
()
{
Map
<
String
,
String
>
param
=
cmptService
.
getAllStatistic
();
public
Result
statistic
(
@RequestParam
(
value
=
"partnerId"
,
required
=
false
)
String
partnerId
)
{
Partner
partner
=
partnerService
.
getPartnerById
(
partnerId
);
if
(
partner
==
null
){
partner
=
new
Partner
();
partner
.
setUserId
(-
1
);
}
Map
<
String
,
String
>
param
=
cmptService
.
getAllStatistic
(
partner
.
getUserId
());
return
Result
.
success
().
setContent
(
param
);
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/RankSettingController.java
0 → 100644
View file @
90bf9e2c
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
web
;
import
com.dlbridge.jadp.common.interceptor.PageView
;
import
com.dlbridge.jadp.plugins.cmpt.bean.CmptScoreRule
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt
;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptScoreRuleService
;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptService
;
import
com.neusoft.www.utils.web.Result
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.servlet.ModelAndView
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Controller
@Log4j2
@RequestMapping
(
"gk/rankSetting/"
)
@ApiIgnore
public
class
RankSettingController
{
@Resource
private
CmptService
cmptService
;
@Resource
CmptScoreRuleService
cmptScoreRuleService
;
@RequestMapping
(
"index/{cmptId}"
)
@PageView
public
ModelAndView
getAlbumCounts
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
,
ModelAndView
mv
)
{
Cmpt
cmpt
=
cmptService
.
queryCmptBycmptId
(
cmptId
);
List
<
CmptScoreRule
>
cmptScoreRules
=
cmptScoreRuleService
.
getCmptScoreRulesByCmptId
(
cmptId
);
mv
.
addObject
(
"cmpt"
,
cmpt
);
if
(
cmptScoreRules
.
size
()
>
0
){
mv
.
addObject
(
"currentRuleType"
,
cmptScoreRules
.
get
(
0
).
getOrderRule
());
}
mv
.
setViewName
(
"cmpt/rankSetting"
);
return
mv
;
}
@RequestMapping
(
"updateOrderRule/{cmptId}/{orderRule}"
)
@ResponseBody
public
Result
updateOrderRule
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
,
@PathVariable
(
"orderRule"
)
Integer
orderRule
)
{
cmptScoreRuleService
.
updateOrderRule
(
cmptId
,
orderRule
);
return
Result
.
success
().
setMsg
(
"操作成功"
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ScoreSettingController.java
View file @
90bf9e2c
...
...
@@ -77,6 +77,8 @@ public class ScoreSettingController {
public
Result
testFallBack
(
Integer
cmptId
,
ModelAndView
mv
){
return
Result
.
fail
().
setMsg
(
"tesetttttttt"
);
}
@RequestMapping
(
"saveRule/{cmptId}/{type}"
)
@ResponseBody
public
Result
saveRule
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
,
...
...
@@ -102,6 +104,7 @@ public class ScoreSettingController {
rule
.
setUpdateTime
(
LocalDateTime
.
now
());
rule
.
setScoreRule
(
type
);
rule
.
setScoreUploadTimes
(
999
);
rule
.
setOrderRule
(
rules
.
get
(
0
).
getOrderRule
());
lists
.
add
(
rule
);
}
...
...
src/main/resources/application-dev.properties
View file @
90bf9e2c
...
...
@@ -98,7 +98,7 @@ spring.cloud.sentinel.skip-keys=cmptId
spring.cloud.sentinel.exclude-urls
=
/static/**,**.css,**.js
## nacos 地址
spring.cloud.sentinel.datasource.ds.nacos.server-addr
=
192.168.1.
2
:8848
spring.cloud.sentinel.datasource.ds.nacos.server-addr
=
192.168.1.
3
:8848
spring.cloud.sentinel.datasource.ds.nacos.dataId
=
micro-gksite-sentinel
spring.cloud.sentinel.datasource.ds.nacos.data-type
=
json
spring.cloud.sentinel.datasource.ds.nacos.groupId
=
dev
...
...
src/main/resources/bootstrap.yml
View file @
90bf9e2c
...
...
@@ -4,11 +4,11 @@ spring:
cloud
:
nacos
:
config
:
server-addr
:
http://192.168.1.
2
:8848
server-addr
:
http://192.168.1.
3
:8848
file-extension
:
properties
group
:
dev
namespace
:
187c2f4d-80c2-4a67-b4e5-319d5c9151d1
server-addr
:
http://192.168.1.
2
:8848
server-addr
:
http://192.168.1.
3
:8848
discovery
:
group
:
dev
namespace
:
187c2f4d-80c2-4a67-b4e5-319d5c9151d1
...
...
@@ -18,11 +18,11 @@ spring:
cloud
:
nacos
:
config
:
server-addr
:
http://192.168.1.
2
:8848
server-addr
:
http://192.168.1.
3
:8848
file-extension
:
properties
group
:
dev
namespace
:
187c2f4d-80c2-4a67-b4e5-319d5c9151d1
server-addr
:
http://192.168.1.
2
:8848
server-addr
:
http://192.168.1.
3
:8848
discovery
:
group
:
dev
namespace
:
187c2f4d-80c2-4a67-b4e5-319d5c9151d1
...
...
src/main/webapp/WEB-INF/views/cmpt/rankSetting.jsp
0 → 100644
View file @
90bf9e2c
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
%>
<%@ include
file=
"/WEB-INF/views/include/taglib.jsp"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<!doctype html>
<html>
<head>
<title>
排行榜
</title>
<!-- Bootstrap CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css"
>
<!-- Fontastic Custom icon font-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/fontastic.css"
>
<!-- Google fonts - Poppins -->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/font-css.css"
>
<!-- theme stylesheet-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/style.default.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
id=
"theme-stylesheet"
>
<!-- Custom stylesheet - for your changes-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/juery-ui-1.12.css"
>
<!-- Favicon-->
<link
rel=
"shortcut icon"
href=
"img/favicon.ico"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/main.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/setting.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet_label.css"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/road.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/road-new.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<script
src=
"${ctxStatic}/My97DatePicker/WdatePicker.js"
type=
"text/javascript"
></script>
<script
src=
"${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"${ctxStatic}/layer/layer.js"
></script>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/layer/skin/layer.css"
>
<link
rel=
"stylesheet"
href=
"/static/cmpt/score.css?
<%=
System
.
currentTimeMillis
()
%>
"
>
<style>
input
[
type
=
checkbox
]
::before
{
border
:
2px
solid
rgba
(
102
,
102
,
102
,
1
);
}
input
[
type
=
checkbox
]
{
position
:
relative
;
top
:
-2px
;
left
:
-10px
;
}
input
[
type
=
radio
]
{
position
:
relative
;
top
:
-1px
;
left
:
27px
;
width
:
0px
;
height
:
0px
;
cursor
:
pointer
;
background
:
white
;
}
input
[
type
=
radio
]
::before
{
position
:
absolute
;
content
:
''
;
width
:
24px
;
height
:
24px
;
border
:
2px
solid
rgba
(
153
,
153
,
153
,
1
);
border-radius
:
50%
;
left
:
-3px
;
top
:
-10px
;
background
:
white
;
}
input
[
type
=
radio
]
:checked::before
{
border
:
none
;
}
input
[
type
=
radio
]
:checked::after
{
position
:
absolute
;
content
:
''
;
width
:
24px
;
height
:
24px
;
background
:
url('/static/images/manage/radio_selected.png')
no-repeat
center
;
border-radius
:
50%
;
left
:
-3px
;
top
:
-10px
;
background-size
:
100%
;
}
.setting-item
{
width
:
880px
;
height
:
75px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
display
:
flex
;
align-items
:
center
;
margin
:
10px
0px
;
}
.submit
{
display
:
inline-block
;
width
:
120px
;
height
:
45px
;
text-align
:
center
;
line-height
:
45px
;
color
:
white
;
background
:
#ce3939
;
border-radius
:
4px
;
letter-spacing
:
1px
;
cursor
:
pointer
;
font-size
:
16px
;
}
.input
{
width
:
390px
;
height
:
45px
;
line-height
:
50px
;
border
:
2px
solid
#F4F4F4
;
border-radius
:
4px
;
margin-right
:
30px
;
margin-left
:
0px
;
padding-left
:
12px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
}
.title-new
{
font-size
:
20px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
margin-right
:
15px
;
}
.func
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.tip
{
font-size
:
16px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
position
:
absolute
;
right
:
45px
;
top
:
10px
;
}
.road-notice
{
position
:
absolute
;
top
:
16px
;
height
:
15px
;
width
:
15px
;
}
.road-notice-txt
{
color
:
rgb
(
206
,
57
,
57
);
font-size
:
16px
;
margin-left
:
25px
;
width
:
300px
;
display
:
inline-block
;
}
.saveDiv
{
display
:
flex
;
justify-content
:
center
;
}
</style>
</head>
<body>
<jsp:include
page=
"../common/header.jsp"
></jsp:include>
<div
class=
"page-content d-flex align-items-stretch main-body"
>
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<div
class=
"rght"
>
<div
id=
"rank"
class=
"section"
style=
"display: flex;justify-content: space-between;align-items: center;"
>
<div
class=
"func"
>
<span
class=
"title-new"
>
展示名称
</span>
<div
style=
"position: relative;"
>
<input
@
input=
"count"
class=
"input"
type=
"text"
v-model=
"rank.nameWeb"
placeholder=
"请输入功能名称,最多五个字符"
>
<span
class=
"tip"
>
{{rank.nameWeb.length}}/5
</span>
</div>
<div
style=
"position: relative;"
>
<span
class=
"road-notice"
></span>
<span
class=
"road-notice-txt"
>
此名称用于展示给选手,只能使用中文,
<br/>
且不能超过5个字。
</span>
</div>
<div
class=
"saveDiv"
>
<span
v-on:click=
"save"
class=
"submit"
>
保存
</span>
</div>
</div>
</div>
<div
class=
"section"
style=
"display: flex;justify-content: space-between;align-items: center;"
>
<span
style=
"font-size:24px;color: #333"
>
榜单设置
</span>
<div>
<input
type=
"checkbox"
name=
"dayRank"
${
cmpt
.
dayRank
?
'
checked
'
:
''}
>
<span
style=
"font-size:20px;color: #333"
>
启用日榜
</span>
</div>
</div>
<div
class=
"section"
>
<div
style=
"display: flex;justify-content: space-between;align-items: center;"
>
<h3
class=
"title"
>
排列顺序(单选)
</h3>
</div>
<div
class=
"data"
>
<div
class=
"setting-item"
>
<input
type=
"radio"
name=
"rule"
value=
"1"
${
currentRuleType =
=
1
?'
checked
'
:
''}
>
<span
style=
"font-size:20px;color: #333;margin-left: 75px;"
>
按照完成的时间升序排列(越早上传、排位越靠前)
</span>
</div>
<c:if
test=
"
${
cmpt
.
cmptType
!=
7
}
"
>
<div
class=
"setting-item"
>
<input
type=
"radio"
name=
"rule"
value=
"2"
${
currentRuleType =
=
2
?
'
checked
'
:
''}
>
<span
style=
"font-size:20px;color: #333;margin-left: 75px;"
>
按照总跑量降序排列(总里程越大、排位越靠前)
</span>
</div>
<div
class=
"setting-item"
>
<input
type=
"radio"
name=
"rule"
value=
"3"
${
currentRuleType =
=
3
?
'
checked
'
:
''}
>
<span
style=
"font-size:20px;color: #333;margin-left: 75px;"
>
按照平均配速升序排列(配速越小、排位越靠前)
</span>
</div>
</c:if>
<div
class=
"setting-item"
>
<input
type=
"radio"
name=
"rule"
value=
"4"
${
currentRuleType =
=
4
?
'
checked
'
:
''}
>
<span
style=
"font-size:20px;color: #333;margin-left: 75px;"
>
按照耗时升序排列(耗时越短、排位越靠前)
</span>
</div>
</div>
</div>
</div>
</div>
<script
src=
"${ctxStatic}/newdermon/vendor/popper.js/umd/popper.min.js"
></script>
<script
src=
"${ctxStatic}/js/qikoo.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/vue/dist/vue.js"
></script>
</body>
<script>
$
(
document
).
ready
(
function
()
{
var
customerV
=
new
Vue
({
el
:
'#rank'
,
data
:
{
rank
:
{
id
:
''
,
nameWeb
:
''
,
cmptId
:
getCId
()}
},
methods
:{
count
:
function
(){
if
(
customerV
.
$data
.
rank
.
nameWeb
.
length
>
5
){
customerV
.
$data
.
rank
.
nameWeb
=
customerV
.
$data
.
rank
.
nameWeb
.
substr
(
0
,
5
)
}
},
save
:
function
()
{
if
(
customerV
.
$data
.
rank
.
nameWeb
.
length
==
0
){
layer
.
msg
(
"功能名称不能为空!"
,{
icon
:
5
,
duration
:
1500
});
return
;
}
$
.
ajax
({
url
:
'/gk/sure-letter/updateName'
,
data
:
customerV
.
$data
.
rank
,
type
:
'post'
,
beforeSend
:
function
(){
var
index
=
layer
.
load
()
setTimeout
(
function
()
{
layer
.
close
(
index
);
},
1500
)
},
success
:
function
(
data
)
{
layer
.
msg
(
'保存成功!'
)
}
})
}
}
});
// 修改成绩规则
$
(
'input[type=radio]'
).
click
(
function
()
{
var
index
=
layer
.
load
();
$
.
ajax
({
url
:
'/gk/rankSetting/updateOrderRule/'
+
getCId
()
+
"/"
+
$
(
this
).
val
(),
success
:
function
(
data
)
{
layer
.
close
(
index
);
if
(
data
.
code
==
200
){
layer
.
msg
(
"切换成功!"
,{
icon
:
1
,
duraion
:
1500
});
}
else
{
layer
.
msg
(
"切换失败!"
,{
icon
:
5
,
duraion
:
1500
});
}
},
complete
:
function
()
{
setTimeout
(
function
()
{
layer
.
close
(
index
);
},
3000
)
}
})
});
$
(
'input[name=dayRank]'
).
click
(
function
()
{
let
status
=
$
(
this
).
get
(
0
).
checked
?
1
:
0
;
$
.
ajax
({
url
:
'/gk/cmpt/updateDayRank'
,
data
:{
cmptId
:
getCId
(),
"status"
:
status
},
success
:
function
(
data
)
{
if
(
data
.
code
==
200
){
layer
.
msg
(
"切换成功!"
,{
icon
:
1
,
duraion
:
1500
});
}
else
{
layer
.
msg
(
"切换失败!"
,{
icon
:
5
,
duraion
:
1500
});
}
},
complete
:
function
()
{
}
});
});
function
getSureLetter
(){
$
.
ajax
({
url
:
'/gk/sure-letter/getFunc?cmptId='
+
getCId
()
+
"&type=17"
,
success
:
function
(
data
)
{
if
(
data
.
content
){
customerV
.
$data
.
rank
=
data
.
content
;
}
}
});
}
getSureLetter
();
});
</script>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/views/cmpt/sure-letter.jsp
View file @
90bf9e2c
...
...
@@ -112,26 +112,26 @@
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<div
class=
"rght"
id=
"letter"
>
<div
class=
"section"
>
<div
class=
"func"
>
<span
class=
"title-new"
>
功能名称
</span>
<div
style=
"position: relative;"
>
<input
@
input=
"count"
class=
"input"
type=
"text"
v-model=
"letter.nameWeb"
placeholder=
"请输入功能名称,最多五个字符"
>
<span
class=
"tip"
>
{{letter.nameWeb.length}}/5
</span>
</div>
<div
style=
"position: relative;"
>
<span
class=
"road-notice"
></span>
<span
class=
"road-notice-txt"
>
<div
class=
"func"
>
<span
class=
"title-new"
>
功能名称
</span>
<div
style=
"position: relative;"
>
<input
@
input=
"count"
class=
"input"
type=
"text"
v-model=
"letter.nameWeb"
placeholder=
"请输入功能名称,最多五个字符"
>
<span
class=
"tip"
>
{{letter.nameWeb.length}}/5
</span>
</div>
<div
style=
"position: relative;"
>
<span
class=
"road-notice"
></span>
<span
class=
"road-notice-txt"
>
此名称用于展示给选手,只能使用中文,
<br/>
且不能超过5个字。
</span>
</div>
</div>
<div
class=
"saveDiv"
>
<span
v-on:click=
"save"
class=
"submit"
>
保存
</span>
</div>
</div>
<div
class=
"saveDiv"
>
<span
v-on:click=
"save"
class=
"submit"
>
保存
</span>
</div>
</div>
</div>
<script
src=
"https://cdn.jsdelivr.net/npm/vue/dist/vue.js"
></script>
...
...
src/main/webapp/WEB-INF/views/common/menu.jsp
View file @
90bf9e2c
...
...
@@ -243,6 +243,13 @@
<span
class=
"menu-txt"
>
确认函
</span>
</a>
</li>
<li
class=
"rankSetting menu-sub-item"
>
<a
href=
"/gk/rankSetting/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
排行榜
</span>
</a>
</li>
</ul>
</li>
</ul>
...
...
@@ -297,7 +304,7 @@
var
classes
=
[
'cmptSetting'
,
'nameList'
,
'manual'
,
'contact'
,
'manage'
,
'route'
,
'road'
,
'equip'
,
'photo'
,
'news'
,
'cert'
,
'data'
,
'banner'
,
'score'
,
'auto'
,
'scan'
,
'review'
,
'customer'
,
'rule'
,
'outter-link'
,
'sure-letter'
];
'outter-link'
,
'sure-letter'
,
'rankSetting'
];
let
url
=
document
.
location
.
href
;
var
done
=
false
;
for
(
var
i
in
classes
)
{
...
...
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