package com.cool.store.dao;

import com.cool.store.dto.openPreparation.FirstOrderDTO;
import com.cool.store.entity.FirstOrderDO;
import com.cool.store.mapper.FirstOrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @Auther: WangShuo
 * @Date: 2024/04/24/下午8:32
 * @Version 1.0
 * @注释:首批订货金
 */
@Repository
public class FirstOrderDAO {

    @Resource
    private FirstOrderMapper firstOrderMapper;

    public Integer insertFirstOrder(FirstOrderDO firstOrderDO) {
           return  firstOrderMapper.insertSelective(firstOrderDO);
    }

    public FirstOrderDTO selectFirstOrderByShopId(Long shopId) {
        return firstOrderMapper.selectByShopId(shopId);
    }
    public Integer updateByPrimaryKeySelective(FirstOrderDO firstOrderDO) {
        return firstOrderMapper.updateByPrimaryKeySelective(firstOrderDO);
    }
}
