package com.bohuikeji.delivery.backstage.service.impl;


import com.bohuikeji.delivery.backstage.entity.TPay;
import com.bohuikeji.delivery.backstage.entity.TSettle;
import com.bohuikeji.delivery.backstage.mapper.TSettleMapper;
import com.bohuikeji.delivery.backstage.service.ITSettleService;
import com.bohuikeji.frame.module.admin.base.ServiceImplBase;
import com.bohuikeji.frame.module.admin.utils.NumberUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * <p>
 * 支付交易信息表 服务实现类
 * </p>
 *
 * @author 10552
 * @since 2019-12-27
 */
@Service
@Slf4j
public class TSettleServiceImpl extends ServiceImplBase<TSettleMapper, TSettle> implements ITSettleService {

    @Autowired
    ITSettleService settleService;

    @Override
    public boolean saveSeettle(TPay pay) {
        TSettle settle = new TSettle();
        settle.setSettleNum(NumberUtils.get("S"));
        settle.setPayNum(pay.getPayNum());
        settle.setOrderId(pay.getOrderId());
        settle.setMerchantNum(pay.getMerchantNum());
        settle.setPayChannel(pay.getPayChannel());
        settle.setPayFactPrice(pay.getPayFactPrice());
        settle.setPayWay(pay.getPayWay());
        settle.setPlayerId(pay.getPlayerId());
        settle.setPayChannelNum(pay.getPayChannelNum());
        return save(settle);
    }
}
