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
dedcd5df
Commit
dedcd5df
authored
May 11, 2020
by
yangshuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动提交代码
parent
056129d8
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
23 additions
and
15 deletions
+23
-15
pom.xml
pom.xml
+1
-1
Func.java
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Func.java
+1
-1
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+1
-1
CmptService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
+5
-1
CmptSettingController.java
...dlbridge/jadp/plugins/cmpt/web/CmptSettingController.java
+1
-1
MicroApiController.java
...om/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
+2
-2
ResourcesController.java
...m/dlbridge/jadp/plugins/cmpt/web/ResourcesController.java
+6
-2
application-production.properties
src/main/resources/application-production.properties
+1
-1
cmptSetting.jsp
src/main/webapp/WEB-INF/views/cmpt/cmptSetting.jsp
+1
-1
road.jsp
src/main/webapp/WEB-INF/views/cmpt/road.jsp
+1
-1
route.jsp
src/main/webapp/WEB-INF/views/cmpt/route.jsp
+1
-1
menu.jsp
src/main/webapp/WEB-INF/views/common/menu.jsp
+1
-1
cmptSetting.js
src/main/webapp/static/js/cmptSetting.js
+1
-1
No files found.
pom.xml
View file @
dedcd5df
...
...
@@ -5,7 +5,7 @@
<groupId>
com.dlbridge.dalp
</groupId>
<artifactId>
gksite
</artifactId>
<version>
0.8
.0
</version>
<version>
1
.0
</version>
<packaging>
jar
</packaging>
<name>
gksite
</name>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Func.java
View file @
dedcd5df
...
...
@@ -17,7 +17,7 @@ public class Func {
private
String
name
;
@ApiModelProperty
(
value
=
"类型,1:赛事成绩 2:赛事相册 3:签到检录 "
+
"4:参赛手册 5:我的照片 6:联系检录"
+
"7:路线下载8:强制装备9:
轨迹导航
"
+
"7:路线下载8:强制装备9:
路线导入
"
+
"10:我的成绩"
,
allowableValues
=
"1~12"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"可见性"
)
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
dedcd5df
...
...
@@ -73,7 +73,7 @@
<select
id=
"queryUserCmpt"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.UserCmpt"
>
select user_id userId,cmpt_id cmptId,mark_no enrollId,status
from gk_user_cmpt_map
where cmpt_id = #{cmptId} and mark_no=#{enrollId} and user_id=#{userId}
where cmpt_id = #{cmptId} and mark_no=#{enrollId} and user_id=#{userId}
and `status`=1
limit 1
</select>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
View file @
dedcd5df
...
...
@@ -8,6 +8,7 @@ import com.dlbridge.jadp.plugins.cmpt.dao.mapper.CmptMapper;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.UserCmpt
;
import
com.dlbridge.jadp.plugins.cmpt.utils.Page
;
import
com.dlbridge.jadp.plugins.cmpt.utils.PageFactory
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.log4j.Logger
;
import
org.springframework.data.domain.Pageable
;
...
...
@@ -26,6 +27,7 @@ import java.util.List;
*/
@Service
@Transactional
@Log4j2
public
class
CmptService
{
Logger
logger
=
Logger
.
getLogger
(
CmptService
.
class
);
...
...
@@ -95,7 +97,9 @@ public class CmptService {
if
(
cmpt
!=
null
&&
cmpt
.
getStatus
()
==
1
)
{
//已经绑定
return
info
;
}
else
{
saveUserCmpt
(
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
;
}
}
else
{
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/CmptSettingController.java
View file @
dedcd5df
...
...
@@ -166,7 +166,7 @@ public class CmptSettingController {
count
=
remoteService
.
getCmptEnrollCount
(
cmptId
);
}
else
if
(
type
==
6
)
{
// 联系救援
count
=
contactService
.
queryConcat
(
cmptId
).
size
();
}
else
if
(
type
==
7
||
type
==
9
)
{
// 路线下载 ||
轨迹导航
}
else
if
(
type
==
7
||
type
==
9
)
{
// 路线下载 ||
路线导入
List
<
Road
>
roads
=
roadService
.
queryRoads
(
cmptId
);
count
=
roads
.
stream
().
filter
(
road
->
StringUtils
.
isNotBlank
(
road
.
getFileUrl
())).
count
();
}
else
if
(
type
==
8
)
{
// 强制装备
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
View file @
dedcd5df
...
...
@@ -301,7 +301,7 @@ public class MicroApiController {
}
/**
*
轨迹导航
*
路线导入
*
* @return
*/
...
...
@@ -310,7 +310,7 @@ public class MicroApiController {
@ApiResponse
(
code
=
200
,
message
=
"成功"
),
@ApiResponse
(
code
=
-
1
,
message
=
"失败"
,
response
=
ObjectUtils
.
Null
.
class
),
@ApiResponse
(
code
=
200
,
message
=
"成功"
,
response
=
Result
.
class
)})
@ApiOperation
(
value
=
"获取路线坐标点"
,
notes
=
"获取路线坐标点"
,
tags
=
"
轨迹导航
"
)
@ApiOperation
(
value
=
"获取路线坐标点"
,
notes
=
"获取路线坐标点"
,
tags
=
"
路线导入
"
)
public
Result
<
RoadGpsPoint
>
route_gps
(
@PathVariable
(
"roadId"
)
Integer
roadId
)
{
RoadGpsPoint
gps
=
roadService
.
getGps
(
roadId
);
return
Result
.
success
().
setContent
(
gps
);
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ResourcesController.java
View file @
dedcd5df
...
...
@@ -11,6 +11,7 @@ import com.dlbridge.jadp.plugins.cmpt.service.CmptService;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptSettingService
;
import
com.dlbridge.jadp.plugins.cmpt.service.RemoteService
;
import
org.json.JSONObject
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.DigestUtils
;
...
...
@@ -52,12 +53,15 @@ public class ResourcesController {
@Resource
CmptService
cmptService
;
@Resource
private
ValueOperations
valueOperations
;
@RequestMapping
(
"{cmptid}"
)
public
void
img
(
@PathVariable
(
"cmptid"
)
Integer
cmptid
,
HttpServletResponse
response
)
throws
IOException
{
JSONObject
obj
=
new
JSONObject
();
obj
.
put
(
"scene"
,
"raceId="
+
cmptid
);
ResponseEntity
<
org
.
springframework
.
core
.
io
.
Resource
>
resourceResponseEntity
=
restTemplate
.
postForEntity
(
"https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token="
+
WeiXinAccessToken
.
getAccessToken
(
),
obj
.
toString
(),
org
.
springframework
.
core
.
io
.
Resource
.
class
);
+
(
String
)
valueOperations
.
get
(
"micro_gk:access_token"
),
obj
.
toString
(),
org
.
springframework
.
core
.
io
.
Resource
.
class
);
ServletOutputStream
outputStream
=
response
.
getOutputStream
();
org
.
springframework
.
core
.
io
.
Resource
body
=
resourceResponseEntity
.
getBody
();
...
...
@@ -79,7 +83,7 @@ public class ResourcesController {
obj
.
put
(
"scene"
,
"raceId="
+
cmptid
);
;
ResponseEntity
<
org
.
springframework
.
core
.
io
.
Resource
>
resourceResponseEntity
=
restTemplate
.
postForEntity
(
"https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token="
+
WeiXinAccessToken
.
getAccessToken
(
),
obj
.
toString
(),
org
.
springframework
.
core
.
io
.
Resource
.
class
);
+
(
String
)
valueOperations
.
get
(
"micro_gk:access_token"
),
obj
.
toString
(),
org
.
springframework
.
core
.
io
.
Resource
.
class
);
Cmpt
cmpt
=
cmptService
.
queryCmptBycmptId
(
cmptid
);
BufferedImage
bg
=
ImageIO
.
read
(
resourceResponseEntity
.
getBody
().
getInputStream
());
...
...
src/main/resources/application-production.properties
View file @
dedcd5df
...
...
@@ -43,7 +43,7 @@ pagehelper.supportMethodsArguments=true
pagehelper.params
=
count=countSql
weixin.micro.appid
=
wxf599f7763ad997c5
weixin.micro.secret
=
adc1789fddbaef7cf5b38f60b956529b
geexek.user.url
=
http://www.geexek.com/
geexek.user.url
=
http
s
://www.geexek.com/
geexek.cmpt.url
=
http://timerbackend.geexek.com/
geexek.shamus.url
=
http://shamus.geexek.com/
server.url
=
http://zs.geexek.com/
...
...
src/main/webapp/WEB-INF/views/cmpt/cmptSetting.jsp
View file @
dedcd5df
...
...
@@ -121,7 +121,7 @@
<div
class=
"content"
>
<div
class=
"t-i t-i-x"
style=
"width: 100%;"
>
<span
class=
"t-i-1"
>
手机绑定
</span>
<span
class=
"t-i-2"
><span
class=
"tip-one tip-1"
>
注
</span>
请在完成计时名单导入后启用此功能,启用此功能后,才能启用仅能向选手开发的功能:我的成绩、我的相册、联系救援、签到检录、
轨迹导航
</span>
<span
class=
"t-i-2"
><span
class=
"tip-one tip-1"
>
注
</span>
请在完成计时名单导入后启用此功能,启用此功能后,才能启用仅能向选手开发的功能:我的成绩、我的相册、联系救援、签到检录、
路线导入
</span>
</div>
</div>
</div>
...
...
src/main/webapp/WEB-INF/views/cmpt/road.jsp
View file @
dedcd5df
...
...
@@ -4,7 +4,7 @@
<!doctype html>
<html>
<head>
<title>
轨迹导航
</title>
<title>
路线导入
</title>
<!-- Bootstrap CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome CSS-->
...
...
src/main/webapp/WEB-INF/views/cmpt/route.jsp
View file @
dedcd5df
...
...
@@ -123,7 +123,7 @@
<div
class=
"tip"
>
<img
src=
"/static/images/download.png"
alt=
""
width=
"130px"
>
<span
style=
"font-size:30px;color:rgba(153,153,153,1);"
>
未上传
</span>
<span
style=
"font-size:24px;color:rgba(153,153,153,1);"
>
请在“
轨迹导航
”中完成路线上传
</span>
<span
style=
"font-size:24px;color:rgba(153,153,153,1);"
>
请在“
路线导入
”中完成路线上传
</span>
</div>
</c:otherwise>
</c:choose>
...
...
src/main/webapp/WEB-INF/views/common/menu.jsp
View file @
dedcd5df
...
...
@@ -115,7 +115,7 @@
<li
class=
"road menu-item"
>
<a
href=
"/gk/road/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"menuico left-arrow"
></span>
<span
class=
"menu-txt"
>
轨迹导航
</span>
<span
class=
"menu-txt"
>
路线导入
</span>
</a>
</li>
<li
class=
"equip menu-item"
>
...
...
src/main/webapp/static/js/cmptSetting.js
View file @
dedcd5df
...
...
@@ -55,7 +55,7 @@ $(function () {
}
else
if
(
type
==
6
)
{
layer
.
alert
(
"要启用此功能,需要先编辑救援电话"
);
}
else
if
(
type
==
7
)
{
layer
.
alert
(
"要启用此功能,需要先在‘
轨迹导航
’中上传比赛路线"
);
layer
.
alert
(
"要启用此功能,需要先在‘
路线导入
’中上传比赛路线"
);
}
else
if
(
type
==
8
)
{
layer
.
alert
(
"要启用此功能,需要先编辑强制装备"
);
}
else
if
(
type
==
9
)
{
...
...
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