package org.linlinjava.jz.db.service;

import org.linlinjava.jz.db.dao.ContractSubMapper;
import org.linlinjava.jz.db.domain.ContractSub;
import org.linlinjava.jz.db.domain.ContractSubExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author fuxubing
 */
@Service
public class ContractSubService {
    @Resource
    private ContractSubMapper contractSubMapper;

    public ContractSub queryByOrderNo(String orderNo) {
        ContractSubExample example = new ContractSubExample();
        example.or().andSubOrderNoEqualTo(orderNo).andContractStateEqualTo(0);
        return contractSubMapper.selectOneByExample(example);
    }
}
