package com.ycl.platform.service.impl;
|
|
import com.ycl.platform.domain.entity.AccountingRules;
|
import com.ycl.platform.mapper.AccountingRulesMapper;
|
import com.ycl.platform.service.IAccountingRulesService;
|
import com.ycl.utils.DateUtils;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
|
/**
|
* 核算规则Service业务层处理
|
*
|
* @author gonghl
|
* @date 2024-03-21
|
*/
|
@Service
|
public class AccountingRulesServiceImpl implements IAccountingRulesService {
|
@Autowired
|
private AccountingRulesMapper accountingRulesMapper;
|
|
/**
|
* 查询核算规则
|
*
|
* @param id 核算规则主键
|
* @return 核算规则
|
*/
|
@Override
|
public AccountingRules selectAccountingRulesById(Integer id) {
|
return accountingRulesMapper.selectAccountingRulesById(id);
|
}
|
|
/**
|
* 查询核算规则列表
|
*
|
* @param accountingRules 核算规则
|
* @return 核算规则
|
*/
|
@Override
|
public List<AccountingRules> selectAccountingRulesList(AccountingRules accountingRules) {
|
return accountingRulesMapper.selectAccountingRulesList(accountingRules);
|
}
|
|
/**
|
* 新增核算规则
|
*
|
* @param accountingRules 核算规则
|
* @return 结果
|
*/
|
@Override
|
public int insertAccountingRules(AccountingRules accountingRules) {
|
accountingRules.setCreateTime(DateUtils.getNowDate());
|
accountingRules.setDeleted("0");
|
return accountingRulesMapper.insertAccountingRules(accountingRules);
|
}
|
|
/**
|
* 修改核算规则
|
*
|
* @param accountingRules 核算规则
|
* @return 结果
|
*/
|
@Override
|
public int updateAccountingRules(AccountingRules accountingRules) {
|
accountingRules.setUpdateTime(DateUtils.getNowDate());
|
return accountingRulesMapper.updateAccountingRules(accountingRules);
|
}
|
|
/**
|
* 批量删除核算规则
|
*
|
* @param ids 需要删除的核算规则主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteAccountingRulesByIds(Integer[] ids) {
|
return accountingRulesMapper.deleteAccountingRulesByIds(ids);
|
}
|
|
/**
|
* 删除核算规则信息
|
*
|
* @param id 核算规则主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteAccountingRulesById(Integer id) {
|
return accountingRulesMapper.deleteAccountingRulesById(id);
|
}
|
}
|