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
7efbd46d
Commit
7efbd46d
authored
Oct 10, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-im' into dev
parents
9f07ac1a
e0206f4e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
42 deletions
+52
-42
CustomerServiceBiz.java
...ain/java/com/xxfc/platform/im/biz/CustomerServiceBiz.java
+42
-41
OrderRentVehicleController.java
.../xxfc/platform/order/rest/OrderRentVehicleController.java
+2
-1
BaseOrderMapper.xml
...rder-server/src/main/resources/mapper/BaseOrderMapper.xml
+3
-0
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+5
-0
No files found.
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/biz/CustomerServiceBiz.java
View file @
7efbd46d
...
@@ -11,6 +11,7 @@ import com.xxfc.platform.im.entity.CustomerService;
...
@@ -11,6 +11,7 @@ import com.xxfc.platform.im.entity.CustomerService;
import
com.xxfc.platform.im.mapper.CustomerServiceMapper
;
import
com.xxfc.platform.im.mapper.CustomerServiceMapper
;
import
com.xxfc.platform.im.vo.CustomerServiceVO
;
import
com.xxfc.platform.im.vo.CustomerServiceVO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -54,14 +55,14 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
...
@@ -54,14 +55,14 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
CustomerService
customerService
=
new
CustomerService
();
CustomerService
customerService
=
new
CustomerService
();
BeanUtils
.
copyProperties
(
customerServiceDTO
,
customerService
);
BeanUtils
.
copyProperties
(
customerServiceDTO
,
customerService
);
if
(
Objects
.
isNull
(
customerServiceDTO
.
getId
()))
{
if
(
Objects
.
isNull
(
customerServiceDTO
.
getId
()))
{
customerService
.
setCreateTime
(
Instant
.
now
().
toEpochMilli
());
customerService
.
setCreateTime
(
Instant
.
now
().
toEpochMilli
());
customerService
.
setName
(
String
.
format
(
"%s%s"
,
NICK_PRE_NAME
,
customerServiceDTO
.
getTelphone
()));
customerService
.
setName
(
String
.
format
(
"%s%s"
,
NICK_PRE_NAME
,
customerServiceDTO
.
getTelphone
()));
customerService
.
setIsDel
(
false
);
customerService
.
setIsDel
(
false
);
customerService
.
setPassword
(
INIT_PASSWORD
);
customerService
.
setPassword
(
StringUtils
.
isEmpty
(
customerServiceDTO
.
getPassword
())
?
INIT_PASSWORD
:
customerServiceDTO
.
getPassword
().
trim
().
length
()
>
0
?
customerServiceDTO
.
getPassword
()
:
INIT_PASSWORD
);
Map
<
String
,
Object
>
imMap
=
new
HashMap
<>(
2
);
Map
<
String
,
Object
>
imMap
=
new
HashMap
<>(
2
);
imMap
.
put
(
"telephone"
,
customerServiceDTO
.
getTelphone
());
imMap
.
put
(
"telephone"
,
customerServiceDTO
.
getTelphone
());
imMap
.
put
(
"password"
,
INIT_PASSWORD
);
imMap
.
put
(
"password"
,
DigestUtils
.
md5Hex
(
customerService
.
getPassword
())
);
imMap
.
put
(
"nickname"
,
customerService
.
getName
());
imMap
.
put
(
"nickname"
,
customerService
.
getName
());
BaseResponse
imResponse
=
userBiz
.
register
(
imMap
);
BaseResponse
imResponse
=
userBiz
.
register
(
imMap
);
String
imResult
=
imResponse
.
getMessage
();
String
imResult
=
imResponse
.
getMessage
();
...
@@ -73,10 +74,10 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
...
@@ -73,10 +74,10 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
}
}
customerService
.
setImUserId
((
Integer
)
userId
);
customerService
.
setImUserId
((
Integer
)
userId
);
mapper
.
insertSelective
(
customerService
);
mapper
.
insertSelective
(
customerService
);
}
else
{
}
else
{
customerService
.
setUpdateTime
(
Instant
.
now
().
toEpochMilli
());
customerService
.
setUpdateTime
(
Instant
.
now
().
toEpochMilli
());
if
(!
StringUtils
.
isEmpty
(
customerServiceDTO
.
getPassword
()))
{
if
(!
StringUtils
.
isEmpty
(
customerServiceDTO
.
getPassword
()))
{
userBiz
.
updatePasswordByPhone
(
customerServiceDTO
.
getTelphone
(),
customerServiceDTO
.
getPassword
());
userBiz
.
updatePasswordByPhone
(
customerServiceDTO
.
getTelphone
(),
customerServiceDTO
.
getPassword
());
}
}
mapper
.
updateByPrimaryKeySelective
(
customerService
);
mapper
.
updateByPrimaryKeySelective
(
customerService
);
}
}
...
@@ -121,12 +122,12 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
...
@@ -121,12 +122,12 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
public
void
updatePasswordByPhone
(
String
telphone
,
String
password
)
{
public
void
updatePasswordByPhone
(
String
telphone
,
String
password
)
{
Example
example
=
new
Example
(
CustomerService
.
class
);
Example
example
=
new
Example
(
CustomerService
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"telphone"
,
telphone
);
criteria
.
andEqualTo
(
"telphone"
,
telphone
);
CustomerService
customerService
=
new
CustomerService
();
CustomerService
customerService
=
new
CustomerService
();
customerService
.
setPassword
(
password
);
customerService
.
setPassword
(
DigestUtils
.
md5Hex
(
password
)
);
customerService
.
setUpdateTime
(
Instant
.
now
().
toEpochMilli
());
customerService
.
setUpdateTime
(
Instant
.
now
().
toEpochMilli
());
mapper
.
updateByExampleSelective
(
customerService
,
example
);
mapper
.
updateByExampleSelective
(
customerService
,
example
);
}
}
public
PageDataVO
<
CustomerServiceVO
>
findCustomerServiceWithPage
(
Integer
page
,
Integer
limit
)
{
public
PageDataVO
<
CustomerServiceVO
>
findCustomerServiceWithPage
(
Integer
page
,
Integer
limit
)
{
...
@@ -134,11 +135,11 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
...
@@ -134,11 +135,11 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
Example
example
=
new
Example
(
CustomerService
.
class
);
Example
example
=
new
Example
(
CustomerService
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"isDel"
,
false
);
criteria
.
andEqualTo
(
"isDel"
,
false
);
PageDataVO
<
CustomerService
>
pageDataVO
=
PageDataVO
.
pageInfo
(
page
,
limit
,()->
mapper
.
selectByExample
(
example
));
PageDataVO
<
CustomerService
>
pageDataVO
=
PageDataVO
.
pageInfo
(
page
,
limit
,
()
->
mapper
.
selectByExample
(
example
));
List
<
CustomerService
>
data
=
pageDataVO
.
getData
();
List
<
CustomerService
>
data
=
pageDataVO
.
getData
();
if
(
CollectionUtils
.
isEmpty
(
data
)){
if
(
CollectionUtils
.
isEmpty
(
data
))
{
return
dataVO
;
return
dataVO
;
}
}
...
@@ -146,7 +147,7 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
...
@@ -146,7 +147,7 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
CustomerServiceVO
customerServiceVO
;
CustomerServiceVO
customerServiceVO
;
for
(
CustomerService
customerService
:
data
)
{
for
(
CustomerService
customerService
:
data
)
{
customerServiceVO
=
new
CustomerServiceVO
();
customerServiceVO
=
new
CustomerServiceVO
();
BeanUtils
.
copyProperties
(
customerService
,
customerServiceVO
);
BeanUtils
.
copyProperties
(
customerService
,
customerServiceVO
);
customerServiceVOS
.
add
(
customerServiceVO
);
customerServiceVOS
.
add
(
customerServiceVO
);
}
}
...
@@ -161,7 +162,7 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
...
@@ -161,7 +162,7 @@ public class CustomerServiceBiz extends BaseBiz<CustomerServiceMapper, CustomerS
public
CustomerServiceDTO
findCustomerServiceById
(
Long
id
)
{
public
CustomerServiceDTO
findCustomerServiceById
(
Long
id
)
{
CustomerServiceDTO
customerServiceDTO
=
new
CustomerServiceDTO
();
CustomerServiceDTO
customerServiceDTO
=
new
CustomerServiceDTO
();
CustomerService
customerService
=
mapper
.
selectByPrimaryKey
(
id
);
CustomerService
customerService
=
mapper
.
selectByPrimaryKey
(
id
);
BeanUtils
.
copyProperties
(
customerService
,
customerServiceDTO
);
BeanUtils
.
copyProperties
(
customerService
,
customerServiceDTO
);
return
customerServiceDTO
;
return
customerServiceDTO
;
}
}
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/OrderRentVehicleController.java
View file @
7efbd46d
...
@@ -74,7 +74,8 @@ public class OrderRentVehicleController extends CommonBaseController {
...
@@ -74,7 +74,8 @@ public class OrderRentVehicleController extends CommonBaseController {
bo
.
setAppUserDTO
(
userFeign
.
userDetailById
(
dto
.
getAppUserId
()).
getData
());
bo
.
setAppUserDTO
(
userFeign
.
userDetailById
(
dto
.
getAppUserId
()).
getData
());
bo
.
setCrtUser
(
"-1"
+
BaseContextHandler
.
getUserID
());
bo
.
setCrtUser
(
"-1"
+
BaseContextHandler
.
getUserID
());
bo
.
setUseType
(
null
);
//设置-1表示查询所有的车
bo
.
setUseType
(-
1
);
orderRentVehicleService
.
createOrder
(
bo
);
orderRentVehicleService
.
createOrder
(
bo
);
return
ObjectRestResponse
.
succ
(
bo
.
getOrder
());
return
ObjectRestResponse
.
succ
(
bo
.
getOrder
());
}
}
...
...
xx-order/xx-order-server/src/main/resources/mapper/BaseOrderMapper.xml
View file @
7efbd46d
...
@@ -130,6 +130,9 @@
...
@@ -130,6 +130,9 @@
</foreach>
</foreach>
</if>
</if>
<if
test=
"userId != null"
>
and b.user_id = #{userId}
</if>
<if
test=
"status != null"
>
<if
test=
"status != null"
>
and b.status = #{status}
and b.status = #{status}
</if>
</if>
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
7efbd46d
...
@@ -1249,6 +1249,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -1249,6 +1249,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
}
}
public
PageDataVO
<
Vehicle
>
searchUsableVehicle
(
RentVehicleBookDTO
dto
)
{
public
PageDataVO
<
Vehicle
>
searchUsableVehicle
(
RentVehicleBookDTO
dto
)
{
//设置-1表示查询所有的车 由于null json序列化不会赋值过来
if
(-
1
==
dto
.
getUseType
())
{
dto
.
setUseType
(
null
);
}
Map
<
String
,
Object
>
params
=
BeanUtil
.
beanToMap
(
dto
);
Map
<
String
,
Object
>
params
=
BeanUtil
.
beanToMap
(
dto
);
List
<
String
>
notBookedDates
=
Lists
.
newArrayList
();
List
<
String
>
notBookedDates
=
Lists
.
newArrayList
();
if
(
StringUtils
.
isNotBlank
(
dto
.
getBookEndDate
())
&&
if
(
StringUtils
.
isNotBlank
(
dto
.
getBookEndDate
())
&&
...
...
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