完成微信支付以外的所有功能
This commit is contained in:
@ -141,7 +141,10 @@ public class CourseOrderController {
|
||||
Long userId = courseOrder.getUserId();
|
||||
List<Long> pathToRoot = userInfoService.findPathToRoot(userId);
|
||||
List<Long> subPathToRoot = pathToRoot.subList(1, 3);
|
||||
List<UserPerformanceSummary> userPerformanceSummaryList = commonService.findByFieldInTargetField(subPathToRoot, userPerformanceSummaryService, Function.identity(), UserPerformanceSummary::getUserId);
|
||||
List<UserPerformanceSummary> userPerformanceSummaryList = commonService.findByFieldInTargetFieldWithSpecificFields(
|
||||
subPathToRoot, userPerformanceSummaryService, Function.identity(), UserPerformanceSummary::getUserId,
|
||||
List.of(UserPerformanceSummary::getTotalAmount, UserPerformanceSummary::getNetAmount, UserPerformanceSummary::getOrderCount,
|
||||
UserPerformanceSummary::getToRelease, UserPerformanceSummary::getToSettle));
|
||||
BigDecimal rate;
|
||||
Map<String, BigDecimal> rateMap = userPerformanceSummaryService.queryRakeRewardsRate();
|
||||
for (int i = 0; i < userPerformanceSummaryList.size(); i ++ ) {
|
||||
@ -221,7 +224,9 @@ public class CourseOrderController {
|
||||
Long userId = courseOrder.getUserId();
|
||||
List<Long> pathToRoot = userInfoService.findPathToRoot(userId);
|
||||
List<Long> superUserIdList = pathToRoot.subList(1, 3);
|
||||
List<UserPerformanceSummary> userPerformanceSummaryList = commonService.findByFieldInTargetField(superUserIdList, userPerformanceSummaryService, Function.identity(), UserPerformanceSummary::getUserId);
|
||||
List<UserPerformanceSummary> userPerformanceSummaryList = commonService.findByFieldInTargetFieldWithSpecificFields(
|
||||
superUserIdList, userPerformanceSummaryService, Function.identity(), UserPerformanceSummary::getUserId,
|
||||
List.of(UserPerformanceSummary::getTotalAmount, UserPerformanceSummary::getToRelease, UserPerformanceSummary::getRefunded));
|
||||
BigDecimal rate;
|
||||
LambdaQueryWrapper<CoursePromotionCommissionPending> coursePromotionQueryWrapper = new LambdaQueryWrapper<>();
|
||||
coursePromotionQueryWrapper.eq(CoursePromotionCommissionPending::getOrderId, courseOrder.getId());
|
||||
|
@ -43,25 +43,25 @@ import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 课程推广待提成记录 控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coursePromo")
|
||||
@Slf4j
|
||||
@Tag(name = "课程推广待提成记录模块")
|
||||
@Transactional
|
||||
public class CoursePromotionCommissionPendingController {
|
||||
|
||||
@Resource
|
||||
private CoursePromotionCommissionPendingService coursePromotionCommissionPendingService;
|
||||
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
@Resource
|
||||
private UserInfoService userInfoService;
|
||||
|
||||
///**
|
||||
// * 课程推广待提成记录 控制器
|
||||
// */
|
||||
//@RestController
|
||||
//@RequestMapping("coursePromo")
|
||||
//@Slf4j
|
||||
//@Tag(name = "课程推广待提成记录模块")
|
||||
//@Transactional
|
||||
//public class CoursePromotionCommissionPendingController {
|
||||
//
|
||||
// @Resource
|
||||
// private CoursePromotionCommissionPendingService coursePromotionCommissionPendingService;
|
||||
//
|
||||
// @Resource
|
||||
// private CommonService commonService;
|
||||
//
|
||||
// @Resource
|
||||
// private UserInfoService userInfoService;
|
||||
//
|
||||
|
||||
|
||||
|
||||
@ -158,4 +158,4 @@ public class CoursePromotionCommissionPendingController {
|
||||
// voPage.setTotal(page.getTotal());
|
||||
// return ResultUtils.success(voPage);
|
||||
// }
|
||||
}
|
||||
//}
|
@ -79,8 +79,8 @@ public class AdvancementApplyController {
|
||||
.or()
|
||||
.eq(AdvancementApply::getPhone, phone)
|
||||
.and(w -> w.in(AdvancementApply::getReviewStatus, ReviewStatusEnum.APPROVED.getValue(), ReviewStatusEnum.PENDING.getValue()));
|
||||
List<AdvancementApply> applies = advancementApplyService.list(queryWrapper);
|
||||
ThrowUtils.throwIf(!applies.isEmpty(), ErrorCode.OPERATION_ERROR, "当前手机号或身份证号已申请过");
|
||||
long count = advancementApplyService.count(queryWrapper);
|
||||
ThrowUtils.throwIf(count > 0, ErrorCode.OPERATION_ERROR, "当前手机号或身份证号已申请过");
|
||||
AdvancementApply advancementApply = commonService.copyProperties(advancementApplyAddRequest, AdvancementApply.class);
|
||||
advancementApplyService.save(advancementApply);
|
||||
return ResultUtils.success(advancementApply.getId());
|
||||
|
@ -81,20 +81,20 @@ public class UserInfoController {
|
||||
|
||||
|
||||
|
||||
@PostMapping("test")
|
||||
public BaseResponse<Boolean> test() throws IOException {
|
||||
List<UserInfo> list = userInfoService.list();
|
||||
List<UserMainInfo> userMainInfoList = userMainInfoService.list();
|
||||
for (UserInfo userInfo : list) {
|
||||
String userRole = userInfo.getUserRole();
|
||||
UserRoleEnum userRoleEnum = UserRoleEnum.getEnumByValue(userRole);
|
||||
String wxQrCode = wechatGetQrcodeService.getWxQrCode(userInfo.getInvitationCode(), userRoleEnum);
|
||||
UserMainInfo userMainInfo = UserMainInfo.builder().userId(userInfo.getId()).inviteQrCode(wxQrCode).build();
|
||||
userMainInfoList.add(userMainInfo);
|
||||
}
|
||||
userMainInfoService.saveOrUpdateBatch(userMainInfoList);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
// @PostMapping("test")
|
||||
// public BaseResponse<Boolean> test() throws IOException {
|
||||
// List<UserInfo> list = userInfoService.list();
|
||||
// List<UserMainInfo> userMainInfoList = userMainInfoService.list();
|
||||
// for (UserInfo userInfo : list) {
|
||||
// String userRole = userInfo.getUserRole();
|
||||
// UserRoleEnum userRoleEnum = UserRoleEnum.getEnumByValue(userRole);
|
||||
// String wxQrCode = wechatGetQrcodeService.getWxQrCode(userInfo.getInvitationCode(), userRoleEnum);
|
||||
// UserMainInfo userMainInfo = UserMainInfo.builder().userId(userInfo.getId()).inviteQrCode(wxQrCode).build();
|
||||
// userMainInfoList.add(userMainInfo);
|
||||
// }
|
||||
// userMainInfoService.saveOrUpdateBatch(userMainInfoList);
|
||||
// return ResultUtils.success(true);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user