1
phpcjl
2024-12-19 89a28adb80842f1eba611a8dc7eaecacbbfc6498
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java
@@ -14,7 +14,7 @@
import com.ruoyi.common.core.exception.ServiceException;
import com.ruoyi.common.core.utils.bean.BeanUtils;
import com.ruoyi.other.api.domain.ShopBalanceStatement;
import com.ruoyi.other.api.feignClient.ShopBalanceStatementClient;
import com.ruoyi.other.api.feignClient.ShopClient;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -29,7 +29,7 @@
@Service
public class BalanceChangeRecordServiceImpl extends ServiceImpl<BalanceChangeRecordMapper, BalanceChangeRecord> implements BalanceChangeRecordService {
    @Resource
    private ShopBalanceStatementClient shopBalanceStatementClient;
    private ShopClient shopClient;
    @Override
    public IPage<BalanceChangeRecord> pageList(BalanceQuery agentQuery) {
@@ -60,7 +60,7 @@
        R<List<ShopBalanceStatement>> r;
        try {
            r = shopBalanceStatementClient.getList(shopBalanceStatement);
            r = shopClient.getShopBalanceStatementList(shopBalanceStatement);
        } catch (Exception e) {
            log.error("获取店铺余额对账单列表时出错", e);
            return null;
@@ -86,10 +86,13 @@
        long current = page.getCurrent();
        long size = page.getSize();
        int fromIndex = (int) (current - 1);
        if (current < 1) {
            current = 1;
        }
        int fromIndex = (int) ((current - 1) * size);
        int toIndex = (int) Math.min(fromIndex + size, walletStatisticsDetailList.size());
        if (fromIndex < 0 || toIndex > walletStatisticsDetailList.size()) {
        if (fromIndex >= walletStatisticsDetailList.size()) {
            throw new ServiceException("页面参数无效");
        }