package com.ruoyi.dz.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dz.mapper.DzPaymentOrdersMapper;
import com.ruoyi.dz.domain.DzPaymentOrders;
import com.ruoyi.dz.service.IDzPaymentOrdersService;

/**
 * 订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-12
 */
@Service
public class DzPaymentOrdersServiceImpl implements IDzPaymentOrdersService 
{
    @Autowired
    private DzPaymentOrdersMapper dzPaymentOrdersMapper;

    /**
     * 查询订单
     * 
     * @param id 订单主键
     * @return 订单
     */
    @Override
    public DzPaymentOrders selectDzPaymentOrdersById(Long id)
    {
        return dzPaymentOrdersMapper.selectDzPaymentOrdersById(id);
    }

    /**
     * 查询订单列表
     * 
     * @param dzPaymentOrders 订单
     * @return 订单
     */
    @Override
    public List<DzPaymentOrders> selectDzPaymentOrdersList(DzPaymentOrders dzPaymentOrders)
    {
        return dzPaymentOrdersMapper.selectDzPaymentOrdersList(dzPaymentOrders);
    }

    /**
     * 新增订单
     * 
     * @param dzPaymentOrders 订单
     * @return 结果
     */
    @Override
    public int insertDzPaymentOrders(DzPaymentOrders dzPaymentOrders)
    {
        dzPaymentOrders.setCreateTime(DateUtils.getNowDate());
        return dzPaymentOrdersMapper.insertDzPaymentOrders(dzPaymentOrders);
    }

    /**
     * 修改订单
     * 
     * @param dzPaymentOrders 订单
     * @return 结果
     */
    @Override
    public int updateDzPaymentOrders(DzPaymentOrders dzPaymentOrders)
    {
        return dzPaymentOrdersMapper.updateDzPaymentOrders(dzPaymentOrders);
    }

    /**
     * 批量删除订单
     * 
     * @param ids 需要删除的订单主键
     * @return 结果
     */
    @Override
    public int deleteDzPaymentOrdersByIds(Long[] ids)
    {
        return dzPaymentOrdersMapper.deleteDzPaymentOrdersByIds(ids);
    }

    /**
     * 删除订单信息
     * 
     * @param id 订单主键
     * @return 结果
     */
    @Override
    public int deleteDzPaymentOrdersById(Long id)
    {
        return dzPaymentOrdersMapper.deleteDzPaymentOrdersById(id);
    }
}
