分佣:增加获得分销排行分页 API mock
This commit is contained in:
parent
f99e2aec2d
commit
0329f13fbf
@ -1,10 +1,10 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.brokerage;
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||
import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.record.AppBrokerageRecordPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.record.AppBrokerageRecordRespVO;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.record.AppBrokerageRecordPageReqVO;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.record.AppBrokerageRecordRespVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -21,7 +21,7 @@ import static java.util.Arrays.asList;
|
||||
|
||||
@Tag(name = "用户 APP - 分销用户")
|
||||
@RestController
|
||||
@RequestMapping("/member/brokerage-record")
|
||||
@RequestMapping("/trade/brokerage-record")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class AppBrokerageRecordController {
|
@ -0,0 +1,93 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserRankByPriceRespVO;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserRankByUserCountRespVO;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserRankPageReqVO;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserSummaryRespVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
@Tag(name = "用户 APP - 分销用户")
|
||||
@RestController
|
||||
@RequestMapping("/trade/brokerage-user")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class AppBrokerageUserController {
|
||||
|
||||
// TODO 芋艿:临时 mock =>
|
||||
@GetMapping("/get-summary")
|
||||
@Operation(summary = "获得个人分销统计")
|
||||
@PreAuthenticated
|
||||
public CommonResult<AppBrokerageUserSummaryRespVO> getBrokerageUserSummary() {
|
||||
AppBrokerageUserSummaryRespVO respVO = new AppBrokerageUserSummaryRespVO()
|
||||
.setYesterdayBrokeragePrice(1)
|
||||
.setBrokeragePrice(2)
|
||||
.setFrozenBrokeragePrice(3)
|
||||
.setWithdrawBrokeragePrice(4);
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
@GetMapping("/rank-page-by-user-count")
|
||||
@Operation(summary = "获得分销用户排行分页(基于用户量)")
|
||||
@PreAuthenticated
|
||||
public CommonResult<PageResult<AppBrokerageUserRankByUserCountRespVO>> getBrokerageUserRankPageByUserCount(AppBrokerageUserRankPageReqVO pageReqVO) {
|
||||
AppBrokerageUserRankByUserCountRespVO vo1 = new AppBrokerageUserRankByUserCountRespVO()
|
||||
.setUserId(1L).setNickname("芋1**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokerageUserCount(10);
|
||||
AppBrokerageUserRankByUserCountRespVO vo2 = new AppBrokerageUserRankByUserCountRespVO()
|
||||
.setUserId(2L).setNickname("芋2**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokerageUserCount(6);
|
||||
AppBrokerageUserRankByUserCountRespVO vo3 = new AppBrokerageUserRankByUserCountRespVO()
|
||||
.setUserId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokerageUserCount(4);
|
||||
AppBrokerageUserRankByUserCountRespVO vo4 = new AppBrokerageUserRankByUserCountRespVO()
|
||||
.setUserId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokerageUserCount(4);
|
||||
return success(new PageResult<>(asList(vo1, vo2, vo3, vo4), 10L));
|
||||
}
|
||||
|
||||
@GetMapping("/rank-page-by-price")
|
||||
@Operation(summary = "获得分销用户排行分页(基于佣金)")
|
||||
@PreAuthenticated
|
||||
public CommonResult<PageResult<AppBrokerageUserRankByPriceRespVO>> getBrokerageUserRankPageByPrice(AppBrokerageUserRankPageReqVO pageReqVO) {
|
||||
AppBrokerageUserRankByPriceRespVO vo1 = new AppBrokerageUserRankByPriceRespVO()
|
||||
.setUserId(1L).setNickname("芋1**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokeragePrice(10);
|
||||
AppBrokerageUserRankByPriceRespVO vo2 = new AppBrokerageUserRankByPriceRespVO()
|
||||
.setUserId(2L).setNickname("芋2**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokeragePrice(6);
|
||||
AppBrokerageUserRankByPriceRespVO vo3 = new AppBrokerageUserRankByPriceRespVO()
|
||||
.setUserId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokeragePrice(4);
|
||||
AppBrokerageUserRankByPriceRespVO vo4 = new AppBrokerageUserRankByPriceRespVO()
|
||||
.setUserId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokeragePrice(4);
|
||||
return success(new PageResult<>(asList(vo1, vo2, vo3, vo4), 10L));
|
||||
}
|
||||
|
||||
@GetMapping("/get-rank-by-price")
|
||||
@Operation(summary = "获得分销用户排行(基于佣金)")
|
||||
@Parameter(name = "times", description = "时间段", required = true)
|
||||
public CommonResult<Integer> getBrokerageUserRankByPrice(
|
||||
@RequestParam("times") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) LocalDateTime[] times) {
|
||||
return success(1);
|
||||
}
|
||||
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.brokerage;
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||
import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.withdraw.AppBrokerageWithdrawRespVO;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.withdraw.AppBrokerageWithdrawRespVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -19,7 +19,7 @@ import static java.util.Arrays.asList;
|
||||
|
||||
@Tag(name = "用户 APP - 分销提现")
|
||||
@RestController
|
||||
@RequestMapping("/member/brokerage-withdraw")
|
||||
@RequestMapping("/trade/brokerage-withdraw")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class AppBrokerageWithdrawController {
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.brokerage.vo.record;
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.record;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.brokerage.vo.record;
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.record;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "用户 App - 分销排行用户(基于用户量) Response VO")
|
||||
@Data
|
||||
public class AppBrokerageUserRankByPriceRespVO {
|
||||
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "小王")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://www.iocoder.cn/xxx.jpg")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "佣金金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
private Integer brokeragePrice;
|
||||
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user;
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "用户 App - 分销排行用户 Response VO")
|
||||
@Schema(description = "用户 App - 分销排行用户(基于用户量) Response VO")
|
||||
@Data
|
||||
public class AppBrokerageUserRankRespVO {
|
||||
public class AppBrokerageUserRankByUserCountRespVO {
|
||||
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
private Long userId;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user;
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user;
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.brokerage.vo.withdraw;
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.withdraw;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
@ -1,59 +0,0 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.brokerage;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||
import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user.AppBrokerageUserRankPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user.AppBrokerageUserRankRespVO;
|
||||
import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user.AppBrokerageUserSummaryRespVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
@Tag(name = "用户 APP - 分销用户")
|
||||
@RestController
|
||||
@RequestMapping("/member/brokerage-user")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class AppBrokerageUserController {
|
||||
|
||||
// TODO 芋艿:临时 mock =>
|
||||
@GetMapping("/get-summary")
|
||||
@Operation(summary = "获得个人分销统计")
|
||||
@PreAuthenticated
|
||||
public CommonResult<AppBrokerageUserSummaryRespVO> getBrokerageUserSummary() {
|
||||
AppBrokerageUserSummaryRespVO respVO = new AppBrokerageUserSummaryRespVO()
|
||||
.setYesterdayBrokeragePrice(1)
|
||||
.setBrokeragePrice(2)
|
||||
.setFrozenBrokeragePrice(3)
|
||||
.setWithdrawBrokeragePrice(4);
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
@GetMapping("/rank-page")
|
||||
@Operation(summary = "获得分销用户排行分页")
|
||||
@PreAuthenticated
|
||||
public CommonResult<PageResult<AppBrokerageUserRankRespVO>> getBrokerageUserRankPage(AppBrokerageUserRankPageReqVO pageReqVO) {
|
||||
AppBrokerageUserRankRespVO vo1 = new AppBrokerageUserRankRespVO()
|
||||
.setUserId(1L).setNickname("芋1**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokerageUserCount(10);
|
||||
AppBrokerageUserRankRespVO vo2 = new AppBrokerageUserRankRespVO()
|
||||
.setUserId(2L).setNickname("芋2**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokerageUserCount(6);
|
||||
AppBrokerageUserRankRespVO vo3 = new AppBrokerageUserRankRespVO()
|
||||
.setUserId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokerageUserCount(4);
|
||||
AppBrokerageUserRankRespVO vo4 = new AppBrokerageUserRankRespVO()
|
||||
.setUserId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg")
|
||||
.setBrokerageUserCount(4);
|
||||
return success(new PageResult<>(asList(vo1, vo2, vo3, vo4), 10L));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user