| | |
| | | import com.xiaopeng.api.dto.statistics.StatisticsQueryDTO; |
| | | import com.xiaopeng.api.dto.vehicleConvoy.BaseVehicleUserDto; |
| | | import com.xiaopeng.api.feignClient.account.SysGroupMenuClient; |
| | | import com.xiaopeng.api.feignClient.frdXfipEvent.XpFrdXfipEventClient; |
| | | import com.xiaopeng.api.feignClient.operation.XpWhiteListClient; |
| | | import com.xiaopeng.api.feignClient.vehicleConvoy.VehicleMacClient; |
| | | import com.xiaopeng.api.feignClient.vehicleConvoy.XpVehicleClient; |
| | | import com.xiaopeng.api.model.operation.XpOfficialPartner; |
| | | import com.xiaopeng.api.model.operation.XpWhitelist; |
| | | import com.xiaopeng.api.model.order.OrderTrajectory; |
| | | import com.xiaopeng.api.model.order.XpOrder; |
| | | import com.xiaopeng.api.model.vehicleConvoy.XpVehicle; |
| | | import com.xiaopeng.api.vo.account.LoginUser; |
| | |
| | | import com.xiaopeng.common.core.utils.StringUtils; |
| | | import com.xiaopeng.common.core.utils.WebUtils; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.common.log.annotation.AdminOperationLog; |
| | | import com.xiaopeng.common.log.enums.AdminBusinessType; |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | import com.xiaopeng.common.redis.service.RedisService; |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | | import com.xiaopeng.order.config.BluetoothDebugConfig; |
| | | import com.xiaopeng.order.dto.OrderNavigationDto; |
| | | import com.xiaopeng.api.model.order.OrderTrajectory; |
| | | import com.xiaopeng.order.model.dto.XpOrderCommentDto; |
| | | import com.xiaopeng.order.model.dto.XpOrderOperateDTO; |
| | | import com.xiaopeng.order.model.dto.XpOrderPayDto; |
| | | import com.xiaopeng.order.model.dto.XpOrderReassignDTO; |
| | | import com.xiaopeng.order.model.dto.*; |
| | | import com.xiaopeng.order.model.exportExcel.XpOrderExportExcel; |
| | | import com.xiaopeng.order.model.query.XpHistoryOrderListQuery; |
| | | import com.xiaopeng.order.model.query.XpOrderExcelQuery; |
| | | import com.xiaopeng.order.model.query.XpOrderPageQuery; |
| | | import com.xiaopeng.order.model.vo.CreditPayCallVo; |
| | | import com.xiaopeng.order.model.vo.XpOrderDetailVO; |
| | | import com.xiaopeng.order.model.vo.XpOrderHistoryVO; |
| | | import com.xiaopeng.order.model.vo.XpOrderPageVO; |
| | |
| | | |
| | | @Resource |
| | | private VehicleMacClient vehicleMacClient; |
| | | @Resource |
| | | private SysGroupMenuClient groupMenuClient; |
| | | |
| | | @Resource |
| | | private XpWhiteListClient xpWhiteListClient; |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 信用支付下单回调 |
| | | */ |
| | | @PostMapping("/base/v1/mini-program/order/creditPayCall") |
| | | @ApiOperation(value = "信用支付下单回调", tags = {"小程序-发起支付"}, response = CreditPayCallVo.class) |
| | | public CreditPayCallVo creditPayCall(@RequestBody CreditPayCallDto dto) { |
| | | CreditPayCallVo vo = new CreditPayCallVo(); |
| | | vo.setRetCode("0"); |
| | | vo.setRetMsg("成功"); |
| | | |
| | | if (dto == null || (StringUtils.isBlank(dto.getAuthOrderId()) || StringUtils.isBlank(dto.getBusinessOrderId()))) { |
| | | return vo; |
| | | } |
| | | |
| | | LambdaQueryWrapper<XpOrder> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(XpOrder::getAuthOrderId, dto.getAuthOrderId()); |
| | | XpOrder order = xpOrderService.getOne(wrapper.last("LIMIT 1")); |
| | | if (order == null) { |
| | | return vo; |
| | | } |
| | | if ("SUCCESS".equals(dto.getCreditOrderStatus())) { |
| | | // 发起扣款 |
| | | xpOrderService.creditPayCall(order); |
| | | } |
| | | return vo; |
| | | } |
| | | |
| | | /** |
| | | * 信用扣款回调 |
| | | */ |
| | | @PostMapping("/base/v1/mini-program/order/creditPaySuccessCall") |
| | | @ApiOperation(value = "信用扣款回调", tags = {"小程序-发起支付"}, response = CreditPayCallVo.class) |
| | | public CreditPayCallVo creditPaySuccessCall(@RequestBody CreditPaySuccessCallDto dto) { |
| | | |
| | | LambdaQueryWrapper<XpOrder> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(XpOrder::getAuthOrderId, dto.getAuthOrderId()); |
| | | XpOrder order = xpOrderService.getOne(wrapper.last("LIMIT 1")); |
| | | if(dto.getPayStatus()==1){ |
| | | order.setStatus(9); |
| | | order.setAppUserId(null); |
| | | xpOrderService.updateById(order); |
| | | CreditPayCallVo vo = new CreditPayCallVo(); |
| | | vo.setRetCode("0"); |
| | | vo.setRetMsg("成功"); |
| | | |
| | | // 对接财务 |
| | | xpOrderService.xpFrdXfipEventPush(order,dto.getPayFee(),dto.getOrderId()); |
| | | |
| | | return vo; |
| | | } |
| | | return null; |
| | | |
| | | } |
| | | |
| | | } |