Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e6f69583
authored
May 26, 2021
by
黄小葱
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
替换selectByPrimaryKey
1 parent
7341724c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
e6f6958
...
...
@@ -22,7 +22,6 @@ import cn.com.glsx.auth.utils.ShieldContextHolder;
import
cn.com.glsx.usercenter.api.dto.request.FindUserRequest
;
import
cn.com.glsx.usercenter.api.dto.response.User
;
import
cn.com.glsx.usercenter.api.feign.UserService
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.glsx.plat.common.utils.StringUtils
;
...
...
@@ -70,7 +69,7 @@ public class VehicleService {
}
public
PageInfo
<
VehicleLinkSnsDTO
>
linkSnsSearch
(
VehicleSearch
search
)
{
Page
page
=
Page
Helper
.
startPage
(
search
.
getPageNumber
(),
search
.
getPageSize
());
PageHelper
.
startPage
(
search
.
getPageNumber
(),
search
.
getPageSize
());
search
.
setDeviceSource
(
1
);
List
<
VehicleLinkSnsDTO
>
list
=
vehicleMapper
.
linkSnsSearch
(
search
);
return
new
PageInfo
<>(
list
);
...
...
@@ -118,7 +117,7 @@ public class VehicleService {
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateDriveVehicleById
(
TrialDriveVehicleEditBo
driveVehicleoBo
)
{
Vehicle
vehicle
=
vehicleMapper
.
selectBy
PrimaryKey
(
driveVehicleoBo
.
getTempId
(
));
Vehicle
vehicle
=
vehicleMapper
.
selectBy
Id
(
Long
.
parseLong
(
driveVehicleoBo
.
getTempId
()
));
BeanUtils
.
copyProperties
(
driveVehicleoBo
,
vehicle
);
vehicle
.
setUpdatedBy
(
ShieldContextHolder
.
getUserId
());
vehicle
.
setUpdatedDate
(
new
Date
());
...
...
@@ -133,7 +132,7 @@ public class VehicleService {
*/
public
TrialDriveVehicleEditDTO
findDriveVehicleById
(
String
tempId
)
{
TrialDriveVehicleEditDTO
editDTO
=
new
TrialDriveVehicleEditDTO
();
Vehicle
vehicle
=
vehicleMapper
.
selectBy
PrimaryKey
(
tempId
);
Vehicle
vehicle
=
vehicleMapper
.
selectBy
Id
(
Long
.
parseLong
(
tempId
)
);
BeanUtils
.
copyProperties
(
vehicle
,
editDTO
);
editDTO
.
setShopNameId
(
vehicle
.
getCreatedBy
());
//
...
...
@@ -197,7 +196,7 @@ public class VehicleService {
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteDriveVehicle
(
String
tempId
)
{
Vehicle
vehicle
=
vehicleMapper
.
selectBy
PrimaryKey
(
tempId
);
Vehicle
vehicle
=
vehicleMapper
.
selectBy
Id
(
Long
.
parseLong
(
tempId
)
);
vehicle
.
setDelFlag
(
Constants
.
DELETE_FLAG
);
vehicle
.
setUpdatedDate
(
new
Date
());
vehicle
.
setUpdatedBy
(
ShieldContextHolder
.
getUserId
());
...
...
@@ -241,7 +240,6 @@ public class VehicleService {
vehicle
.
setRemark
(
vehicleBo
.
getChanle
());
vehicle
.
setCreatedDate
(
new
Date
());
// vehicle.setBuyDate(vehicleBo.getActiveTime());
// TODO 匹配该条数据 是属于哪个门店,即设置创建人
String
shopName
=
vehicleBo
.
getShopName
();
R
<
List
<
User
>>
userR
=
userService
.
findByUser
(
new
FindUserRequest
().
setUsername
(
shopName
));
Long
createId
=
null
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment