Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
5b7c75c9
Commit
5b7c75c9
authored
Oct 22, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加根据预定记录ID获取出行记录接口
parent
7f41531f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
VehicleActiveService.java
...a/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
+15
-0
VehicleActiveController.java
...m/xxfc/platform/vehicle/rest/VehicleActiveController.java
+8
-4
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
View file @
5b7c75c9
...
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.vehicle.biz;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.vehicle.constant.*
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.entity.*
;
...
...
@@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.*
;
...
...
@@ -456,6 +458,19 @@ public class VehicleActiveService {
}
public
ObjectRestResponse
selectDepartureLogByBookRecordId
(
Long
bookRecordId
)
{
if
(
bookRecordId
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
Example
example
=
new
Example
(
VehicleDepartureLog
.
class
);
example
.
createCriteria
().
andEqualTo
(
"bookRecordId"
,
bookRecordId
);
VehicleDepartureLog
vehicleDepartureLog
=
vehicleDepartureLogMapper
.
selectOneByExample
(
example
);
if
(
vehicleDepartureLog
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResCode
.
FIND_DATA_NOT_EXIST
.
getCode
(),
ResCode
.
FIND_DATA_NOT_EXIST
.
getDesc
());
}
return
ObjectRestResponse
.
succ
(
vehicleDepartureLog
);
}
public
static
void
main
(
String
[]
args
)
{
DateTime
startDate
=
DateTime
.
parse
(
"2019-08-21 17:00:00"
,
DATE_TIME_FORMATTER
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleActiveController.java
View file @
5b7c75c9
package
com
.
xxfc
.
platform
.
vehicle
.
rest
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.vehicle.biz.VehicleActiveService
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
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
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Date
;
...
...
@@ -91,6 +89,12 @@ public class VehicleActiveController {
}
@GetMapping
(
"/getOne"
)
public
ObjectRestResponse
selectByRecordId
(
Long
bookRecordId
)
{
return
vehicleActiveService
.
selectDepartureLogByBookRecordId
(
bookRecordId
);
}
/**
* 保养
...
...
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