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
432607b1
Commit
432607b1
authored
Aug 02, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付宝支付方式
parent
60ccb41c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
16 deletions
+55
-16
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+26
-9
VehicleBookRecordBiz.java
...a/com/xxfc/platform/vehicle/biz/VehicleBookRecordBiz.java
+25
-6
VehicleBookRecordMapper.xml
...ver/src/main/resources/mapper/VehicleBookRecordMapper.xml
+2
-1
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+2
-0
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
432607b1
...
...
@@ -19,10 +19,18 @@ import com.google.common.collect.Lists;
import
com.google.common.collect.Maps
;
import
com.xxfc.platform.vehicle.common.CustomIllegalParamException
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.constant.*
;
import
com.xxfc.platform.vehicle.constant.ConstantType
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.entity.*
;
import
com.xxfc.platform.vehicle.mapper.*
;
import
com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus
;
import
com.xxfc.platform.vehicle.constant.VehicleStatus
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.VehicleBookInfo
;
import
com.xxfc.platform.vehicle.entity.VehicleBookRecord
;
import
com.xxfc.platform.vehicle.mapper.BookRecordAccItemMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleBookInfoMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleMapper
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -56,8 +64,6 @@ import java.util.*;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
static
com
.
github
.
wxiaoqi
.
security
.
auth
.
common
.
constatns
.
CommonConstants
.
DATA_ALL_FALSE
;
@Service
@Slf4j
public
class
VehicleBiz
extends
BaseBiz
<
VehicleMapper
,
Vehicle
>
implements
UserRestInterface
{
...
...
@@ -1278,12 +1284,23 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
return
ObjectRestResponse
.
createFailedResult
(
235
,
"token失效"
);
}
List
<
Integer
>
companyList
=
Lists
.
newArrayList
();
if
(
DATA_ALL_FALSE
.
equals
(
userDTO
.
getDataAll
()))
{
//不能获取全部数据
companyList
=
dataCompany
(
userDTO
.
getDataZone
(),
userDTO
.
getDataCompany
());
}
List
<
BranchCompany
>
branchCompany
=
branchCompanyBiz
.
getListByUser
(
userDTO
);
companyList
=
branchCompany
.
stream
().
map
(
BranchCompany:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
vehiclePlanDto
.
getParkBranchCompanyId
()
!=
null
)
{
companyList
.
add
(
vehiclePlanDto
.
getParkBranchCompanyId
());
if
(
companyList
.
size
()
>
0
)
{
if
(
companyList
.
contains
(
vehiclePlanDto
.
getParkBranchCompanyId
()))
{
companyList
.
clear
();
companyList
.
add
(
vehiclePlanDto
.
getParkBranchCompanyId
());
}
else
{
return
ObjectRestResponse
.
succ
();
}
}
else
{
companyList
.
add
(
vehiclePlanDto
.
getParkBranchCompanyId
());
}
}
log
.
info
(
"用户权限公司ID: companyList = {}"
,
companyList
);
vehiclePlanDto
.
setCompanyIds
(
companyList
);
Query
query
=
new
Query
(
vehiclePlanDto
);
PageDataVO
<
VehicleAndModelInfoVo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getVehicle
(
query
.
getSuper
()));
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookRecordBiz.java
View file @
432607b1
...
...
@@ -112,9 +112,18 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
List
<
Integer
>
companyList
=
Lists
.
newArrayList
();
if
(
DATA_ALL_FALSE
.
equals
(
userDTO
.
getDataAll
()))
{
//不能获取全部数据
companyList
=
dataCompany
(
userDTO
.
getDataZone
(),
userDTO
.
getDataCompany
());
}
if
(
vehicleBookRecordQueryVo
.
getUserCompany
()
!=
null
)
{
companyList
.
add
(
vehicleBookRecordQueryVo
.
getUserCompany
());
if
(
vehicleBookRecordQueryVo
.
getCompanyId
()
!=
null
)
{
if
(
companyList
.
contains
(
vehicleBookRecordQueryVo
.
getCompanyId
()))
{
//如果权限中有这个公司就允许查询, 否则就直接返回空
companyList
.
clear
();
companyList
.
add
(
vehicleBookRecordQueryVo
.
getCompanyId
());
}
else
{
return
RestResponse
.
suc
();
}
}
}
else
{
if
(
vehicleBookRecordQueryVo
.
getCompanyId
()
!=
null
)
{
companyList
.
add
(
vehicleBookRecordQueryVo
.
getCompanyId
());
}
}
vehicleBookRecordQueryVo
.
setCompanyIds
(
companyList
);
Query
query
=
new
Query
(
vehicleBookRecordQueryVo
);
...
...
@@ -136,10 +145,20 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
List
<
Integer
>
companyList
=
Lists
.
newArrayList
();
if
(
DATA_ALL_FALSE
.
equals
(
userDTO
.
getDataAll
()))
{
//不能获取全部数据
companyList
=
dataCompany
(
userDTO
.
getDataZone
(),
userDTO
.
getDataCompany
());
if
(
vehicleBookRecordQueryVo
.
getCompanyId
()
!=
null
)
{
if
(
companyList
.
contains
(
vehicleBookRecordQueryVo
.
getCompanyId
()))
{
//如果权限中有这个公司就允许查询, 否则就直接返回空
companyList
.
clear
();
companyList
.
add
(
vehicleBookRecordQueryVo
.
getCompanyId
());
}
else
{
return
RestResponse
.
suc
();
}
}
}
else
{
if
(
vehicleBookRecordQueryVo
.
getCompanyId
()
!=
null
)
{
companyList
.
add
(
vehicleBookRecordQueryVo
.
getCompanyId
());
}
}
if
(
vehicleBookRecordQueryVo
.
getCompanyId
()
!=
null
)
{
companyList
.
add
(
vehicleBookRecordQueryVo
.
getCompanyId
());
}
vehicleBookRecordQueryVo
.
setCompanyIds
(
companyList
);
Query
query
=
new
Query
(
vehicleBookRecordQueryVo
);
PageDataVO
<
VehicleBookRecordVo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getBookRecordInfo
(
query
.
getSuper
()));
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleBookRecordMapper.xml
View file @
432607b1
...
...
@@ -402,7 +402,7 @@
</foreach>
</if>
and v1.status between 1 and 2
and v1.status between 1 and 2
and v1.book_user != -2
</where>
order by create_time DESC
...
...
@@ -440,6 +440,7 @@
<if
test=
"status != null"
>
and v1.status = #{status}
</if>
and v1.book_user != -2
</where>
group by v1.id
order by create_time DESC
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
432607b1
...
...
@@ -475,7 +475,9 @@
#{id}
</foreach>
</if>
and is_del != 1
</where>
ORDER BY parkCompanyName
</select>
<select
id=
"countVehicleByParam"
parameterType=
"com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto"
...
...
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