|
|
@ -17,10 +17,7 @@ import com.qniao.dam.domian.aggregate.product.constant.ProductSubCategoryEnum; |
|
|
import com.qniao.dam.domian.aggregate.walletaccount.constant.IdentityTypeEnum; |
|
|
import com.qniao.dam.domian.aggregate.walletaccount.constant.IdentityTypeEnum; |
|
|
import com.qniao.dam.domian.aggregate.walletaccount.constant.TradeSceneEnum; |
|
|
import com.qniao.dam.domian.aggregate.walletaccount.constant.TradeSceneEnum; |
|
|
import com.qniao.dam.infrastructure.constant.MqExchange; |
|
|
import com.qniao.dam.infrastructure.constant.MqExchange; |
|
|
import com.qniao.dam.infrastructure.persistent.dao.domain.MarriageInformationDao; |
|
|
|
|
|
import com.qniao.dam.infrastructure.persistent.dao.domain.OperationCenterDao; |
|
|
|
|
|
import com.qniao.dam.infrastructure.persistent.dao.domain.OrderDao; |
|
|
|
|
|
import com.qniao.dam.infrastructure.persistent.dao.domain.StoreDao; |
|
|
|
|
|
|
|
|
import com.qniao.dam.infrastructure.persistent.dao.domain.*; |
|
|
import com.qniao.dam.query.matchmaker.MatchmakerQueryService; |
|
|
import com.qniao.dam.query.matchmaker.MatchmakerQueryService; |
|
|
import com.qniao.dam.query.operationcenter.OperationCenterQueryService; |
|
|
import com.qniao.dam.query.operationcenter.OperationCenterQueryService; |
|
|
import com.qniao.dam.query.revenuereward.RevenueRewardQueryService; |
|
|
import com.qniao.dam.query.revenuereward.RevenueRewardQueryService; |
|
|
@ -71,6 +68,8 @@ public class RewardApplicationService extends BaseApplicationService { |
|
|
private OperationCenterQueryService operationCenterQueryService; |
|
|
private OperationCenterQueryService operationCenterQueryService; |
|
|
@Resource |
|
|
@Resource |
|
|
private AmqpTemplate amqpTemplate; |
|
|
private AmqpTemplate amqpTemplate; |
|
|
|
|
|
@Resource |
|
|
|
|
|
private RevenueRewardDao revenueRewardDao; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -258,17 +257,17 @@ public class RewardApplicationService extends BaseApplicationService { |
|
|
if (Objects.nonNull(matchmaker.getStoreId())) { |
|
|
if (Objects.nonNull(matchmaker.getStoreId())) { |
|
|
//门店收益 |
|
|
//门店收益 |
|
|
Store store = storeQueryService.queryById(matchmaker.getStoreId()); |
|
|
Store store = storeQueryService.queryById(matchmaker.getStoreId()); |
|
|
handleAcquireReward(store.getOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_STORE_REWARD, serviceFee, meetingMi, |
|
|
|
|
|
|
|
|
handleAcquireReward(store.getOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_STORE_REWARD, dto.getReceivedAmount(), meetingMi, |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
//门店升级收益 |
|
|
//门店升级收益 |
|
|
if (Objects.nonNull(store.getParentStoreId())) { |
|
|
if (Objects.nonNull(store.getParentStoreId())) { |
|
|
Store parentStore = storeQueryService.queryById(store.getParentStoreId()); |
|
|
Store parentStore = storeQueryService.queryById(store.getParentStoreId()); |
|
|
handleAcquireReward(parentStore.getOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_STORE_UPGRADE_REWARD, serviceFee, meetingMi, |
|
|
|
|
|
|
|
|
handleAcquireReward(parentStore.getOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_STORE_UPGRADE_REWARD, dto.getReceivedAmount(), meetingMi, |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
} |
|
|
} |
|
|
//运营中心 |
|
|
//运营中心 |
|
|
if (Objects.nonNull(store.getOperationCenterOrgId())) { |
|
|
if (Objects.nonNull(store.getOperationCenterOrgId())) { |
|
|
handleAcquireReward(store.getOperationCenterOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_OPERATION_CENTER_REWARD, serviceFee, meetingMi, |
|
|
|
|
|
|
|
|
handleAcquireReward(store.getOperationCenterOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_OPERATION_CENTER_REWARD, dto.getReceivedAmount(), meetingMi, |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -366,17 +365,17 @@ public class RewardApplicationService extends BaseApplicationService { |
|
|
if (Objects.nonNull(matchmaker.getStoreId())) { |
|
|
if (Objects.nonNull(matchmaker.getStoreId())) { |
|
|
//门店收益 |
|
|
//门店收益 |
|
|
Store store = storeQueryService.queryById(matchmaker.getStoreId()); |
|
|
Store store = storeQueryService.queryById(matchmaker.getStoreId()); |
|
|
handleAcquireReward(store.getOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_STORE_REWARD, serviceFee, associatedMi, |
|
|
|
|
|
|
|
|
handleAcquireReward(store.getOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_STORE_REWARD, dto.getReceivedAmount(), associatedMi, |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
//门店升级收益 |
|
|
//门店升级收益 |
|
|
if (Objects.nonNull(store.getParentStoreId())) { |
|
|
if (Objects.nonNull(store.getParentStoreId())) { |
|
|
Store parentStore = storeQueryService.queryById(store.getParentStoreId()); |
|
|
Store parentStore = storeQueryService.queryById(store.getParentStoreId()); |
|
|
handleAcquireReward(parentStore.getOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_STORE_UPGRADE_REWARD, serviceFee, associatedMi, |
|
|
|
|
|
|
|
|
handleAcquireReward(parentStore.getOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_STORE_UPGRADE_REWARD, dto.getReceivedAmount(), associatedMi, |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
} |
|
|
} |
|
|
//运营中心 |
|
|
//运营中心 |
|
|
if (Objects.nonNull(store.getOperationCenterOrgId())) { |
|
|
if (Objects.nonNull(store.getOperationCenterOrgId())) { |
|
|
handleAcquireReward(store.getOperationCenterOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_OPERATION_CENTER_REWARD, serviceFee, associatedMi, |
|
|
|
|
|
|
|
|
handleAcquireReward(store.getOperationCenterOrgId(), IdentityTypeEnum.ORGANIZATION, RewardTypeEnum.PLATFORM_SERVICE_OPERATION_CENTER_REWARD, dto.getReceivedAmount(), associatedMi, |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
dto.getTotalAssociateOrderAmount(), dto.getOrderIdRelList(), tradeType); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -414,8 +413,12 @@ public class RewardApplicationService extends BaseApplicationService { |
|
|
public void replenishMatchmakerJoinRecommend() { |
|
|
public void replenishMatchmakerJoinRecommend() { |
|
|
List<RevenueRewardRecord> revenueRewardRecordList = revenueRewardQueryService. |
|
|
List<RevenueRewardRecord> revenueRewardRecordList = revenueRewardQueryService. |
|
|
listAllRecordBy(TradeTypeEnum.MATCHMAKER_JOIN_RECOMMEND_FEE, TradeSceneEnum.ONLINE); |
|
|
listAllRecordBy(TradeTypeEnum.MATCHMAKER_JOIN_RECOMMEND_FEE, TradeSceneEnum.ONLINE); |
|
|
if (CollUtil.isNotEmpty(revenueRewardRecordList)){ |
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(revenueRewardRecordList)) { |
|
|
|
|
|
revenueRewardRecordList.forEach(record -> { |
|
|
|
|
|
RevenueReward revenueReward = revenueRewardDao.selectById(record.getRevenueRewardId()); |
|
|
|
|
|
//判断是否个人收入 |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |