分销数据统计
parent
21790ab31d
commit
e79abc1405
|
@ -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<PageResult<RechargeOrderRespVO>> promoterOrderInfo(RechargeOrderPageReqVO pageRespVO) {
|
||||
public CommonResult<PageResult<RechargeOrderRespVO>> promoterOrderInfo(@RequestBody RechargeOrderPageReqVO pageRespVO) {
|
||||
pageRespVO.setPromoterId(SecurityFrameworkUtils.getLoginUserId());
|
||||
return CommonResult.success(rechargeOrderService.promoterOrderInfo(pageRespVO));
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue