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
94c63906
Commit
94c63906
authored
Sep 12, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
bfcd9246
0b4efbef
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
229 deletions
+109
-229
BaseOrder.java
...c/main/java/com/xxfc/platform/order/entity/BaseOrder.java
+27
-27
OrderRentVehicleDetail.java
...om/xxfc/platform/order/entity/OrderRentVehicleDetail.java
+6
-6
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+46
-145
OrderCancelBiz.java
...ava/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
+16
-42
ArticleBiz.java
.../src/main/java/com/xxfc/platform/uccn/biz/ArticleBiz.java
+3
-3
JPushBiz.java
...c/main/java/com/xxfc/platform/universal/biz/JPushBiz.java
+3
-1
JPushController.java
...m/xxfc/platform/universal/controller/JPushController.java
+7
-4
SmsService.java
.../java/com/xxfc/platform/universal/service/SmsService.java
+1
-1
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/BaseOrder.java
View file @
94c63906
...
@@ -252,31 +252,31 @@ public class BaseOrder implements Serializable {
...
@@ -252,31 +252,31 @@ public class BaseOrder implements Serializable {
@Column
(
name
=
"member_level"
)
@Column
(
name
=
"member_level"
)
private
Integer
memberLevel
;
private
Integer
memberLevel
;
/**
//
/**
* 违约金
//
* 违约金
*/
//
*/
@ApiModelProperty
(
value
=
"违约金"
)
//
@ApiModelProperty(value = "违约金")
@Column
(
name
=
"violate_amount"
)
//
@Column(name = "violate_amount")
BigDecimal
ViolateAmount
;
//
BigDecimal ViolateAmount;
//
/**
//
/**
* 赔偿金
//
* 赔偿金
*/
//
*/
@ApiModelProperty
(
value
=
"赔偿金"
)
//
@ApiModelProperty(value = "赔偿金")
@Column
(
name
=
"damages_amount"
)
//
@Column(name = "damages_amount")
BigDecimal
damagesAmount
;
//
BigDecimal damagesAmount;
//
/**
//
/**
* 额外费用
//
* 额外费用
*/
//
*/
@ApiModelProperty
(
value
=
"额外费用"
)
//
@ApiModelProperty(value = "额外费用")
@Column
(
name
=
"extra_amount"
)
//
@Column(name = "extra_amount")
BigDecimal
extraAmount
;
//
BigDecimal extraAmount;
//
/**
//
/**
* 返还的优惠券
//
* 返还的优惠券
*/
//
*/
@ApiModelProperty
(
value
=
"返回的优惠券"
)
//
@ApiModelProperty(value = "返回的优惠券")
@Column
(
name
=
"back_coupon"
)
//
@Column(name = "back_coupon")
String
backCoupon
;
//
String backCoupon;
}
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/OrderRentVehicleDetail.java
View file @
94c63906
...
@@ -308,11 +308,11 @@ public class OrderRentVehicleDetail implements Serializable {
...
@@ -308,11 +308,11 @@ public class OrderRentVehicleDetail implements Serializable {
@Column
(
name
=
"fixed_loss_status"
)
@Column
(
name
=
"fixed_loss_status"
)
private
Integer
fixedLossStatus
;
private
Integer
fixedLossStatus
;
/**
//
/**
* 返还的免费天数
//
* 返还的免费天数
*/
//
*/
@ApiModelProperty
(
value
=
"返回的免费天数"
)
//
@ApiModelProperty(value = "返回的免费天数")
@Column
(
name
=
"back_free_days"
)
//
@Column(name = "back_free_days")
Integer
backFreeDays
;
//
Integer backFreeDays;
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
94c63906
This diff is collapsed.
Click to expand it.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
View file @
94c63906
...
@@ -4,19 +4,15 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign;
...
@@ -4,19 +4,15 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.activity.entity.Coupon
;
import
com.xxfc.platform.activity.feign.ActivityFeign
;
import
com.xxfc.platform.order.biz.*
;
import
com.xxfc.platform.order.biz.*
;
import
com.xxfc.platform.order.contant.enumerate.*
;
import
com.xxfc.platform.order.contant.enumerate.*
;
import
com.xxfc.platform.order.entity.*
;
import
com.xxfc.platform.order.entity.*
;
import
com.xxfc.platform.order.pojo.calculate.InProgressVO
;
import
com.xxfc.platform.order.pojo.mq.OrderMQDTO
;
import
com.xxfc.platform.order.pojo.mq.OrderMQDTO
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.assertj.core.util.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -59,9 +55,6 @@ public class OrderCancelBiz {
...
@@ -59,9 +55,6 @@ public class OrderCancelBiz {
@Autowired
@Autowired
OrderMsgBiz
orderMsgBiz
;
OrderMsgBiz
orderMsgBiz
;
@Autowired
OrderCalculateBiz
orderCalculateBiz
;
@Autowired
@Autowired
UserFeign
userFeign
;
UserFeign
userFeign
;
...
@@ -74,9 +67,6 @@ public class OrderCancelBiz {
...
@@ -74,9 +67,6 @@ public class OrderCancelBiz {
@Autowired
@Autowired
ThirdFeign
thirdFeign
;
ThirdFeign
thirdFeign
;
@Autowired
ActivityFeign
activityFeign
;
private
static
Map
<
Integer
,
List
<
Integer
>>
cancelAble
;
private
static
Map
<
Integer
,
List
<
Integer
>>
cancelAble
;
static
{
static
{
cancelAble
=
new
HashMap
<
Integer
,
List
<
Integer
>>();
cancelAble
=
new
HashMap
<
Integer
,
List
<
Integer
>>();
...
@@ -120,47 +110,34 @@ public class OrderCancelBiz {
...
@@ -120,47 +110,34 @@ public class OrderCancelBiz {
setOrderId
(
baseOrder
.
getId
());
setOrderId
(
baseOrder
.
getId
());
}});
}});
OrderItem
orderItem
=
orderItemBiz
.
selectOne
(
new
OrderItem
(){{
setType
(
ItemTypeEnum
.
VEHICLE_MODEL
.
getCode
());
setOrderId
(
baseOrder
.
getId
());
}});
//原退还押金
//原退还押金
Integer
freeDays
=
(
null
==
orderItem
.
getCutNum
())?
0
:
orderItem
.
getCutNum
();
BigDecimal
freeDayAmount
=
BigDecimal
.
ZERO
;
BigDecimal
freeDayAmount
=
BigDecimal
.
ZERO
;
//判断是否使用免费天数,并且进行扣款
if
(
null
!=
orvd
.
getFreeDays
()
&&
orvd
.
getFreeDays
()
>
0
)
{
OrderItem
orderItem
=
orderItemBiz
.
selectOne
(
new
OrderItem
(){{
setType
(
ItemTypeEnum
.
VEHICLE_MODEL
.
getCode
());
setOrderId
(
baseOrder
.
getId
());
}});
freeDayAmount
=
orderItem
.
getUnitPrice
().
multiply
(
new
BigDecimal
(
orvd
.
getFreeDays
()+
""
));
}
//如果超过出发时间,不能取消订单
//如果超过出发时间,不能取消订单
//根据时间处理goodsAmount
//根据时间处理goodsAmount
//获取出发时间 到现在 距离时间
//获取出发时间 到现在 距离时间
Long
timeLag
=
orvd
.
getStartTime
()
-
System
.
currentTimeMillis
();
Long
timeLag
=
orvd
.
getStartTime
()
-
System
.
currentTimeMillis
();
if
(
timeLag
<
0
)
{
//后面允许开始时间过后可以取消订单
//计算:使用天数 当前时间 - 开始时间的0时0分0秒
// if(timeLag < 0) {
Long
useTimeLag
=
System
.
currentTimeMillis
()
-
orvd
.
getStartTime
();
// throw new BaseException(ResultCode.FAILED_CODE, new HashSet<String>(){{
Integer
useDays
=
new
BigDecimal
(
useTimeLag
+
""
).
divide
(
new
BigDecimal
((
24
*
60
*
60
*
1000
)+
""
)).
setScale
(
0
,
BigDecimal
.
ROUND_UP
).
intValue
();
// add("已超过出发时间,不能取消订单");
orderCalculateBiz
.
inProgressCalculate
(
baseOrder
,
orderItem
,
freeDays
,
useDays
);
// }});
// }
}
else
{
//没到出车时间
//判断是否使用免费天数,并且进行扣款
if
(
freeDays
>
0
)
{
freeDayAmount
=
orderItem
.
getUnitPrice
().
multiply
(
new
BigDecimal
(
orvd
.
getFreeDays
()+
""
));
//违约金封顶 租车身份价 * 2天
BigDecimal
topAmount
=
orderItem
.
getUnitPrice
().
multiply
(
new
BigDecimal
(
"2"
));
if
(
freeDayAmount
.
compareTo
(
topAmount
)
>
0
)
{
freeDayAmount
=
freeDayAmount
;
}
}
}
//退款流程
//退款流程
//退订单款
//退订单款
orderRefundBiz
.
rentRefundProcess
(
hasUpdateOrder
,
timeLag
,
APP_ORDER
+
"_"
+
RENT_REFUND
);
orderRefundBiz
.
rentRefundProcess
(
hasUpdateOrder
,
timeLag
,
APP_ORDER
+
"_"
+
RENT_REFUND
);
//退押金
//退押金
orderRefundBiz
.
rentRefundDepositProcess
(
hasUpdateOrder
,
orvd
.
getDeposit
(),
timeLag
,
APP_ORDER
+
"_"
+
RENT_REFUND
,
freeDayAmount
);
orderRefundBiz
.
rentRefundDepositProcess
(
hasUpdateOrder
,
orvd
.
getDeposit
(),
timeLag
,
APP_ORDER
+
"_"
+
RENT_REFUND
,
freeDayAmount
);
//已付款的取消订单发送消息
//已付款的取消订单发送消息
...
@@ -186,9 +163,6 @@ public class OrderCancelBiz {
...
@@ -186,9 +163,6 @@ public class OrderCancelBiz {
}
}
//退款流程
//退款流程
orderRefundBiz
.
rentRefundProcess
(
hasUpdateOrder
,
timeLag
,
APP_ORDER
+
"_"
+
key
);
orderRefundBiz
.
rentRefundProcess
(
hasUpdateOrder
,
timeLag
,
APP_ORDER
+
"_"
+
key
);
//站点总人数减少
tourFeign
.
updateTourGoodPersonNum
(
otd
.
getVerificationId
(),
TourFeign
.
TOTAL_PERSON
,
(
otd
.
getTotalNumber
()
*
-
1
));
}
}
}
}
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/biz/ArticleBiz.java
View file @
94c63906
...
@@ -171,9 +171,9 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
...
@@ -171,9 +171,9 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
updateSelectiveByIdRe
(
Article
article
){
public
int
updateSelectiveByIdRe
(
Article
article
){
article
.
setUpdTime
(
new
Date
());
article
.
setUpdTime
(
new
Date
());
if
(
article
.
getTagTitle
()==
null
||
article
.
getKeywords
()==
null
||
article
.
getDescription
()==
null
)
{
//
if (article.getTagTitle()==null||article.getKeywords()==null||article.getDescription()==null) {
throw
new
BaseException
(
"必须设置seo"
);
//
throw new BaseException("必须设置seo");
}
//
}
return
mapper
.
updateByPrimaryKeySelective
(
article
);
return
mapper
.
updateByPrimaryKeySelective
(
article
);
}
}
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/JPushBiz.java
View file @
94c63906
...
@@ -216,7 +216,9 @@ public class JPushBiz extends BaseBiz<MessagePushMapper, MessagePush> {
...
@@ -216,7 +216,9 @@ public class JPushBiz extends BaseBiz<MessagePushMapper, MessagePush> {
}
}
//删除推送内容
//删除推送内容
public
ObjectRestResponse
delMessagePush
(
MessagePush
messagePush
){
public
ObjectRestResponse
delMessagePush
(
Integer
id
){
MessagePush
messagePush
=
new
MessagePush
();
messagePush
.
setId
(
id
);
messagePush
.
setIsDel
(
1
);
messagePush
.
setIsDel
(
1
);
updateSelectiveById
(
messagePush
);
updateSelectiveById
(
messagePush
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/JPushController.java
View file @
94c63906
...
@@ -51,9 +51,9 @@ public class JPushController {
...
@@ -51,9 +51,9 @@ public class JPushController {
}
}
@RequestMapping
(
value
=
"/del
"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/del
/{id}"
,
method
=
RequestMethod
.
DELETE
)
public
ObjectRestResponse
delMessagePush
(
@
RequestBody
MessagePush
messagePush
){
public
ObjectRestResponse
delMessagePush
(
@
PathVariable
Integer
id
){
return
jPushBiz
.
delMessagePush
(
messagePush
);
return
jPushBiz
.
delMessagePush
(
id
);
}
}
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
public
ObjectRestResponse
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
...
@@ -63,7 +63,10 @@ public class JPushController {
...
@@ -63,7 +63,10 @@ public class JPushController {
return
jPushBiz
.
getList
(
page
,
limit
,
title
,
type
);
return
jPushBiz
.
getList
(
page
,
limit
,
title
,
type
);
}
}
@RequestMapping
(
value
=
"/getOne/{id}"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
getOne
(
@PathVariable
Integer
id
){
return
ObjectRestResponse
.
succ
(
jPushBiz
.
selectById
(
id
));
}
}
}
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/SmsService.java
View file @
94c63906
...
@@ -248,7 +248,7 @@ public class SmsService {
...
@@ -248,7 +248,7 @@ public class SmsService {
}
}
if
(
i
>
3
){
if
(
i
>
2
){
jsonParams
.
put
(
param
+(
i
+
2
),
para
);
jsonParams
.
put
(
param
+(
i
+
2
),
para
);
}
else
{
}
else
{
jsonParams
.
put
(
param
+(
i
+
1
),
para
);
jsonParams
.
put
(
param
+(
i
+
1
),
para
);
...
...
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