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
07233313
Commit
07233313
authored
Sep 27, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-vehicle-price' into dev-tiande
parents
091db407
80a92e6b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
8 deletions
+60
-8
CompanySearchOldDTO.java
...a/com/xxfc/platform/vehicle/pojo/CompanySearchOldDTO.java
+15
-0
BranchCompanyBiz.java
.../java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
+7
-4
BranchCompanyMapper.java
...com/xxfc/platform/vehicle/mapper/BranchCompanyMapper.java
+1
-0
BranchCompanyController.java
...m/xxfc/platform/vehicle/rest/BranchCompanyController.java
+8
-4
BranchCompanyMapper.xml
...-server/src/main/resources/mapper/BranchCompanyMapper.xml
+29
-0
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/CompanySearchOldDTO.java
0 → 100644
View file @
07233313
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
;
import
lombok.Data
;
@Data
public
class
CompanySearchOldDTO
{
Integer
page
;
Integer
limit
;
Integer
addrCity
;
String
lon
;
String
lat
;
Integer
state
;
Integer
isShow
=
1
;
Integer
isDel
=
0
;
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
View file @
07233313
...
@@ -24,10 +24,7 @@ import com.xxfc.platform.vehicle.entity.BranchCompany;
...
@@ -24,10 +24,7 @@ import com.xxfc.platform.vehicle.entity.BranchCompany;
import
com.xxfc.platform.vehicle.entity.BranchCompanyStockInfo
;
import
com.xxfc.platform.vehicle.entity.BranchCompanyStockInfo
;
import
com.xxfc.platform.vehicle.entity.SysRegion
;
import
com.xxfc.platform.vehicle.entity.SysRegion
;
import
com.xxfc.platform.vehicle.mapper.BranchCompanyMapper
;
import
com.xxfc.platform.vehicle.mapper.BranchCompanyMapper
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyVo
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.CompanyDetail
;
import
com.xxfc.platform.vehicle.pojo.CompanySearchDTO
;
import
com.xxfc.platform.vehicle.pojo.CompanySearchVO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyAreaDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyAreaDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyFindDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyFindDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyListDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyListDTO
;
...
@@ -225,6 +222,12 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
...
@@ -225,6 +222,12 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
return
PageDataVO
.
pageInfo
(
branchCompanyPageInfo
);
return
PageDataVO
.
pageInfo
(
branchCompanyPageInfo
);
}
}
public
PageDataVO
<
BranchCompany
>
searchOld
(
CompanySearchOldDTO
vo
)
{
PageHelper
.
startPage
(
vo
.
getPage
(),
vo
.
getLimit
());
PageInfo
<
BranchCompany
>
branchCompanyPageInfo
=
new
PageInfo
<>(
mapper
.
searchOld
(
vo
.
getLon
(),
vo
.
getLat
(),
vo
.
getAddrCity
(),
vo
.
getState
(),
vo
.
getIsShow
(),
vo
.
getIsDel
()));
return
PageDataVO
.
pageInfo
(
branchCompanyPageInfo
);
}
public
PageDataVO
<
CompanySearchVO
>
search
(
CompanySearchDTO
vo
)
{
public
PageDataVO
<
CompanySearchVO
>
search
(
CompanySearchDTO
vo
)
{
PageHelper
.
startPage
(
vo
.
getPage
(),
vo
.
getLimit
());
PageHelper
.
startPage
(
vo
.
getPage
(),
vo
.
getLimit
());
PageInfo
<
CompanySearchVO
>
branchCompanyPageInfo
=
new
PageInfo
<>(
getList
(
vo
));
PageInfo
<
CompanySearchVO
>
branchCompanyPageInfo
=
new
PageInfo
<>(
getList
(
vo
));
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/BranchCompanyMapper.java
View file @
07233313
...
@@ -15,6 +15,7 @@ import java.util.List;
...
@@ -15,6 +15,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
public
interface
BranchCompanyMapper
extends
Mapper
<
BranchCompany
>,
SelectByIdListMapper
<
BranchCompany
,
Integer
>
{
public
interface
BranchCompanyMapper
extends
Mapper
<
BranchCompany
>,
SelectByIdListMapper
<
BranchCompany
,
Integer
>
{
List
<
BranchCompany
>
searchOld
(
@Param
(
"lon"
)
String
lon
,
@Param
(
"lat"
)
String
lat
,
@Param
(
"addrCity"
)
Integer
addrCity
,
Integer
state
,
Integer
isShow
,
Integer
isDel
);
List
<
CompanySearchVO
>
search
(
CompanySearchDTO
companySearchDTO
);
List
<
CompanySearchVO
>
search
(
CompanySearchDTO
companySearchDTO
);
List
<
BranchCompany
>
selectByZoneId
(
Map
<
String
,
Object
>
param
);
List
<
BranchCompany
>
selectByZoneId
(
Map
<
String
,
Object
>
param
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/BranchCompanyController.java
View file @
07233313
...
@@ -16,10 +16,7 @@ import com.xxfc.platform.vehicle.common.RestResponse;
...
@@ -16,10 +16,7 @@ import com.xxfc.platform.vehicle.common.RestResponse;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.entity.Area
;
import
com.xxfc.platform.vehicle.entity.Area
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyVo
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.CompanyDetail
;
import
com.xxfc.platform.vehicle.pojo.CompanySearchDTO
;
import
com.xxfc.platform.vehicle.pojo.CompanySearchVO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyAreaDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyAreaDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyFindDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyFindDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.BranComanyLeaderVo
;
import
com.xxfc.platform.vehicle.pojo.vo.BranComanyLeaderVo
;
...
@@ -248,4 +245,11 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
...
@@ -248,4 +245,11 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
return
ObjectRestResponse
.
succ
(
baseBiz
.
getList
(
vo
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
getList
(
vo
));
}
}
@RequestMapping
(
value
=
"/search"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
@IgnoreClientToken
public
RestResponse
<
PageDataVO
<
BranchCompany
>>
search
(
@Validated
CompanySearchOldDTO
vo
)
{
return
RestResponse
.
data
(
baseBiz
.
searchOld
(
vo
));
}
}
}
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/BranchCompanyMapper.xml
View file @
07233313
...
@@ -24,6 +24,35 @@
...
@@ -24,6 +24,35 @@
<result
column=
"state"
property=
"state"
/>
<result
column=
"state"
property=
"state"
/>
</resultMap>
</resultMap>
<select
id=
"searchOld"
resultType=
"com.xxfc.platform.vehicle.pojo.CompanySearchVO"
>
select *
<if
test=
"lon != null and lat != null"
>
, st_distance_sphere(point(#{lon}, #{lat}), point(longitude, latitude)) as distance
</if>
from branch_company
<where>
<if
test=
"addrCity != null"
>
and (addr_city = #{addrCity} or addr_province = #{addrCity} or addr_town = #{addrCity})
</if>
<if
test=
"lon != null and lat != null"
>
and longitude is not null and latitude is not null
</if>
<if
test=
"state != null"
>
and state = #{state}
</if>
<if
test=
"isShow != null"
>
and is_show = #{isShow}
</if>
<if
test=
"isDel != null"
>
and is_del = #{isDel}
</if>
</where>
<if
test=
"lon != null and lat != null"
>
order by distance asc
</if>
</select>
<select
id=
"search"
parameterType=
"com.xxfc.platform.vehicle.pojo.CompanySearchDTO"
resultType=
"com.xxfc.platform.vehicle.pojo.CompanySearchVO"
>
<select
id=
"search"
parameterType=
"com.xxfc.platform.vehicle.pojo.CompanySearchDTO"
resultType=
"com.xxfc.platform.vehicle.pojo.CompanySearchVO"
>
select c.*,i.name as companyName
select c.*,i.name as companyName
<if
test=
"lon != null and lat != null"
>
<if
test=
"lon != null and lat != null"
>
...
...
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