package com.ruoyi.cwgl.service.impl;
|
|
import java.util.List;
|
|
import com.ruoyi.common.utils.DateUtils;
|
import javax.annotation.Resource;
|
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.stereotype.Service;
|
import org.springframework.scheduling.annotation.Async;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.annotation.DataSource;
|
import com.ruoyi.common.enums.DataSourceType;
|
import com.ruoyi.common.core.service.BaseService;
|
|
import com.ruoyi.cwgl.mapper.AccountLogMapper;
|
import com.ruoyi.cwgl.domain.AccountLog;
|
import com.ruoyi.cwgl.service.IAccountLogService;
|
import com.ruoyi.common.core.text.Convert;
|
|
/**
|
* 账款分析日志Service业务层处理
|
*
|
* @author ruoyi
|
* @date 2026-03-20
|
*/
|
@Service
|
@Transactional(rollbackFor = Exception.class)
|
public class AccountLogServiceImpl extends BaseService<AccountLogMapper, AccountLog> implements IAccountLogService
|
{
|
protected final Logger logger = LoggerFactory.getLogger(getClass());
|
@Resource
|
private AccountLogMapper accountLogMapper;
|
|
|
/**
|
* 查询账款分析日志
|
*
|
* @param id 账款分析日志ID
|
* @return 账款分析日志
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public AccountLog selectAccountLogById(Integer id)
|
{
|
return accountLogMapper.selectAccountLogById(id);
|
}
|
|
/**
|
* 查询账款分析日志 记录数
|
*
|
* @param accountLog 账款分析日志
|
* @return 账款分析日志集合
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public int selectAccountLogCount(AccountLog accountLog)
|
{
|
return accountLogMapper.selectAccountLogCount(accountLog);
|
}
|
|
/**
|
* 查询账款分析日志列表
|
*
|
* @param accountLog 账款分析日志
|
* @return 账款分析日志
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public List<AccountLog> selectAccountLogList(AccountLog accountLog)
|
{
|
return accountLogMapper.selectAccountLogList(accountLog);
|
}
|
|
/**
|
* 查询账款分析日志列表 异步 导出
|
*
|
* @param accountLog 账款分析日志
|
* @param exportKey 导出功能的唯一标识
|
* @return 账款分析日志集合
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Async
|
@Override
|
public void export(AccountLog accountLog,String exportKey) {
|
|
super.export(AccountLog.class,exportKey,"accountLogData",(pageNum)->{
|
PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
|
return selectAccountLogList(accountLog);
|
});
|
}
|
|
|
/**
|
* 新增账款分析日志
|
*
|
* @param accountLog 账款分析日志
|
* @return 结果
|
*/
|
@Override
|
public int insertAccountLog(AccountLog accountLog)
|
{
|
accountLog.setCreateTime(DateUtils.getNowDate());
|
return accountLogMapper.insertAccountLog(accountLog);
|
}
|
|
/**
|
* 新增账款分析日志[批量]
|
*
|
* @param accountLogs 账款分析日志
|
* @return 结果
|
*/
|
@Override
|
public int insertAccountLogBatch(List<AccountLog> accountLogs)
|
{
|
int rows = accountLogMapper.insertAccountLogBatch(accountLogs);
|
return rows;
|
}
|
|
/**
|
* 修改账款分析日志
|
*
|
* @param accountLog 账款分析日志
|
* @return 结果
|
*/
|
@Override
|
public int updateAccountLog(AccountLog accountLog)
|
{
|
return accountLogMapper.updateAccountLog(accountLog);
|
}
|
|
/**
|
* 修改账款分析日志[批量]
|
*
|
* @param accountLogs 账款分析日志
|
* @return 结果
|
*/
|
@Override
|
public int updateAccountLogBatch(List<AccountLog> accountLogs){
|
return accountLogMapper.updateAccountLogBatch(accountLogs);
|
}
|
|
/**
|
* 删除账款分析日志对象
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteAccountLogByIds(String ids)
|
{
|
return deleteAccountLogByIds(Convert.toIntArray(ids));
|
}
|
|
/**
|
* 删除账款分析日志对象
|
*
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteAccountLogByIds(Integer[] ids)
|
{
|
return accountLogMapper.deleteAccountLogByIds(ids);
|
}
|
|
/**
|
* 删除账款分析日志信息
|
*
|
* @param id 账款分析日志ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteAccountLogById(Integer id)
|
{
|
return accountLogMapper.deleteAccountLogById(id);
|
}
|
}
|