@ApiOperation("获取服务订单详情")
@GetMapping("getServiceOrderDetail")
public T getServiceOrderDetail(
@ApiParam(required = true, value = "服务类型") @RequestParam String QRCodeType,
@ApiParam(required = true, value = "服务ID") @RequestParam String businessId) {
return orderServiceService.getServiceOrderDetail(QRCodeType, businessId);
}
/**
* 获取服务详情
*/
T getServiceOrderDetail(String qrCodeType, String businessId);
@Override
public T getServiceOrderDetail(String qrCodeType, String businessId) {
OrderCheckoutStrategy checkoutStrategy = OrderCheckoutStrategyFactory.getOrderCheckoutStrategy(qrCodeType);
return checkoutStrategy.getOrderDetail(businessId);
}
public interface OrderCheckoutStrategy {
T getOrderDetail(String businessId);
}
@Override
public T getOrderDetail(String businessId) {
//查询用户卡券是否符合核销要求
// BaseUserCardDTO baseUserCardDTO = userExport.queryUserCardByCardId(businessId);
// AssertUtils.check(Objects.nonNull(baseUserCardDTO),OrderResultCode.USER_CARD_ERROR);
BaseUserCardDTO baseUserCardDTO = userExport.queryUserCardInfoByCardId(Integer.valueOf(businessId));
AssertUtils.check(Objects.nonNull(baseUserCardDTO),OrderResultCode.USER_CARD_NOT_EXIST);
BaseMerchantCardDTO cardDTO = merchantCardExport.getBaseMerchantSettlementCard(baseUserCardDTO.getMerchantCardId());
cardDTO.setAvailableDateConvert(DateUtils.format(cardDTO.getAvailableDate(), PatternConstant.DAY_PATTERN));
cardDTO.setCardTypeDesc(MerchantCardTypeEnum.getUserShowDescBySatus(cardDTO.getCardType()));
// cardDTO.setPhone();
// cardDTO.setNickName();
return (T)cardDTO;
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19