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
jinan
traffic-signal-platform
Commits
4639661a
Commit
4639661a
authored
Mar 18, 2025
by
wangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
区域基本信息相关代码生成
根据区划类型查询对应数据接口
parent
bf1659b4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
181 additions
and
0 deletions
+181
-0
BaseAreaInfoController.java
...pt/controllerv2/judgeanalysis/BaseAreaInfoController.java
+59
-0
BaseAreaInfo.java
...java/net/wanji/opt/entity/judgeanalysis/BaseAreaInfo.java
+60
-0
BaseAreaInfoService.java
...anji/opt/servicev2/judgeanalysis/BaseAreaInfoService.java
+18
-0
BaseAreaInfoServiceImpl.java
...servicev2/judgeanalysis/impl/BaseAreaInfoServiceImpl.java
+39
-0
AbstractRestServer.java
...a/net/wanji/common/framework/rest/AbstractRestServer.java
+5
-0
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controllerv2/judgeanalysis/BaseAreaInfoController.java
0 → 100644
View file @
4639661a
package
net
.
wanji
.
opt
.
controllerv2
.
judgeanalysis
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.common.framework.exception.DubboProviderException
;
import
net.wanji.common.framework.i18n.I18nResourceBundle
;
import
net.wanji.common.framework.rest.AbstractRestServer
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.common.framework.rest.Page
;
import
net.wanji.common.framework.rest.impl.AbstractRestServerImpl
;
import
net.wanji.databus.po.BaseAreaInfoPO
;
import
net.wanji.opt.entity.BaseAreaInfo
;
import
net.wanji.opt.servicev2.judgeanalysis.BaseAreaInfoService
;
import
net.wanji.opt.vo.GreenWaveRunStateVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.ws.rs.core.MediaType
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 区域基础信息 接口API
* </p>
* @version 1.0
* @author wangtao
* @Date 2025-03-18
*/
@RestController
@Slf4j
@RequestMapping
(
"/base-area-info"
)
@Api
(
value
=
"BaseAreaInfoController"
,
description
=
"区域基础信息接口"
,
tags
=
"区域基础信息"
)
public
class
BaseAreaInfoController
{
@Autowired
private
BaseAreaInfoService
baseAreaInfoService
;
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"区域基础信息-根据区划类型查询对应集合数据"
,
notes
=
""
)
@GetMapping
(
value
=
"/byCondition"
)
public
JsonViewObject
getListByType
(
@RequestParam
(
value
=
"type"
,
required
=
false
,
defaultValue
=
"2"
)
Integer
type
)
{
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
try
{
List
<
BaseAreaInfoPO
>
list
=
baseAreaInfoService
.
selectByType
(
type
);
jsonViewObject
.
success
(
list
);
}
catch
(
Exception
e
)
{
jsonViewObject
.
fail
(
I18nResourceBundle
.
getConstants
(
"GET_FAILED_MSG"
));
log
.
error
(
"{} getAll error"
,
this
.
getClass
().
getSimpleName
(),
e
);
}
return
jsonViewObject
;
}
}
signal-optimize-service/src/main/java/net/wanji/opt/entity/judgeanalysis/BaseAreaInfo.java
0 → 100644
View file @
4639661a
package
net
.
wanji
.
opt
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
net.wanji.common.framework.domain.TrackableEntity
;
import
java.util.Date
;
import
java.math.BigDecimal
;
/**
* <p>
* 区域基础信息
* </p>
*
* @Author wangtao
* @Date 2025-03-18
*/
@Data
@ApiModel
(
value
=
"BaseAreaInfo对象"
,
description
=
"区域基础信息"
)
public
class
BaseAreaInfo
extends
TrackableEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"行政区划代码"
)
private
Long
code
;
@ApiModelProperty
(
value
=
"行政区划名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"道路名称"
)
private
String
roadName
;
@ApiModelProperty
(
value
=
"区划类型:1行政区划;2交警辖区;3商圈;4交通小区;5热点区域;6道路"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"父节点"
)
private
Integer
parentCode
;
@ApiModelProperty
(
value
=
"区域中心点"
)
private
String
location
;
@ApiModelProperty
(
value
=
"区域边界"
)
private
String
polylines
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
gmtCreate
;
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
gmtModified
;
}
signal-optimize-service/src/main/java/net/wanji/opt/servicev2/judgeanalysis/BaseAreaInfoService.java
0 → 100644
View file @
4639661a
package
net
.
wanji
.
opt
.
servicev2
.
judgeanalysis
;
import
net.wanji.databus.po.BaseAreaInfoPO
;
import
java.util.List
;
/**
* <p>
* 区域基础信息
* </p>
*
* @Author wangtao
* @Date 2025-03-18
*/
public
interface
BaseAreaInfoService
{
List
<
BaseAreaInfoPO
>
selectByType
(
Integer
type
);
}
signal-optimize-service/src/main/java/net/wanji/opt/servicev2/judgeanalysis/impl/BaseAreaInfoServiceImpl.java
0 → 100644
View file @
4639661a
package
net
.
wanji
.
opt
.
servicev2
.
judgeanalysis
.
impl
;
import
net.wanji.common.framework.dubbointerface.impl.BaseDubboInterfaceImpl
;
import
net.wanji.common.framework.mapper.BaseInterfaceMapper
;
import
net.wanji.databus.dao.mapper.BaseAreaInfoMapper
;
import
net.wanji.databus.po.BaseAreaInfoPO
;
import
net.wanji.opt.entity.BaseAreaInfo
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.opt.servicev2.judgeanalysis.BaseAreaInfoService
;
import
org.apache.dubbo.config.annotation.Service
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p>
* 区域基础信息
* </p>
*
* @Author wangtao
* @Date 2025-03-18
*/
@Slf4j
@Component
@Service
public
class
BaseAreaInfoServiceImpl
implements
BaseAreaInfoService
{
@Resource
private
BaseAreaInfoMapper
baseAreaInfoMapper
;
public
List
<
BaseAreaInfoPO
>
selectByType
(
Integer
type
){
return
baseAreaInfoMapper
.
selectByType
(
type
);
}
}
wj-common/src/main/java/net/wanji/common/framework/rest/AbstractRestServer.java
View file @
4639661a
...
...
@@ -2,6 +2,7 @@ package net.wanji.common.framework.rest;
import
net.wanji.common.framework.domain.TrackableEntity
;
import
io.swagger.annotations.*
;
import
net.wanji.common.framework.exception.DubboProviderException
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -26,6 +27,10 @@ public interface AbstractRestServer<Entity extends TrackableEntity> {
@GetMapping
(
value
=
"/byAll"
,
produces
=
MediaType
.
APPLICATION_JSON
)
JsonViewObject
getAll
();
@ApiOperation
(
value
=
"区域基础信息-根据条件查询记录"
,
notes
=
"根据条件查询记录"
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@GetMapping
(
value
=
"/byCondition"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
JsonViewObject
getByWhere
(
@RequestParam
(
value
=
"type"
,
required
=
false
,
defaultValue
=
"2"
)
Integer
type
)
throws
DubboProviderException
;
/**
* 根据条件分页查询记录
*
...
...
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