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.AppletOrderItemDateLogMapper;
import com.ruoyi.model.domain.AppletOrderItemDateLog;
import com.ruoyi.model.service.IAppletOrderItemDateLogService;

/**
 * 订单信息表Service业务层处理
 *
 * @author daixiande
 */
@Service
public class AppletOrderItemDateLogServiceImpl implements IAppletOrderItemDateLogService {
    @Autowired
    private AppletOrderItemDateLogMapper appletOrderItemDateLogMapper;

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

    @Override
    public AppletOrderItemDateLog selectAppletOrderItemDateLogByItemDateId(Long itemDateId) {
        return appletOrderItemDateLogMapper.selectAppletOrderItemDateLogByItemDateId(itemDateId);
    }




    /**
     * 查询订单信息表列表
     *
     * @param appletOrderItemDateLog 订单信息表
     * @return 订单信息表
     */
    @Override
    public List<AppletOrderItemDateLog> selectAppletOrderItemDateLogList(AppletOrderItemDateLog appletOrderItemDateLog) {
        return appletOrderItemDateLogMapper.selectList(appletOrderItemDateLog);
    }

    /**
     * 新增订单信息表
     *
     * @param appletOrderItemDateLog 订单信息表
     * @return 结果
     */
    @Override
    public int insertAppletOrderItemDateLog(AppletOrderItemDateLog appletOrderItemDateLog) {
//        appletOrderItemDateLog.setCreateTime(String.now());
        return appletOrderItemDateLogMapper.insert(appletOrderItemDateLog);
    }

    /**
     * 修改订单信息表
     *
     * @param appletOrderItemDateLog 订单信息表
     * @return 结果
     */
    @Override
    public int updateAppletOrderItemDateLog(AppletOrderItemDateLog appletOrderItemDateLog) {
//        appletOrderItemDateLog.setUpdateTime(DateUtils.getNowDate());
        return appletOrderItemDateLogMapper.update(appletOrderItemDateLog);
    }

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

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