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
e9613285
Commit
e9613285
authored
Oct 23, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
de177794
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
7 deletions
+63
-7
VehicleFindDTO.java
...va/com/xxfc/platform/vehicle/pojo/dto/VehicleFindDTO.java
+3
-0
VehicleVO.java
...ain/java/com/xxfc/platform/vehicle/pojo/vo/VehicleVO.java
+8
-1
AdminVehicleController.java
...c/platform/vehicle/rest/admin/AdminVehicleController.java
+9
-0
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+43
-6
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/dto/VehicleFindDTO.java
View file @
e9613285
...
@@ -52,4 +52,7 @@ public class VehicleFindDTO extends PageParam implements DataInter {
...
@@ -52,4 +52,7 @@ public class VehicleFindDTO extends PageParam implements DataInter {
List
<
Integer
>
dataCompanyIds
;
List
<
Integer
>
dataCompanyIds
;
Integer
bizType
;
Integer
bizType
;
@ApiModelProperty
(
"店铺类型:1-店铺资产;2-店铺经营;3-店铺停靠"
)
private
Integer
type
;
}
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/vo/VehicleVO.java
View file @
e9613285
...
@@ -21,9 +21,16 @@ public class VehicleVO extends Vehicle {
...
@@ -21,9 +21,16 @@ public class VehicleVO extends Vehicle {
private
String
categoryName
;
private
String
categoryName
;
@ApiModelProperty
(
"店铺名称"
)
@ApiModelProperty
(
"
所属
店铺名称"
)
private
String
companyName
;
private
String
companyName
;
@ApiModelProperty
(
"经营店铺名称"
)
private
String
manageCompanyName
;
@ApiModelProperty
(
"停靠店铺名称"
)
private
String
parkCompanyName
;
private
VehicleApply
vehicleApply
;
private
VehicleApply
vehicleApply
;
private
List
<
VehicleExtensionVO
>
extensionVOS
;
private
List
<
VehicleExtensionVO
>
extensionVOS
;
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/AdminVehicleController.java
View file @
e9613285
...
@@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -53,6 +54,14 @@ public class AdminVehicleController extends BaseController<VehicleBiz>{
...
@@ -53,6 +54,14 @@ public class AdminVehicleController extends BaseController<VehicleBiz>{
@ApiModelProperty
(
"店铺商品列表"
)
@ApiModelProperty
(
"店铺商品列表"
)
public
ObjectRestResponse
shopSelectList
(
VehicleFindDTO
vehicleFindDTO
)
{
public
ObjectRestResponse
shopSelectList
(
VehicleFindDTO
vehicleFindDTO
)
{
setPowerData
(
vehicleFindDTO
);
setPowerData
(
vehicleFindDTO
);
Integer
type
=
vehicleFindDTO
.
getType
()
==
null
?
0
:
vehicleFindDTO
.
getType
();
if
(
type
>
0
){
List
<
Integer
>
dataCompanyIds
=
vehicleFindDTO
.
getDataCompanyIds
()
==
null
?
new
ArrayList
<>()
:
vehicleFindDTO
.
getDataCompanyIds
();
if
(
vehicleFindDTO
.
getBranchId
()
!=
null
&&
vehicleFindDTO
.
getBranchId
()
>
0
){
dataCompanyIds
.
add
(
vehicleFindDTO
.
getBranchId
());
vehicleFindDTO
.
setDataCompanyIds
(
dataCompanyIds
);
}
}
return
baseBiz
.
selectList
(
vehicleFindDTO
);
return
baseBiz
.
selectList
(
vehicleFindDTO
);
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
e9613285
...
@@ -1297,11 +1297,15 @@
...
@@ -1297,11 +1297,15 @@
v.*,
v.*,
b.cn_name as brandName,
b.cn_name as brandName,
c.`name` categoryName,
c.`name` categoryName,
bc.`name` as companyName
bc.`name` as companyName,
bc1.`name` as manageCompanyName,
bc2.`name` as parkCompanyName
FROM vehicle v
FROM vehicle v
LEFT JOIN vehicle_brand b ON v.brand_id=b.id
LEFT JOIN vehicle_brand b ON v.brand_id=b.id
LEFT JOIN vehicle_category c ON v.category_id=c.id
LEFT JOIN vehicle_category c ON v.category_id=c.id
LEFT JOIN branch_company bc ON v.subordinate_branch=bc.id
LEFT JOIN branch_company bc ON v.subordinate_branch=bc.id
LEFT JOIN branch_company bc1 ON v.manage_company_id=bc1.id
LEFT JOIN branch_company bc2 ON v.park_branch_company_id=bc2.id
<where>
<where>
v.is_del = 0
v.is_del = 0
<if
test=
"name != null and name != ''"
>
<if
test=
"name != null and name != ''"
>
...
@@ -1317,7 +1321,7 @@
...
@@ -1317,7 +1321,7 @@
AND v.`category_id`= #{categoryId}
AND v.`category_id`= #{categoryId}
</if>
</if>
<if
test=
"branchId != null and branchId > 0"
>
<if
test=
"branchId != null and branchId > 0"
>
AND
v.`subordinate_branch`= #{branchId}
AND
(v.`subordinate_branch`= #{branchId} or v.`park_branch_company_id`= #{branchId} or v.`manage_company_id`= #{branchId} )
</if>
</if>
<if
test=
"state != null "
>
<if
test=
"state != null "
>
AND v.`state`= #{state}
AND v.`state`= #{state}
...
@@ -1326,10 +1330,43 @@
...
@@ -1326,10 +1330,43 @@
AND v.`goods_type`= #{goodsType}
AND v.`goods_type`= #{goodsType}
</if>
</if>
<if
test=
"dataCompanyIds != null and dataCompanyIds.size > 0"
>
<if
test=
"dataCompanyIds != null and dataCompanyIds.size > 0"
>
<if
test=
"type != null and type > 0"
>
<choose>
<when
test=
"type !=null and type == 1"
>
and bc.id in
and bc.id in
<foreach
collection=
"dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
#{id}
</foreach>
</foreach>
</when>
<when
test=
"type !=null and type == 2"
>
and bc1.id in
<foreach
collection=
"dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</when>
<when
test=
"type !=null and type == 3"
>
and bc2.id in
<foreach
collection=
"dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</when>
<otherwise>
and (bc.id in
<foreach
collection=
"dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
or bc1.id in
<foreach
collection=
"dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
or bc2.id in
<foreach
collection=
"dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
)
</otherwise>
</choose>
</if>
</if>
</if>
<if
test=
"dataCorporationIds != null and dataCorporationIds.size > 0"
>
<if
test=
"dataCorporationIds != null and dataCorporationIds.size > 0"
>
and bc.company_id in
and bc.company_id in
...
...
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