Browse Source

补充

master
188814092560 11 months ago
parent
commit
60f78dc88c
4 changed files with 58 additions and 1 deletions
  1. 46
      dating-agency-mall-constant/src/main/java/com/qniao/dam/domian/aggregate/ffpm/constant/FranchiseFeeProfitManagementTypeEnum.java
  2. 5
      dating-agency-mall-entity/src/main/java/com/qniao/dam/domain/aggregate/ffpm/entity/FranchiseFeeProfitManagement.java
  3. 4
      dating-agency-mall-server/src/main/java/com/qniao/dam/application/handler/revenuereward/RevenueRewardEventHandler.java
  4. 4
      dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/reward/RewardApplicationService.java

46
dating-agency-mall-constant/src/main/java/com/qniao/dam/domian/aggregate/ffpm/constant/FranchiseFeeProfitManagementTypeEnum.java

@ -0,0 +1,46 @@
package com.qniao.dam.domian.aggregate.ffpm.constant;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;
/**
* @author Zpj
* @date 2025/4/24
*/
@Getter
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum FranchiseFeeProfitManagementTypeEnum {
/**
* settlement
*/
SERVICE_PROVIDER_SETTLEMENT(1, "服务商入驻"),
SERVICE_PROVIDER_RECOMMEND_MATCHMAKER(2, "服务商推荐红娘"),
MATCHMAKER_RECOMMEND_MATCHMAKER(3, "红娘推荐红娘");
@EnumValue
@JsonValue
private final Integer value;
private final String desc;
FranchiseFeeProfitManagementTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
@JsonCreator
public static FranchiseFeeProfitManagementTypeEnum get(Object code) {
for (FranchiseFeeProfitManagementTypeEnum e : FranchiseFeeProfitManagementTypeEnum.values()) {
if (e.getValue().equals(code)) {
return e;
}
}
return null;
}
}

5
dating-agency-mall-entity/src/main/java/com/qniao/dam/domain/aggregate/ffpm/entity/FranchiseFeeProfitManagement.java

@ -1,6 +1,7 @@
package com.qniao.dam.domain.aggregate.ffpm.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qniao.dam.domian.aggregate.ffpm.constant.FranchiseFeeProfitManagementTypeEnum;
import com.qniao.dam.domian.aggregate.walletaccount.constant.IdentityTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -26,6 +27,8 @@ public class FranchiseFeeProfitManagement extends Entity<FranchiseFeeProfitManag
@ApiModelProperty("身份类型(个人、组织)")
private IdentityTypeEnum identityType;
private FranchiseFeeProfitManagementTypeEnum type;
@ApiModelProperty("是否完成分润")
private Boolean isFinish;
@ -33,10 +36,12 @@ public class FranchiseFeeProfitManagement extends Entity<FranchiseFeeProfitManag
private Long associatedOrderId;
public static FranchiseFeeProfitManagement initOrg(Long orgId,
FranchiseFeeProfitManagementTypeEnum type,
Long associatedOrderId) {
FranchiseFeeProfitManagement management = new FranchiseFeeProfitManagement();
management.setOrgId(orgId);
management.setIdentityType(IdentityTypeEnum.ORGANIZATION);
management.setType(type);
management.setIsFinish(false);
management.setAssociatedOrderId(associatedOrderId);
return management;

4
dating-agency-mall-server/src/main/java/com/qniao/dam/application/handler/revenuereward/RevenueRewardEventHandler.java

@ -9,6 +9,7 @@ import com.qniao.dam.domain.aggregate.revenuereward.entity.RevenueReward;
import com.qniao.dam.domain.aggregate.revenuereward.valueobj.RevenueRewardRecord;
import com.qniao.dam.domain.aggregate.revenuereward.valueobj.RevenueRewardRecoveredRecord;
import com.qniao.dam.domain.aggregate.rewardconfig.entity.RewardConfig;
import com.qniao.dam.domian.aggregate.ffpm.constant.FranchiseFeeProfitManagementTypeEnum;
import com.qniao.dam.domian.aggregate.revenuereward.event.RevenueRewardRecoveryRequirementFilledEvent;
import com.qniao.dam.domian.aggregate.revenuereward.event.RevenueRewardUpdatedEvent;
import com.qniao.dam.domian.aggregate.rewardconfig.constant.RewardTypeEnum;
@ -112,7 +113,8 @@ public class RevenueRewardEventHandler extends BaseApplicationService {
//推荐服务商回本后 先提取50%,剩余20需要被推荐服务商回本50%后才能提取
handleServiceProviderManagementFee(mq.getRecommendServiceProviderOrgId(), mq.getStoreName(), mq.getFranchiseFee(), RewardTypeEnum.OPERATING_RECOMMEND_50);
//补充 入驻费分佣管理
FranchiseFeeProfitManagement franchiseFeeProfitManagement = FranchiseFeeProfitManagement.initOrg(mq.getOrgId(), null);
FranchiseFeeProfitManagement franchiseFeeProfitManagement = FranchiseFeeProfitManagement.initOrg(mq.getOrgId(), FranchiseFeeProfitManagementTypeEnum.SERVICE_PROVIDER_SETTLEMENT,
null);
franchiseFeeProfitManagementAggregate.create(franchiseFeeProfitManagement);
}
} else {

4
dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/reward/RewardApplicationService.java

@ -147,7 +147,11 @@ public class RewardApplicationService extends BaseApplicationService {
//门店直推的话
//门店回本前 拿100% 20%推荐费+50%门店费用30%直接拿+20%新手任务完成+ 30%回本补贴
//门店回本后 拿70% 20%推荐费+50%门店费用30%直接拿+20%新手任务完成
RevenueReward storeRevenueReward = revenueRewardQueryService.queryByOrgId(dto.getStoreOrgId());
if (!storeRevenueReward.getAllRecoveryRequirement()){
//未回本 拿100% 20%推荐费+50%门店费用30%直接拿+20%新手任务完成+ 30%回本补贴
}
}else{
//红娘推荐的话
//门店回本前+红娘没有完成新手任务 红娘直接拿20%+30%回本补贴+对照新手任务奖励

Loading…
Cancel
Save