|
|
@@ -218,17 +218,14 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|
|
|
|
|
@Override
|
|
|
public PageResult<InvoiceRespVO> getInvoicePage(InvoicePageReqVO pageReqVO) {
|
|
|
- LoginUser loginUser = getLoginUser();
|
|
|
- Long distributorId;
|
|
|
- DistributorRespDTO distributor = otaDistributorApi.getDistributorByLoginUserId(loginUser.getId());
|
|
|
- if(distributor != null){
|
|
|
- distributorId = distributor.getId();
|
|
|
- pageReqVO.setAgencyId(distributorId.toString());
|
|
|
+ LoginUser agencyLoginUser = agencyAuthUtils.getAgencyLoginUser();
|
|
|
+ if (agencyLoginUser.getDistributorId() != null) {
|
|
|
+ pageReqVO.setAgencyId(agencyLoginUser.getDistributorId().toString());
|
|
|
}
|
|
|
- Long storeId = loginUser.getStoreId();
|
|
|
- if (storeId != null) {
|
|
|
- pageReqVO.setStoreId(storeId);
|
|
|
+ if (agencyLoginUser.getStoreId() != null) {
|
|
|
+ pageReqVO.setStoreId(agencyLoginUser.getStoreId());
|
|
|
}
|
|
|
+
|
|
|
IPage<InvoiceRespVO> iPage = MyBatisUtils.buildPage(pageReqVO);
|
|
|
IPage<InvoiceRespVO> page = invoiceMapper.queryInvoicePage(iPage, pageReqVO);
|
|
|
String downurl = configApi.getPlatformConfigValueByKey("newinvoice.downurl");
|