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.PayableFeeManagementLogMapper; import com.ruoyi.cwgl.domain.PayableFeeManagementLog; import com.ruoyi.cwgl.service.IPayableFeeManagementLogService; import com.ruoyi.common.core.text.Convert; /** * 应付费用管理操作日志Service业务层处理 * * @author ruoyi * @date 2025-12-22 */ @Service @Transactional(rollbackFor = Exception.class) public class PayableFeeManagementLogServiceImpl extends BaseService implements IPayableFeeManagementLogService { protected final Logger logger = LoggerFactory.getLogger(getClass()); @Resource private PayableFeeManagementLogMapper payableFeeManagementLogMapper; /** * 查询应付费用管理操作日志 * * @param id 应付费用管理操作日志ID * @return 应付费用管理操作日志 */ @DataSource(DataSourceType.SLAVE) @Override public PayableFeeManagementLog selectPayableFeeManagementLogById(Integer id) { return payableFeeManagementLogMapper.selectPayableFeeManagementLogById(id); } /** * 查询应付费用管理操作日志 记录数 * * @param payableFeeManagementLog 应付费用管理操作日志 * @return 应付费用管理操作日志集合 */ @DataSource(DataSourceType.SLAVE) @Override public int selectPayableFeeManagementLogCount(PayableFeeManagementLog payableFeeManagementLog) { return payableFeeManagementLogMapper.selectPayableFeeManagementLogCount(payableFeeManagementLog); } /** * 查询应付费用管理操作日志列表 * * @param payableFeeManagementLog 应付费用管理操作日志 * @return 应付费用管理操作日志 */ @DataSource(DataSourceType.SLAVE) @Override public List selectPayableFeeManagementLogList(PayableFeeManagementLog payableFeeManagementLog) { return payableFeeManagementLogMapper.selectPayableFeeManagementLogList(payableFeeManagementLog); } /** * 查询应付费用管理操作日志列表 异步 导出 * * @param payableFeeManagementLog 应付费用管理操作日志 * @param exportKey 导出功能的唯一标识 * @return 应付费用管理操作日志集合 */ @DataSource(DataSourceType.SLAVE) @Async @Override public void export(PayableFeeManagementLog payableFeeManagementLog,String exportKey) { super.export(PayableFeeManagementLog.class,exportKey,"payableFeeManagementLogData",(pageNum)->{ PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE); return selectPayableFeeManagementLogList(payableFeeManagementLog); }); } /** * 新增应付费用管理操作日志 * * @param payableFeeManagementLog 应付费用管理操作日志 * @return 结果 */ @Override public int insertPayableFeeManagementLog(PayableFeeManagementLog payableFeeManagementLog) { payableFeeManagementLog.setCreateTime(DateUtils.getNowDate()); return payableFeeManagementLogMapper.insertPayableFeeManagementLog(payableFeeManagementLog); } /** * 新增应付费用管理操作日志[批量] * * @param payableFeeManagementLogs 应付费用管理操作日志 * @return 结果 */ @Override public int insertPayableFeeManagementLogBatch(List payableFeeManagementLogs) { int rows = payableFeeManagementLogMapper.insertPayableFeeManagementLogBatch(payableFeeManagementLogs); return rows; } /** * 修改应付费用管理操作日志 * * @param payableFeeManagementLog 应付费用管理操作日志 * @return 结果 */ @Override public int updatePayableFeeManagementLog(PayableFeeManagementLog payableFeeManagementLog) { return payableFeeManagementLogMapper.updatePayableFeeManagementLog(payableFeeManagementLog); } /** * 修改应付费用管理操作日志[批量] * * @param payableFeeManagementLogs 应付费用管理操作日志 * @return 结果 */ @Override public int updatePayableFeeManagementLogBatch(List payableFeeManagementLogs){ return payableFeeManagementLogMapper.updatePayableFeeManagementLogBatch(payableFeeManagementLogs); } /** * 删除应付费用管理操作日志对象 * * @param ids 需要删除的数据ID * @return 结果 */ @Override public int deletePayableFeeManagementLogByIds(String ids) { return deletePayableFeeManagementLogByIds(Convert.toIntArray(ids)); } /** * 删除应付费用管理操作日志对象 * * * @param ids 需要删除的数据ID * @return 结果 */ @Override public int deletePayableFeeManagementLogByIds(Integer[] ids) { return payableFeeManagementLogMapper.deletePayableFeeManagementLogByIds(ids); } /** * 删除应付费用管理操作日志信息 * * @param id 应付费用管理操作日志ID * @return 结果 */ @Override public int deletePayableFeeManagementLogById(Integer id) { return payableFeeManagementLogMapper.deletePayableFeeManagementLogById(id); } }