Browse Source

1、解决结算问题

rayson 6 tháng trước cách đây
mục cha
commit
fce64aad37

+ 4 - 3
citu-module-pay/citu-module-pay-api/src/main/java/com/citu/module/pay/api/wallet/dto/PayWalletAddBalanceReqDTO.java

@@ -1,5 +1,6 @@
 package com.citu.module.pay.api.wallet.dto;
 
+import com.citu.framework.common.enums.UserTypeEnum;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
@@ -18,14 +19,14 @@ public class PayWalletAddBalanceReqDTO {
 
     /**
      * 用户编号
-     *
+     * <p>
      * 关联 MemberUserDO 的 id 属性,或者 AdminUserDO 的 id 属性
      */
     @NotNull(message = "用户编号不能为空")
     private Long userId;
     /**
      * 用户类型
-     *
+     * <p>
      * 关联 {@link  UserTypeEnum}
      */
     @NotNull(message = "用户类型不能为空")
@@ -44,7 +45,7 @@ public class PayWalletAddBalanceReqDTO {
 
     /**
      * 交易金额,单位分
-     *
+     * <p>
      * 正值表示余额增加,负值表示余额减少
      */
     @NotNull(message = "交易金额不能为空")

+ 8 - 4
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/interview/InterviewInviteServiceImpl.java

@@ -4,6 +4,7 @@ package com.citu.module.menduner.system.service.interview;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.dynamic.datasource.annotation.DSTransactional;
+import com.citu.framework.common.enums.UserTypeEnum;
 import com.citu.framework.common.pojo.PageResult;
 import com.citu.framework.common.util.object.BeanUtils;
 import com.citu.framework.security.core.LoginUser;
@@ -55,8 +56,8 @@ import java.util.stream.Collectors;
 import static com.citu.framework.common.exception.util.ServiceExceptionUtil.exception;
 import static com.citu.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY3;
 import static com.citu.framework.common.util.validation.ValidationUtils.isMobile;
-import static com.citu.module.menduner.common.util.TimeUtils.generateDateTimeRange;
 import static com.citu.module.menduner.common.CommonConstants.*;
+import static com.citu.module.menduner.common.util.TimeUtils.generateDateTimeRange;
 import static com.citu.module.menduner.system.enums.ErrorCodeConstants.*;
 
 /**
@@ -295,9 +296,9 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
         reqDTO = messageUtils.buildWxSubscribeMessageByInterview(reqDTO,
                 job.getName(),
                 interviewInvite.getTime().format(DateTimeFormatter.ofPattern(FORMAT_YEAR_MONTH_DAY3)),
-                null==contactRespVO?enterprise.getName():contactRespVO.getName(),
+                null == contactRespVO ? enterprise.getName() : contactRespVO.getName(),
                 interviewInvite.getAddress(),
-                StringUtils.hasText(interviewInvite.getRemark())?interviewInvite.getRemark():"面试邀请,请点击查看详情!"
+                StringUtils.hasText(interviewInvite.getRemark()) ? interviewInvite.getRemark() : "面试邀请,请点击查看详情!"
         );
         if (null == reqVO.getId()) {
             mapper.insert(interviewInvite);
@@ -315,7 +316,6 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
             );
 
 
-
         } else {
             mapper.updateById(interviewInvite);
             messageUtils.sendSystemImAndWxSubscribeMessage(reqVO.getUserId(),
@@ -480,6 +480,7 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
         if (headhuntPrice > 0) {
             walletApi.addWalletBalance(PayWalletAddBalanceReqDTO.builder()
                     .userId(0L)
+                    .userType(UserTypeEnum.MEMBER.getValue())
                     .bizId(job.getId().toString())
                     .price(Math.toIntExact(headhuntPrice))
                     .bizType(PayWalletBizTypeEnum.PLATFORM_COMMISSION.getType())
@@ -491,6 +492,7 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
         if (null == cv.getRecommendUserId()) {
             walletApi.addWalletBalance(PayWalletAddBalanceReqDTO.builder()
                     .userId(0L)
+                    .userType(UserTypeEnum.MEMBER.getValue())
                     .bizId(job.getId().toString())
                     .price(Math.toIntExact(recommendPrice))
                     .bizType(PayWalletBizTypeEnum.NOT_RECOMMENDED.getType())
@@ -503,6 +505,7 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
                 && null != cv.getRecommendUserId()) {
             walletApi.addWalletBalance(PayWalletAddBalanceReqDTO.builder()
                     .userId(cv.getRecommendUserId())
+                    .userType(UserTypeEnum.MEMBER.getValue())
                     .bizId(job.getId().toString())
                     .price(Math.toIntExact(recommendPrice))
                     .bizType(PayWalletBizTypeEnum.RECOMMENDED_POSITIONS.getType())
@@ -515,6 +518,7 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
 
             walletApi.addWalletBalance(PayWalletAddBalanceReqDTO.builder()
                     .userId(cv.getUserId())
+                    .userType(UserTypeEnum.MEMBER.getValue())
                     .bizId(job.getId().toString())
                     .price(Math.toIntExact(cvPrice))
                     .bizType(PayWalletBizTypeEnum.DELIVERY_PERSON.getType())