Commit 4a0fa2a3a4ff729dc3b3c9685e309ad69ad4a445
Merge remote-tracking branch 'origin/feature/mall_product' into feature/mall_product
Showing
14 changed files
with
223 additions
and
103 deletions
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/SortingField.java
| 1 | 1 | package cn.iocoder.yudao.framework.common.pojo; |
| 2 | 2 | |
| 3 | +import lombok.AllArgsConstructor; | |
| 4 | +import lombok.Data; | |
| 5 | +import lombok.NoArgsConstructor; | |
| 6 | + | |
| 3 | 7 | import java.io.Serializable; |
| 4 | 8 | |
| 5 | 9 | /** |
| ... | ... | @@ -7,6 +11,9 @@ import java.io.Serializable; |
| 7 | 11 | * |
| 8 | 12 | * 类名加了 ing 的原因是,避免和 ES SortField 重名。 |
| 9 | 13 | */ |
| 14 | +@Data | |
| 15 | +@NoArgsConstructor | |
| 16 | +@AllArgsConstructor | |
| 10 | 17 | public class SortingField implements Serializable { |
| 11 | 18 | |
| 12 | 19 | /** |
| ... | ... | @@ -27,30 +34,4 @@ public class SortingField implements Serializable { |
| 27 | 34 | */ |
| 28 | 35 | private String order; |
| 29 | 36 | |
| 30 | - // 空构造方法,解决反序列化 | |
| 31 | - public SortingField() { | |
| 32 | - } | |
| 33 | - | |
| 34 | - public SortingField(String field, String order) { | |
| 35 | - this.field = field; | |
| 36 | - this.order = order; | |
| 37 | - } | |
| 38 | - | |
| 39 | - public String getField() { | |
| 40 | - return field; | |
| 41 | - } | |
| 42 | - | |
| 43 | - public SortingField setField(String field) { | |
| 44 | - this.field = field; | |
| 45 | - return this; | |
| 46 | - } | |
| 47 | - | |
| 48 | - public String getOrder() { | |
| 49 | - return order; | |
| 50 | - } | |
| 51 | - | |
| 52 | - public SortingField setOrder(String order) { | |
| 53 | - this.order = order; | |
| 54 | - return this; | |
| 55 | - } | |
| 56 | 37 | } | ... | ... |
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/brokerage/AppBrokerageRecordController.java renamed to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageRecordController.java
| 1 | -package cn.iocoder.yudao.module.member.controller.app.brokerage; | |
| 1 | +package cn.iocoder.yudao.module.trade.controller.app.brokerage; | |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | 5 | import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; |
| 6 | -import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.record.AppBrokerageRecordPageReqVO; | |
| 7 | -import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.record.AppBrokerageRecordRespVO; | |
| 6 | +import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.record.AppBrokerageRecordPageReqVO; | |
| 7 | +import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.record.AppBrokerageRecordRespVO; | |
| 8 | 8 | import io.swagger.v3.oas.annotations.Operation; |
| 9 | 9 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 10 | 10 | import lombok.extern.slf4j.Slf4j; |
| ... | ... | @@ -21,7 +21,7 @@ import static java.util.Arrays.asList; |
| 21 | 21 | |
| 22 | 22 | @Tag(name = "用户 APP - 分销用户") |
| 23 | 23 | @RestController |
| 24 | -@RequestMapping("/member/brokerage-record") | |
| 24 | +@RequestMapping("/trade/brokerage-record") | |
| 25 | 25 | @Validated |
| 26 | 26 | @Slf4j |
| 27 | 27 | public class AppBrokerageRecordController { | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.trade.controller.app.brokerage; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; | |
| 6 | +import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.*; | |
| 7 | +import io.swagger.v3.oas.annotations.Operation; | |
| 8 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 9 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 10 | +import lombok.extern.slf4j.Slf4j; | |
| 11 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 12 | +import org.springframework.validation.annotation.Validated; | |
| 13 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 14 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 16 | +import org.springframework.web.bind.annotation.RestController; | |
| 17 | + | |
| 18 | +import java.time.LocalDateTime; | |
| 19 | + | |
| 20 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 21 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 22 | +import static java.util.Arrays.asList; | |
| 23 | + | |
| 24 | +@Tag(name = "用户 APP - 分销用户") | |
| 25 | +@RestController | |
| 26 | +@RequestMapping("/trade/brokerage-user") | |
| 27 | +@Validated | |
| 28 | +@Slf4j | |
| 29 | +public class AppBrokerageUserController { | |
| 30 | + | |
| 31 | + // TODO 芋艿:临时 mock => | |
| 32 | + @GetMapping("/get-summary") | |
| 33 | + @Operation(summary = "获得个人分销统计") | |
| 34 | + @PreAuthenticated | |
| 35 | + public CommonResult<AppBrokerageUserMySummaryRespVO> getBrokerageUserSummary() { | |
| 36 | + AppBrokerageUserMySummaryRespVO respVO = new AppBrokerageUserMySummaryRespVO() | |
| 37 | + .setYesterdayBrokeragePrice(1) | |
| 38 | + .setBrokeragePrice(2) | |
| 39 | + .setFrozenBrokeragePrice(3) | |
| 40 | + .setWithdrawBrokeragePrice(4) | |
| 41 | + .setFirstBrokerageUserCount(166) | |
| 42 | + .setSecondBrokerageUserCount(233); | |
| 43 | + return success(respVO); | |
| 44 | + } | |
| 45 | + | |
| 46 | + // TODO 芋艿:临时 mock => | |
| 47 | + @GetMapping("/rank-page-by-user-count") | |
| 48 | + @Operation(summary = "获得分销用户排行分页(基于用户量)") | |
| 49 | + @PreAuthenticated | |
| 50 | + public CommonResult<PageResult<AppBrokerageUserRankByUserCountRespVO>> getBrokerageUserRankPageByUserCount(AppBrokerageUserRankPageReqVO pageReqVO) { | |
| 51 | + AppBrokerageUserRankByUserCountRespVO vo1 = new AppBrokerageUserRankByUserCountRespVO() | |
| 52 | + .setId(1L).setNickname("芋1**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 53 | + .setBrokerageUserCount(10); | |
| 54 | + AppBrokerageUserRankByUserCountRespVO vo2 = new AppBrokerageUserRankByUserCountRespVO() | |
| 55 | + .setId(2L).setNickname("芋2**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 56 | + .setBrokerageUserCount(6); | |
| 57 | + AppBrokerageUserRankByUserCountRespVO vo3 = new AppBrokerageUserRankByUserCountRespVO() | |
| 58 | + .setId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 59 | + .setBrokerageUserCount(4); | |
| 60 | + AppBrokerageUserRankByUserCountRespVO vo4 = new AppBrokerageUserRankByUserCountRespVO() | |
| 61 | + .setId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 62 | + .setBrokerageUserCount(4); | |
| 63 | + return success(new PageResult<>(asList(vo1, vo2, vo3, vo4), 10L)); | |
| 64 | + } | |
| 65 | + | |
| 66 | + // TODO 芋艿:临时 mock => | |
| 67 | + @GetMapping("/rank-page-by-price") | |
| 68 | + @Operation(summary = "获得分销用户排行分页(基于佣金)") | |
| 69 | + @PreAuthenticated | |
| 70 | + public CommonResult<PageResult<AppBrokerageUserRankByPriceRespVO>> getBrokerageUserChildSummaryPageByPrice(AppBrokerageUserRankPageReqVO pageReqVO) { | |
| 71 | + AppBrokerageUserRankByPriceRespVO vo1 = new AppBrokerageUserRankByPriceRespVO() | |
| 72 | + .setId(1L).setNickname("芋1**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 73 | + .setBrokeragePrice(10); | |
| 74 | + AppBrokerageUserRankByPriceRespVO vo2 = new AppBrokerageUserRankByPriceRespVO() | |
| 75 | + .setId(2L).setNickname("芋2**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 76 | + .setBrokeragePrice(6); | |
| 77 | + AppBrokerageUserRankByPriceRespVO vo3 = new AppBrokerageUserRankByPriceRespVO() | |
| 78 | + .setId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 79 | + .setBrokeragePrice(4); | |
| 80 | + AppBrokerageUserRankByPriceRespVO vo4 = new AppBrokerageUserRankByPriceRespVO() | |
| 81 | + .setId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 82 | + .setBrokeragePrice(4); | |
| 83 | + return success(new PageResult<>(asList(vo1, vo2, vo3, vo4), 10L)); | |
| 84 | + } | |
| 85 | + | |
| 86 | + // TODO 芋艿:临时 mock => | |
| 87 | + @GetMapping("/child-summary-page") | |
| 88 | + @Operation(summary = "获得下级分销统计分页") | |
| 89 | + @PreAuthenticated | |
| 90 | + public CommonResult<PageResult<AppBrokerageUserChildSummaryRespVO>> getBrokerageUserChildSummaryPage( | |
| 91 | + AppBrokerageUserChildSummaryPageReqVO pageReqVO) { | |
| 92 | + AppBrokerageUserChildSummaryRespVO vo1 = new AppBrokerageUserChildSummaryRespVO() | |
| 93 | + .setId(1L).setNickname("芋1**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 94 | + .setBrokeragePrice(10).setBrokeragePrice(20).setBrokerageOrderCount(30) | |
| 95 | + .setBrokerageTime(LocalDateTime.now()); | |
| 96 | + AppBrokerageUserChildSummaryRespVO vo2 = new AppBrokerageUserChildSummaryRespVO() | |
| 97 | + .setId(1L).setNickname("芋2**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 98 | + .setBrokeragePrice(20).setBrokeragePrice(30).setBrokerageOrderCount(40) | |
| 99 | + .setBrokerageTime(LocalDateTime.now()); | |
| 100 | + return success(new PageResult<>(asList(vo1, vo2), 10L)); | |
| 101 | + } | |
| 102 | + | |
| 103 | + // TODO 芋艿:临时 mock => | |
| 104 | + @GetMapping("/get-rank-by-price") | |
| 105 | + @Operation(summary = "获得分销用户排行(基于佣金)") | |
| 106 | + @Parameter(name = "times", description = "时间段", required = true) | |
| 107 | + public CommonResult<Integer> getBrokerageUserRankByPrice( | |
| 108 | + @RequestParam("times") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) LocalDateTime[] times) { | |
| 109 | + return success(1); | |
| 110 | + } | |
| 111 | + | |
| 112 | +} | ... | ... |
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/brokerage/AppBrokerageWithdrawController.java renamed to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageWithdrawController.java
| 1 | -package cn.iocoder.yudao.module.member.controller.app.brokerage; | |
| 1 | +package cn.iocoder.yudao.module.trade.controller.app.brokerage; | |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | 5 | import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; |
| 6 | -import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.withdraw.AppBrokerageWithdrawRespVO; | |
| 6 | +import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.withdraw.AppBrokerageWithdrawRespVO; | |
| 7 | 7 | import io.swagger.v3.oas.annotations.Operation; |
| 8 | 8 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 9 | 9 | import lombok.extern.slf4j.Slf4j; |
| ... | ... | @@ -19,7 +19,7 @@ import static java.util.Arrays.asList; |
| 19 | 19 | |
| 20 | 20 | @Tag(name = "用户 APP - 分销提现") |
| 21 | 21 | @RestController |
| 22 | -@RequestMapping("/member/brokerage-withdraw") | |
| 22 | +@RequestMapping("/trade/brokerage-withdraw") | |
| 23 | 23 | @Validated |
| 24 | 24 | @Slf4j |
| 25 | 25 | public class AppBrokerageWithdrawController { | ... | ... |
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/brokerage/vo/record/AppBrokerageRecordPageReqVO.java renamed to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/record/AppBrokerageRecordPageReqVO.java
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/brokerage/vo/record/AppBrokerageRecordRespVO.java renamed to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/record/AppBrokerageRecordRespVO.java
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/user/AppBrokerageUserChildSummaryPageReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.SortingField; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import lombok.Data; | |
| 7 | + | |
| 8 | +@Schema(description = "用户 App - 下级分销统计分页 Request VO") | |
| 9 | +@Data | |
| 10 | +public class AppBrokerageUserChildSummaryPageReqVO extends PageParam { | |
| 11 | + | |
| 12 | + public static final String SORT_FIELD_USER_COUNT = "userCount"; | |
| 13 | + public static final String SORT_FIELD_ORDER_COUNT = "orderCount"; | |
| 14 | + public static final String SORT_FIELD_PRICE = "price"; | |
| 15 | + | |
| 16 | + @Schema(description = "用户昵称", example = "李") // 模糊匹配 | |
| 17 | + private String nickname; | |
| 18 | + | |
| 19 | + @Schema(description = "排序字段", example = "userCount") | |
| 20 | + private SortingField sortingField; | |
| 21 | + | |
| 22 | + @Schema(description = "下级的级别", example = "1") // 1 - 直接下级;2 - 间接下级 | |
| 23 | + private Integer level; | |
| 24 | + | |
| 25 | +} | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/user/AppBrokerageUserChildSummaryRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | + | |
| 8 | +@Schema(description = "用户 App - 下级分销统计 Response VO") | |
| 9 | +@Data | |
| 10 | +public class AppBrokerageUserChildSummaryRespVO { | |
| 11 | + | |
| 12 | + @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") | |
| 13 | + private Long id; | |
| 14 | + | |
| 15 | + @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "小王") | |
| 16 | + private String nickname; | |
| 17 | + | |
| 18 | + @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xxx.jpg") | |
| 19 | + private String avatar; | |
| 20 | + | |
| 21 | + @Schema(description = "佣金金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") | |
| 22 | + private Integer brokeragePrice; | |
| 23 | + | |
| 24 | + @Schema(description = "分销订单数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20") | |
| 25 | + private Integer brokerageOrderCount; | |
| 26 | + | |
| 27 | + @Schema(description = "分销用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "30") | |
| 28 | + private Integer brokerageUserCount; | |
| 29 | + | |
| 30 | + @Schema(description = "成为分销员时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 31 | + private LocalDateTime brokerageTime; | |
| 32 | + | |
| 33 | +} | ... | ... |
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/brokerage/vo/user/AppBrokerageUserSummaryRespVO.java renamed to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/user/AppBrokerageUserMySummaryRespVO.java
| 1 | -package cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user; | |
| 1 | +package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user; | |
| 2 | 2 | |
| 3 | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 4 | import lombok.Data; |
| 5 | 5 | |
| 6 | 6 | @Schema(description = "用户 App - 个人分销统计 Response VO") |
| 7 | 7 | @Data |
| 8 | -public class AppBrokerageUserSummaryRespVO { | |
| 8 | +public class AppBrokerageUserMySummaryRespVO { | |
| 9 | 9 | |
| 10 | 10 | @Schema(description = "昨天的佣金,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") |
| 11 | 11 | private Integer yesterdayBrokeragePrice; |
| ... | ... | @@ -19,4 +19,10 @@ public class AppBrokerageUserSummaryRespVO { |
| 19 | 19 | @Schema(description = "冻结的佣金,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "234") |
| 20 | 20 | private Integer frozenBrokeragePrice; |
| 21 | 21 | |
| 22 | + @Schema(description = "分销用户数量(一级)", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") | |
| 23 | + private Integer firstBrokerageUserCount; | |
| 24 | + | |
| 25 | + @Schema(description = "分销用户数量(二级)", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") | |
| 26 | + private Integer secondBrokerageUserCount; | |
| 27 | + | |
| 22 | 28 | } | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/user/AppBrokerageUserRankByPriceRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Schema(description = "用户 App - 分销排行用户(基于用户量) Response VO") | |
| 7 | +@Data | |
| 8 | +public class AppBrokerageUserRankByPriceRespVO { | |
| 9 | + | |
| 10 | + @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") | |
| 11 | + private Long id; | |
| 12 | + | |
| 13 | + @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "小王") | |
| 14 | + private String nickname; | |
| 15 | + | |
| 16 | + @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xxx.jpg") | |
| 17 | + private String avatar; | |
| 18 | + | |
| 19 | + @Schema(description = "佣金金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") | |
| 20 | + private Integer brokeragePrice; | |
| 21 | + | |
| 22 | +} | ... | ... |
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/brokerage/vo/user/AppBrokerageUserRankRespVO.java renamed to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/user/AppBrokerageUserRankByUserCountRespVO.java
| 1 | -package cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user; | |
| 1 | +package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user; | |
| 2 | 2 | |
| 3 | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 4 | import lombok.Data; |
| 5 | 5 | |
| 6 | -@Schema(description = "用户 App - 分销排行用户 Response VO") | |
| 6 | +@Schema(description = "用户 App - 分销排行用户(基于用户量) Response VO") | |
| 7 | 7 | @Data |
| 8 | -public class AppBrokerageUserRankRespVO { | |
| 8 | +public class AppBrokerageUserRankByUserCountRespVO { | |
| 9 | 9 | |
| 10 | 10 | @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") |
| 11 | - private Long userId; | |
| 11 | + private Long id; | |
| 12 | 12 | |
| 13 | 13 | @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "小王") |
| 14 | 14 | private String nickname; |
| 15 | 15 | |
| 16 | - @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://www.iocoder.cn/xxx.jpg") | |
| 16 | + @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xxx.jpg") | |
| 17 | 17 | private String avatar; |
| 18 | 18 | |
| 19 | 19 | @Schema(description = "邀请用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") | ... | ... |
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/brokerage/vo/user/AppBrokerageUserRankPageReqVO.java renamed to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/user/AppBrokerageUserRankPageReqVO.java
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/brokerage/vo/withdraw/AppBrokerageWithdrawRespVO.java renamed to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/vo/withdraw/AppBrokerageWithdrawRespVO.java
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/brokerage/AppBrokerageUserController.java deleted
| 1 | -package cn.iocoder.yudao.module.member.controller.app.brokerage; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | -import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; | |
| 6 | -import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user.AppBrokerageUserRankPageReqVO; | |
| 7 | -import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user.AppBrokerageUserRankRespVO; | |
| 8 | -import cn.iocoder.yudao.module.member.controller.app.brokerage.vo.user.AppBrokerageUserSummaryRespVO; | |
| 9 | -import io.swagger.v3.oas.annotations.Operation; | |
| 10 | -import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | -import lombok.extern.slf4j.Slf4j; | |
| 12 | -import org.springframework.validation.annotation.Validated; | |
| 13 | -import org.springframework.web.bind.annotation.GetMapping; | |
| 14 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | -import org.springframework.web.bind.annotation.RestController; | |
| 16 | - | |
| 17 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 18 | -import static java.util.Arrays.asList; | |
| 19 | - | |
| 20 | -@Tag(name = "用户 APP - 分销用户") | |
| 21 | -@RestController | |
| 22 | -@RequestMapping("/member/brokerage-user") | |
| 23 | -@Validated | |
| 24 | -@Slf4j | |
| 25 | -public class AppBrokerageUserController { | |
| 26 | - | |
| 27 | - // TODO 芋艿:临时 mock => | |
| 28 | - @GetMapping("/get-summary") | |
| 29 | - @Operation(summary = "获得个人分销统计") | |
| 30 | - @PreAuthenticated | |
| 31 | - public CommonResult<AppBrokerageUserSummaryRespVO> getBrokerageUserSummary() { | |
| 32 | - AppBrokerageUserSummaryRespVO respVO = new AppBrokerageUserSummaryRespVO() | |
| 33 | - .setYesterdayBrokeragePrice(1) | |
| 34 | - .setBrokeragePrice(2) | |
| 35 | - .setFrozenBrokeragePrice(3) | |
| 36 | - .setWithdrawBrokeragePrice(4); | |
| 37 | - return success(respVO); | |
| 38 | - } | |
| 39 | - | |
| 40 | - @GetMapping("/rank-page") | |
| 41 | - @Operation(summary = "获得分销用户排行分页") | |
| 42 | - @PreAuthenticated | |
| 43 | - public CommonResult<PageResult<AppBrokerageUserRankRespVO>> getBrokerageUserRankPage(AppBrokerageUserRankPageReqVO pageReqVO) { | |
| 44 | - AppBrokerageUserRankRespVO vo1 = new AppBrokerageUserRankRespVO() | |
| 45 | - .setUserId(1L).setNickname("芋1**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 46 | - .setBrokerageUserCount(10); | |
| 47 | - AppBrokerageUserRankRespVO vo2 = new AppBrokerageUserRankRespVO() | |
| 48 | - .setUserId(2L).setNickname("芋2**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 49 | - .setBrokerageUserCount(6); | |
| 50 | - AppBrokerageUserRankRespVO vo3 = new AppBrokerageUserRankRespVO() | |
| 51 | - .setUserId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 52 | - .setBrokerageUserCount(4); | |
| 53 | - AppBrokerageUserRankRespVO vo4 = new AppBrokerageUserRankRespVO() | |
| 54 | - .setUserId(3L).setNickname("芋3**艿").setAvatar("http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") | |
| 55 | - .setBrokerageUserCount(4); | |
| 56 | - return success(new PageResult<>(asList(vo1, vo2, vo3, vo4), 10L)); | |
| 57 | - } | |
| 58 | - | |
| 59 | -} |