diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/member/MemberController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/member/MemberController.java index a3e2f99bb..8343e7c22 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/member/MemberController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/member/MemberController.java @@ -20,10 +20,7 @@ import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -63,10 +60,10 @@ public class MemberController { return CommonResult.success(rechargeOrderService.memberOrderInfo()); } @Operation(summary = "获取当前登录账号的推广员推广会员记录") - @RequestMapping(value = "/promoterOrderInfo", method = RequestMethod.GET) + @RequestMapping(value = "/promoterOrderInfo", method = RequestMethod.POST) @PreAuthenticated @TenantIgnore - public CommonResult> promoterOrderInfo(RechargeOrderPageReqVO pageRespVO) { + public CommonResult> promoterOrderInfo(@RequestBody RechargeOrderPageReqVO pageRespVO) { pageRespVO.setPromoterId(SecurityFrameworkUtils.getLoginUserId()); return CommonResult.success(rechargeOrderService.promoterOrderInfo(pageRespVO)); } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java index e35cb0b5f..1be0c09eb 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java @@ -207,7 +207,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService { appUserInfoReqDTO.setStartTime(LocalDateTimeUtil.beginOfDay(LocalDateTime.now())); appUserInfoReqDTO.setEndTime(LocalDateTimeUtil.endOfDay(LocalDateTime.now())); }else if (type == 2){ - LocalDateTime todayOfLastWeek = LocalDateTime.now(); + LocalDateTime todayOfLastWeek = LocalDateTime.now().minusDays(7); LocalDateTime monday = todayOfLastWeek.with(TemporalAdjusters.previous(DayOfWeek.SUNDAY)).plusDays(1); LocalDateTime sunday = todayOfLastWeek.with(TemporalAdjusters.next(DayOfWeek.MONDAY)).minusDays(1); appUserInfoReqDTO.setStartTime(LocalDateTimeUtil.beginOfDay(monday)); @@ -219,7 +219,8 @@ public class RechargeOrderServiceImpl implements RechargeOrderService { appUserInfoReqDTO.setStartTime(LocalDateTimeUtil.beginOfDay(firstDay)); appUserInfoReqDTO.setEndTime(LocalDateTimeUtil.endOfDay(lastDay)); } - promoterMemberOrderVO.setTotalAmount(rechargeOrderMapper.promoterOrderCount(appUserInfoReqDTO.getStartTime(),appUserInfoReqDTO.getEndTime(),promoterId)); + BigDecimal totalAmount =rechargeOrderMapper.promoterOrderCount(appUserInfoReqDTO.getStartTime(),appUserInfoReqDTO.getEndTime(),promoterId); + promoterMemberOrderVO.setTotalAmount(totalAmount); promoterMemberOrderVO.setMemberCount(memberUserApi.promoterOrderCount(appUserInfoReqDTO)); TenantDTO tenantDTO = tenantApi.getTenant(TenantContextHolder.getTenantId()); promoterMemberOrderVO.setMemberCommission(tenantDTO.getMemberCommission());