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
b6d9ccd4
Commit
b6d9ccd4
authored
Dec 03, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改保险
parent
a0c03fec
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
13 deletions
+38
-13
BaseOrder.java
...c/main/java/com/xxfc/platform/order/entity/BaseOrder.java
+4
-0
BgPageDTO.java
...m/xxfc/platform/order/pojo/personinsurance/BgPageDTO.java
+7
-0
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+15
-0
BgOrderPersonInsuranceController.java
...der/rest/background/BgOrderPersonInsuranceController.java
+4
-4
OrderRentVehicleService.java
.../xxfc/platform/order/service/OrderRentVehicleService.java
+0
-1
OrderPersonInsuranceMapper.xml
.../src/main/resources/mapper/OrderPersonInsuranceMapper.xml
+8
-8
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/BaseOrder.java
View file @
b6d9ccd4
...
...
@@ -30,6 +30,10 @@ public class BaseOrder implements Serializable {
public
static
final
int
ORDER_SIGN_APPLY
=
2
;
public
static
final
int
ORDER_SIGN_SPECIAL
=
3
;
public
static
final
int
INSURE_STATUS_NOT
=
0
;
public
static
final
int
INSURE_STATUS_BUY
=
1
;
public
static
final
int
INSURE_STATUS_CNL
=
2
;
/**
* 主键
*/
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/personinsurance/BgPageDTO.java
View file @
b6d9ccd4
...
...
@@ -8,6 +8,13 @@ import java.util.List;
@Data
public
class
BgPageDTO
extends
PageParam
{
private
String
keyWord
;
private
String
price
;
private
Integer
status
;
private
Long
orderStartTime
;
private
Long
orderEndTime
;
private
Long
refundStartTime
;
private
Long
refundEndTime
;
private
String
no
;
private
String
insurePic
;
private
List
<
OrderPersonInsurance
>
insuranceList
;
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
b6d9ccd4
...
...
@@ -83,6 +83,7 @@ import java.util.stream.Collectors;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.*;
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
.
xxfc
.
platform
.
order
.
entity
.
OrderPersonInsurance
.
STATUS_PAY
;
import
static
com
.
xxfc
.
platform
.
order
.
pojo
.
mq
.
OrderMQDTO
.*;
import
static
com
.
xxfc
.
platform
.
universal
.
constant
.
DictionaryKey
.
ILLEGAL_TYPE
;
...
...
@@ -116,6 +117,9 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
@Autowired
OrderAccountBiz
orderAccountBiz
;
@Autowired
OrderPersonInsuranceBiz
orderPersonInsuranceBiz
;
@Autowired
VehicleFeign
vehicleFeign
;
...
...
@@ -843,6 +847,17 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
}});
}
}
if
(
BaseOrder
.
INSURE_STATUS_BUY
==
baseOrder
.
getInsureStatus
())
{
List
<
OrderPersonInsurance
>
insuranceList
=
orderPersonInsuranceBiz
.
selectList
(
new
OrderPersonInsurance
(){{
setOrderId
(
baseOrder
.
getId
());
}});
//更新 申请状态
insuranceList
.
forEach
(
insurance
->
{
insurance
.
setStatus
(
STATUS_PAY
);
insurance
.
setPaytime
(
DateUtil
.
date
().
getTime
());
});
}
}
finally
{
AppUserDTO
appUserDTO
=
userFeign
.
userDetailById
(
baseOrder
.
getUserId
()).
getData
();
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/background/
P
gOrderPersonInsuranceController.java
→
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/background/
B
gOrderPersonInsuranceController.java
View file @
b6d9ccd4
...
...
@@ -28,7 +28,7 @@ import java.util.Map;
@RestController
@RequestMapping
(
"/background/orderPersonInsurance"
)
@Slf4j
public
class
P
gOrderPersonInsuranceController
extends
BaseController
<
OrderPersonInsuranceBiz
,
OrderPersonInsurance
>
{
public
class
B
gOrderPersonInsuranceController
extends
BaseController
<
OrderPersonInsuranceBiz
,
OrderPersonInsurance
>
{
@Autowired
BaseOrderBiz
baseOrderBiz
;
...
...
@@ -40,9 +40,9 @@ public class PgOrderPersonInsuranceController extends BaseController<OrderPerson
}
@ApiOperation
(
"修改图片"
)
@RequestMapping
(
value
=
"/editPic"
,
method
=
RequestMethod
.
GE
T
)
@RequestMapping
(
value
=
"/editPic"
,
method
=
RequestMethod
.
POS
T
)
@ResponseBody
public
ObjectRestResponse
editPic
(
BgPageDTO
dto
){
public
ObjectRestResponse
editPic
(
@RequestBody
BgPageDTO
dto
){
baseOrderBiz
.
updateByWeekendSelective
(
new
BaseOrder
(){{
setInsurePic
(
dto
.
getInsurePic
());
}},
w
->
{
...
...
@@ -52,7 +52,7 @@ public class PgOrderPersonInsuranceController extends BaseController<OrderPerson
return
ObjectRestResponse
.
succ
();
}
@RequestMapping
(
value
=
"/
bg/
pageExport"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/pageExport"
,
method
=
RequestMethod
.
GET
)
public
void
bgPageExport
(
BgPageDTO
dto
)
throws
Exception
{
PageExportDTO
head
=
new
PageExportDTO
(){{
setOrderNo
(
"订单编号"
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderRentVehicleService.java
View file @
b6d9ccd4
...
...
@@ -483,7 +483,6 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
,
VehicleItemDTO
.
class
);
OrderItem
driverOrderItem
=
orderItemBiz
.
initOrderItem
(
DRIVER_PRICE
,
detail
.
getDayNum
(),
"平台司机"
,
null
,
ItemTypeEnum
.
DRIVER
);
OrderItem
damageSafeOrderItem
=
orderItemBiz
.
initOrderItem
(
DAMAGE_SAFE
,
detail
.
getDayNum
(),
"免赔费用"
,
null
,
ItemTypeEnum
.
DAMAGE_SAFE
);
// OrderItem personInsuranceOrderItem = orderItemBiz.initOrderItem(DAMAGE_SAFE, detail.getDayNum(), "免赔费用", null, ItemTypeEnum.PERSON_INSURANCE);
detail
.
setItems
(
new
ArrayList
<
OrderItem
>());
detail
.
getItems
().
add
(
vehicleOrderItem
);
...
...
xx-order/xx-order-server/src/main/resources/mapper/OrderPersonInsuranceMapper.xml
View file @
b6d9ccd4
...
...
@@ -20,12 +20,12 @@
</resultMap>
<select
id=
"selectOrderInfo"
resultType=
"com.xxfc.platform.order.pojo.personinsurance.BgPageVO"
>
select distinct
ob.no, ob
.insure_pic
select distinct
bo.no, bo
.insure_pic
<include
refid=
"commonFromWhere"
></include>
order by
ob
.no desc
bo
.no desc
</select>
<select
id=
"selectInsuranceInfo"
resultType=
"com.xxfc.platform.order.entity.OrderPersonInsurance"
>
...
...
@@ -34,17 +34,17 @@
<include
refid=
"commonFromWhere"
></include>
order by
ob
.no desc
bo
.no desc
</select>
<sql
id=
"commonFromWhere"
>
from order_person_insurance opi
left join
order_base ob on opi.id = ob.order_
id
left join
base_order bo on opi.order_id = bo.
id
<where>
and
ob
.has_pay = 1
and
bo
.has_pay = 1
<if
test=
"keyWord != null"
>
and (
ob
.no like concat('%',#{keyWord},'%') or opi.name like concat('%',#{keyWord},'%')
bo
.no like concat('%',#{keyWord},'%') or opi.name like concat('%',#{keyWord},'%')
)
</if>
<if
test=
"price != null"
>
...
...
@@ -57,13 +57,13 @@
and opi.pay_time
>
= #{orderStartTime}
</if>
<if
test=
"orderEndTime != null"
>
and
ob
.pay_time
<
= #{orderEndTime}
and
bo
.pay_time
<
= #{orderEndTime}
</if>
<if
test=
"refundStartTime != null"
>
and opi.refund_time
>
= #{refundStartTime}
</if>
<if
test=
"refundEndTime != null"
>
and
ob
.refund_time
<
= #{refundEndTime}
and
bo
.refund_time
<
= #{refundEndTime}
</if>
</where>
</sql>
...
...
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