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.FundFlowLogMapper;
|
import com.ruoyi.cwgl.domain.FundFlowLog;
|
import com.ruoyi.cwgl.service.IFundFlowLogService;
|
import com.ruoyi.common.core.text.Convert;
|
|
/**
|
* 资金流水日志Service业务层处理
|
*
|
* @author ruoyi
|
* @date 2026-01-14
|
*/
|
@Service
|
@Transactional(rollbackFor = Exception.class)
|
public class FundFlowLogServiceImpl extends BaseService<FundFlowLogMapper, FundFlowLog> implements IFundFlowLogService
|
{
|
protected final Logger logger = LoggerFactory.getLogger(getClass());
|
@Resource
|
private FundFlowLogMapper fundFlowLogMapper;
|
|
|
/**
|
* 查询资金流水日志
|
*
|
* @param id 资金流水日志ID
|
* @return 资金流水日志
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public FundFlowLog selectFundFlowLogById(Integer id)
|
{
|
return fundFlowLogMapper.selectFundFlowLogById(id);
|
}
|
|
/**
|
* 查询资金流水日志 记录数
|
*
|
* @param fundFlowLog 资金流水日志
|
* @return 资金流水日志集合
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public int selectFundFlowLogCount(FundFlowLog fundFlowLog)
|
{
|
return fundFlowLogMapper.selectFundFlowLogCount(fundFlowLog);
|
}
|
|
/**
|
* 查询资金流水日志列表
|
*
|
* @param fundFlowLog 资金流水日志
|
* @return 资金流水日志
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public List<FundFlowLog> selectFundFlowLogList(FundFlowLog fundFlowLog)
|
{
|
return fundFlowLogMapper.selectFundFlowLogList(fundFlowLog);
|
}
|
|
/**
|
* 查询资金流水日志列表 异步 导出
|
*
|
* @param fundFlowLog 资金流水日志
|
* @param exportKey 导出功能的唯一标识
|
* @return 资金流水日志集合
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Async
|
@Override
|
public void export(FundFlowLog fundFlowLog,String exportKey) {
|
|
super.export(FundFlowLog.class,exportKey,"fundFlowLogData",(pageNum)->{
|
PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
|
return selectFundFlowLogList(fundFlowLog);
|
});
|
}
|
|
|
/**
|
* 新增资金流水日志
|
*
|
* @param fundFlowLog 资金流水日志
|
* @return 结果
|
*/
|
@Override
|
public int insertFundFlowLog(FundFlowLog fundFlowLog)
|
{
|
fundFlowLog.setCreateTime(DateUtils.getNowDate());
|
return fundFlowLogMapper.insertFundFlowLog(fundFlowLog);
|
}
|
|
/**
|
* 新增资金流水日志[批量]
|
*
|
* @param fundFlowLogs 资金流水日志
|
* @return 结果
|
*/
|
@Override
|
public int insertFundFlowLogBatch(List<FundFlowLog> fundFlowLogs)
|
{
|
int rows = fundFlowLogMapper.insertFundFlowLogBatch(fundFlowLogs);
|
return rows;
|
}
|
|
/**
|
* 修改资金流水日志
|
*
|
* @param fundFlowLog 资金流水日志
|
* @return 结果
|
*/
|
@Override
|
public int updateFundFlowLog(FundFlowLog fundFlowLog)
|
{
|
return fundFlowLogMapper.updateFundFlowLog(fundFlowLog);
|
}
|
|
/**
|
* 修改资金流水日志[批量]
|
*
|
* @param fundFlowLogs 资金流水日志
|
* @return 结果
|
*/
|
@Override
|
public int updateFundFlowLogBatch(List<FundFlowLog> fundFlowLogs){
|
return fundFlowLogMapper.updateFundFlowLogBatch(fundFlowLogs);
|
}
|
|
/**
|
* 删除资金流水日志对象
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteFundFlowLogByIds(String ids)
|
{
|
return deleteFundFlowLogByIds(Convert.toIntArray(ids));
|
}
|
|
/**
|
* 删除资金流水日志对象
|
*
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteFundFlowLogByIds(Integer[] ids)
|
{
|
return fundFlowLogMapper.deleteFundFlowLogByIds(ids);
|
}
|
|
/**
|
* 删除资金流水日志信息
|
*
|
* @param id 资金流水日志ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteFundFlowLogById(Integer id)
|
{
|
return fundFlowLogMapper.deleteFundFlowLogById(id);
|
}
|
}
|