package com.neusoft.smart.pos.payorder.repository;

import com.neusoft.smart.pos.constants.DictionaryConstant;
import com.neusoft.smart.pos.payorder.persistent.domain.PayOrder;
import com.neusoft.smart.pos.payorder.persistent.mapper.PayOrderMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class PayOrderRepository {

    private final static Logger logger = LoggerFactory.getLogger(PayOrderRepository.class);

    @Resource
    private PayOrderMapper payOrderMapper;
    /**
     * 支付平台订单保存方法
     * @param payOrder
     * @return
     */
    public Integer createPayOrder(PayOrder payOrder){
//		payOrder.setOrderStatus(DictionaryConstant.PAYMENT_ORDER_STATUS_DZF.getCode());
        payOrder.setPayStatus(DictionaryConstant.PAY_STATUS_WFK.getCode());
        return payOrderMapper.insertSelective(payOrder);
    }
}
