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
6cf93e68
Commit
6cf93e68
authored
Sep 01, 2020
by
yangshuxing
Browse files
Options
Browse Files
Download
Plain Diff
版本开发
parents
ddd92fcf
cf515407
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
999 additions
and
511 deletions
+999
-511
GeexekScoreService.java
src/main/java/com/dlbridge/feign/GeexekScoreService.java
+1
-2
BeanValidators.java
...om/dlbridge/jadp/common/beanvalidator/BeanValidators.java
+0
-117
SecurityInterceptor.java
...dlbridge/jadp/common/interceptor/SecurityInterceptor.java
+1
-1
JaapRecord.java
...java/com/dlbridge/jadp/common/persistence/JaapRecord.java
+3
-7
TreeEntity.java
...java/com/dlbridge/jadp/common/persistence/TreeEntity.java
+0
-89
CountJob.java
src/main/java/com/dlbridge/jadp/job/CountJob.java
+3
-3
TemplateController.java
...va/com/dlbridge/jadp/plugins/cmpt/TemplateController.java
+35
-0
CmptMapper.java
...com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.java
+8
-0
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+53
-5
DataMapper.java
...com/dlbridge/jadp/plugins/cmpt/dao/mapper/DataMapper.java
+14
-0
DataMapperMapper.xml
...lbridge/jadp/plugins/cmpt/dao/mapper/DataMapperMapper.xml
+27
-0
ManualMapper.xml
...om/dlbridge/jadp/plugins/cmpt/dao/mapper/ManualMapper.xml
+1
-1
TemplateMapper.java
...dlbridge/jadp/plugins/cmpt/dao/mapper/TemplateMapper.java
+12
-0
TemplateMapper.xml
.../dlbridge/jadp/plugins/cmpt/dao/mapper/TemplateMapper.xml
+12
-0
Cmpt.java
...n/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Cmpt.java
+5
-0
CmptSetting.java
...com/dlbridge/jadp/plugins/cmpt/dao/model/CmptSetting.java
+0
-6
Manual.java
...java/com/dlbridge/jadp/plugins/cmpt/dao/model/Manual.java
+0
-6
NameList.java
...va/com/dlbridge/jadp/plugins/cmpt/dao/model/NameList.java
+2
-15
UserCmpt.java
...va/com/dlbridge/jadp/plugins/cmpt/dao/model/UserCmpt.java
+2
-0
CmptHomePageVo.java
...bridge/jadp/plugins/cmpt/dao/model/vo/CmptHomePageVo.java
+2
-7
CmptService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
+61
-3
RemoteService.java
...com/dlbridge/jadp/plugins/cmpt/service/RemoteService.java
+7
-0
TemplateService.java
...m/dlbridge/jadp/plugins/cmpt/service/TemplateService.java
+19
-0
AesUtil.java
...in/java/com/dlbridge/jadp/plugins/cmpt/utils/AesUtil.java
+13
-15
CmptSettingController.java
...dlbridge/jadp/plugins/cmpt/web/CmptSettingController.java
+1
-1
ManualController.java
.../com/dlbridge/jadp/plugins/cmpt/web/ManualController.java
+16
-24
MicroApiController.java
...om/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
+144
-7
application-production.properties
src/main/resources/application-production.properties
+1
-1
bootstrap.yml
src/main/resources/bootstrap.yml
+17
-3
cert.jsp
src/main/webapp/WEB-INF/views/cmpt/cert.jsp
+1
-1
cmptManual.jsp
src/main/webapp/WEB-INF/views/cmpt/cmptManual.jsp
+1
-1
cmptSetting.jsp
src/main/webapp/WEB-INF/views/cmpt/cmptSetting.jsp
+1
-1
contact.jsp
src/main/webapp/WEB-INF/views/cmpt/contact.jsp
+2
-2
news.jsp
src/main/webapp/WEB-INF/views/cmpt/news.jsp
+1
-1
outter-link.jsp
src/main/webapp/WEB-INF/views/cmpt/outter-link.jsp
+8
-0
scan.jsp
src/main/webapp/WEB-INF/views/cmpt/scan.jsp
+1
-1
score.jsp
src/main/webapp/WEB-INF/views/cmpt/score.jsp
+2
-1
score_review.jsp
src/main/webapp/WEB-INF/views/cmpt/score_review.jsp
+134
-74
sure-letter.jsp
src/main/webapp/WEB-INF/views/cmpt/sure-letter.jsp
+4
-0
menu.jsp
src/main/webapp/WEB-INF/views/common/menu.jsp
+70
-22
score_review.css
src/main/webapp/static/cmpt/score_review.css
+125
-18
setting.css
src/main/webapp/static/cmpt/setting.css
+14
-8
icon-score-save.png
src/main/webapp/static/images/manage/icon-score-save.png
+0
-0
score-edit.png
src/main/webapp/static/images/manage/score-edit.png
+0
-0
score_del.png
src/main/webapp/static/images/manage/score_del.png
+0
-0
score_forbidden.png
src/main/webapp/static/images/manage/score_forbidden.png
+0
-0
score_pass.png
src/main/webapp/static/images/manage/score_pass.png
+0
-0
cmptManual.js
src/main/webapp/static/js/cmptManual.js
+0
-3
cmptSetting.js
src/main/webapp/static/js/cmptSetting.js
+2
-2
score.js
src/main/webapp/static/js/score.js
+1
-0
score_review.js
src/main/webapp/static/js/score_review.js
+130
-22
style.default.css
src/main/webapp/static/newdermon/css/style.default.css
+42
-41
No files found.
src/main/java/com/dlbridge/feign/GeexekScoreService.java
View file @
6cf93e68
...
...
@@ -2,7 +2,6 @@ package com.dlbridge.feign;
import
com.dlbridge.feign.bean.CmptScoreCheckpoint
;
import
com.dlbridge.jadp.config.web.FeignConfig
;
import
com.dlbridge.jadp.fallback.GeexekScoreFallbackFactory
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -13,7 +12,7 @@ import java.util.Map;
/**
* 废弃单独处理成绩工程
*/
@FeignClient
(
name
=
"geexekscore"
,
configuration
=
FeignConfig
.
class
,
fallbackFactory
=
GeexekScoreFallbackFactory
.
class
)
@FeignClient
(
name
=
"geexekscore"
,
fallbackFactory
=
GeexekScoreFallbackFactory
.
class
)
@RequestMapping
(
"geexekscore/api/v1/cmpt-score-checkpoint"
)
public
interface
GeexekScoreService
{
...
...
src/main/java/com/dlbridge/jadp/common/beanvalidator/BeanValidators.java
deleted
100644 → 0
View file @
ddd92fcf
/**
* Copyright (c) 2005-2012 springside.org.cn
*/
package
com
.
dlbridge
.
jadp
.
common
.
beanvalidator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
javax.validation.ConstraintViolation
;
import
javax.validation.ConstraintViolationException
;
import
javax.validation.Validator
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
/**
* JSR303 Validator(Hibernate Validator)工具类.
* <p>
* ConstraintViolation中包含propertyPath, message 和invalidValue等信息.
* 提供了各种convert方法,适合不同的i18n需求:
* 1. List<String>, String内容为message
* 2. List<String>, String内容为propertyPath + separator + message
* 3. Map<propertyPath, message>
* <p>
* 详情见wiki: https://github.com/springside/springside4/wiki/HibernateValidator
*
* @author calvin
* @version 2013-01-15
*/
public
class
BeanValidators
{
/**
* 调用JSR303的validate方法, 验证失败时抛出ConstraintViolationException.
*/
@SuppressWarnings
({
"unchecked"
,
"rawtypes"
})
public
static
void
validateWithException
(
Validator
validator
,
Object
object
,
Class
<?>...
groups
)
throws
ConstraintViolationException
{
Set
constraintViolations
=
validator
.
validate
(
object
,
groups
);
if
(!
constraintViolations
.
isEmpty
())
{
throw
new
ConstraintViolationException
(
constraintViolations
);
}
}
/**
* 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>中为List<message>.
*/
public
static
List
<
String
>
extractMessage
(
ConstraintViolationException
e
)
{
return
extractMessage
(
e
.
getConstraintViolations
());
}
/**
* 辅助方法, 转换Set<ConstraintViolation>为List<message>
*/
@SuppressWarnings
(
"rawtypes"
)
public
static
List
<
String
>
extractMessage
(
Set
<?
extends
ConstraintViolation
>
constraintViolations
)
{
List
<
String
>
errorMessages
=
Lists
.
newArrayList
();
for
(
ConstraintViolation
violation
:
constraintViolations
)
{
errorMessages
.
add
(
violation
.
getMessage
());
}
return
errorMessages
;
}
/**
* 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>为Map<property, message>.
*/
public
static
Map
<
String
,
String
>
extractPropertyAndMessage
(
ConstraintViolationException
e
)
{
return
extractPropertyAndMessage
(
e
.
getConstraintViolations
());
}
/**
* 辅助方法, 转换Set<ConstraintViolation>为Map<property, message>.
*/
@SuppressWarnings
(
"rawtypes"
)
public
static
Map
<
String
,
String
>
extractPropertyAndMessage
(
Set
<?
extends
ConstraintViolation
>
constraintViolations
)
{
Map
<
String
,
String
>
errorMessages
=
Maps
.
newHashMap
();
for
(
ConstraintViolation
violation
:
constraintViolations
)
{
errorMessages
.
put
(
violation
.
getPropertyPath
().
toString
(),
violation
.
getMessage
());
}
return
errorMessages
;
}
/**
* 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>为List<propertyPath message>.
*/
public
static
List
<
String
>
extractPropertyAndMessageAsList
(
ConstraintViolationException
e
)
{
return
extractPropertyAndMessageAsList
(
e
.
getConstraintViolations
(),
" "
);
}
/**
* 辅助方法, 转换Set<ConstraintViolations>为List<propertyPath message>.
*/
@SuppressWarnings
(
"rawtypes"
)
public
static
List
<
String
>
extractPropertyAndMessageAsList
(
Set
<?
extends
ConstraintViolation
>
constraintViolations
)
{
return
extractPropertyAndMessageAsList
(
constraintViolations
,
" "
);
}
/**
* 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>为List<propertyPath +separator+ message>.
*/
public
static
List
<
String
>
extractPropertyAndMessageAsList
(
ConstraintViolationException
e
,
String
separator
)
{
return
extractPropertyAndMessageAsList
(
e
.
getConstraintViolations
(),
separator
);
}
/**
* 辅助方法, 转换Set<ConstraintViolation>为List<propertyPath +separator+ message>.
*/
@SuppressWarnings
(
"rawtypes"
)
public
static
List
<
String
>
extractPropertyAndMessageAsList
(
Set
<?
extends
ConstraintViolation
>
constraintViolations
,
String
separator
)
{
List
<
String
>
errorMessages
=
Lists
.
newArrayList
();
for
(
ConstraintViolation
violation
:
constraintViolations
)
{
errorMessages
.
add
(
violation
.
getPropertyPath
()
+
separator
+
violation
.
getMessage
());
}
return
errorMessages
;
}
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/common/interceptor/SecurityInterceptor.java
View file @
6cf93e68
...
...
@@ -46,7 +46,7 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
if
(
userAgent
.
indexOf
(
"miniprogram"
)>-
1
)
{
//小程序
String
partnerId
=
request
.
getParameter
(
"partnerId"
);
if
(
partnerId
==
null
){
throw
new
NoAuthException
(
"未查询到partnerdId,没权限!
"
);
throw
new
NoAuthException
(
"未查询到partnerdId,没权限!
,uri: "
+
request
.
getRequestURI
()
);
}
}
...
...
src/main/java/com/dlbridge/jadp/common/persistence/JaapRecord.java
View file @
6cf93e68
...
...
@@ -3,13 +3,11 @@
*/
package
com
.
dlbridge
.
jadp
.
common
.
persistence
;
import
java.util.Date
;
import
org.hibernate.validator.constraints.Length
;
import
com.dlbridge.jadp.common.utils.IdGen
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.dlbridge.jadp.common.utils.IdGen
;
import
java.util.Date
;
/**
* 数据Entity类
...
...
@@ -62,7 +60,6 @@ public abstract class JaapRecord<T> extends JRecord<T> {
this
.
updateDate
=
new
Date
();
}
@Length
(
min
=
0
,
max
=
255
)
public
String
getRemarks
()
{
return
remarks
;
}
...
...
@@ -108,7 +105,6 @@ public abstract class JaapRecord<T> extends JRecord<T> {
}
@JsonIgnore
@Length
(
min
=
1
,
max
=
1
)
public
String
getDelFlag
()
{
return
delFlag
;
}
...
...
src/main/java/com/dlbridge/jadp/common/persistence/TreeEntity.java
deleted
100644 → 0
View file @
ddd92fcf
/**
* Copyright © 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package
com
.
dlbridge
.
jadp
.
common
.
persistence
;
import
javax.validation.constraints.NotNull
;
import
org.apache.commons.lang3.StringUtils
;
import
org.hibernate.validator.constraints.Length
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
com.dlbridge.jadp.common.utils.Reflections
;
/**
* 数据Entity类
*
* @author ThinkGem
* @version 2014-05-16
*/
public
abstract
class
TreeEntity
<
T
>
extends
JaapRecord
<
T
>
{
private
static
final
long
serialVersionUID
=
1L
;
protected
T
parent
;
// 父级编号
protected
String
parentIds
;
// 所有父级编号
protected
String
name
;
// 机构名称
protected
Integer
sort
;
// 排序
public
TreeEntity
()
{
super
();
this
.
sort
=
30
;
}
public
TreeEntity
(
String
id
)
{
super
(
id
);
}
/**
* 父对象,只能通过子类实现,父类实现mybatis无法读取
*
* @return
*/
@JsonBackReference
@NotNull
public
abstract
T
getParent
();
/**
* 父对象,只能通过子类实现,父类实现mybatis无法读取
*
* @return
*/
public
abstract
void
setParent
(
T
parent
);
@Length
(
min
=
1
,
max
=
2000
)
public
String
getParentIds
()
{
return
parentIds
;
}
public
void
setParentIds
(
String
parentIds
)
{
this
.
parentIds
=
parentIds
;
}
@Length
(
min
=
1
,
max
=
100
)
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Integer
getSort
()
{
return
sort
;
}
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
}
public
String
getParentId
()
{
String
id
=
null
;
if
(
parent
!=
null
)
{
id
=
(
String
)
Reflections
.
getFieldValue
(
parent
,
"id"
);
}
return
StringUtils
.
isNotBlank
(
id
)
?
id
:
"0"
;
}
}
src/main/java/com/dlbridge/jadp/job/CountJob.java
View file @
6cf93e68
...
...
@@ -5,9 +5,10 @@ import com.dlbridge.jadp.plugins.cmpt.bean.BannerStatistic;
import
com.dlbridge.jadp.plugins.cmpt.service.BannerService
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.collections4.list.TreeList
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.data.redis.connection.jedis.JedisClusterConnection
;
import
org.springframework.data.redis.core.*
;
import
org.springframework.data.redis.core.HashOperations
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
redis.clients.jedis.Jedis
;
...
...
@@ -15,7 +16,6 @@ import redis.clients.jedis.JedisPool;
import
redis.clients.jedis.ScanParams
;
import
redis.clients.jedis.ScanResult
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.Resource
;
import
java.text.SimpleDateFormat
;
import
java.util.Collection
;
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/TemplateController.java
0 → 100644
View file @
6cf93e68
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
;
import
com.dlbridge.jadp.plugins.cmpt.bean.CmptTemplate
;
import
com.dlbridge.jadp.plugins.cmpt.service.TemplateService
;
import
com.neusoft.www.utils.web.Result
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
reactor.core.publisher.Mono
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Optional
;
@Controller
@RequestMapping
(
"/template"
)
public
class
TemplateController
{
@Resource
TemplateService
templateService
;
@RequestMapping
(
"cmpt"
)
@ResponseBody
public
Mono
<
Result
>
cmpt
(){
List
<
CmptTemplate
>
cmptTemplates
=
templateService
.
queryAllTemplate
();
Result
result
=
Result
.
fail
();
Optional
.
of
(
cmptTemplates
).
ifPresent
(
r
->
{
if
(
r
.
size
()>
0
){
result
.
setCode
(
200
).
setContent
(
cmptTemplates
);
}
});
return
Mono
.
just
(
result
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.java
View file @
6cf93e68
...
...
@@ -73,4 +73,12 @@ public interface CmptMapper {
Partner
getParnterByParnterId
(
String
partnerId
);
void
updateDayRank
(
@Param
(
"cmptId"
)
int
cmptId
,
@Param
(
"status"
)
int
status
);
int
isUploadProfile
(
Integer
cmptId
);
Map
<
String
,
String
>
getPhotoLocation
(
@Param
(
"cmptId"
)
Integer
cmptId
,
@Param
(
"roadId"
)
Integer
roadId
);
Map
<
String
,
String
>
getAllStatistic
();
Map
<
String
,
String
>
getEnrollUsersByUserMapId
(
int
userMapId
);
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
6cf93e68
...
...
@@ -73,7 +73,7 @@
</select>
<select
id=
"queryUserCmpt"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.UserCmpt"
>
select id,user_id userId,cmpt_id cmptId,mark_no enrollId,status
select id,user_id userId,cmpt_id cmptId,mark_no enrollId,status
,manual_mark_no manualMarkNo
from gk_user_cmpt_map
where cmpt_id = #{cmptId} and user_id=#{userId} and `status`=1
limit 1
...
...
@@ -81,7 +81,14 @@
<update
id=
"updateUserCmptById"
>
update gk_user_cmpt_map
set mark_no = #{cmpt.enrollId}
<set>
<if
test=
"cmpt.enrollId != null"
>
mark_no = #{cmpt.enrollId},
</if>
<if
test=
"cmpt.manualMarkNo != null"
>
manual_mark_no = #{cmpt.manualMarkNo}
</if>
</set>
where id=#{cmpt.id}
</update>
...
...
@@ -140,10 +147,13 @@
<if
test=
"param.type == 1"
>
and now() >= c.openTime and c.deadLine >= now()
</if>
<if
test=
"param.userId > 0"
>
<if
test=
"param.type == 2"
>
and now() >= c.startTime and c.endTime >= now()
</if>
<if
test=
"param.userId > 0"
>
and c.createUserId=#{param.userId} and a.cmpt_status = 2
</if>
<if
test=
"param.userId lt 0"
>
</if>
<if
test=
"param.userId lt 0"
>
and c.createUserId
<![CDATA[ <> ]]>
427744 and a.cmpt_status = 2
</if>
</sql>
...
...
@@ -237,4 +247,42 @@
update gk_cmpt set is_day_rank=#{status}
where cmpt_id = #{cmptId}
</update>
<select
id=
"isUploadProfile"
resultType=
"int"
>
select ifnull(isCertProfilePhoto,0) isCertProfilePhoto
from geerunner.cmpt_main
where cmpt_id=#{cmptId}
</select>
<select
id=
"getPhotoLocation"
resultType=
"java.util.HashMap"
>
select x_coordinate xCoordinate,y_coordinate yCoordinate,width,height
from geerunner.certificate a
inner join geerunner.certificatesetinfo b
on a.id=b.certid
where a.cmptid=#{cmptId} and a.roadid=#{roadId} and selectedField ='photo1_val' limit 1
</select>
<select
id=
"getAllStatistic"
resultType=
"java.util.HashMap"
>
<![CDATA[ select
(SELECT count(1) from gk_cmpt where cmpt_status=2 and del_flag=0) `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()) 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()) race
from dual
]]>
</select>
<select
id=
"getEnrollUsersByUserMapId"
resultType=
"java.util.HashMap"
>
select a.callPhone mobileNum,a.gender,a.IDNumber idCardNo,a.userName name,b.timerRoadId roadId,a.registerId
from raceenroll.competitionusermap a
inner join raceenroll.competitionroadmap b on a.roadId=b.roadId
where a.userMapId=#{userMapId}
</select>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/DataMapper.java
0 → 100644
View file @
6cf93e68
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
mapper
;
import
com.dlbridge.jadp.plugins.cmpt.bean.DataVo
;
import
java.util.List
;
public
interface
DataMapper
{
List
<
DataVo
>
getAllDoubleUnion
();
int
existedInMicro
(
String
userId
);
String
getCompetitionByRegisterId
(
String
[]
userIds
);
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/DataMapperMapper.xml
0 → 100644
View file @
6cf93e68
<?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.DataMapper"
>
<select
id=
"getAllDoubleUnion"
resultType=
"com.dlbridge.jadp.plugins.cmpt.bean.DataVo"
>
<![CDATA[ SELECT count(unionId) count ,unionId,GROUP_CONCAT(userId) userIds
from raceenroll.registerinfo where unionId is not null and
unionId <>
'' and isDelete=0 GROUP BY unionId
HAVING count(unionId) > 1
]]>
</select>
<select
id=
"existedInMicro"
resultType=
"int"
>
select count(1)
from gksite.gk_user_cmpt_map
where user_id=#{userId}
</select>
<select
id=
"getCompetitionByRegisterId"
resultType=
"java.lang.String"
>
select group_concat(cmptId)
from raceenroll.competitionusermap
where registerId in
<foreach
collection=
"array"
open=
"("
close=
")"
separator=
","
item=
"userId"
>
#{userId}
</foreach>
</select>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/ManualMapper.xml
View file @
6cf93e68
...
...
@@ -81,7 +81,7 @@
<update
id=
"delete"
>
UPDATE gk_manual SET
del_flag = #{
DEL_FLAG_DELETE
}
del_flag = #{
delFlag
}
WHERE id = #{id}
</update>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/TemplateMapper.java
0 → 100644
View file @
6cf93e68
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
mapper
;
import
com.dlbridge.jadp.plugins.cmpt.bean.CmptTemplate
;
import
java.util.List
;
public
interface
TemplateMapper
{
List
<
CmptTemplate
>
queryAllTemplate
();
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/TemplateMapper.xml
0 → 100644
View file @
6cf93e68
<?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.TemplateMapper"
>
<select
id=
"queryAllTemplate"
resultType=
"com.dlbridge.jadp.plugins.cmpt.bean.CmptTemplate"
>
select template_id templateId,cmpt_id cmptId,
template_name templateName,
template_bg
from gk_cmpt_template
where del_flag=0
</select>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Cmpt.java
View file @
6cf93e68
...
...
@@ -35,4 +35,9 @@ public class Cmpt extends JaapRecord<Cmpt> {
private
boolean
isDayRank
;
private
int
cmptType
;
private
int
view
;
private
int
enroll
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/CmptSetting.java
View file @
6cf93e68
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
model
;
import
com.dlbridge.jadp.common.persistence.JaapRecord
;
import
org.hibernate.validator.constraints.Length
;
public
class
CmptSetting
extends
JaapRecord
<
CmptSetting
>
{
...
...
@@ -34,7 +33,6 @@ public class CmptSetting extends JaapRecord<CmptSetting> {
this
.
id
=
id
;
}
@Length
(
min
=
1
,
max
=
64
)
public
String
getCmptId
()
{
return
cmptId
;
}
...
...
@@ -43,7 +41,6 @@ public class CmptSetting extends JaapRecord<CmptSetting> {
this
.
cmptId
=
cmptId
;
}
@Length
(
min
=
1
,
max
=
30
)
public
String
getName
()
{
return
name
;
}
...
...
@@ -52,7 +49,6 @@ public class CmptSetting extends JaapRecord<CmptSetting> {
this
.
name
=
name
;
}
@Length
(
min
=
1
,
max
=
9
)
public
Integer
getType
()
{
return
type
;
}
...
...
@@ -61,7 +57,6 @@ public class CmptSetting extends JaapRecord<CmptSetting> {
this
.
type
=
type
;
}
@Length
(
min
=
1
,
max
=
9
)
public
String
getVisibility
()
{
return
visibility
;
}
...
...
@@ -70,7 +65,6 @@ public class CmptSetting extends JaapRecord<CmptSetting> {
this
.
visibility
=
visibility
;
}
@Length
(
min
=
1
,
max
=
2
)
public
String
getSeq
()
{
return
seq
;
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Manual.java
View file @
6cf93e68
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
model
;
import
org.hibernate.validator.constraints.Length
;
import
com.dlbridge.jadp.common.persistence.JaapRecord
;
...
...
@@ -29,7 +28,6 @@ public class Manual extends JaapRecord<Manual> {
this
.
id
=
id
;
}
@Length
(
min
=
1
,
max
=
64
)
public
String
getCmptId
()
{
return
cmptId
;
}
...
...
@@ -38,7 +36,6 @@ public class Manual extends JaapRecord<Manual> {
this
.
cmptId
=
cmptId
;
}
@Length
(
min
=
1
,
max
=
30
)
public
String
getName
()
{
return
name
;
}
...
...
@@ -47,7 +44,6 @@ public class Manual extends JaapRecord<Manual> {
this
.
name
=
name
;
}
@Length
(
min
=
1
,
max
=
512
)
public
String
getCatalogPhotoURL
()
{
return
catalogPhotoURL
;
}
...
...
@@ -56,7 +52,6 @@ public class Manual extends JaapRecord<Manual> {
this
.
catalogPhotoURL
=
catalogPhotoURL
;
}
@Length
(
min
=
1
,
max
=
4
)
public
Integer
getSeq
()
{
return
seq
;
}
...
...
@@ -65,7 +60,6 @@ public class Manual extends JaapRecord<Manual> {
this
.
seq
=
seq
;
}
@Length
(
min
=
1
,
max
=
64
)
public
String
getVisibility
()
{
return
visibility
;
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/NameList.java
View file @
6cf93e68
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
model
;
import
java.util.Date
;
import
org.hibernate.validator.constraints.Length
;
import
com.dlbridge.jadp.common.persistence.JaapRecord
;
import
com.dlbridge.jadp.common.utils.excel.annotation.ExcelField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.util.Date
;
/**
* 参赛人员信息表
*
...
...
@@ -52,7 +50,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
id
=
id
;
}
@Length
(
min
=
1
,
max
=
64
)
public
Integer
getCmptId
()
{
return
cmptId
;
}
...
...
@@ -61,7 +58,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
cmptId
=
cmptId
;
}
@Length
(
min
=
1
,
max
=
30
)
public
String
getName
()
{
return
name
;
}
...
...
@@ -70,7 +66,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
name
=
name
;
}
@Length
(
min
=
1
,
max
=
64
)
public
String
getIdNo
()
{
return
idNo
;
}
...
...
@@ -79,7 +74,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
idNo
=
idNo
;
}
@Length
(
min
=
0
,
max
=
64
)
public
String
getProjectName
()
{
return
projectName
;
}
...
...
@@ -88,7 +82,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
projectName
=
projectName
;
}
@Length
(
min
=
0
,
max
=
11
)
public
String
getNumber
()
{
return
number
;
}
...
...
@@ -97,7 +90,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
number
=
number
;
}
@Length
(
min
=
0
,
max
=
64
)
public
String
getTeamName
()
{
return
teamName
;
}
...
...
@@ -106,7 +98,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
teamName
=
teamName
;
}
@Length
(
min
=
1
,
max
=
9
)
public
String
getSex
()
{
return
sex
;
}
...
...
@@ -115,7 +106,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
sex
=
sex
;
}
@Length
(
min
=
0
,
max
=
32
)
public
String
getPhone
()
{
return
phone
;
}
...
...
@@ -124,7 +114,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
phone
=
phone
;
}
@Length
(
min
=
0
,
max
=
64
)
public
String
getNationality
()
{
return
nationality
;
}
...
...
@@ -133,7 +122,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
nationality
=
nationality
;
}
@Length
(
min
=
1
,
max
=
9
)
public
String
getRecord
()
{
return
record
;
}
...
...
@@ -151,7 +139,6 @@ public class NameList extends JaapRecord<NameList> {
this
.
recordTime
=
recordTime
;
}
@Length
(
min
=
0
,
max
=
10
)
public
String
getSignIn
()
{
return
signIn
;
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/UserCmpt.java
View file @
6cf93e68
...
...
@@ -23,4 +23,6 @@ public class UserCmpt {
private
String
createTime
;
private
String
manualMarkNo
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/vo/CmptHomePageVo.java
View file @
6cf93e68
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
model
.
vo
;
import
java.util.List
;
import
org.hibernate.validator.constraints.Length
;
import
com.dlbridge.jadp.common.persistence.JaapRecord
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.CmptSetting
;
import
java.util.List
;
/**
* 赛事活动首页实体
*
...
...
@@ -21,7 +19,6 @@ public class CmptHomePageVo extends JaapRecord<CmptHomePageVo> {
private
String
playBill
;
// 海报图片
private
List
<
CmptSetting
>
cmptSettings
;
// 赛事活动列表
@Length
(
min
=
1
,
max
=
64
)
public
String
getCmptName
()
{
return
cmptName
;
}
...
...
@@ -39,7 +36,6 @@ public class CmptHomePageVo extends JaapRecord<CmptHomePageVo> {
this
.
logo
=
logo
;
}
@Length
(
min
=
0
,
max
=
64
)
public
String
getCmptbgColour
()
{
return
cmptbgColour
;
}
...
...
@@ -48,7 +44,6 @@ public class CmptHomePageVo extends JaapRecord<CmptHomePageVo> {
this
.
cmptbgColour
=
cmptbgColour
;
}
@Length
(
min
=
0
,
max
=
255
)
public
String
getPlayBill
()
{
return
playBill
;
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
View file @
6cf93e68
...
...
@@ -9,6 +9,7 @@ import com.dlbridge.jadp.plugins.cmpt.utils.PageFactory;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.log4j.Logger
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -34,12 +35,15 @@ public class CmptService {
@Resource
private
RemoteService
remoteService
;
@Resource
private
ValueOperations
valueOperations
;
public
Cmpt
queryCmptBycmptId
(
Integer
cmptId
)
{
try
{
Cmpt
cmpt
=
remoteService
.
getCmptByCmptId
(
cmptId
);
if
(
cmpt
==
null
)
{
logger
.
error
(
"
[not find related cmpt]"
);
logger
.
error
(
"
not find related cmpt id : "
+
cmptId
);
return
new
Cmpt
().
setCmptId
(
cmptId
);
}
cmpt
.
setCmptId
(
cmptId
);
...
...
@@ -85,15 +89,20 @@ public class CmptService {
public
EnrollInfo
bind
(
Integer
userId
,
String
phone
,
Integer
cmptId
)
{
EnrollInfo
info
=
getUserInfoByPhone
(
phone
,
cmptId
);
if
(
info
!=
null
)
{
// 找到报名信息
UserCmpt
cmpt
=
queryUserCmpt
(
cmptId
,
userId
,
info
.
getMarkNo
());
if
(
cmpt
!=
null
&&
cmpt
.
getStatus
()
==
1
)
{
//已经绑定
if
(
cmpt
!=
null
&&
cmpt
.
getStatus
()
==
1
)
{
//
已经绑定
logger
.
info
(
"已绑定数据,需更新:"
+
cmpt
);
cmpt
.
setEnrollId
(
info
.
getMarkNo
());
cmptMapper
.
updateUserCmptById
(
cmpt
);
return
info
;
}
else
{
UserCmpt
userCmpt
=
new
UserCmpt
().
setCmptId
(
cmptId
).
setEnrollId
(
info
.
getMarkNo
()).
setUserId
(
userId
).
setStatus
(
1
);
UserCmpt
userCmpt
=
new
UserCmpt
().
setCmptId
(
cmptId
)
.
setEnrollId
(
info
.
getMarkNo
()).
setUserId
(
userId
)
.
setStatus
(
1
);
logger
.
info
(
"插入绑定内容:"
+
userCmpt
);
saveUserCmpt
(
userCmpt
);
return
info
;
...
...
@@ -122,6 +131,14 @@ public class CmptService {
public
Page
<
List
<
Cmpt
>>
queryCmpt
(
Pageable
page
,
Map
<
String
,
String
>
param
)
{
long
count
=
cmptMapper
.
countCount
(
param
);
List
<
Cmpt
>
list
=
cmptMapper
.
queryCmpt
(
page
,
param
);
list
.
forEach
(
cmpt
->
{
Object
o
=
valueOperations
.
get
(
"gk:view:"
+
cmpt
.
getCmptId
());
if
(
o
!=
null
){
cmpt
.
setView
((
Integer
)
o
);
cmpt
.
setEnroll
(
remoteService
.
getCmptEnrollCount
(
cmpt
.
getCmptId
()));
}
});
return
PageFactory
.
setContent
(
list
,
page
,
count
);
}
...
...
@@ -181,4 +198,45 @@ public class CmptService {
public
void
updateDayRank
(
int
cmptId
,
int
status
)
{
cmptMapper
.
updateDayRank
(
cmptId
,
status
);
}
public
boolean
isUploadProfile
(
Integer
cmptId
)
{
int
is
=
cmptMapper
.
isUploadProfile
(
cmptId
);
return
is
>
0
;
}
public
Map
<
String
,
String
>
getPhotoLocation
(
Integer
cmptId
,
Integer
roadId
)
{
return
cmptMapper
.
getPhotoLocation
(
cmptId
,
roadId
);
}
public
Map
<
String
,
String
>
getAllStatistic
()
{
return
cmptMapper
.
getAllStatistic
();
}
public
Map
<
String
,
String
>
getEnrollUsersByUserMapId
(
int
userMapId
)
{
return
cmptMapper
.
getEnrollUsersByUserMapId
(
userMapId
);
}
public
EnrollInfo
bindByManual
(
Integer
userId
,
String
markNo
,
int
cmptId
)
{
EnrollInfo
info
=
remoteService
.
getUserInfoByMarkNo
(
markNo
,
cmptId
);
if
(
info
!=
null
)
{
// 找到报名信息
UserCmpt
cmpt
=
queryUserCmpt
(
cmptId
,
userId
,
info
.
getMarkNo
());
if
(
cmpt
!=
null
&&
cmpt
.
getStatus
()
==
1
)
{
// 已经绑定
logger
.
info
(
"已绑定数据,需更新:"
+
cmpt
);
cmpt
.
setManualMarkNo
(
info
.
getMarkNo
());
cmptMapper
.
updateUserCmptById
(
cmpt
);
info
.
setManualMarkNo
(
markNo
);
return
info
;
}
else
{
UserCmpt
userCmpt
=
new
UserCmpt
().
setCmptId
(
cmptId
)
.
setEnrollId
(
info
.
getMarkNo
()).
setUserId
(
userId
)
.
setStatus
(
1
).
setManualMarkNo
(
info
.
getMarkNo
());
logger
.
info
(
"插入绑定内容:"
+
userCmpt
);
saveUserCmpt
(
userCmpt
);
info
.
setManualMarkNo
(
info
.
getMarkNo
());
return
info
;
}
}
else
{
return
null
;
}
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/RemoteService.java
View file @
6cf93e68
...
...
@@ -20,6 +20,7 @@ import java.nio.charset.StandardCharsets;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
@Log4j2
...
...
@@ -117,6 +118,7 @@ public class RemoteService {
info
.
setPhone
(
content
.
getString
(
"phone"
));
info
.
setRemark
(
content
.
getString
(
"remark"
));
info
.
setGender
(
"0"
.
equals
(
content
.
getString
(
"gender"
))
?
"男"
:
"女"
);
info
.
setIdentityNo
(
content
.
getString
(
"identityNo"
));
return
info
;
}
else
{
return
null
;
...
...
@@ -250,6 +252,8 @@ public class RemoteService {
String
userName
=
o
.
getString
(
"userName"
);
String
roadName
=
o
.
getString
(
"roadName"
);
String
audiStatus
=
o
.
getString
(
"audiStatus"
);
user
.
setUserMapId
(
o
.
getIntValue
(
"userMapId"
));
user
.
setIdNumber
(
o
.
getString
(
"idNumber"
));
user
.
setMobile
(
callPhone
).
setRoadName
(
roadName
).
setUserName
(
userName
);
if
(
"无"
.
equals
(
audiStatus
))
{
user
.
setEnrollStatus
(
payStatus
);
...
...
@@ -577,4 +581,7 @@ public class RemoteService {
}
}
public
Map
<
String
,
String
>
getEnrollUsersByUserMapId
(
int
userMapId
)
{
return
cmptService
.
getEnrollUsersByUserMapId
(
userMapId
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/TemplateService.java
0 → 100644
View file @
6cf93e68
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
service
;
import
com.dlbridge.jadp.plugins.cmpt.bean.CmptTemplate
;
import
com.dlbridge.jadp.plugins.cmpt.dao.mapper.TemplateMapper
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
public
class
TemplateService
{
@Resource
private
TemplateMapper
templateMapper
;
public
List
<
CmptTemplate
>
queryAllTemplate
()
{
return
templateMapper
.
queryAllTemplate
();
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/utils/AesUtil.java
View file @
6cf93e68
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
utils
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.log4j.Log4j
2
;
import
org.apache.commons.codec.binary.Base64
;
import
org.bouncycastle.jce.provider.BouncyCastleProvider
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
javax.crypto.BadPaddingException
;
import
javax.crypto.Cipher
;
...
...
@@ -17,12 +15,10 @@ import java.security.*;
import
java.security.spec.AlgorithmParameterSpec
;
import
java.security.spec.InvalidParameterSpecException
;
@Log4j
@Log4j
2
public
class
AesUtil
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AesUtil
.
class
);
static
{
//BouncyCastle是一个开源的加解密解决方案,主页在http://www.bouncycastle.org/
Security
.
addProvider
(
new
BouncyCastleProvider
());
...
...
@@ -59,26 +55,28 @@ public class AesUtil {
byte
[]
resultByte
=
cipher
.
doFinal
(
dataByte
);
if
(
null
!=
resultByte
&&
resultByte
.
length
>
0
)
{
String
result
=
new
String
(
resultByte
,
encodingFormat
);
log
ger
.
info
(
result
);
log
.
info
(
result
);
return
result
;
}
else
{
log
.
info
(
"解析失败----"
);
}
return
null
;
}
catch
(
NoSuchAlgorithmException
e
)
{
e
.
printStackTrace
(
);
log
.
info
(
e
.
getMessage
(),
e
);
}
catch
(
NoSuchPaddingException
e
)
{
e
.
printStackTrace
(
);
log
.
info
(
e
.
getMessage
(),
e
);
}
catch
(
InvalidParameterSpecException
e
)
{
e
.
printStackTrace
(
);
log
.
info
(
e
.
getMessage
(),
e
);
}
catch
(
InvalidKeyException
e
)
{
e
.
printStackTrace
(
);
log
.
info
(
e
.
getMessage
(),
e
);
}
catch
(
InvalidAlgorithmParameterException
e
)
{
e
.
printStackTrace
(
);
log
.
info
(
e
.
getMessage
(),
e
);
}
catch
(
IllegalBlockSizeException
e
)
{
e
.
printStackTrace
(
);
log
.
info
(
e
.
getMessage
(),
e
);
}
catch
(
BadPaddingException
e
)
{
e
.
printStackTrace
(
);
log
.
info
(
e
.
getMessage
(),
e
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
(
);
log
.
info
(
e
.
getMessage
(),
e
);
}
return
null
;
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/CmptSettingController.java
View file @
6cf93e68
...
...
@@ -177,7 +177,7 @@ public class CmptSettingController {
count
=
remoteService
.
getCmptEnrollCount
(
cmptId
);
}
else
if
(
type
==
15
||
type
==
16
)
{
// 自动打卡,扫描打卡
count
=
geexekScoreService
.
hasCheckPoint
(
cmptId
);
if
(
count
<
3
){
if
(
count
<
2
){
return
Result
.
fail
().
setContent
(
count
);
}
}
else
{
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ManualController.java
View file @
6cf93e68
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
web
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
com.dlbridge.jadp.common.interceptor.PageView
;
import
com.google.gson.Gson
;
import
com.neusoft.www.utils.web.Result
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.*
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.CmptSetting
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Manual
;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptService
;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptSettingService
;
import
com.dlbridge.jadp.plugins.cmpt.service.ManualService
;
import
com.github.pagehelper.util.StringUtil
;
import
com.neusoft.www.utils.web.Result
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
sun.misc.BASE64Decoder
;
import
sun.rmi.runtime.Log
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Log4j2
@Controller
...
...
@@ -87,11 +81,7 @@ public class ManualController {
model
.
addAttribute
(
"cmpt"
,
cmpt
);
}
model
.
addAttribute
(
"manuals"
,
manuals
);
for
(
Manual
manual
:
manuals
)
{
log
.
info
(
"manual id: "
+
manual
.
getId
()
+
" CmptId:"
+
manual
.
getCmptId
()
+
" name:"
+
manual
.
getName
()
+
" seq:"
+
manual
.
getSeq
());
}
model
.
addAttribute
(
"manuals"
,
manuals
);
model
.
addAttribute
(
"cmptId"
,
cmptId
);
model
.
addAttribute
(
"pagecount"
,
manuals
.
size
());
...
...
@@ -196,17 +186,19 @@ public class ManualController {
*
* @param id
*/
@ResponseBody
@RequestMapping
(
value
=
"delManual"
)
@ResponseBody
public
Map
<
String
,
Object
>
delManual
(
String
id
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
String
result
=
"删除成功"
;
String
code
=
"200"
;
Manual
manual
=
new
Manual
();
manual
.
setId
(
id
);
manual
.
setDelFlag
(
"1"
);
try
{
manualService
.
delete
(
manual
);
}
catch
(
Exception
e
)
{
log
.
info
(
e
.
getMessage
(),
e
);
result
=
"删除失败"
;
code
=
"201"
;
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
View file @
6cf93e68
...
...
@@ -81,6 +81,11 @@ public class MicroApiController {
@Resource
RemoteService
remoteService
;
@Resource
private
ValueOperations
valueOperations
;
@Value
(
"${geexek.cmpt.url}"
)
private
String
timerURL
;
@Resource
private
CmptScoreFieldValueService
cmptScoreFieldValueService
;
...
...
@@ -91,10 +96,9 @@ public class MicroApiController {
@Value
(
"${geexek.user.url}"
)
private
String
geexekURL
;
@Value
(
"${geexek.cmpt.url}"
)
private
String
timerURL
;
@Value
(
"${server.url.https}"
)
private
String
serverURL
;
@Value
(
"${geexek.shamus.url}"
)
private
String
shamusURL
;
...
...
@@ -102,8 +106,7 @@ public class MicroApiController {
@Resource
private
ManualService
manualService
;
@Resource
private
ValueOperations
valueOperations
;
@Resource
private
HashOperations
hashOperations
;
...
...
@@ -132,7 +135,8 @@ public class MicroApiController {
@ApiResponse
(
code
=
200
,
message
=
"成功"
,
response
=
Result
.
class
)})
@ApiOperation
(
value
=
"绑定赛事"
,
notes
=
"用户与赛事绑定功能"
,
tags
=
"赛事页面"
)
public
Result
<
EnrollInfo
>
bind
(
@RequestParam
(
"userId"
)
Integer
userId
,
@RequestParam
(
"phone"
)
String
phone
,
@RequestParam
(
"cmptId"
)
Integer
cmptId
)
{
@RequestParam
(
"phone"
)
String
phone
,
@RequestParam
(
"cmptId"
)
Integer
cmptId
)
{
log
.
info
(
"userId:"
+
userId
+
",phone:"
+
phone
+
",cmptId:"
+
cmptId
);
EnrollInfo
info
=
cmptService
.
bind
(
userId
,
phone
,
cmptId
);
if
(
info
==
null
)
{
...
...
@@ -143,6 +147,9 @@ public class MicroApiController {
return
Result
.
fail
().
setMsg
(
"报名成功,未查询到组委会分配的号码牌!"
);
}
}
List
<
RoadUser
>
enrollUsers
=
remoteService
.
getEnrollUsers
(
cmptId
,
userId
);
Optional
<
RoadUser
>
first
=
enrollUsers
.
stream
().
filter
(
user
->
phone
.
equals
(
user
.
getMobile
())).
findFirst
();
info
.
setUserMapId
(
first
.
get
().
getUserMapId
());
return
Result
.
success
().
setMsg
(
"绑定成功!"
).
setContent
(
info
);
}
...
...
@@ -201,6 +208,9 @@ public class MicroApiController {
return
Result
.
fail
().
setMsg
(
"报名成功,未查询到组委会分配的号码牌!"
);
}
}
List
<
RoadUser
>
enrollUsers
=
remoteService
.
getEnrollUsers
(
cmptId
,
userId
);
Optional
<
RoadUser
>
first
=
enrollUsers
.
stream
().
filter
(
user
->
purePhoneNumber
.
equals
(
user
.
getMobile
())).
findFirst
();
info
.
setUserMapId
(
first
.
get
().
getUserMapId
());
return
Result
.
success
().
setMsg
(
"绑定成功!"
).
setContent
(
info
);
}
catch
(
Exception
e
)
{
...
...
@@ -441,15 +451,19 @@ public class MicroApiController {
log
.
info
(
"openId:"
+
openid
+
", session_key:"
+
session_key
);
}
}
else
{
log
.
info
(
"获取授权失败"
);
return
Result
.
fail
().
setMsg
(
"获取授权失败"
);
}
//////////////// 2、对encryptedData加密数据进行AES解密 ////////////////
try
{
String
result
=
AesUtil
.
decrypt
(
encryptedData
,
session_key
,
iv
,
"UTF-8"
);
log
.
info
(
result
);
log
.
info
(
"解密结果:"
+
result
);
if
(
null
!=
result
&&
result
.
length
()
>
0
)
{
JSONObject
jsoninfo
=
JSONObject
.
parseObject
(
result
);
String
name
=
jsoninfo
.
getString
(
"nickName"
);
if
(
StringUtils
.
isNotBlank
(
name
)){
name
=
name
.
replaceAll
(
"\\{"
,
""
).
replaceAll
(
"\\}"
,
""
);
}
String
imgUrl
=
jsoninfo
.
getString
(
"avatarUrl"
);
String
url
=
null
;
if
(
jsoninfo
.
getString
(
"unionId"
)
!=
null
&&
...
...
@@ -472,7 +486,8 @@ public class MicroApiController {
log
.
info
(
"返回数据:"
+
user
);
return
Result
.
success
().
setContent
(
user
);
}
else
{
return
Result
.
fail
().
setMsg
(
"请求出错!"
);
log
.
info
(
"请求平台数据出错!"
);
return
Result
.
fail
().
setMsg
(
"请求平台数据出错!"
);
}
}
}
catch
(
Exception
e
)
{
...
...
@@ -1143,4 +1158,126 @@ public class MicroApiController {
List
<
Road
>
list
=
roadService
.
queryRoads
(
cmptId
);
return
Result
.
success
().
setContent
(
list
);
}
/**
* 根据赛事Id获取项目列表
* @param cmptId
* @return
*/
@GetMapping
(
value
=
"/isUploadPortrait"
)
public
Result
isUploadProfile
(
@RequestParam
(
"cmptId"
)
Integer
cmptId
,
@RequestParam
(
"roadId"
)
Integer
roadId
)
{
boolean
is
=
cmptService
.
isUploadProfile
(
cmptId
);
Map
param
=
new
HashMap
();
if
(
is
){
Map
<
String
,
String
>
location
=
cmptService
.
getPhotoLocation
(
cmptId
,
roadId
);
if
(
location
==
null
||
location
.
size
()
==
0
){
location
=
new
HashMap
<>();
location
.
put
(
"xCoordinate"
,
"0"
);
location
.
put
(
"yCoordinate"
,
"0"
);
location
.
put
(
"width"
,
"0"
);
location
.
put
(
"height"
,
"0"
);
}
param
.
putAll
(
location
);
}
param
.
put
(
"isUploadPortrait"
,
is
);
return
Result
.
success
().
setContent
(
param
);
}
/**
* @param cmptId
* @return
*/
@GetMapping
(
value
=
"/view/{cmptId}"
)
@ResponseBody
public
Result
view
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
)
{
Long
increment
=
valueOperations
.
increment
(
"gk:view:"
+
cmptId
,
1
);
return
Result
.
success
().
setContent
(
increment
);
}
/**
* @param
* @return
*/
@GetMapping
(
value
=
"/cmpt/statistic"
)
@ResponseBody
public
Result
statistic
()
{
Map
<
String
,
String
>
param
=
cmptService
.
getAllStatistic
();
return
Result
.
success
().
setContent
(
param
);
}
/**
* @param
* @return
*/
@GetMapping
(
value
=
"/manualMarkNO"
)
@ResponseBody
public
Result
manualMarkNO
(
@RequestParam
(
"cmptId"
)
int
cmptId
,
@RequestParam
(
"userMapId"
)
int
userMapId
,
@RequestParam
(
"markNo"
)
String
markNo
,
@RequestParam
(
"manualMarkNo"
)
String
manualMarkNo
)
{
Object
o
=
hashOperations
.
get
(
"manual:markno:"
+
cmptId
,
manualMarkNo
);
if
(
o
!=
null
){
return
Result
.
fail
().
setMsg
(
"该号码牌已经被分配!"
);
}
EnrollInfo
userInfo
=
null
;
if
(
StringUtils
.
isNotBlank
(
markNo
)){
userInfo
=
remoteService
.
getUserInfoByMarkNo
(
markNo
,
cmptId
);
// 获取原计时信息
}
if
(
userInfo
==
null
){
// 根据号码牌判断是否已经存储
Map
<
String
,
String
>
param
=
remoteService
.
getEnrollUsersByUserMapId
(
userMapId
);
param
.
put
(
"cmptId"
,
cmptId
+
""
);
param
.
put
(
"markNo"
,
manualMarkNo
);
param
.
put
(
"deviceId"
,
manualMarkNo
);
param
.
put
(
"enrollId"
,
"-1"
);
if
(
param
.
get
(
"roadId"
)
==
null
){
return
Result
.
fail
().
setMsg
(
"未找到赛事项目!"
);
}
String
json
=
new
Gson
().
toJson
(
param
);
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
getForEntity
(
timerURL
+
"/mergePersonEnroll.do?org-id=1-3&personEnroll={json}"
,
String
.
class
,
json
);
log
.
info
(
"返回结果:"
+
responseEntity
.
getBody
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
responseEntity
.
getBody
());
int
status
=
jsonObject
.
getIntValue
(
"status"
);
if
(
status
==
0
){
Object
registerId
=
param
.
get
(
"registerId"
);
EnrollInfo
info
=
cmptService
.
bindByManual
(
Integer
.
valueOf
(
registerId
.
toString
()),
manualMarkNo
,
cmptId
);
hashOperations
.
put
(
"manual:markno:"
+
cmptId
,
manualMarkNo
,
"1"
);
return
Result
.
success
().
setContent
(
info
);
}
else
{
return
Result
.
fail
().
setMsg
(
jsonObject
.
getString
(
"message"
));
}
}
else
{
Map
<
String
,
String
>
param
=
remoteService
.
getEnrollUsersByUserMapId
(
userMapId
);
param
.
put
(
"cmptId"
,
cmptId
+
""
);
param
.
put
(
"markNo"
,
manualMarkNo
);
param
.
put
(
"deviceId"
,
manualMarkNo
);
param
.
put
(
"roadId"
,
userInfo
.
getRoadId
()+
""
);
param
.
put
(
"name"
,
userInfo
.
getUserName
());
param
.
put
(
"gender"
,
userInfo
.
getGender
());
param
.
put
(
"mobileNum"
,
userInfo
.
getPhone
());
param
.
put
(
"idCardNo"
,
userInfo
.
getIdentityNo
());
param
.
put
(
"enrollId"
,
userInfo
.
getEnrollId
());
String
json
=
new
Gson
().
toJson
(
param
);
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
getForEntity
(
timerURL
+
"/mergePersonEnroll.do?org-id=1-3&personEnroll={json}"
,
String
.
class
,
json
);
log
.
info
(
"返回结果:"
+
responseEntity
.
getBody
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
responseEntity
.
getBody
());
int
status
=
jsonObject
.
getIntValue
(
"status"
);
if
(
status
==
0
){
Object
registerId
=
param
.
get
(
"registerId"
);
EnrollInfo
info
=
cmptService
.
bindByManual
(
Integer
.
valueOf
(
registerId
.
toString
()),
manualMarkNo
,
cmptId
);
hashOperations
.
put
(
"manual:markno:"
+
cmptId
,
manualMarkNo
,
"1"
);
return
Result
.
success
().
setContent
(
info
);
}
else
{
return
Result
.
fail
().
setMsg
(
jsonObject
.
getString
(
"message"
));
}
}
}
}
src/main/resources/application-production.properties
View file @
6cf93e68
...
...
@@ -83,7 +83,7 @@ swagger.enable=false
base.url
=
https://zs.geexek.com/
spring.cloud.nacos.server-addr
=
http
s://nacos.geexek.com
spring.cloud.nacos.server-addr
=
http
://172.16.214.237:9848,http://172.16.214.241:9848,http://172.16.214.242:9848
spring.cloud.nacos.discovery.group
=
production
#spring.cloud.sentinel.servlet.blockPage=test
...
...
src/main/resources/bootstrap.yml
View file @
6cf93e68
---
spring
:
profiles
:
default
cloud
:
nacos
:
config
:
server-addr
:
http://192.168.1.2:8848
file-extension
:
properties
group
:
dev
namespace
:
187c2f4d-80c2-4a67-b4e5-319d5c9151d1
server-addr
:
http://192.168.1.2:8848
discovery
:
group
:
dev
namespace
:
187c2f4d-80c2-4a67-b4e5-319d5c9151d1
---
spring
:
profiles
:
dev
cloud
:
nacos
:
config
:
server-addr
:
http://192.168.1.
115
:8848
server-addr
:
http://192.168.1.
2
:8848
file-extension
:
properties
group
:
dev
namespace
:
187c2f4d-80c2-4a67-b4e5-319d5c9151d1
server-addr
:
http://192.168.1.
115
:8848
server-addr
:
http://192.168.1.
2
:8848
discovery
:
group
:
dev
namespace
:
187c2f4d-80c2-4a67-b4e5-319d5c9151d1
...
...
@@ -36,7 +50,7 @@ spring:
file-extension
:
properties
group
:
production
namespace
:
1bc7c9a2-3cd3-4223-bf3d-17c10a8a501b
server-addr
:
http
s://nacos.geexek.com
server-addr
:
http
://172.16.214.237:9848,http://172.16.214.241:9848,http://172.16.214.242:9848
discovery
:
group
:
production
namespace
:
1bc7c9a2-3cd3-4223-bf3d-17c10a8a501b
\ No newline at end of file
src/main/webapp/WEB-INF/views/cmpt/cert.jsp
View file @
6cf93e68
...
...
@@ -22,7 +22,7 @@
<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"
>
<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
()
%>
"
/>
...
...
src/main/webapp/WEB-INF/views/cmpt/cmptManual.jsp
View file @
6cf93e68
...
...
@@ -189,7 +189,7 @@
<script
src=
"${ctxStatic}/newdermon/vendor/jquery.cookie/jquery.cookie.js"
></script>
<script
src=
"${ctxStatic}/newdermon/vendor/jquery-validation/jquery.validate.min.js"
></script>
<script
src=
"${ctxStatic}/newdermon/js/jquery-ui.js"
></script>
<script
src=
"${ctxStatic}/js/cmptManual.js"
></script>
<script
src=
"${ctxStatic}/js/cmptManual.js
?v=
<%=
System
.
currentTimeMillis
()
%>
"
></script>
<script
src=
"${ctxStatic}/js/qikoo.js"
></script>
<!-- Main File-->
...
...
src/main/webapp/WEB-INF/views/cmpt/cmptSetting.jsp
View file @
6cf93e68
...
...
@@ -43,7 +43,7 @@
<script
src=
"${ctxStatic}/newdermon/js/jquery-ui.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"${ctxStatic}/layer/layer.js"
></script>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/layer/skin/layer.css"
>
<script
src=
"${ctxStatic}/js/cmptSetting.js"
></script>
<script
src=
"${ctxStatic}/js/cmptSetting.js
?
<%=
System
.
currentTimeMillis
()
%>
"
></script>
<style>
.tip-one
{
width
:
21px
;
...
...
src/main/webapp/WEB-INF/views/cmpt/contact.jsp
View file @
6cf93e68
...
...
@@ -14,7 +14,7 @@
<!-- 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"
id=
"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"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/juery-ui-1.12.css"
>
...
...
@@ -22,7 +22,7 @@
<link
rel=
"shortcut icon"
href=
"img/favicon.ico"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/main.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/setting.css"
>
<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"
/>
...
...
src/main/webapp/WEB-INF/views/cmpt/news.jsp
View file @
6cf93e68
...
...
@@ -23,7 +23,7 @@
<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"
>
<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"
/>
...
...
src/main/webapp/WEB-INF/views/cmpt/outter-link.jsp
View file @
6cf93e68
...
...
@@ -179,6 +179,14 @@
}
},
save
:
function
()
{
if
(
customerV
.
$data
.
letter
.
nameWeb
.
length
==
0
){
layer
.
msg
(
"功能名称不能为空!"
,{
icon
:
5
,
duration
:
1500
});
return
;
}
if
(
customerV
.
$data
.
letter
.
appId
.
length
==
0
){
layer
.
msg
(
"AppId不能为空!"
,{
icon
:
5
,
duration
:
1500
});
return
;
}
$
.
ajax
({
url
:
'/gk/sure-letter/updateName'
,
data
:
customerV
.
$data
.
letter
,
...
...
src/main/webapp/WEB-INF/views/cmpt/scan.jsp
View file @
6cf93e68
...
...
@@ -23,7 +23,7 @@
<link
rel=
"shortcut icon"
href=
"img/favicon.ico"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/main.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/setting.css"
>
<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
()
%>
"
/>
...
...
src/main/webapp/WEB-INF/views/cmpt/score.jsp
View file @
6cf93e68
...
...
@@ -23,7 +23,7 @@
<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"
>
<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
()
%>
"
/>
...
...
@@ -121,6 +121,7 @@
<select
name=
""
id=
""
class=
"select"
>
<option
value=
"1"
${
item
.
fieldType =
=
1
?'
selected
'
:
''}
>
照片
</option>
<option
value=
"2"
${
item
.
fieldType =
=
2
?'
selected
'
:
''}
>
视频
</option>
<option
value=
"4"
${
item
.
fieldType =
=
4
?'
selected
'
:
''}
>
照片/视频
</option>
</select>
<span
class=
"down-arrow"
></span>
</div>
...
...
src/main/webapp/WEB-INF/views/cmpt/score_review.jsp
View file @
6cf93e68
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/cmpt/sure-letter.jsp
View file @
6cf93e68
...
...
@@ -148,6 +148,10 @@
}
},
save
:
function
()
{
if
(
customerV
.
$data
.
letter
.
nameWeb
.
length
==
0
){
layer
.
msg
(
"功能名称不能为空!"
,{
icon
:
5
,
duration
:
1500
});
return
;
}
$
.
ajax
({
url
:
'/gk/sure-letter/updateName'
,
data
:
customerV
.
$data
.
letter
,
...
...
src/main/webapp/WEB-INF/views/common/menu.jsp
View file @
6cf93e68
...
...
@@ -15,12 +15,11 @@
.menu-item.active
{
color
:
#ce3939
;
opacity
:
0.9
;
box-shadow
:
0px
0px
8px
#ffdcdc
;
border-radius
:
4px
;
}
.menu-sub-item.active
{
border-left
:
#ce3939
;
border-left-width
:
4px
;
border-left-style
:
solid
;
background
:
rgba
(
206
,
57
,
57
,
0.1
);
}
.active
span
.menu-txt
{
...
...
@@ -28,21 +27,26 @@
font-weight
:
bold
;
}
.menu-hidden
{
display
:
none
;
}
.left-arrow
{
background
:
url(/static/images/left_arrow.png)
no-repeat
;
width
:
8
px
;
width
:
30
px
;
display
:
none
;
height
:
13
px
;
height
:
30
px
;
background-size
:
contain
;
position
:
absolute
;
left
:
62px
;
top
:
20px
;
left
:
26px
;
top
:
10px
;
background-color
:
#ffffff
!
Important
;
z-index
:
99999
;
}
.active
.left-arrow
{
display
:
inline-block
;
background
:
url(/static/images/left_arrow_select.png)
no-repeat
;
background-size
:
contain
;
background-size
:
25%
;
background-position
:
center
;
}
.flex
{
display
:
flex
;
...
...
@@ -62,7 +66,7 @@
background
:
url(/static/images/manage/iconset_grey.png)
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
left
:
4
5px
;
left
:
2
5px
;
top
:
6px
;
}
.active
.icon-xingxiang
{
...
...
@@ -73,10 +77,10 @@
width
:
32px
;
height
:
32px
;
display
:
inline-block
;
background
:
url(
'/static/images/manage/func_white.png'
)
no-repeat
center
;
background
:
url(
/static/images/manage/func_white.png
)
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
left
:
4
5px
;
left
:
2
5px
;
top
:
6px
;
}
.active
.icon-function
{
...
...
@@ -90,7 +94,7 @@
background
:
url('/static/images/manage/base-setting.png')
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
left
:
4
5px
;
left
:
2
5px
;
top
:
6px
;
}
.menu-sub-item
{
...
...
@@ -111,6 +115,33 @@
font-size
:
16px
;
color
:
#999
;
}
.menu-sub-item
:first-child::after
{
content
:
""
;
height
:
29px
;
width
:
1px
;
background
:
#ce3939
;
position
:
absolute
;
left
:
43px
;
top
:
20px
;
}
.menu-sub-item
:last-child::after
{
content
:
""
;
height
:
29px
;
width
:
1px
;
background
:
#ce3939
;
position
:
absolute
;
left
:
43px
;
top
:
0px
;
}
.menu-sub-item
::after
{
content
:
""
;
height
:
49px
;
width
:
1px
;
background
:
#ce3939
;
position
:
absolute
;
left
:
43px
;
top
:
0px
;
}
</style>
<input
type=
"hidden"
value=
"${cmpt.cmptId}"
id=
"cmpt"
>
<input
type=
"hidden"
value=
"${uId}"
id=
"uId"
>
...
...
@@ -125,8 +156,8 @@
<span
class=
"menu-txt"
>
形象管理
</span>
</a>
</li>
<ul
style=
"padding: 0px"
>
<li
class=
"cmptSetting menu-item"
>
<ul
style=
"padding: 0px
;margin: 15px 0px;
"
>
<li
id=
"cmptSetting"
class=
"cmptSetting menu-item"
>
<a
href=
"/gk/cmpt/cmptSetting/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"icon-function"
></span>
<span
class=
"menu-txt"
>
功能管理
</span>
...
...
@@ -141,7 +172,7 @@
</a>
</li>
<li
class=
"news
menu-item
menu-sub-item "
>
<li
class=
"news menu-sub-item "
>
<a
href=
"/gk/news/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
赛事公告
</span>
...
...
@@ -215,15 +246,15 @@
</ul>
</li>
</ul>
<ul>
<li
class=
"base menu-item
"
>
<a
href=
"#"
>
<ul
style=
"padding: 0px 0;"
>
<li
id=
"base"
class=
"base menu-item"
style=
"cursor: pointer
"
>
<a>
<span
class=
"icon-base-setting"
></span>
<span
class=
"menu-txt"
>
基础设置
</span>
<span
class=
"arrow"
></span>
</a>
</li>
<ul
style=
"padding: 0px"
>
<ul
style=
"padding: 0px"
>
<li
class=
"road menu-sub-item"
>
<a
href=
"/gk/road/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
...
...
@@ -266,22 +297,39 @@
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'
];
let
url
=
document
.
location
.
href
;
var
done
=
false
;
for
(
var
i
in
classes
)
{
if
(
url
.
indexOf
(
classes
[
i
])
>
-
1
)
{
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
classList
.
add
(
'active'
);
if
(
classes
[
i
]
!=
'cmptSetting'
){
let
classesStr
=
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
parentNode
.
parentNode
.
firstElementChild
.
classList
;
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
parentNode
.
parentNode
.
firstElementChild
.
classList
.
add
(
'active'
);
if
(
classesStr
.
contains
(
'cmptSetting'
)){
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
else
{
document
.
getElementById
(
'cmptSetting'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
}
else
{
document
.
getElementById
(
'cmptSetting'
).
nextSibling
.
nextSibling
.
classList
.
remove
(
'menu-hidden'
);
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
done
=
true
;
break
;
}
}
document
.
getElementById
(
'base'
).
addEventListener
(
'click'
,
function
()
{
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
remove
(
'menu-hidden'
);
document
.
getElementById
(
'cmptSetting'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
window
.
scrollTo
(
0
,
0
);
});
if
(
!
done
)
{
var
classList
=
document
.
getElementsByClassName
(
'main'
)[
0
].
classList
;
classList
.
add
(
'active'
);
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
document
.
getElementById
(
'cmptSetting'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
function
getCmptId
()
{
...
...
src/main/webapp/static/cmpt/score_review.css
View file @
6cf93e68
...
...
@@ -94,33 +94,65 @@ input[type=checkbox] {
color
:
rgba
(
206
,
57
,
57
,
1
);
border-bottom
:
none
;
}
input
.score-input
{
width
:
110px
;
height
:
40px
;
background
:
whitesmoke
;
}
input
.score-input-bigger
{
width
:
120px
;
height
:
40px
;
background
:
whitesmoke
;
}
.icon-score-edit
{
width
:
16px
;
height
:
18px
;
background
:
url(/static/images/manage/score-edit.png)
no-repeat
center
;
background-size
:
contain
;
background-position
:
center
;
}
.icon-score-save
{
width
:
20px
;
height
:
16px
;
background
:
url(/static/images/manage/icon-score-save.png)
no-repeat
center
;
background-size
:
contain
;
background-position
:
center
;
}
.score-edit
{
color
:
#ce3939
!important
;
font-size
:
14px
;
}
.tab
.review-status
:last-child
{
border-right
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
}
.data-cloumn
{
padding
:
0px
20px
;
padding
:
0px
0px
;
display
:
flex
;
}
.data-cloumn
span
,
.score-info
span
{
.data-cloumn
>
span
,
.score-info
>
span
{
display
:
inline-block
;
width
:
1
20
px
;
width
:
1
17
px
;
height
:
45px
;
line-height
:
45px
;
font-size
:
16px
;
color
:
rgba
(
153
,
153
,
153
,
1
);
}
.data-cloumn
span
:last-child
,
.score-info
span
:last-child
{
width
:
50
px
;
.data-cloumn
>
span
:last-child
,
.score-info
>
span
:last-child
{
width
:
62
px
;
text-align
:
center
;
}
.score-item
{
background
:
rgba
(
250
,
250
,
250
,
1
);
border-radius
:
4px
;
padding
:
0px
2
0px
;
margin-bottom
:
2
0px
;
padding
:
0px
0px
;
margin-bottom
:
1
0px
;
}
.score-info
{
border-bottom
:
1px
solid
rgba
(
221
,
221
,
221
,
1
);
height
:
45px
;
line-height
:
45px
;
display
:
flex
;
}
.score-info
span
{
color
:
rgba
(
51
,
51
,
51
,
1
);
...
...
@@ -180,13 +212,22 @@ input[type=checkbox] {
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
}
.preview
{
max-width
:
80
%
;
height
:
8
0%
;
max-width
:
80
0px
;
height
:
10
0%
;
margin
:
auto
;
position
:
relative
;
padding
:
20px
;
background
:
white
;
z-index
:
9999
;
overflow
:
scroll
;
overflow-x
:
hidden
;
width
:
100%
;
text-align
:
center
;
}
.preview
::-webkit-scrollbar
{
width
:
4px
;
height
:
4px
;
background-color
:
#f1f1f1
;
}
#dialog
{
display
:
none
;
...
...
@@ -196,7 +237,22 @@ input[type=checkbox] {
position
:
fixed
;
width
:
100%
;
height
:
100%
;
top
:
0px
;
left
:
0px
;
background
:
rgba
(
0
,
0
,
0
,
0.4
);
z-index
:
99
top
:
0px
;
left
:
0px
;
background
:
rgba
(
0
,
0
,
0
,
0.4
);
z-index
:
99
;
}
.dialog-content
{
position
:
relative
;
justify-content
:
center
;
align-items
:
center
;
display
:
flex
;
width
:
80%
;
height
:
80%
;
top
:
0px
;
left
:
0px
;
max-width
:
800px
;
z-index
:
99
;
}
.select
{
text-transform
:
none
;
...
...
@@ -266,9 +322,9 @@ input[type=checkbox] {
background-image
:
url(/static/images/close-red.png)
;
background-position
:
center
;
background-repeat
:
no-repeat
;
right
:
-1
0
px
;
z-index
:
100
;
top
:
-1
0
px
;
right
:
-1
7
px
;
z-index
:
100
000
;
top
:
-1
5
px
;
border-radius
:
50%
;
background-color
:
white
;
cursor
:
pointer
;
...
...
@@ -301,7 +357,7 @@ input[type=checkbox] {
}
.search-btn-text
{
display
:
inline-block
;
width
:
8
0px
;
width
:
10
0px
;
text-align
:
center
;
color
:
#333
;
cursor
:
pointer
;
...
...
@@ -312,17 +368,68 @@ input[type=checkbox] {
}
.search-ipt
{
border
:
0px
;
width
:
14
0px
;
width
:
30
0px
;
height
:
46px
;
}
.export-btn
{
width
:
110
px
;
height
:
5
0px
;
width
:
145
px
;
height
:
4
0px
;
background
:
rgba
(
206
,
57
,
57
,
1
);
border-radius
:
4px
;
font-size
:
16px
;
color
:
white
;
line-height
:
5
0px
;
line-height
:
4
0px
;
text-align
:
center
;
cursor
:
pointer
;
}
.pass-icon
{
background
:
url("/static/images/manage/score_pass.png")
center
no-repeat
;
background-size
:
contain
;
background-position
:
center
;
width
:
18px
;
height
:
18px
;
display
:
inline-block
;
}
.forbidden-icon
{
background
:
url("/static/images/manage/score_forbidden.png")
center
no-repeat
;
background-size
:
contain
;
background-position
:
center
;
width
:
18px
;
height
:
18px
;
display
:
inline-block
;
}
.del-icon
{
background
:
url("/static/images/manage/score_del.png")
center
no-repeat
;
background-size
:
contain
;
background-position
:
center
;
width
:
18px
;
height
:
18px
;
display
:
inline-block
;
}
.icon-sec
{
width
:
125px
;
height
:
60px
;
line-height
:
60px
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
cursor
:
pointer
;
position
:
relative
;
}
.icon-sec
::after
{
content
:
''
;
width
:
1px
;
height
:
31px
;
background
:
rgba
(
216
,
216
,
216
,
1
);
position
:
absolute
;
right
:
0px
;
}
.icon-sec
:last-child::after
{
content
:
''
;
display
:
none
;
}
.icon-sec
span
:nth-child
(
2n
)
{
width
:
60px
;
text-align
:
center
;
}
\ No newline at end of file
src/main/webapp/static/cmpt/setting.css
View file @
6cf93e68
...
...
@@ -63,6 +63,7 @@ input[type=checkbox]::before {
.disabled
input
[
type
=
checkbox
]
::before
{
background-color
:
#d8d8d8
!important
;
border
:
2px
solid
#d8d8d8
!important
;
}
input
[
type
=
checkbox
]
:checked::before
{
...
...
@@ -326,12 +327,13 @@ input[type=checkbox]:checked::before {
.mod-dialog
{
background-color
:
#fff
;
border-top
:
none
;
width
:
5
80px
;
height
:
2
5
6px
;
*
padding-top
:
27px
;
width
:
4
80px
;
height
:
2
2
6px
;
padding-top
:
27px
;
position
:
absolute
;
z-index
:
1001
;
margin-top
:
-20px
;
border-radius
:
4px
;
}
.mod-inputdialog
{
...
...
@@ -393,7 +395,7 @@ input[type=checkbox]:checked::before {
.mod-dialog
.dialog-main
{
font-size
:
14px
;
padding
:
4
5px
;
padding
:
3
5px
;
/*text-align: center;*/
}
...
...
@@ -495,25 +497,29 @@ input[type=checkbox]:checked::before {
.mod-dialog
.dialog-console
.console-btn-confirm
{
background
:
#ce3939
repeat-x
;
width
:
1
46
px
;
width
:
1
20
px
;
height
:
42px
;
color
:
#fff
;
text-align
:
center
;
font-size
:
20
px
;
font-size
:
18
px
;
margin-top
:
-6px
;
line-height
:
42px
;
margin-left
:
12px
;
border-radius
:
4px
;
letter-spacing
:
4px
;
}
.mod-dialog
.dialog-console
.console-btn-cancel
{
background
:
#949494
repeat-x
;
width
:
1
4
6px
;
width
:
1
1
6px
;
height
:
42px
;
color
:
#fff
;
text-align
:
center
;
font-size
:
20
px
;
font-size
:
18
px
;
margin-top
:
-6px
;
line-height
:
42px
;
border-radius
:
4px
;
letter-spacing
:
4px
;
}
.mod-pop
.pop-close
:hover
{
...
...
src/main/webapp/static/images/manage/icon-score-save.png
0 → 100644
View file @
6cf93e68
977 Bytes
src/main/webapp/static/images/manage/score-edit.png
0 → 100644
View file @
6cf93e68
1.71 KB
src/main/webapp/static/images/manage/score_del.png
0 → 100644
View file @
6cf93e68
1.06 KB
src/main/webapp/static/images/manage/score_forbidden.png
0 → 100644
View file @
6cf93e68
980 Bytes
src/main/webapp/static/images/manage/score_pass.png
0 → 100644
View file @
6cf93e68
1.22 KB
src/main/webapp/static/js/cmptManual.js
View file @
6cf93e68
...
...
@@ -59,9 +59,6 @@ $(function () {
//确认
$
.
ajax
({
url
:
'/gk/cmpt/manual/delManual?id='
+
id
,
/*接口域名地址*/
type
:
'post'
,
contentType
:
'application/json'
,
processData
:
false
,
success
:
function
(
res
)
{
parent
.
remove
();
console
.
log
(
res
);
...
...
src/main/webapp/static/js/cmptSetting.js
View file @
6cf93e68
...
...
@@ -70,12 +70,12 @@ $(function () {
}
else
if
(
type
==
12
){
layer
.
alert
(
"要启用此功能,请先在计时管理页面完成名单导入"
);
}
else
if
(
type
==
15
){
layer
.
alert
(
"要启用此功能,请先导入路线,且路线上至少有
3
个标注点"
);
layer
.
alert
(
"要启用此功能,请先导入路线,且路线上至少有
2
个标注点"
);
setTimeout
(
function
()
{
window
.
location
.
href
=
"/gk/road/index/"
+
getCmptId
()
+
"?"
+
window
.
location
.
search
;
},
3000
)
}
else
if
(
type
==
16
){
layer
.
alert
(
"要启用此功能,请先导入路线,且路线上至少有
3
个标注点"
);
layer
.
alert
(
"要启用此功能,请先导入路线,且路线上至少有
2
个标注点"
);
setTimeout
(
function
()
{
window
.
location
.
href
=
"/gk/road/index/"
+
getCmptId
()
+
"?"
+
window
.
location
.
search
;
},
3000
)
...
...
src/main/webapp/static/js/score.js
View file @
6cf93e68
...
...
@@ -120,6 +120,7 @@ $(document).ready(function () {
' <select name="" id="" class="select">
\
n'
+
' <option value="1" selected>照片</option>
\
n'
+
' <option value="2" >视频</option>
\
n'
+
' <option value="4" >照片/视频</option>
\
n'
+
' </select>
\
n'
+
' <span class="down-arrow"></span>
\
n'
+
' </td>'
+
...
...
src/main/webapp/static/js/score_review.js
View file @
6cf93e68
This diff is collapsed.
Click to expand it.
src/main/webapp/static/newdermon/css/style.default.css
View file @
6cf93e68
...
...
@@ -470,6 +470,8 @@ nav.side-navbar ul {
nav
.side-navbar
ul
li
{
height
:
49px
;
margin
:
auto
;
width
:
200px
;
list-style
:
none
;
}
...
...
@@ -489,94 +491,94 @@ nav.side-navbar ul li a {
}
nav
.side-navbar
ul
li
a
:hover
{
background
:
rgba
(
196
,
196
,
196
,
0.3
);
color
:
#fff
;
/*background: rgba(196, 196, 196, 0.3);*/
color
:
#fff
;
}
nav
.side-navbar
ul
li
li
a
{
padding-left
:
50px
;
background
:
#f6f6f6
;
padding-left
:
50px
;
background
:
#f6f6f6
;
}
nav
.side-navbar
ul
li
.menu-sub-item.active
>
a
{
color
:
rgba
(
206
,
57
,
57
,
1
);
color
:
rgba
(
206
,
57
,
57
,
1
);
}
nav
.side-navbar
ul
li
.active
>
a
:hover
{
background
:
rgba
(
196
,
196
,
196
,
0.3
);
/*background: rgba(196, 196, 196, 0.3);*/
}
nav
.side-navbar
ul
li
li
.active
>
a
{
background
:
rgba
(
196
,
196
,
196
,
0.3
);
background
:
rgba
(
196
,
196
,
196
,
0.3
);
}
nav
.side-navbar
ul
li
ul
{
padding
:
0
;
padding
:
0
;
}
nav
.side-navbar.shrinked
{
min-width
:
90px
;
max-width
:
90px
;
text-align
:
center
;
min-width
:
90px
;
max-width
:
90px
;
text-align
:
center
;
}
nav
.side-navbar.shrinked
span
.heading
{
margin
:
0
;
margin
:
0
;
}
nav
.side-navbar.shrinked
ul
li
a
{
padding
:
15px
2px
;
border
:
none
;
font-size
:
0.8em
;
color
:
#aaa
;
-webkit-transition
:
color
0.3s
,
background
0.3s
;
transition
:
color
0.3s
,
background
0.3s
;
padding
:
15px
2px
;
border
:
none
;
font-size
:
0.8em
;
color
:
#aaa
;
-webkit-transition
:
color
0.3s
,
background
0.3s
;
transition
:
color
0.3s
,
background
0.3s
;
}
nav
.side-navbar.shrinked
ul
li
a
[
data-toggle
=
"collapse"
]
::before
{
content
:
'\f107'
;
-webkit-transform
:
translateX
(
50%
);
transform
:
translateX
(
50%
);
position
:
absolute
;
top
:
auto
;
right
:
50%
;
bottom
:
0
;
left
:
auto
;
content
:
'\f107'
;
-webkit-transform
:
translateX
(
50%
);
transform
:
translateX
(
50%
);
position
:
absolute
;
top
:
auto
;
right
:
50%
;
bottom
:
0
;
left
:
auto
;
}
nav
.side-navbar.shrinked
ul
li
a
[
data-toggle
=
"collapse"
][
aria-expanded
=
"true"
]
::before
{
content
:
'\f106'
;
content
:
'\f106'
;
}
nav
.side-navbar.shrinked
ul
li
a
:hover
{
color
:
#fff
;
border
:
none
;
color
:
#fff
;
border
:
none
;
}
nav
.side-navbar.shrinked
ul
li
a
:hover
i
{
color
:
#fff
;
color
:
#fff
;
}
nav
.side-navbar.shrinked
ul
li
a
i
{
margin-right
:
0
;
margin-bottom
:
2px
;
display
:
block
;
font-size
:
1rem
;
color
:
#333
;
-webkit-transition
:
color
0.3s
;
transition
:
color
0.3s
;
margin-right
:
0
;
margin-bottom
:
2px
;
display
:
block
;
font-size
:
1rem
;
color
:
#333
;
-webkit-transition
:
color
0.3s
;
transition
:
color
0.3s
;
}
nav
.side-navbar.shrinked
ul
li
.active
>
a
{
color
:
#fff
;
color
:
#fff
;
}
nav
.side-navbar.shrinked
ul
li
.active
>
a
i
{
color
:
#fff
;
color
:
#fff
;
}
nav
.side-navbar.shrinked
.sidebar-header
.title
{
display
:
none
;
display
:
none
;
}
/* SIDEBAR MEDIAQUERIES ----------------------------------- */
...
...
@@ -2844,7 +2846,6 @@ a {
a:focus, a:hover {
color: #3b25e6;
text-decoration: underline;
}
h1,
...
...
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