package com.ruoyi.model.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.AppletOrderItemDateMapper;
import com.ruoyi.model.domain.AppletOrderItemDate;
import com.ruoyi.model.service.IAppletOrderItemDateService;

/**
 * 订单信息表Service业务层处理
 *
 * @author daixiande
 */
@Service
public class AppletOrderItemDateServiceImpl implements IAppletOrderItemDateService {
    @Autowired
    private AppletOrderItemDateMapper appletOrderItemDateMapper;

    /**
     * 查询订单信息表
     *
     * @param id 订单信息表主键
     * @return 订单信息表
     */
    @Override
    public AppletOrderItemDate selectAppletOrderItemDateById(Long id) {
        return appletOrderItemDateMapper.selectById(id);
    }

    /**
     * 查询订单信息表列表
     *
     * @param appletOrderItemDate 订单信息表
     * @return 订单信息表
     */
    @Override
    public List<AppletOrderItemDate> selectAppletOrderItemDateList(AppletOrderItemDate appletOrderItemDate) {
        return appletOrderItemDateMapper.selectList(appletOrderItemDate);
    }

    /**
     * 新增订单信息表
     *
     * @param appletOrderItemDate 订单信息表
     * @return 结果
     */
    @Override
    public int insertAppletOrderItemDate(AppletOrderItemDate appletOrderItemDate) {
//        appletOrderItemDate.setCreateTime(String.now());
        return appletOrderItemDateMapper.insert(appletOrderItemDate);
    }

    /**
     * 修改订单信息表
     *
     * @param appletOrderItemDate 订单信息表
     * @return 结果
     */
    @Override
    public int updateAppletOrderItemDate(AppletOrderItemDate appletOrderItemDate) {
//        appletOrderItemDate.setUpdateTime(DateUtils.getNowDate());
        return appletOrderItemDateMapper.update(appletOrderItemDate);
    }

    /**
     * 批量删除订单信息表
     *
     * @param ids 需要删除的订单信息表主键
     * @return 结果
     */
    @Override
    public int deleteAppletOrderItemDateByIds(Long[] ids) {
        return appletOrderItemDateMapper.deleteByIds(ids);
    }

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