diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/fees/ShopAllocationInfoDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/fees/ShopAllocationInfoDAO.java index 4d51f3814..893eda6f7 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/fees/ShopAllocationInfoDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/fees/ShopAllocationInfoDAO.java @@ -56,7 +56,7 @@ public class ShopAllocationInfoDAO { } for (ShopAllocationInfoDO shopAllocationInfoDO : list) { if (Objects.isNull(shopAllocationInfoDO.getStatus())) { - shopAllocationInfoDO.setStatus(AllocationPayStatusEnum.PAYING.getStatus()); + shopAllocationInfoDO.setStatus(AllocationPayStatusEnum.UNPAID.getStatus()); } } shopAllocationInfoMapper.insertOrUpdateBatch(list); diff --git a/coolstore-partner-model/src/main/java/com/cool/store/dto/UserSimpleDTO.java b/coolstore-partner-model/src/main/java/com/cool/store/dto/UserSimpleDTO.java index 84a4f2e61..239912c5f 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/dto/UserSimpleDTO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/dto/UserSimpleDTO.java @@ -1,5 +1,6 @@ package com.cool.store.dto; +import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -14,14 +15,13 @@ import lombok.Data; @Data public class UserSimpleDTO { @ApiModelProperty("用户id") + @JsonIgnore private String userId; @ApiModelProperty("名称") private String name; - @ApiModelProperty("手机号") - private String mobile; - + @JsonIgnore private String storeId; public UserSimpleDTO(String userId, String storeId) { diff --git a/coolstore-partner-model/src/main/java/com/cool/store/request/oppty/OpportunityListRequest.java b/coolstore-partner-model/src/main/java/com/cool/store/request/oppty/OpportunityListRequest.java index 7a1c0bc80..765b1c058 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/request/oppty/OpportunityListRequest.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/request/oppty/OpportunityListRequest.java @@ -34,6 +34,7 @@ public class OpportunityListRequest{ @ApiModelProperty("机会点名称") private String name; - + @ApiModelProperty("机会点优先级过滤:`0` 全部,`3` 高,`2` 中,`1` 低") + private Integer level; } \ No newline at end of file diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/fees/impl/ShopAllocationInfoServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/fees/impl/ShopAllocationInfoServiceImpl.java index 94933969a..939042d02 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/fees/impl/ShopAllocationInfoServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/fees/impl/ShopAllocationInfoServiceImpl.java @@ -79,7 +79,7 @@ public class ShopAllocationInfoServiceImpl implements ShopAllocationInfoService v.setShopId(shopId); v.setCreateUserId(userId); v.setUpdateUserId(userId); - v.setStatus(AllocationPayStatusEnum.PAYING.getStatus()); + v.setStatus(AllocationPayStatusEnum.UNPAID.getStatus()); }); shopAllocationInfoDAO.insertOrUpdateBatch(infoList); } @@ -142,7 +142,7 @@ public class ShopAllocationInfoServiceImpl implements ShopAllocationInfoService .payeeName(Objects.nonNull(allocationCompanyDO) ? allocationCompanyDO.getPayeeName() : null) .payeeCode(Objects.nonNull(allocationCompanyDO) ? allocationCompanyDO.getPayeeCode() : null) .amount(Objects.nonNull(standardConfigDO) ? standardConfigDO.getAmount() : BigDecimal.ZERO) - .status(AllocationPayStatusEnum.PAYING.getStatus()) + .status(AllocationPayStatusEnum.UNPAID.getStatus()) .build(); }) .collect(Collectors.toList()); diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/fees/impl/WalletPayInfoServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/fees/impl/WalletPayInfoServiceImpl.java index f771b459f..f5a622729 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/fees/impl/WalletPayInfoServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/fees/impl/WalletPayInfoServiceImpl.java @@ -101,13 +101,15 @@ public class WalletPayInfoServiceImpl implements WalletPayInfoService { throw new ServiceException(ErrorCodeEnum.THE_USER_IS_PAYING); } try { + // 使用网商钱包支付 + Integer walletType = 2; // 查询所有费用 List list = shopAllocationInfoDAO.getByShopId(request.getShopId()); Map allocationAmountMap = CollStreamUtil.toMap(list, ShopAllocationInfoDO::getExpenseType, ShopAllocationInfoDO::getAmount); Map allocationInfoMap = CollStreamUtil.toMap(list, ShopAllocationInfoDO::getExpenseType, v -> v); // 支付校验 - verifyPay(request, shopInfo, allocationAmountMap); + verifyPay(request, shopInfo, allocationAmountMap, walletType); // 批量发起转账 PartnerUserInfoVO user = PartnerUserHolder.getUser(); @@ -124,7 +126,7 @@ public class WalletPayInfoServiceImpl implements WalletPayInfoService { assert feeItem != null; return new BatchTransferRequest.TransDataRequest(payNo, feeItem.getFeeItemId(), shopAllocationInfoDO.getPayeeCode(), null, payAmount.toString(), feeItem.getDesc()); }); - BatchTransferRequest transRequest = new BatchTransferRequest(2, shopInfo.getStoreId(), request.getPayPwd(), transDataList); + BatchTransferRequest transRequest = new BatchTransferRequest(walletType, shopInfo.getStoreId(), request.getPayPwd(), transDataList); BatchTransferDTO batchTransferDTO = walletApiService.batchTransfer(transRequest); if (CollectionUtils.isEmpty(batchTransferDTO.getTransArray())) { throw new ServiceException(ErrorCodeEnum.WALLET_TRANS_FAIL); @@ -246,7 +248,7 @@ public class WalletPayInfoServiceImpl implements WalletPayInfoService { /** * 支付校验 */ - private void verifyPay(WalletPayRequest request, ShopInfoDO shopInfo, Map allocationAmountMap) { + private void verifyPay(WalletPayRequest request, ShopInfoDO shopInfo, Map allocationAmountMap, Integer walletType) { // 校验费用类型 for (String expenseType : request.getExpenseTypes()) { if (!DictConstants.PING_AN_DEFAULT_ALLOCATION_EXPENSE_TYPE_CODES.contains(expenseType)) { @@ -284,7 +286,7 @@ public class WalletPayInfoServiceImpl implements WalletPayInfoService { } // 校验余额 List accountInfo = walletApiService.getAccountInfo(new OutStoreIdRequest(shopInfo.getStoreId())); - AccountInfoDTO accountInfoDTO = accountInfo.stream().filter(v -> CommonConstants.INDEX_ONE.equals(v.getWalletType()) && CommonConstants.INDEX_ZERO.equals(v.getLabelingStatus())).findFirst().orElse(null); + AccountInfoDTO accountInfoDTO = accountInfo.stream().filter(v -> Objects.nonNull(v.getWalletType()) && v.getWalletType().equals(walletType)).findFirst().orElse(null); if (Objects.isNull(accountInfoDTO)) { throw new ServiceException(ErrorCodeEnum.NOT_EXIST_PING_AN_ACCOUNT); } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/StoreServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/StoreServiceImpl.java index 44556b1df..c097ddd17 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/StoreServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/StoreServiceImpl.java @@ -516,7 +516,6 @@ public class StoreServiceImpl implements StoreService { .filter(v -> userInfoMap.containsKey(v.getUserId())) .peek(v -> { EnterpriseUserDO user = userInfoMap.get(v.getUserId()); - v.setMobile(user.getMobile()); v.setName(user.getName()); }).collect(Collectors.groupingBy(UserSimpleDTO::getStoreId)); }