package com.bonus.canteen.core.pay.channel.other.service;

import com.bonus.canteen.core.pay.channel.other.extension.OtherPayExtension;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
public class OtherPayServiceImpl implements OtherPayExtension {
   private static final Logger log = LoggerFactory.getLogger(OtherPayServiceImpl.class);
//   @Autowired
//   @Lazy
//   protected CustInfoApi custInfoApi;
//
//   public ChannelPayVO channelPay(ChannelPayDTO channelPayDTO) {
//      ChannelPayVO payResultVO;
//      if (!PayChannelSelectEnum.isDeviceOnline(channelPayDTO.getScenario()) && !PayChannelSelectEnum.isDeviceOffline(channelPayDTO.getScenario()) && !PayChannelSelectEnum.isOpen(channelPayDTO.getScenario())) {
//         payResultVO = new ChannelPayVO();
//         payResultVO.setCode(PayStateEnum.PAY_FAIL.getKey());
//         payResultVO.setMsg("当前渠道暂不支持支付");
//         return payResultVO;
//      } else {
//         payResultVO = new ChannelPayVO();
//         payResultVO.setCode(PayStateEnum.PAY_SUCC.getKey());
//         payResultVO.setMsg(PayStateEnum.PAY_SUCC.getDesc());
//         payResultVO.setCustId(channelPayDTO.getCustId());
//         payResultVO.setAmount(channelPayDTO.getAmount());
//         payResultVO.setRealAmount(channelPayDTO.getAmount());
//         payResultVO.setOutTradeNo(channelPayDTO.getOutTradeNo());
//         return payResultVO;
//      }
//   }
//
//   public AndroidPayVO paySelect(PaySelectDTO paySelectDTO) {
//      AndroidPayVO androidPayVO = new AndroidPayVO();
//      androidPayVO.setCode(PayStateEnum.PAY_SUCC.getKey());
//      androidPayVO.setMsg(PayStateEnum.PAY_SUCC.getDesc());
//      return androidPayVO;
//   }
//
//   public PayRefundVO payRefund(PayRefundDTO payRefundDTO) {
//      PayRefundVO payRefundVO = new PayRefundVO();
//      payRefundVO.setCode(PayStateEnum.PAY_SUCC.getKey());
//      payRefundVO.setMsg(PayStateEnum.PAY_SUCC.getDesc());
//      return payRefundVO;
//   }
//
//   public boolean payChannelSelect(PayChannelSelectEnum selectType, PayChannelSelectDTO payChannelSelectDTO, AllocPayModel canteenPayModel, AllocPayModel merchantPayModel, PayChannelSelectService payChannelSelectService, PayChannelSelectResultVO resultVO) {
//      if (PayTypeEnum.isOtherChannel(payChannelSelectDTO.getPayType())) {
//         resultVO.addPayChannelSplit(payChannelSelectDTO.getPayType(), PayChannelEnum.OTHER.getKey());
//      } else if (NuclearModeEnum.isTally(payChannelSelectDTO.getNuClearMode())) {
//         resultVO.addPayChannelSplit(payChannelSelectDTO.getPayType(), PayChannelEnum.OTHER.getKey());
//      } else if (PayTypeEnum.CASH_MACHINE.getKey().equals(payChannelSelectDTO.getPayType())) {
//         resultVO.addPayChannelSplit(payChannelSelectDTO.getPayType(), PayChannelEnum.CASH.getKey());
//      }
//
//      return true;
//   }
}
