package com.flossom.system.service.impl;

import java.util.List;

import com.flossom.common.core.domain.entity.WxOtherSetting;
import com.flossom.common.core.mapper.WxOtherSettingMapper;
import com.flossom.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flossom.system.service.IWxOtherSettingService;

/**
 * 其他配置Service业务层处理
 *
 * @author flossom
 * @date 2023-12-13
 */
@Service
public class WxOtherSettingServiceImpl implements IWxOtherSettingService {
    @Autowired
    private WxOtherSettingMapper wxOtherSettingMapper;

    /**
     * 查询其他配置
     *
     * @param id 其他配置主键
     * @return 其他配置
     */
    @Override
    public WxOtherSetting selectWxOtherSettingById(Long id) {
        return wxOtherSettingMapper.selectWxOtherSettingById(id);
    }

    /**
     * 查询其他配置列表
     *
     * @param wxOtherSetting 其他配置
     * @return 其他配置
     */
    @Override
    public List<WxOtherSetting> selectWxOtherSettingList(WxOtherSetting wxOtherSetting) {
        return wxOtherSettingMapper.selectWxOtherSettingList(wxOtherSetting);
    }

    /**
     * 新增其他配置
     *
     * @param wxOtherSetting 其他配置
     * @return 结果
     */
    @Override
    public int insertWxOtherSetting(WxOtherSetting wxOtherSetting) {
        wxOtherSetting.setCreateTime(DateUtils.getNowDate());
        return wxOtherSettingMapper.insertWxOtherSetting(wxOtherSetting);
    }

    /**
     * 修改其他配置
     *
     * @param wxOtherSetting 其他配置
     * @return 结果
     */
    @Override
    public int updateWxOtherSetting(WxOtherSetting wxOtherSetting) {
        wxOtherSetting.setUpdateTime(DateUtils.getNowDate());
        return wxOtherSettingMapper.updateWxOtherSetting(wxOtherSetting);
    }

    /**
     * 批量删除其他配置
     *
     * @param ids 需要删除的其他配置主键
     * @return 结果
     */
    @Override
    public int deleteWxOtherSettingByIds(Long[] ids) {
        return wxOtherSettingMapper.deleteWxOtherSettingByIds(ids);
    }

    /**
     * 删除其他配置信息
     *
     * @param id 其他配置主键
     * @return 结果
     */
    @Override
    public int deleteWxOtherSettingById(Long id) {
        return wxOtherSettingMapper.deleteWxOtherSettingById(id);
    }
}
