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
6054aafa
Commit
6054aafa
authored
Jul 16, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev
parents
034ed65a
606ae041
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
3 deletions
+47
-3
OrderRentVehicleService.java
.../xxfc/platform/order/service/OrderRentVehicleService.java
+22
-0
VehicleFeign.java
...in/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
+4
-1
BaseController.java
...java/com/xxfc/platform/vehicle/common/BaseController.java
+6
-1
BranchCompanyController.java
...m/xxfc/platform/vehicle/rest/BranchCompanyController.java
+8
-0
ListTest.java
...ver/src/test/java/com/xxfc/platform/vehicle/ListTest.java
+7
-1
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderRentVehicleService.java
View file @
6054aafa
...
@@ -22,9 +22,11 @@ import com.xxfc.platform.order.pojo.order.RentVehicleBO;
...
@@ -22,9 +22,11 @@ import com.xxfc.platform.order.pojo.order.RentVehicleBO;
import
com.xxfc.platform.order.pojo.price.RentVehiclePriceVO
;
import
com.xxfc.platform.order.pojo.price.RentVehiclePriceVO
;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.entity.VehicleBookRecord
;
import
com.xxfc.platform.vehicle.entity.VehicleBookRecord
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
com.xxfc.platform.vehicle.pojo.CompanyDetail
;
import
com.xxfc.platform.vehicle.pojo.RentVehicleBookDTO
;
import
com.xxfc.platform.vehicle.pojo.RentVehicleBookDTO
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -35,8 +37,10 @@ import javax.annotation.PostConstruct;
...
@@ -35,8 +37,10 @@ import javax.annotation.PostConstruct;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.List
;
import
static
com
.
github
.
wxiaoqi
.
security
.
admin
.
constant
.
enumerate
.
MemberEnum
.*;
import
static
com
.
github
.
wxiaoqi
.
security
.
admin
.
constant
.
enumerate
.
MemberEnum
.*;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_FALSE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
import
static
com
.
xxfc
.
platform
.
universal
.
constant
.
DictionaryKey
.
APP_ORDER
;
import
static
com
.
xxfc
.
platform
.
universal
.
constant
.
DictionaryKey
.
APP_ORDER
;
...
@@ -84,6 +88,24 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -84,6 +88,24 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
initDictionary
();
initDictionary
();
VehicleModel
vehicleModel
=
vehicleFeign
.
get
(
bo
.
getModelId
()).
getData
();
VehicleModel
vehicleModel
=
vehicleFeign
.
get
(
bo
.
getModelId
()).
getData
();
bo
.
setVehicleModel
(
vehicleModel
);
bo
.
setVehicleModel
(
vehicleModel
);
//根据还车城市设置还车公司id
if
(
SYS_FALSE
.
equals
(
bo
.
getEndCompanyId
()))
{
if
(
null
!=
bo
.
getEndCity
()
&&
null
!=
bo
.
getStartCity
())
{
if
(
bo
.
getEndCity
().
equals
(
bo
.
getStartCity
()))
{
bo
.
setEndCompanyId
(
bo
.
getStartCompanyId
());
}
else
{
//查询结束城市分公司
List
<
BranchCompany
>
companyDetails
=
vehicleFeign
.
branchCompanyEntityList
(
BeanUtil
.
beanToMap
(
new
BranchCompany
(){{
setAddrCity
(
bo
.
getEndCity
());
}},
false
,
true
)).
getData
();
if
(
null
!=
companyDetails
&&
companyDetails
.
size
()
>
0
)
{
bo
.
setEndCompanyId
(
companyDetails
.
get
(
0
).
getId
());
}
}
}
}
}
}
public
void
initDictionary
()
{
public
void
initDictionary
()
{
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
View file @
6054aafa
...
@@ -10,6 +10,7 @@ import org.springframework.cloud.openfeign.FeignClient;
...
@@ -10,6 +10,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* Created by ace on 2017/9/15.
* Created by ace on 2017/9/15.
...
@@ -55,9 +56,11 @@ public interface VehicleFeign {
...
@@ -55,9 +56,11 @@ public interface VehicleFeign {
public
List
<
BranchCompany
>
companyAll
(
public
List
<
BranchCompany
>
companyAll
(
@RequestParam
(
value
=
"dataAll"
)
Integer
dataAll
,
@RequestParam
(
value
=
"dataAll"
)
Integer
dataAll
,
@RequestParam
(
value
=
"dataCompany"
)
String
dataCompany
,
@RequestParam
(
value
=
"dataCompany"
)
String
dataCompany
,
@RequestParam
(
value
=
"dataZone"
)
String
dataZone
);
@RequestParam
(
value
=
"dataZone"
)
String
dataZone
);
@GetMapping
(
"/branchCompany/entityList"
)
public
ObjectRestResponse
<
List
<
BranchCompany
>>
branchCompanyEntityList
(
@RequestParam
(
"entity"
)
Map
<
String
,
Object
>
entity
);
@RequestMapping
(
value
=
"/user/license/one"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/user/license/one"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
VehicleUserLicense
>
one
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
public
RestResponse
<
VehicleUserLicense
>
one
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/common/BaseController.java
View file @
6054aafa
package
com
.
xxfc
.
platform
.
vehicle
.
common
;
package
com
.
xxfc
.
platform
.
vehicle
.
common
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
@Slf4j
@Slf4j
public
class
BaseController
<
Biz
extends
BaseBiz
>
{
public
class
BaseController
<
Biz
extends
BaseBiz
>
{
...
@@ -12,5 +18,4 @@ public class BaseController<Biz extends BaseBiz> {
...
@@ -12,5 +18,4 @@ public class BaseController<Biz extends BaseBiz> {
protected
HttpServletRequest
request
;
protected
HttpServletRequest
request
;
@Autowired
@Autowired
protected
Biz
baseBiz
;
protected
Biz
baseBiz
;
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/BranchCompanyController.java
View file @
6054aafa
...
@@ -151,4 +151,12 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
...
@@ -151,4 +151,12 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
}
}
return
baseBiz
.
getListByUser
(
userDTO
);
return
baseBiz
.
getListByUser
(
userDTO
);
}
}
@ApiOperation
(
"根据参数查询,等于"
)
@RequestMapping
(
value
=
"/entityList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ObjectRestResponse
<
List
<
BranchCompany
>>
entityList
(
BranchCompany
entity
){
//查询列表数据
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectList
(
entity
));
}
}
}
xx-vehicle/xx-vehicle-server/src/test/java/com/xxfc/platform/vehicle/ListTest.java
View file @
6054aafa
...
@@ -3,13 +3,19 @@ package com.xxfc.platform.vehicle;
...
@@ -3,13 +3,19 @@ package com.xxfc.platform.vehicle;
import
org.junit.Test
;
import
org.junit.Test
;
import
java.lang.reflect.Array
;
import
java.lang.reflect.Array
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
public
class
ListTest
{
public
class
ListTest
{
@Test
//
@Test
public
void
ListTest
(){
public
void
ListTest
(){
List
<
Object
>
objects
=
Arrays
.
asList
();
List
<
Object
>
objects
=
Arrays
.
asList
();
System
.
out
.
println
(
"objects.size()"
+
objects
.
get
(
0
));
System
.
out
.
println
(
"objects.size()"
+
objects
.
get
(
0
));
}
}
public
static
void
main
(
String
[]
args
)
{
List
<
Object
>
objects
=
new
ArrayList
<
Object
>();
System
.
out
.
println
(
"objects.size()"
+
objects
.
get
(
0
));
}
}
}
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