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
ed7932bc
Commit
ed7932bc
authored
Jul 30, 2020
by
yangshuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
头像修改
parent
47dca491
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
163 additions
and
272 deletions
+163
-272
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
DataDetailVo.java
...ava/com/dlbridge/jadp/plugins/cmpt/bean/DataDetailVo.java
+10
-0
DataVo.java
...main/java/com/dlbridge/jadp/plugins/cmpt/bean/DataVo.java
+13
-0
CmptMapper.java
...com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.java
+4
-0
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+14
-0
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
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
CmptHomePageVo.java
...bridge/jadp/plugins/cmpt/dao/model/vo/CmptHomePageVo.java
+2
-7
CmptService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
+9
-0
AesUtil.java
...in/java/com/dlbridge/jadp/plugins/cmpt/utils/AesUtil.java
+13
-15
MicroApiController.java
...om/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
+31
-2
application-production.properties
src/main/resources/application-production.properties
+1
-1
bootstrap.yml
src/main/resources/bootstrap.yml
+15
-1
No files found.
src/main/java/com/dlbridge/feign/GeexekScoreService.java
View file @
ed7932bc
...
...
@@ -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 @
47dca491
/**
* 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 @
ed7932bc
...
...
@@ -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 @
ed7932bc
...
...
@@ -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 @
47dca491
/**
* 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 @
ed7932bc
...
...
@@ -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/bean/DataDetailVo.java
0 → 100644
View file @
ed7932bc
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
bean
;
import
lombok.Data
;
@Data
public
class
DataDetailVo
{
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/DataVo.java
0 → 100644
View file @
ed7932bc
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
bean
;
import
lombok.Data
;
@Data
public
class
DataVo
{
private
String
unionId
;
private
String
userIds
;
private
int
count
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.java
View file @
ed7932bc
...
...
@@ -73,4 +73,8 @@ 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
);
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
ed7932bc
...
...
@@ -237,4 +237,18 @@
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>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/DataMapper.java
0 → 100644
View file @
ed7932bc
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 @
ed7932bc
<?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/model/CmptSetting.java
View file @
ed7932bc
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 @
ed7932bc
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 @
ed7932bc
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/vo/CmptHomePageVo.java
View file @
ed7932bc
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 @
ed7932bc
...
...
@@ -181,4 +181,13 @@ 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
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/utils/AesUtil.java
View file @
ed7932bc
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/MicroApiController.java
View file @
ed7932bc
...
...
@@ -441,15 +441,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 +476,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 +1148,28 @@ 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
);
}
}
src/main/resources/application-production.properties
View file @
ed7932bc
...
...
@@ -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 @
ed7932bc
---
spring
:
profiles
:
default
cloud
:
nacos
:
config
:
server-addr
:
http://192.168.1.115:8848
file-extension
:
properties
group
:
dev
namespace
:
187c2f4d-80c2-4a67-b4e5-319d5c9151d1
server-addr
:
http://192.168.1.115:8848
discovery
:
group
:
dev
namespace
:
187c2f4d-80c2-4a67-b4e5-319d5c9151d1
---
spring
:
profiles
:
dev
cloud
:
...
...
@@ -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
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