Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
379ac1ea
Commit
379ac1ea
authored
Nov 16, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.ccs换流站详情
parent
cb47ecc3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
8 deletions
+30
-8
IFireStationInfoService.java
.../boot/module/ccs/api/service/IFireStationInfoService.java
+8
-0
FireStationInfoController.java
.../module/ccs/biz/controller/FireStationInfoController.java
+8
-4
FireStationInfoServiceImpl.java
...dule/ccs/biz/service/impl/FireStationInfoServiceImpl.java
+14
-4
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/java/com/yeejoin/amos/boot/module/ccs/api/service/IFireStationInfoService.java
View file @
379ac1ea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
api
.
service
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireStationInfoDto
;
/**
* 站端信息表接口类
*
...
...
@@ -9,4 +11,10 @@ package com.yeejoin.amos.boot.module.ccs.api.service;
*/
public
interface
IFireStationInfoService
{
/**
* 详情
* @param stationCode
* @return
*/
FireStationInfoDto
getOneByCode
(
String
stationCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/controller/FireStationInfoController.java
View file @
379ac1ea
...
...
@@ -8,10 +8,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -46,4 +43,11 @@ public class FireStationInfoController extends BaseController {
@ApiParam
(
value
=
"排序条件"
)
@RequestParam
(
required
=
false
)
String
orderBy
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
fireStationInfoServiceImpl
.
queryForFireStationInfoList
(
orderBy
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"站端信息详情"
,
notes
=
"站端信息详情"
)
@GetMapping
(
value
=
"/{stationCode}/detail"
)
public
ResponseModel
getOne
(
@PathVariable
String
stationCode
)
{
return
ResponseHelper
.
buildResponse
(
fireStationInfoServiceImpl
.
getOneByCode
(
stationCode
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/service/impl/FireStationInfoServiceImpl.java
View file @
379ac1ea
...
...
@@ -7,7 +7,6 @@ import com.yeejoin.amos.boot.module.ccs.api.mapper.FireStationInfoMapper;
import
com.yeejoin.amos.boot.module.ccs.api.service.IFireStationInfoService
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.StringUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
...
...
@@ -20,18 +19,28 @@ import java.util.Optional;
* @date 2021-11-09
*/
@Service
public
class
FireStationInfoServiceImpl
extends
BaseService
<
FireStationInfoDto
,
FireStationInfo
,
FireStationInfoMapper
>
implements
IFireStationInfoService
{
public
class
FireStationInfoServiceImpl
extends
BaseService
<
FireStationInfoDto
,
FireStationInfo
,
FireStationInfoMapper
>
implements
IFireStationInfoService
{
/**
* 列表查询 示例
*
* @param orderBy
*/
public
List
<
FireStationInfoDto
>
queryForFireStationInfoList
(
String
orderBy
)
throws
Exception
{
if
(
StringUtils
.
isNotBlank
(
orderBy
))
{
if
(
StringUtils
.
isNotBlank
(
orderBy
))
{
Optional
<
StationOrderByTypeEnum
>
op
=
StationOrderByTypeEnum
.
getEnum
(
orderBy
);
op
.
orElseThrow
(()
->
new
Exception
(
"不存在查询排序条件"
));
op
.
orElseThrow
(()
->
new
Exception
(
"不存在查询排序条件"
));
return
this
.
baseMapper
.
queryStationListWithStatistics
(
op
.
get
().
getOrderBy
());
}
else
{
return
this
.
baseMapper
.
queryStationListWithStatistics
(
null
);
}
}
@Override
public
FireStationInfoDto
getOneByCode
(
String
stationCode
)
{
List
<
FireStationInfoDto
>
dtos
=
this
.
queryForList
(
""
,
false
,
stationCode
);
if
(
dtos
.
isEmpty
())
{
throw
new
RuntimeException
(
"不存在指定数据"
);
}
return
dtos
.
iterator
().
next
();
}
}
\ 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