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
8d244a69
Commit
8d244a69
authored
Oct 31, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-chw' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev-chw
parents
aa516126
6ef20d08
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
118 additions
and
7 deletions
+118
-7
BaseOrder.java
...c/main/java/com/xxfc/platform/order/entity/BaseOrder.java
+6
-0
ShuntApply.java
.../main/java/com/xxfc/platform/order/entity/ShuntApply.java
+4
-0
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+17
-0
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+2
-5
OrderCancelBiz.java
...ava/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
+21
-0
BackStageOrderController.java
...om/xxfc/platform/order/rest/BackStageOrderController.java
+1
-1
ShuntApplyController.java
...va/com/xxfc/platform/order/rest/ShuntApplyController.java
+67
-1
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/BaseOrder.java
View file @
8d244a69
...
@@ -349,4 +349,10 @@ public class BaseOrder implements Serializable {
...
@@ -349,4 +349,10 @@ public class BaseOrder implements Serializable {
@Column
(
name
=
"goods_type"
)
@Column
(
name
=
"goods_type"
)
private
Integer
goodsType
;
private
Integer
goodsType
;
@Column
(
name
=
"user_phone"
)
private
String
userPhone
;
@Column
(
name
=
"realname"
)
private
String
realname
;
}
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/ShuntApply.java
View file @
8d244a69
...
@@ -59,6 +59,10 @@ public class ShuntApply implements Serializable {
...
@@ -59,6 +59,10 @@ public class ShuntApply implements Serializable {
@ApiModelProperty
(
value
=
"状态 1--待支付 2--已支付 3--已取消 "
)
@ApiModelProperty
(
value
=
"状态 1--待支付 2--已支付 3--已取消 "
)
private
Integer
orderStatus
;
private
Integer
orderStatus
;
public
void
setOrderStatus
(
Integer
orderStatus
)
{
this
.
orderStatus
=
orderStatus
;
}
/**
/**
* 创建时间
* 创建时间
*/
*/
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
8d244a69
...
@@ -147,6 +147,8 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
...
@@ -147,6 +147,8 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
@Autowired
@Autowired
CompanyInfoBiz
companyInfoBiz
;
CompanyInfoBiz
companyInfoBiz
;
@Autowired
ShuntApplyBiz
shuntApplyBiz
;
public
static
final
DateTimeFormatter
DEFAULT_DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd HH:mm:ss"
);
public
static
final
DateTimeFormatter
DEFAULT_DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd HH:mm:ss"
);
...
@@ -766,6 +768,8 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
...
@@ -766,6 +768,8 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
userFeign
.
memberDays
(
baseOrder
.
getUserId
(),
orvd
.
getFreeDays
(),
UserFeign
.
MEMBER_DAYS_CONFIRM
);
userFeign
.
memberDays
(
baseOrder
.
getUserId
(),
orvd
.
getFreeDays
(),
UserFeign
.
MEMBER_DAYS_CONFIRM
);
}
}
//
}
else
if
(
OrderTypeEnum
.
TOUR
.
getCode
().
equals
(
baseOrder
.
getType
()))
{
}
else
if
(
OrderTypeEnum
.
TOUR
.
getCode
().
equals
(
baseOrder
.
getType
()))
{
updateOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_TOSTART
.
getCode
());
updateOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_TOSTART
.
getCode
());
otd
=
orderTourDetailBiz
.
selectOne
(
new
OrderTourDetail
()
{{
otd
=
orderTourDetailBiz
.
selectOne
(
new
OrderTourDetail
()
{{
...
@@ -797,6 +801,19 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
...
@@ -797,6 +801,19 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
BeanUtil
.
copyProperties
(
this
.
updateSelectiveByIdReT
(
updateOrder
),
baseOrder
);
BeanUtil
.
copyProperties
(
this
.
updateSelectiveByIdReT
(
updateOrder
),
baseOrder
);
//记录订单账款记录
//记录订单账款记录
Integer
flag
=
orderAccountBiz
.
addOrderAccount
(
baseOrder
.
getId
(),
"订单支付"
,
oad
.
getOriginOrderAmount
().
add
(
oad
.
getOriginDepositAmount
()),
oad
.
getOrderAmount
().
add
(
oad
.
getDepositAmount
()),
tradeNo
,
AccountTypeEnum
.
IN_ORDER_PAY
.
getCode
(),
JSONUtil
.
toJsonStr
(
oad
));
Integer
flag
=
orderAccountBiz
.
addOrderAccount
(
baseOrder
.
getId
(),
"订单支付"
,
oad
.
getOriginOrderAmount
().
add
(
oad
.
getOriginDepositAmount
()),
oad
.
getOrderAmount
().
add
(
oad
.
getDepositAmount
()),
tradeNo
,
AccountTypeEnum
.
IN_ORDER_PAY
.
getCode
(),
JSONUtil
.
toJsonStr
(
oad
));
//更新 申请状态
ShuntApply
shuntApply
=
shuntApplyBiz
.
selectOne
(
new
ShuntApply
(){{
setOrderNo
(
baseOrder
.
getNo
());
}});
if
(
null
!=
shuntApply
&&
shuntApply
.
getStatus
()
==
ShuntApply
.
STATUS_ORDER
)
{
shuntApplyBiz
.
updateSelectiveById
(
new
ShuntApply
(){{
setId
(
shuntApply
.
getId
());
setStatus
(
ShuntApply
.
STATUS_SUCC
);
setOrderStatus
(
ShuntApply
.
ORDER_STATUS_PAY
);
}});
}
}
finally
{
}
finally
{
AppUserDTO
appUserDTO
=
userFeign
.
userDetailById
(
baseOrder
.
getUserId
()).
getData
();
AppUserDTO
appUserDTO
=
userFeign
.
userDetailById
(
baseOrder
.
getUserId
()).
getData
();
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
8d244a69
...
@@ -234,9 +234,6 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -234,9 +234,6 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
//获取app用户信息 根据用户名(手机号)定位后台商家用户
//获取app用户信息 根据用户名(手机号)定位后台商家用户
UserDTO
userDTO
=
getBusinessUserByAppUser
();
UserDTO
userDTO
=
getBusinessUserByAppUser
();
if
(
null
==
userDTO
&&
null
!=
getAppUser
())
{
userDTO
=
userFeign
.
businessUserinfoByMobilePhone
(
getAppUser
().
getUsername
()).
getData
();
}
if
(
userDTO
==
null
)
{
if
(
userDTO
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
RSTOKEN_EXPIRED_CODE
,
"token is null or invalid"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
RSTOKEN_EXPIRED_CODE
,
"token is null or invalid"
);
...
@@ -256,11 +253,11 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -256,11 +253,11 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
if
(!
flag
)
{
if
(!
flag
)
{
return
ObjectRestResponse
.
createFailedResult
(
3502
,
"已超过预定还车时间,不能进行交车操作!"
);
return
ObjectRestResponse
.
createFailedResult
(
3502
,
"已超过预定还车时间,不能进行交车操作!"
);
}
}
if
(
null
==
userDTO
.
getCompanyId
()
||
!
userDTO
.
getCompanyId
().
equal
s
(
orderRentVehicleDetail
.
getStartCompanyId
()))
{
if
(
null
==
userDTO
.
getCompanyId
s
()
||
!
userDTO
.
getCompanyIds
().
contain
s
(
orderRentVehicleDetail
.
getStartCompanyId
()))
{
return
ObjectRestResponse
.
createFailedResult
(
3501
,
"无交车权限"
);
return
ObjectRestResponse
.
createFailedResult
(
3501
,
"无交车权限"
);
}
}
}
else
{
}
else
{
if
(
null
==
userDTO
.
getCompanyId
()
||
!
userDTO
.
getCompanyId
().
equal
s
(
orderRentVehicleDetail
.
getEndCompanyId
()))
{
if
(
null
==
userDTO
.
getCompanyId
s
()
||
!
userDTO
.
getCompanyIds
().
contain
s
(
orderRentVehicleDetail
.
getEndCompanyId
()))
{
return
ObjectRestResponse
.
createFailedResult
(
3503
,
"无收车权限"
);
return
ObjectRestResponse
.
createFailedResult
(
3503
,
"无收车权限"
);
}
}
}
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
View file @
8d244a69
...
@@ -84,6 +84,9 @@ public class OrderCancelBiz {
...
@@ -84,6 +84,9 @@ public class OrderCancelBiz {
@Autowired
@Autowired
OrderTemplateBiz
orderTemplateBiz
;
OrderTemplateBiz
orderTemplateBiz
;
@Autowired
ShuntApplyBiz
shuntApplyBiz
;
@Autowired
@Autowired
UserFeign
userFeign
;
UserFeign
userFeign
;
...
@@ -376,6 +379,24 @@ public class OrderCancelBiz {
...
@@ -376,6 +379,24 @@ public class OrderCancelBiz {
orderRentVehicleBiz
.
updateSelectiveById
(
orvd
);
orderRentVehicleBiz
.
updateSelectiveById
(
orvd
);
}
}
//更新 申请状态
ShuntApply
shuntApply
=
shuntApplyBiz
.
selectOne
(
new
ShuntApply
(){{
setOrderNo
(
baseOrder
.
getNo
());
}});
if
(
null
!=
shuntApply
)
{
Integer
status
=
ShuntApply
.
STATUS_AUTOCNL_TOPAY
;
if
(
SYS_TRUE
.
equals
(
baseOrder
.
getHasPay
()))
{
status
=
ShuntApply
.
STATUS_AUTOCNL_PAYED
;
}
Integer
finalStatus
=
status
;
shuntApplyBiz
.
updateSelectiveById
(
new
ShuntApply
(){{
setId
(
shuntApply
.
getId
());
setStatus
(
finalStatus
);
setOrderStatus
(
ShuntApply
.
ORDER_STATUS_CANCEL
);
}});
}
}
else
if
(
OrderTypeEnum
.
TOUR
.
getCode
().
equals
(
baseOrder
.
getType
()))
{
}
else
if
(
OrderTypeEnum
.
TOUR
.
getCode
().
equals
(
baseOrder
.
getType
()))
{
otd
=
orderTourDetailBiz
.
selectOne
(
new
OrderTourDetail
(){{
otd
=
orderTourDetailBiz
.
selectOne
(
new
OrderTourDetail
(){{
setOrderId
(
baseOrder
.
getId
());
setOrderId
(
baseOrder
.
getId
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BackStageOrderController.java
View file @
8d244a69
...
@@ -386,7 +386,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
...
@@ -386,7 +386,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
@IgnoreClientToken
@IgnoreClientToken
@ResponseBody
@ResponseBody
public
ObjectRestResponse
<
OrderPageVO
>
getOrderDetail
(
String
orderNo
,
Boolean
flag
)
{
public
ObjectRestResponse
<
OrderPageVO
>
getOrderDetail
(
String
orderNo
,
Boolean
flag
)
{
UserDTO
userDTO
=
get
AdminUserInfo
();
UserDTO
userDTO
=
get
BusinessUserByAppUser
();
if
(
null
==
userDTO
&&
null
!=
getAppUser
())
{
if
(
null
==
userDTO
&&
null
!=
getAppUser
())
{
userDTO
=
userFeign
.
businessUserinfoByMobilePhone
(
getAppUser
().
getUsername
()).
getData
();
userDTO
=
userFeign
.
businessUserinfoByMobilePhone
(
getAppUser
().
getUsername
()).
getData
();
}
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/ShuntApplyController.java
View file @
8d244a69
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.order.rest;
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.order.rest;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
...
@@ -39,6 +40,7 @@ import com.xxfc.platform.vehicle.pojo.RentVehicleBookDTO;
...
@@ -39,6 +40,7 @@ import com.xxfc.platform.vehicle.pojo.RentVehicleBookDTO;
import
com.xxfc.platform.vehicle.pojo.vo.UsableVeicleVO
;
import
com.xxfc.platform.vehicle.pojo.vo.UsableVeicleVO
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
lombok.Data
;
import
org.mockito.internal.util.collections.Sets
;
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.*
;
...
@@ -81,11 +83,43 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -81,11 +83,43 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
@Autowired
@Autowired
RabbitProduct
rabbitProduct
;
RabbitProduct
rabbitProduct
;
@RequestMapping
(
value
=
"/app/del"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
@ApiOperation
(
value
=
"删除申请"
)
public
ObjectRestResponse
appDel
(
@RequestBody
IdDTO
idDTO
)
{
//查询列表数据
if
(
StrUtil
.
isBlank
(
getCurrentUserId
()))
{
throw
new
BaseException
(
ResultCode
.
AJAX_WECHAT_NOTEXIST_CODE
);
}
baseBiz
.
updateByWeekendSelective
(
new
ShuntApply
(){{
setIsDel
(
SYS_TRUE
);
}},
w
->
{
w
.
andEqualTo
(
ShuntApply:
:
getId
,
idDTO
.
getApplyId
())
.
andEqualTo
(
ShuntApply:
:
getUserId
,
getCurrentUserIdInt
());
return
w
;
});
// new ShuntApply(){{
// setId(idDTO.getApplyId());
// setUserId(getCurrentUserIdInt());
// setIsDel(SYS_TRUE);
// }}
return
ObjectRestResponse
.
succ
();
}
@RequestMapping
(
value
=
"/addApply"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/addApply"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
@ApiOperation
(
value
=
"添加申请"
)
@ApiOperation
(
value
=
"添加申请"
)
public
ObjectRestResponse
addApply
(
@RequestBody
ShuntApply
shuntApply
)
{
public
ObjectRestResponse
addApply
(
@RequestBody
ShuntApply
shuntApply
)
{
DateTime
startDateTime
=
DateUtil
.
date
(
shuntApply
.
getStartTime
());
DateTime
afterDateTime
=
DateUtil
.
offsetHour
(
DateUtil
.
date
(),
1
);
if
(!
startDateTime
.
isAfterOrEquals
(
afterDateTime
))
{
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"请提前一小时需求预定"
));
}
//查询列表数据
//查询列表数据
if
(
StrUtil
.
isBlank
(
getCurrentUserId
()))
{
if
(
StrUtil
.
isBlank
(
getCurrentUserId
()))
{
throw
new
BaseException
(
ResultCode
.
AJAX_WECHAT_NOTEXIST_CODE
);
throw
new
BaseException
(
ResultCode
.
AJAX_WECHAT_NOTEXIST_CODE
);
...
@@ -103,7 +137,12 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -103,7 +137,12 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
shuntApply
.
setUserId
(
getCurrentUserIdInt
());
shuntApply
.
setUserId
(
getCurrentUserIdInt
());
shuntApply
.
setStatus
(
STATUS_CRT
);
shuntApply
.
setStatus
(
STATUS_CRT
);
return
add
(
shuntApply
);
Long
delayTime
=
DateUtil
.
date
().
getTime
()
-
DateUtil
.
offsetMinute
(
startDateTime
,
-
30
).
getTime
();
shuntApply
.
setOverTime
(
delayTime
);
baseBiz
.
insertSelective
(
shuntApply
);
rabbitProduct
.
sendApplyRequireDelayMessage
(
baseBiz
.
selectById
(
shuntApply
.
getId
()),
delayTime
);
return
ObjectRestResponse
.
succ
();
}
}
@RequestMapping
(
value
=
"/cancelApply"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/cancelApply"
,
method
=
RequestMethod
.
POST
)
...
@@ -216,6 +255,29 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -216,6 +255,29 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
/********************************************app商家端**********************************************************/
/********************************************app商家端**********************************************************/
@RequestMapping
(
value
=
"/appBusiness/del"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
@ApiOperation
(
value
=
"删除申请"
)
public
ObjectRestResponse
appBusinessDel
(
@RequestBody
IdDTO
idDTO
)
{
//查询列表数据
if
(
StrUtil
.
isBlank
(
getCurrentUserId
()))
{
throw
new
BaseException
(
ResultCode
.
AJAX_WECHAT_NOTEXIST_CODE
);
}
UserDTO
userDTO
=
getBusinessUserByAppUser
();
AssertUtils
.
isBlank
(
userDTO
);
baseBiz
.
updateByWeekendSelective
(
new
ShuntApply
(){{
setIsBizdel
(
SYS_TRUE
);
}},
w
->
{
w
.
andEqualTo
(
ShuntApply:
:
getId
,
idDTO
.
getApplyId
())
.
andEqualTo
(
ShuntApply:
:
getConfirmUserId
,
userDTO
.
getId
());
return
w
;
});
return
ObjectRestResponse
.
succ
();
}
@RequestMapping
(
value
=
"/appBusiness/list"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/appBusiness/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
@ApiOperation
(
value
=
"根据城市查询待确认申请列表"
)
@ApiOperation
(
value
=
"根据城市查询待确认申请列表"
)
...
@@ -377,6 +439,10 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -377,6 +439,10 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
return
ObjectRestResponse
.
succ
(
pages
);
return
ObjectRestResponse
.
succ
(
pages
);
}
}
@Data
public
static
class
IdDTO
{
Integer
applyId
;
}
@Data
@Data
public
static
class
ConfirmApplyDTO
{
public
static
class
ConfirmApplyDTO
{
...
...
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