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
e530bd36
Commit
e530bd36
authored
Nov 18, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
ee9ff3a8
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
203 additions
and
8 deletions
+203
-8
OrderPulishReceiveDetail.java
.../xxfc/platform/order/entity/OrderPulishReceiveDetail.java
+6
-0
PulishReceiveBO.java
...a/com/xxfc/platform/order/pojo/order/PulishReceiveBO.java
+3
-3
OrderPulishReceiveService.java
...xfc/platform/order/service/OrderPulishReceiveService.java
+11
-4
VehiclePublishReceive.java
...m/xxfc/platform/vehicle/entity/VehiclePublishReceive.java
+30
-0
VehiclePublishReceiveDTO.java
...c/platform/vehicle/pojo/dto/VehiclePublishReceiveDTO.java
+3
-0
VehiclePublishReceiveVo.java
...xfc/platform/vehicle/pojo/vo/VehiclePublishReceiveVo.java
+37
-0
VehicleExtensionBiz.java
...va/com/xxfc/platform/vehicle/biz/VehicleExtensionBiz.java
+5
-0
VehiclePublishReceiveBiz.java
...m/xxfc/platform/vehicle/biz/VehiclePublishReceiveBiz.java
+60
-1
VehicleEextensionMapper.java
...xxfc/platform/vehicle/mapper/VehicleEextensionMapper.java
+4
-0
VehiclePublishReceiveMapper.java
.../platform/vehicle/mapper/VehiclePublishReceiveMapper.java
+7
-0
VehiclePublishReceiveMapper.xml
...src/main/resources/mapper/VehiclePublishReceiveMapper.xml
+37
-0
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/OrderPulishReceiveDetail.java
View file @
e530bd36
...
...
@@ -54,6 +54,12 @@ public class OrderPulishReceiveDetail implements Serializable {
@Column
(
name
=
"receive_ids"
)
@ApiModelProperty
(
value
=
"接单ids(逗号隔开)"
)
private
String
receiveIds
;
@Column
(
name
=
"refuse_receive_ids"
)
@ApiModelProperty
(
value
=
"拒绝的接单ids"
)
private
String
refuseReceiveIds
;
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/PulishReceiveBO.java
View file @
e530bd36
...
...
@@ -5,7 +5,7 @@ import com.xxfc.platform.order.entity.BaseOrder;
import
com.xxfc.platform.order.entity.OrderItem
;
import
com.xxfc.platform.order.entity.OrderPulishReceiveDetail
;
import
com.xxfc.platform.order.entity.inter.OrderDetail
;
import
com.xxfc.platform.vehicle.
entity.VehiclePublishGoods
;
import
com.xxfc.platform.vehicle.
pojo.vo.VehiclePublishReceiveVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -14,13 +14,13 @@ import java.util.List;
@Data
public
class
PulishReceiveBO
extends
OrderPulishReceiveDetail
implements
OrderDetail
{
private
BaseOrder
order
;
private
VehiclePublishGoods
vehiclePublishGood
s
;
private
List
<
VehiclePublishReceiveVo
>
receiveVo
s
;
AppUserDTO
appUserDTO
;
/**
* 促成人联系方式
*/
@ApiModelProperty
(
value
=
"促成人联系方式"
)
String
facilitatePhone
;
Integer
facilitatePhone
;
/**
* 下单来源,1--app;2--小程序
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderPulishReceiveService.java
View file @
e530bd36
...
...
@@ -20,6 +20,7 @@ import com.xxfc.platform.tour.feign.TourFeign;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
com.xxfc.platform.vehicle.pojo.vo.VehiclePublishReceiveVo
;
import
lombok.extern.log4j.Log4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -93,10 +94,16 @@ public class OrderPulishReceiveService extends AbstractOrderHandle<OrderPulishRe
public
void
handleDetail
(
PulishReceiveBO
bo
)
{
//设置订单状态为3
bo
.
getOrder
().
setStatus
(
OrderStatusEnum
.
ORDER_UNPAY
.
getCode
());
//设置订单图片
bo
.
getOrder
().
setPicture
(
bo
.
getVehiclePublishGoods
().
getCover
());
//设置订单名称
// bo.getOrder().setName(bo.getVehiclePublishGoods().getName());
List
<
VehiclePublishReceiveVo
>
receiveVos
=
bo
.
getReceiveVos
();
if
(
receiveVos
.
size
()
>
0
){
VehiclePublishReceiveVo
receiveVo
=
receiveVos
.
get
(
0
);
//设置订单图片
bo
.
getOrder
().
setPicture
(
receiveVo
.
getCover
());
//设置订单名称
bo
.
getOrder
().
setName
(
receiveVo
.
getName
());
}
super
.
handleDetail
(
bo
);
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/VehiclePublishReceive.java
View file @
e530bd36
...
...
@@ -40,6 +40,36 @@ public class VehiclePublishReceive implements Serializable {
private
String
vehicleId
;
@Column
(
name
=
"name"
)
@ApiModelProperty
(
value
=
"商品名称"
)
private
String
name
;
@Column
(
name
=
"goods_type"
)
@ApiModelProperty
(
value
=
"商品类型 1--房车;2--机车;3--游艇;4-豪车"
)
private
Integer
goodsType
;
@Column
(
name
=
"brand_id"
)
@ApiModelProperty
(
value
=
"品牌id"
)
private
Integer
brandId
;
@Column
(
name
=
"category_id"
)
@ApiModelProperty
(
value
=
"型号id"
)
private
Integer
categoryId
;
@Column
(
name
=
"cover"
)
@ApiModelProperty
(
value
=
"封面"
)
private
String
cover
;
@Column
(
name
=
"extension_list"
)
@ApiModelProperty
(
value
=
"扩展信息(逗号隔开)"
)
private
String
extensionList
;
@Column
(
name
=
"publish_goods_id"
)
@ApiModelProperty
(
value
=
"需求子id"
)
private
Integer
publishGoodsId
;
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/dto/VehiclePublishReceiveDTO.java
View file @
e530bd36
...
...
@@ -34,6 +34,9 @@ public class VehiclePublishReceiveDTO{
private
Integer
userId
;
List
<
Integer
>
ids
;
@ApiModelProperty
(
"接单详情"
)
List
<
VehiclePublishReceive
>
receives
;
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/vo/VehiclePublishReceiveVo.java
0 → 100644
View file @
e530bd36
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
.
vo
;
import
com.xxfc.platform.vehicle.entity.VehiclePublishReceive
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
VehiclePublishReceiveVo
extends
VehiclePublishReceive
{
@ApiModelProperty
(
"品牌名称"
)
String
brandName
;
@ApiModelProperty
(
"型号名称"
)
String
categoryName
;
private
List
<
VehicleExtensionVO
>
extensionVOS
;
@ApiModelProperty
(
"接单公司"
)
String
receiveCompanyName
;
@ApiModelProperty
(
"发布公司"
)
String
publishCompanyName
;
@ApiModelProperty
(
"需求id"
)
private
Integer
publishId
;
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleExtensionBiz.java
View file @
e530bd36
...
...
@@ -133,6 +133,11 @@ public class VehicleExtensionBiz extends BaseBiz<VehicleEextensionMapper, Vehicl
}
public
String
getExtensionIds
(
String
vehicleId
){
return
mapper
.
getExtensionIds
(
vehicleId
);
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehiclePublishReceiveBiz.java
View file @
e530bd36
...
...
@@ -5,11 +5,16 @@ package com.xxfc.platform.vehicle.biz;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.order.entity.BaseOrder
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.VehiclePublish
;
import
com.xxfc.platform.vehicle.entity.VehiclePublishGoods
;
import
com.xxfc.platform.vehicle.entity.VehiclePublishReceive
;
import
com.xxfc.platform.vehicle.mapper.VehiclePublishReceiveMapper
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePublishReceiveDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -21,14 +26,65 @@ import java.util.List;
public
class
VehiclePublishReceiveBiz
extends
BaseBiz
<
VehiclePublishReceiveMapper
,
VehiclePublishReceive
>
{
@Autowired
VehicleBiz
vehicleBiz
;
@Autowired
VehiclePublishBiz
vehiclePublishBiz
;
@Autowired
VehiclePublishGoodsBiz
publishGoodsBiz
;
@Autowired
VehicleExtensionBiz
vehicleExtensionBiz
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
receive
(
VehiclePublishReceiveDTO
publishReceiveDTO
){
if
(
publishReceiveDTO
==
null
||
CollectionUtils
.
isEmpty
(
publishReceiveDTO
.
getReceives
())){
Integer
publishId
=
publishReceiveDTO
.
getPublishId
()
==
null
?
0
:
publishReceiveDTO
.
getPublishId
();
if
(
publishId
==
0
||
CollectionUtils
.
isEmpty
(
publishReceiveDTO
.
getReceives
())){
throw
new
BaseException
(
"参数不能为空"
,
ResultCode
.
FAILED_CODE
);
}
VehiclePublish
vehiclePublish
=
vehiclePublishBiz
.
selectById
(
publishId
);
if
(
vehiclePublish
==
null
){
throw
new
BaseException
(
"需求不存在或无效"
,
ResultCode
.
FAILED_CODE
);
}
Integer
type
=
vehiclePublish
.
getType
()
==
null
?
0
:
vehiclePublish
.
getType
();
List
<
VehiclePublishReceive
>
receives
=
publishReceiveDTO
.
getReceives
();
for
(
VehiclePublishReceive
vehiclePublishReceive
:
receives
){
Integer
id
=
vehiclePublishReceive
.
getId
()
==
null
?
0
:
vehiclePublishReceive
.
getId
();
if
(
id
==
0
){
String
vehicleId
=
vehiclePublishReceive
.
getVehicleId
();
Vehicle
vehicle
=
vehicleBiz
.
selectById
(
vehicleId
);
if
(
vehicle
==
null
){
throw
new
BaseException
(
"商品信息不存在"
,
ResultCode
.
FAILED_CODE
);
}
Integer
publishGoodsId
=
vehiclePublishReceive
.
getPublishGoodsId
()
==
null
?
0
:
vehiclePublishReceive
.
getPublishGoodsId
();
VehiclePublishGoods
publishGoods
=
publishGoodsBiz
.
selectById
(
publishGoodsId
);
if
(
publishGoods
==
null
){
throw
new
BaseException
(
"子需求不存在"
,
ResultCode
.
FAILED_CODE
);
}
String
cover
=
publishGoods
.
getCover
();
Integer
brandId
=
publishGoods
.
getBrandId
();
Integer
categoryId
=
publishGoods
.
getCategoryId
();
String
extensionList
=
publishGoods
.
getExtensionList
();
if
(
type
==
1
){
cover
=
vehicle
.
getCover
();
brandId
=
vehicle
.
getBrandId
();
categoryId
=
vehicle
.
getCategoryId
();
extensionList
=
vehicleExtensionBiz
.
getExtensionIds
(
vehicleId
);
}
vehiclePublishReceive
.
setName
(
vehicle
.
getName
());
vehiclePublishReceive
.
setGoodsType
(
vehiclePublish
.
getGoodsType
());
vehiclePublishReceive
.
setCover
(
cover
);
vehiclePublishReceive
.
setBrandId
(
brandId
);
vehiclePublishReceive
.
setCategoryId
(
categoryId
);
vehiclePublishReceive
.
setExtensionList
(
extensionList
);
insertSelective
(
vehiclePublishReceive
);
}
else
{
}
}
...
...
@@ -36,6 +92,9 @@ public class VehiclePublishReceiveBiz extends BaseBiz<VehiclePublishReceiveMappe
}
public
BaseOrder
addOrder
()
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleEextensionMapper.java
View file @
e530bd36
...
...
@@ -6,6 +6,7 @@ import com.xxfc.platform.vehicle.entity.VehicleExtension;
import
com.xxfc.platform.vehicle.pojo.dto.VehicleExtensionFindDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.VehicleExtensionVO
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
tk.mybatis.mapper.additional.idlist.SelectByIdListMapper
;
import
tk.mybatis.mapper.common.Mapper
;
...
...
@@ -28,4 +29,7 @@ public interface VehicleEextensionMapper extends Mapper<VehicleExtension>, Selec
List
<
VehicleExtensionVO
>
selectListByPlatCata
(
VehicleExtensionFindDTO
vehicleExtensionFindDTO
);
@Select
(
"SELECT GROUP_CONCAT(cata_id) FROM vehicle_extension WHERE vehicle_id=#{vehicleId} and is_del = 0"
)
String
getExtensionIds
(
@Param
(
"vehicleId"
)
String
vehicleId
);
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehiclePublishReceiveMapper.java
View file @
e530bd36
...
...
@@ -2,9 +2,16 @@ package com.xxfc.platform.vehicle.mapper;
import
com.xxfc.platform.vehicle.entity.VehiclePublishReceive
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePublishReceiveDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.VehiclePublishReceiveVo
;
import
tk.mybatis.mapper.additional.idlist.SelectByIdListMapper
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
public
interface
VehiclePublishReceiveMapper
extends
Mapper
<
VehiclePublishReceive
>,
SelectByIdListMapper
<
VehiclePublishReceive
,
Integer
>
{
List
<
VehiclePublishReceiveVo
>
selectList
(
VehiclePublishReceiveDTO
receiveDTO
);
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehiclePublishReceiveMapper.xml
0 → 100644
View file @
e530bd36
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.xxfc.platform.vehicle.mapper.VehiclePublishReceiveMapper"
>
<select
id=
"selectList"
resultType=
"com.xxfc.platform.vehicle.pojo.vo.VehiclePublishReceiveVo"
parameterType=
"com.xxfc.platform.vehicle.pojo.dto.VehiclePublishReceiveDTO"
>
SELECT r.*,
b.cn_name as brandName,
c.`name` categoryName,
bc.`name` as receiveCompanyName,
bc1.`name` as publishCompanyName,
g.`publish_id` as publishId
FROM vehicle_publish_receive r
LEFT JOIN vehicle_brand b ON a.brand_id=b.id
LEFT JOIN vehicle_category c ON a.category_id=c.id
LEFT JOIN branch_company bc ON r.receive_company_id = bc.id
LEFT JOIN branch_company bc1 ON r.publish_company_id = bc1.id
LEFT JOIN vehicle_publish_goods g ON r.publish_goods_id=g.id
<where>
r.is_del = 0
<if
test=
"publishId != null and publishId > 0"
>
AND g.`publish_id`= #{publishId}
</if>
<if
test=
"publishGoodsId != null and publishGoodsId > 0"
>
AND r.`publish_goods_id`= #{publishGoodsId}
</if>
<if
test=
"ids != null and ids.size > 0"
>
and r.id in
<foreach
collection=
"ids"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
</where>
order by r.id DESC
</select>
</mapper>
\ No newline at end of file
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