Commit 760c618d authored by hanfeng's avatar hanfeng

修改租车订单

parent a9af589c
...@@ -80,5 +80,5 @@ public interface ActivityFeign { ...@@ -80,5 +80,5 @@ public interface ActivityFeign {
@ApiOperation("获取所用优惠卷") @ApiOperation("获取所用优惠卷")
@GetMapping("/coupon/coupons") @GetMapping("/coupon/coupons")
Map<Integer, Coupon> coupons(); Map<String, Coupon> coupons();
} }
package com.xxfc.platform.activity.biz; package com.xxfc.platform.activity.biz;
import cn.hutool.core.collection.CollectionUtil;
import com.github.wxiaoqi.security.admin.feign.dto.UserDTO; import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
...@@ -124,8 +125,14 @@ public class CouponBiz extends BaseBiz<CouponMapper, Coupon> { ...@@ -124,8 +125,14 @@ public class CouponBiz extends BaseBiz<CouponMapper, Coupon> {
return mapper.selectTitles(); return mapper.selectTitles();
} }
public Map<Integer, Coupon> getCoupons() { public Map<String, Coupon> getCoupons() {
Map<Integer, Coupon> coupons = mapper.getCoupons(); HashMap<String, Coupon> map = Maps.newHashMap();
return coupons ; List<Coupon> coupons = mapper.getCoupons();
if (CollectionUtil.isNotEmpty(coupons)) {
for (Coupon coupon : coupons) {
map.put(coupon.getId().toString(),coupon);
}
}
return map;
} }
} }
\ No newline at end of file
...@@ -19,7 +19,7 @@ public interface CouponMapper extends Mapper<Coupon> { ...@@ -19,7 +19,7 @@ public interface CouponMapper extends Mapper<Coupon> {
List<CouponTitleVo> selectTitles(); List<CouponTitleVo> selectTitles();
Map<Integer, Coupon> getCoupons(); List<Coupon> getCoupons();
} }
...@@ -17,7 +17,7 @@ public class CouponController extends BaseController<CouponBiz, Coupon> { ...@@ -17,7 +17,7 @@ public class CouponController extends BaseController<CouponBiz, Coupon> {
@ApiOperation("获取所用优惠卷") @ApiOperation("获取所用优惠卷")
@RequestMapping("/coupons") @RequestMapping("/coupons")
public Map<Integer, Coupon> coupons() { public Map<String, Coupon> coupons() {
return baseBiz.getCoupons(); return baseBiz.getCoupons();
} }
......
...@@ -39,4 +39,10 @@ public class OrderVehicleCrosstownDto extends OrderVehicleCrosstown { ...@@ -39,4 +39,10 @@ public class OrderVehicleCrosstownDto extends OrderVehicleCrosstown {
List<DepositRefundRecord> depositRefundRecord; List<DepositRefundRecord> depositRefundRecord;
private String deliveryName;
private String deliveryPhone;
private Long deliveryTime;
} }
...@@ -175,8 +175,11 @@ public class BackStageOrderController extends CommonBaseController implements Us ...@@ -175,8 +175,11 @@ public class BackStageOrderController extends CommonBaseController implements Us
} }
} }
} }
Map<String, Coupon> coupons=null;
if (dto.getType()==1) {
coupons = activityFeign.coupons();
}
Map<Integer, Coupon> coupons = activityFeign.coupons();
for (OrderListVo orderPageVO : list) { for (OrderListVo orderPageVO : list) {
AppUserVo appUserVo = appvoMap.get(orderPageVO.getUserId()); AppUserVo appUserVo = appvoMap.get(orderPageVO.getUserId());
if (appUserVo != null) { if (appUserVo != null) {
...@@ -187,6 +190,7 @@ public class BackStageOrderController extends CommonBaseController implements Us ...@@ -187,6 +190,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
orderPageVO.setMemberName(appUserVo.getMemberName()); orderPageVO.setMemberName(appUserVo.getMemberName());
} }
if (dto.getType()==1&&coupons!=null) {
ArrayList<Coupon> couponList = Lists.newArrayList(); ArrayList<Coupon> couponList = Lists.newArrayList();
ArrayList<Coupon> backCouponList = Lists.newArrayList(); ArrayList<Coupon> backCouponList = Lists.newArrayList();
if (StringUtils.isNotBlank(orderPageVO.getCouponTickerNos())) { if (StringUtils.isNotBlank(orderPageVO.getCouponTickerNos())) {
...@@ -203,6 +207,7 @@ public class BackStageOrderController extends CommonBaseController implements Us ...@@ -203,6 +207,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
} }
orderPageVO.setCouponList(couponList); orderPageVO.setCouponList(couponList);
orderPageVO.setBackCouponList(backCouponList); orderPageVO.setBackCouponList(backCouponList);
}
// String carArticlesJson = orderPageVO.getCarArticlesJson(); // String carArticlesJson = orderPageVO.getCarArticlesJson();
// if (StringUtils.isNotBlank(carArticlesJson)){ // if (StringUtils.isNotBlank(carArticlesJson)){
// List<OrderAccompanyDTO> orderAccompanyDTOS = JSONObject.parseArray(carArticlesJson, OrderAccompanyDTO.class); // List<OrderAccompanyDTO> orderAccompanyDTOS = JSONObject.parseArray(carArticlesJson, OrderAccompanyDTO.class);
......
...@@ -36,8 +36,10 @@ ...@@ -36,8 +36,10 @@
javaType="com.xxfc.platform.order.entity.DepositRefundRecord"/> javaType="com.xxfc.platform.order.entity.DepositRefundRecord"/>
</resultMap> </resultMap>
<select id="selectByOrderId" parameterType="com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto" resultType="com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto"> <select id="selectByOrderId" parameterType="com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto" resultType="com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto">
select o.*, o.violate_amount_detail violateDetail select o.*, o.violate_amount_detail violateDetail,r.delivery_name as deliveryName,r.delivery_phone as deliveryPhone ,r.delivery_time as deliveryTime
from order_vehicle_crosstown o from order_vehicle_crosstown o
left join order_rent_vehicle_detail r
on o.order_id=r.order_id
<where> <where>
<if test="status != null"> <if test="status != null">
and o.status = #{status} and o.status = #{status}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment