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
a3f6a428
Commit
a3f6a428
authored
Nov 24, 2022
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统管理-设备管理-厂商管理
parent
f1afad27
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
172 additions
and
8 deletions
+172
-8
pom.xml
pom.xml
+14
-0
pom.xml
signal-utc-service/pom.xml
+9
-0
ManufacturerAdminController.java
...net/wanji/utc/controller/ManufacturerAdminController.java
+47
-0
ManufacturerInfoMapper.java
...ain/java/net/wanji/utc/mapper/ManufacturerInfoMapper.java
+2
-0
ManufacturerInfoPO.java
...ce/src/main/java/net/wanji/utc/po/ManufacturerInfoPO.java
+10
-8
ManufacturerService.java
...et/wanji/utc/service/systemadmin/ManufacturerService.java
+13
-0
ManufacturerServiceImpl.java
...utc/service/systemadmin/impl/ManufacturerServiceImpl.java
+35
-0
ManufacturerListInVO.java
...va/net/wanji/utc/vo/systemadmin/ManufacturerListInVO.java
+21
-0
application.yml
signal-utc-service/src/main/resources/application.yml
+10
-0
ManufacturerInfoMapper.xml
...vice/src/main/resources/mapper/ManufacturerInfoMapper.xml
+11
-0
No files found.
pom.xml
View file @
a3f6a428
...
...
@@ -50,6 +50,8 @@
<beanutils.version>
1.9.4
</beanutils.version>
<httpclient.version>
4.5.13
</httpclient.version>
<jedis.version>
3.3.0
</jedis.version>
<pagehelper.boot.version>
1.3.1
</pagehelper.boot.version>
<jersey.version>
2.23.2
</jersey.version>
</properties>
<!-- 依赖声明 -->
...
...
@@ -148,6 +150,18 @@
<artifactId>
jedis
</artifactId>
<version>
${jedis.version}
</version>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
<version>
${pagehelper.boot.version}
</version>
</dependency>
<!-- jersey -->
<dependency>
<groupId>
org.glassfish.jersey.media
</groupId>
<artifactId>
jersey-media-multipart
</artifactId>
<version>
${jersey.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
...
...
signal-utc-service/pom.xml
View file @
a3f6a428
...
...
@@ -134,6 +134,15 @@
<groupId>
redis.clients
</groupId>
<artifactId>
jedis
</artifactId>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.glassfish.jersey.media
</groupId>
<artifactId>
jersey-media-multipart
</artifactId>
</dependency>
</dependencies>
<build>
...
...
signal-utc-service/src/main/java/net/wanji/utc/controller/ManufacturerAdminController.java
0 → 100644
View file @
a3f6a428
package
net
.
wanji
.
utc
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
net.wanji.utc.po.ManufacturerInfoPO
;
import
net.wanji.utc.service.systemadmin.ManufacturerService
;
import
net.wanji.utc.vo.systemadmin.ManufacturerListInVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.ws.rs.core.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 系统管理-厂商管理
*
* @author Kent HAN
* @date 2022/11/24 8:32
*/
@Api
(
value
=
"系统管理-厂商管理"
,
description
=
"系统管理-厂商管理"
)
@RequestMapping
(
"/manufacturer"
)
@RestController
public
class
ManufacturerAdminController
{
@Autowired
ManufacturerService
manufacturerService
;
@ApiOperation
(
value
=
"厂商列表"
,
notes
=
"厂商列表"
,
response
=
ManufacturerInfoPO
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/list"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ManufacturerInfoPO
.
class
),
})
public
ResponseEntity
list
(
@RequestBody
ManufacturerListInVO
manufacturerListInVO
)
{
PageInfo
<
ManufacturerInfoPO
>
manufacturerInfoPOPageInfo
=
manufacturerService
.
list
(
manufacturerListInVO
);
return
ResponseEntity
.
ok
(
manufacturerInfoPOPageInfo
);
}
//添加或修改
//删除
}
signal-utc-service/src/main/java/net/wanji/utc/mapper/ManufacturerInfoMapper.java
View file @
a3f6a428
...
...
@@ -17,4 +17,6 @@ public interface ManufacturerInfoMapper {
ManufacturerInfoPO
selectById
(
@Param
(
"manufacturerId"
)
Integer
manufacturerId
);
List
<
ManufacturerInfoPO
>
selectAll
();
List
<
ManufacturerInfoPO
>
selectByOptionalName
(
@Param
(
"name"
)
String
name
);
}
signal-utc-service/src/main/java/net/wanji/utc/po/ManufacturerInfoPO.java
View file @
a3f6a428
package
net
.
wanji
.
utc
.
po
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -10,29 +11,30 @@ import java.util.Date;
* @date 2022/11/15 16:47
*/
@Data
@ApiModel
(
value
=
"ManufacturerInfoPO"
,
description
=
"查询厂商列表返回值"
)
public
class
ManufacturerInfoPO
{
/** 厂商ID */
@ApiModelProperty
(
nam
e
=
"厂商ID"
,
notes
=
""
)
@ApiModelProperty
(
valu
e
=
"厂商ID"
,
notes
=
""
)
private
Integer
id
;
/** 厂商代码 */
@ApiModelProperty
(
nam
e
=
"厂商代码"
,
notes
=
""
)
@ApiModelProperty
(
valu
e
=
"厂商代码"
,
notes
=
""
)
private
String
code
;
/** 厂商名称 */
@ApiModelProperty
(
nam
e
=
"厂商名称"
,
notes
=
""
)
@ApiModelProperty
(
valu
e
=
"厂商名称"
,
notes
=
""
)
private
String
name
;
/** 厂商简称 */
@ApiModelProperty
(
nam
e
=
"厂商简称"
,
notes
=
""
)
@ApiModelProperty
(
valu
e
=
"厂商简称"
,
notes
=
""
)
private
String
nickName
;
/** 平台地址 */
@ApiModelProperty
(
nam
e
=
"平台地址"
,
notes
=
""
)
@ApiModelProperty
(
valu
e
=
"平台地址"
,
notes
=
""
)
private
String
address
;
/** 维护单位 */
@ApiModelProperty
(
nam
e
=
"维护单位"
,
notes
=
""
)
@ApiModelProperty
(
valu
e
=
"维护单位"
,
notes
=
""
)
private
String
maintenanceUnit
;
/** 创建时间 */
@ApiModelProperty
(
nam
e
=
"创建时间"
,
notes
=
""
)
@ApiModelProperty
(
valu
e
=
"创建时间"
,
notes
=
""
)
private
Date
gmtCreate
;
/** 修改时间 */
@ApiModelProperty
(
nam
e
=
"修改时间"
,
notes
=
""
)
@ApiModelProperty
(
valu
e
=
"修改时间"
,
notes
=
""
)
private
Date
gmtModified
;
}
signal-utc-service/src/main/java/net/wanji/utc/service/systemadmin/ManufacturerService.java
0 → 100644
View file @
a3f6a428
package
net
.
wanji
.
utc
.
service
.
systemadmin
;
import
com.github.pagehelper.PageInfo
;
import
net.wanji.utc.po.ManufacturerInfoPO
;
import
net.wanji.utc.vo.systemadmin.ManufacturerListInVO
;
/**
* @author Kent HAN
* @date 2022/11/24 8:49
*/
public
interface
ManufacturerService
{
PageInfo
<
ManufacturerInfoPO
>
list
(
ManufacturerListInVO
manufacturerListInVO
);
}
signal-utc-service/src/main/java/net/wanji/utc/service/systemadmin/impl/ManufacturerServiceImpl.java
0 → 100644
View file @
a3f6a428
package
net
.
wanji
.
utc
.
service
.
systemadmin
.
impl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
net.wanji.utc.mapper.ManufacturerInfoMapper
;
import
net.wanji.utc.po.ManufacturerInfoPO
;
import
net.wanji.utc.service.systemadmin.ManufacturerService
;
import
net.wanji.utc.vo.systemadmin.ManufacturerListInVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author Kent HAN
* @date 2022/11/24 8:50
*/
@Service
public
class
ManufacturerServiceImpl
implements
ManufacturerService
{
@Autowired
ManufacturerInfoMapper
manufacturerInfoMapper
;
@Override
public
PageInfo
<
ManufacturerInfoPO
>
list
(
ManufacturerListInVO
manufacturerListInVO
)
{
Integer
pageNum
=
manufacturerListInVO
.
getPageNum
();
Integer
pageSize
=
manufacturerListInVO
.
getPageSize
();
String
name
=
manufacturerListInVO
.
getName
();
PageHelper
.
startPage
(
pageNum
,
pageSize
);
List
<
ManufacturerInfoPO
>
manufacturerInfoPOList
=
manufacturerInfoMapper
.
selectByOptionalName
(
name
);
PageInfo
<
ManufacturerInfoPO
>
borrowPOPageInfo
=
new
PageInfo
<>(
manufacturerInfoPOList
);
return
borrowPOPageInfo
;
}
}
signal-utc-service/src/main/java/net/wanji/utc/vo/systemadmin/ManufacturerListInVO.java
0 → 100644
View file @
a3f6a428
package
net
.
wanji
.
utc
.
vo
.
systemadmin
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author Kent HAN
* @date 2022/11/24 8:41
*/
@Data
@ApiModel
(
value
=
"ManufacturerListInVO"
,
description
=
"查询厂商列表输入参数"
)
public
class
ManufacturerListInVO
{
@ApiModelProperty
(
required
=
true
,
value
=
"页号"
)
Integer
pageNum
;
@ApiModelProperty
(
required
=
true
,
value
=
"每页记录数"
)
Integer
pageSize
;
@ApiModelProperty
(
value
=
"厂商名称"
)
String
name
;
}
signal-utc-service/src/main/resources/application.yml
View file @
a3f6a428
...
...
@@ -4,6 +4,9 @@ spring:
mvc
:
pathmatch
:
matching-strategy
:
ant_path_matcher
main
:
allow-circular-references
:
true
server
:
undertow
:
url-charset
:
UTF-8
...
...
@@ -28,6 +31,7 @@ server:
enabled
:
true
# 设置访问日志所在目录
dir
:
logs
mybatis-plus
:
mapper-locations
:
classpath:mapper/*.xml
typeAliasesPackage
:
net.wanji.utc.entity
...
...
@@ -44,3 +48,9 @@ mybatis-plus:
auto-mapping-unknown-column-behavior
:
warning
#开启SQL打印
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
# PageHelper分页插件
pagehelper
:
helperDialect
:
mysql
supportMethodsArguments
:
true
params
:
count=countSql
signal-utc-service/src/main/resources/mapper/ManufacturerInfoMapper.xml
View file @
a3f6a428
...
...
@@ -30,4 +30,15 @@
id,code,name,nick_name,address,maintenance_unit,gmt_create,gmt_modified
from t_manufacturer_info
</select>
<select
id=
"selectByOptionalName"
resultMap=
"BaseResultMap"
>
select id,code,name,nick_name,address,maintenance_unit,gmt_create,gmt_modified
from t_manufacturer_info
<where>
<if
test=
"name != null and name != ''"
>
AND name LIKE CONCAT('%',#{name},'%')
</if>
</where>
order by id
</select>
</mapper>
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