From f7f49482695e9f94a35e5e3718d42105bb3987fb Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期五, 20 三月 2026 18:01:29 +0800
Subject: [PATCH] 新增查询
---
service/src/main/java/com/ruoyi/cwgl/service/impl/AccountLogServiceImpl.java | 181 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 181 insertions(+), 0 deletions(-)
diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/AccountLogServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/AccountLogServiceImpl.java
new file mode 100644
index 0000000..337e44e
--- /dev/null
+++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/AccountLogServiceImpl.java
@@ -0,0 +1,181 @@
+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);
+ }
+}
--
Gitblit v1.8.0