| | |
| | | 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; |
| | |
| | | @Service |
| | | public class BalanceChangeRecordServiceImpl extends ServiceImpl<BalanceChangeRecordMapper, BalanceChangeRecord> implements BalanceChangeRecordService { |
| | | @Resource |
| | | private ShopBalanceStatementClient shopBalanceStatementClient; |
| | | private ShopClient shopClient; |
| | | |
| | | @Override |
| | | public IPage<BalanceChangeRecord> pageList(BalanceQuery agentQuery) { |
| | |
| | | |
| | | R<List<ShopBalanceStatement>> r; |
| | | try { |
| | | r = shopBalanceStatementClient.getList(shopBalanceStatement); |
| | | r = shopClient.getShopBalanceStatementList(shopBalanceStatement); |
| | | } catch (Exception e) { |
| | | log.error("获取店铺余额对账单列表时出错", e); |
| | | return null; |
| | |
| | | |
| | | 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("页面参数无效"); |
| | | } |
| | | |