Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
signal
traffic-signal-platform
Commits
c0adf590
Commit
c0adf590
authored
Nov 14, 2022
by
黄福新
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 1、信号平台接口服务;2、统一信控标准API
parent
39f72c6e
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
514 additions
and
0 deletions
+514
-0
CrossInfoMapper.java
...c/main/java/com/wanji/utc/dao/mapper/CrossInfoMapper.java
+34
-0
application-dev.yml
signal-utc-service/src/main/resources/application-dev.yml
+61
-0
application-pro.yml
signal-utc-service/src/main/resources/application-pro.yml
+61
-0
application.yml
signal-utc-service/src/main/resources/application.yml
+37
-0
controller.java.ftl
...e/src/main/resources/generate_code_vm/controller.java.ftl
+41
-0
entity.java.ftl
...rvice/src/main/resources/generate_code_vm/entity.java.ftl
+55
-0
mapper.java.ftl
...rvice/src/main/resources/generate_code_vm/mapper.java.ftl
+15
-0
mapper.xml.ftl
...ervice/src/main/resources/generate_code_vm/mapper.xml.ftl
+30
-0
service.java.ftl
...vice/src/main/resources/generate_code_vm/service.java.ftl
+14
-0
serviceImpl.java.ftl
.../src/main/resources/generate_code_vm/serviceImpl.java.ftl
+16
-0
logback-spring.xml
signal-utc-service/src/main/resources/logback-spring.xml
+70
-0
CrossInfoMapper.xml
...utc-service/src/main/resources/mapper/CrossInfoMapper.xml
+45
-0
generatorConfig.xml
.../src/main/resources/mybatis-generator/generatorConfig.xml
+35
-0
No files found.
signal-utc-service/src/main/java/com/wanji/utc/dao/mapper/CrossInfoMapper.java
0 → 100644
View file @
c0adf590
package
com
.
wanji
.
utc
.
dao
.
mapper
;
import
com.wanji.utc.dao.MyBaseMapper
;
import
com.wanji.utc.dao.model.CrossInfo
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
/**
* @Description: [路口信息持久层实现]</p>
* @author hfx
* @version 1.0
* Created on 2019年05月06日
*/
@Repository
public
interface
CrossInfoMapper
extends
MyBaseMapper
<
CrossInfo
>
{
/**
* @description: 根据路口id删除基础信息
* @param crossId 路口id
* @return
* @author hfx
* @date 2020/3/19 16:10
*/
void
deleteByCrossId
(
@Param
(
"crossId"
)
String
crossId
);
/**
* @description: 根据条件获取路口基础信息列表
* @param crossName 路口名称
* @return
* @author hfx
* @date 2020/3/19 16:10
*/
void
listCrossInfo
(
@Param
(
"crossName"
)
String
crossName
);
}
\ No newline at end of file
signal-utc-service/src/main/resources/application-dev.yml
0 → 100644
View file @
c0adf590
server
:
port
:
30000
servlet
:
display-name
:
Wanji
context-path
:
/utc
multipart
:
max-file-size
:
50MB
max-request-size
:
50MB
tomcat
:
threads
:
max
:
10000
#线程池配置
threadPool
:
corePoolSize
:
5
maxPoolSize
:
200
queueCapacity
:
5
keepAliveTime
:
60000
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://10.100.1.74:3306/t_signal_utc?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&sessionVariables=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'&useSSL=false&useCursorFetch=true
username
:
root
password
:
Wanji300552
type
:
com.alibaba.druid.pool.DruidDataSource
filters
:
stat
minIdle
:
50
maxActive
:
200
initialSize
:
10
maxWait
:
5000
minEvictableIdleTimeMillis
:
60000
timeBetweenEvictionRunsMillis
:
30000
testWhileIdle
:
true
testOnBorrow
:
false
testOnReturn
:
false
keepAlive
:
false
validationQuery
:
SELECT
1
poolPreparedStatements
:
false
maxPoolPreparedStatementPerConnectionSize
:
-1
maxOpenPreparedStatements
:
-1
logAbandoned
:
true
encoding
:
force
:
true
charset
:
UTF-8
enabled
:
true
redis
:
host
:
10.100.1.74
port
:
6379
password
:
Wanji300552
jedis
:
pool
:
max-active
:
200
max-wait
:
5000
max-idle
:
20
min-idle
:
10
timeout
:
5000
database
:
3
# 信号平台
signal
:
signal-utc-service/src/main/resources/application-pro.yml
0 → 100644
View file @
c0adf590
server
:
port
:
30000
servlet
:
display-name
:
Wanji
context-path
:
/web
multipart
:
max-file-size
:
50MB
max-request-size
:
50MB
tomcat
:
threads
:
max
:
10000
#线程池配置
threadPool
:
corePoolSize
:
5
maxPoolSize
:
200
queueCapacity
:
5
keepAliveTime
:
60000
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://10.100.1.74:3306/t_signal?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&sessionVariables=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'&useSSL=false&useCursorFetch=true
username
:
root
password
:
Wanji300552
type
:
com.alibaba.druid.pool.DruidDataSource
filters
:
stat
minIdle
:
50
maxActive
:
200
initialSize
:
10
maxWait
:
5000
minEvictableIdleTimeMillis
:
60000
timeBetweenEvictionRunsMillis
:
30000
testWhileIdle
:
true
testOnBorrow
:
false
testOnReturn
:
false
keepAlive
:
false
validationQuery
:
SELECT
1
poolPreparedStatements
:
false
maxPoolPreparedStatementPerConnectionSize
:
-1
maxOpenPreparedStatements
:
-1
logAbandoned
:
true
encoding
:
force
:
true
charset
:
UTF-8
enabled
:
true
redis
:
host
:
10.100.1.74
port
:
6379
password
:
Wanji300552
jedis
:
pool
:
max-active
:
200
max-wait
:
5000
max-idle
:
20
min-idle
:
10
timeout
:
5000
database
:
3
# 信号平台
signal
:
signal-utc-service/src/main/resources/application.yml
0 → 100644
View file @
c0adf590
spring
:
profiles
:
active
:
dev
jackson
:
mapper
:
accept_case_insensitive_properties
:
true
main
:
allow-circular-references
:
true
mvc
:
pathmatch
:
matching-strategy
:
ant_path_matcher
service
:
name
:
signal-web-service
mybatis
:
type-aliases-package
:
com.wanji.*.model
mapper-locations
:
classpath:mapper/*.xml
configuration
:
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
mapper
:
mappers
:
-
com.wanji.utc.dao.MyBaseMapper
not-empty
:
false
identity
:
MYSQL
pagehelper
:
helper-dialect
:
mysql
reasonable
:
false
support-methods-arguments
:
true
params
:
count=countSql
jasypt
:
encryptor
:
algorithm
:
PBEWithMD5AndDES
password
:
7F84150B6A114C48F0EA1158484BF63C
iv-generator-classname
:
org.jasypt.iv.NoIvGenerator
signal-utc-service/src/main/resources/generate_code_vm/controller.java.ftl
0 → 100644
View file @
c0adf590
package
${
package
.
Controller
};
import
${
package
.
Service
}.${
table
.
serviceName
};
import
${
package
.
Entity
}.${
entity
};
import
org
.
apache
.
shiro
.
authz
.
annotation
.
RequiresPermissions
;
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Autowired
;
import
org
.
springframework
.
stereotype
.
Controller
;
import
org
.
springframework
.
ui
.
Model
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
PathVariable
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
RequestMapping
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
RequestMethod
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
ResponseBody
;
<#
if
superControllerClassPackage
??
>
import
${
superControllerClassPackage
};
</#
if
>
/**
*
@
Description
:
[${
table
.
comment
}
接口
API
]</
p
>
*
@
author
${
author
}
*
@
version
1.0
*
Created
on
${
date
}
*/
@
Slf4j
@
RestController
@
RequestMapping
(
"<#if package.ModuleName??>/${package.ModuleName}</#if><#if package.SubModuleName??>/${package.SubModuleName}</#if>/${table.viewName}"
)
@
Api
(
value
=
${
table
.
comment
}
接口
,
description
=
${
table
.
comment
}
接口
,
tags
=
{${
table
.
comment
}})
<#
if
superControllerClass
??>
public
class
${
table
.
controllerName
}
extends
${
superControllerClass
}
{
<#
else
>
public
class
${
table
.
controllerName
}
{
</#
if
>
/**
*
<
p
>
Description
:[${
table
.
comment
}
服务
]</
p
>
*/
@
Autowired
private
${
table
.
serviceName
}
${
table
.
serviceName
?
uncap_first
};
}
signal-utc-service/src/main/resources/generate_code_vm/entity.java.ftl
0 → 100644
View file @
c0adf590
package
${
package
.
Entity
};
<#
list
table
.
importPackages
as
pkg
>
import
${
pkg
};
</#
list
>
import
lombok
.
Data
;
import
javax
.
persistence
.*;
/**
*
@
Description
:
[${
table
.
comment
}
实体类
]</
p
>
*
@
author
${
author
}
*
@
version
1.0
*
Created
on
${
date
}
*/
@
Data
<#
if
tableAnnotation
??&&
tableAnnotation
>
@
Table
(
name
=
"${table.name}"
)
</#
if
>
<#
if
superEntityClass
??
>
public
class
${
entity
}
extends
${
superEntityClass
}<#
if
activeRecord
><${
entity
}></#
if
>
{
<#
elseif
activeRecord
>
public
class
${
entity
}
extends
Model
<${
entity
}>
{
<#
else
>
public
class
${
entity
}
{
</#
if
>
<#
list
table
.
fields
as
field
>
/**
*
<#
if
field
.
comment
??&&
field
.
comment
!= "">${field.comment}</#if>
**/
<#
if
field
.
keyFlag
>
<#
assign
keyPropertyName
=
field
.
propertyName
/>
@
Id
</#
if
>
<#
if
field
.
convert
>
@
Column
(
name
=
"${field.name}"
)
</#
if
>
private
${
field
.
propertyType
}
${
field
.
propertyName
};
<#
if
cfg
.
rangeDateFileds
?
seq_contains
(
field
.
propertyName
)>
/**
*
<
p
>${
field
.
comment
}
范围查询
-
开始
</
p
>
*/
private
String
${
field
.
propertyName
}
Start
;
/**
*
<
p
>${
field
.
comment
}
范围查询
-
结束
</
p
>
*/
private
String
${
field
.
propertyName
}
End
;
</#
if
>
</#
list
>
}
signal-utc-service/src/main/resources/generate_code_vm/mapper.java.ftl
0 → 100644
View file @
c0adf590
package
${
package
.
Mapper
};
import
${
package
.
Entity
}.${
entity
};
import
${
superMapperClassPackage
};
import
org
.
springframework
.
stereotype
.
Repository
;
/**
*
@
Description
:
[${
table
.
comment
}
持久层实现
]</
p
>
*
@
author
${
author
}
*
@
version
1.0
*
Created
on
${
date
}
*/
@
Repository
public
interface
${
table
.
mapperName
}
extends
${
superMapperClass
}<${
entity
}>
{
}
\ No newline at end of file
signal-utc-service/src/main/resources/generate_code_vm/mapper.xml.ftl
0 → 100644
View file @
c0adf590
<?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=
"${package.Mapper}.${table.mapperName}"
>
<
#if
enableCache
>
<!-- 开启二级缓存 -->
<cache
type=
"org.mybatis.caches.ehcache.LoggingEhcache"
/>
</
#
if>
<
#if
baseResultMap
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"${package.Entity}.${entity}"
>
<
#list
table
.
fields
as
field
>
<
#if
field
.
keyFlag
>
<id
column=
"${field.name}"
property=
"${field.propertyName}"
/>
<
#else
>
<result
column=
"${field.name}"
property=
"${field.propertyName}"
/>
</
#
if>
</
#
list>
</resultMap>
</
#
if>
<!--基本字段列表-->
<sql
id=
"Base_Column_List"
>
<
#list
table
.
fields
as
field
>
${field.name}
<
#sep
>
,
</
#
list>
</sql>
</mapper>
signal-utc-service/src/main/resources/generate_code_vm/service.java.ftl
0 → 100644
View file @
c0adf590
package
${
package
.
Service
};
import
${
package
.
Entity
}.${
entity
};
import
org
.
springframework
.
stereotype
.
Repository
;
/**
*
@
Description
:
[${
table
.
comment
}
service
]</
p
>
*
@
author
${
author
}
*
@
version
1.0
*
Created
on
${
date
}
*/
@
Repository
public
interface
${
table
.
serviceName
}
extends
${
superServiceClass
}<${
entity
}>
{
}
signal-utc-service/src/main/resources/generate_code_vm/serviceImpl.java.ftl
0 → 100644
View file @
c0adf590
package
${
package
.
ServiceImpl
};
import
${
package
.
Entity
}.${
entity
};
import
${
package
.
Mapper
}.${
table
.
mapperName
};
import
${
package
.
Service
}.${
table
.
serviceName
};
import
org
.
springframework
.
stereotype
.
Service
;
/**
*
@
Description
:
[${
table
.
comment
}
service
实现
]</
p
>
*
@
author
${
author
}
*
@
version
1.0
*
Created
on
${
date
}
*/
@
Service
public
class
${
table
.
serviceImplName
}
extends
${
superServiceImplClass
}<${
entity
},
${
table
.
mapperName
}>
implements
${
table
.
serviceName
}
{
}
signal-utc-service/src/main/resources/logback-spring.xml
0 → 100644
View file @
c0adf590
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<property
name=
"encoding"
value=
"UTF-8"
/>
<property
name=
"normal-pattern"
value=
"%date{yyyy-MM-dd HH:mm:ss.SSS} %-5level[%thread]%logger{56}.%method:%L -%msg%n"
/>
<property
name=
"LOG_PATH"
value=
"./logs"
/>
<!-- 配置打印DEBUG级别日志的环境. 多个使用逗号隔开. -->
<springProfile
name=
"dev,test"
>
<!-- 如果需要,请自行开启spring或其他组件的debug级别 -->
<logger
name=
"com.wanji.web"
level=
"info"
/>
</springProfile>
<!-- 配置打印INFO级别日志的环境 -->
<springProfile
name=
"prod"
>
<logger
name=
"com.wanji.web"
level=
"info"
/>
</springProfile>
<appender
name=
"consoleLog"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<layout
class=
"ch.qos.logback.classic.PatternLayout"
>
<pattern>
${normal-pattern}
</pattern>
</layout>
</appender>
<appender
name=
"fileInfoLog"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${LOG_PATH}/info.log
</file>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
DENY
</onMatch>
<onMismatch>
ACCEPT
</onMismatch>
</filter>
<encoder>
<pattern>
${normal-pattern}
</pattern>
<charset>
${encoding}
</charset>
</encoder>
<!--滚动策略-->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--路径-->
<fileNamePattern>
${LOG_PATH}/info.%d.log
</fileNamePattern>
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
</appender>
<appender
name=
"fileErrorLog"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${LOG_PATH}/error.log
</file>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
ERROR
</level>
</filter>
>
<encoder>
<pattern>
${normal-pattern}
</pattern>
<charset>
${encoding}
</charset>
</encoder>
<!--滚动策略-->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--路径-->
<fileNamePattern>
${LOG_PATH}/error.%d.log
</fileNamePattern>
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
</appender>
<root
level=
"INFO"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
</root>
</configuration>
\ No newline at end of file
signal-utc-service/src/main/resources/mapper/CrossInfoMapper.xml
0 → 100644
View file @
c0adf590
<?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.wanji.utc.dao.mapper.CrossInfoMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.wanji.utc.dao.model.CrossInfo"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"code"
property=
"code"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"location"
property=
"location"
/>
<result
column=
"gmt_create"
property=
"gmtCreate"
/>
<result
column=
"gmt_modified"
property=
"gmtModified"
/>
</resultMap>
<!--基本字段列表-->
<sql
id=
"Base_Column_List"
>
id,
name,
gmt_create,
gmt_modified
</sql>
<delete
id=
"deleteByCrossId"
>
delete from t_cross_info where 1=1
<if
test=
"id != null and id !='' "
>
and id = #{id}
</if>
</delete>
<select
id=
"listCrossInfo"
resultMap=
"BaseResultMap"
>
SELECT
id,
id,
name,
location
FROM
t_cross_info
WHERE 1=1
<if
test=
"crossName != null and crossName != ''"
>
AND name = #{crossName}
</if>
GROUP BY name
</select>
</mapper>
signal-utc-service/src/main/resources/mybatis-generator/generatorConfig.xml
0 → 100644
View file @
c0adf590
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<context
id=
"Mysql"
defaultModelType=
"flat"
>
<property
name=
"javaFileEncoding"
value=
"UTF-8"
/>
<!-- xml配置文件中分隔符 -->
<property
name=
"beginningDelimiter"
value=
"`"
/>
<property
name=
"endingDelimiter"
value=
"`"
/>
<!-- 配置通用的Mapper基类 -->
<plugin
type=
"tk.mybatis.mapper.generator.MapperPlugin"
>
<property
name=
"mappers"
value=
"com.xiaojukeji.ep.ip.dao.util.MyBaseMapper"
/>
</plugin>
<jdbcConnection
connectionURL=
"jdbc:mysql://172.20.24.58/didi-assets"
driverClass=
"com.mysql.jdbc.Driver"
userId=
"root"
password=
"Eifqr!Kge"
>
</jdbcConnection>
<javaModelGenerator
targetPackage=
"${targetModelPackage}"
targetProject=
"${targetJavaProject}"
/>
<sqlMapGenerator
targetPackage=
"${targetXMLPackage}"
targetProject=
"${targetResourcesProject}"
/>
<javaClientGenerator
targetPackage=
"${targetMapperPackage}"
targetProject=
"${targetJavaProject}"
type=
"MIXEDMAPPER"
/>
<!-- 控制生成文件和XML的内容 -->
<table
tableName=
"outsource_user"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
</context>
</generatorConfiguration>
\ 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