Commit 421bb7d1548667fdc8844e59345d9ce504c40cab
1 parent
51899c4c
code review:分销逻辑
Showing
21 changed files
with
71 additions
and
35 deletions
yudao-framework/yudao-spring-boot-starter-biz-error-code/pom.xml
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | <name>${project.artifactId}</name> | 14 | <name>${project.artifactId}</name> |
| 15 | <description> | 15 | <description> |
| 16 | 错误码 ErrorCode 的自动配置功能,提供如下功能: | 16 | 错误码 ErrorCode 的自动配置功能,提供如下功能: |
| 17 | - 1. 远程读取:项目启动时,从 system-server 服务,读取数据库中的 ErrorCode 错误码,实现错误码的提水可配置; | 17 | + 1. 远程读取:项目启动时,从 system-server 服务,读取数据库中的 ErrorCode 错误码,实现错误码的提示可配置; |
| 18 | 2. 自动更新:管理员在管理后台修数据库中的 ErrorCode 错误码时,项目自动从 system-server 服务加载最新的 ErrorCode 错误码; | 18 | 2. 自动更新:管理员在管理后台修数据库中的 ErrorCode 错误码时,项目自动从 system-server 服务加载最新的 ErrorCode 错误码; |
| 19 | 3. 自动写入:项目启动时,将项目本地的错误码写到 system-server 服务中,方便管理员在管理后台编辑; | 19 | 3. 自动写入:项目启动时,将项目本地的错误码写到 system-server 服务中,方便管理员在管理后台编辑; |
| 20 | </description> | 20 | </description> |
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/ErrorCodeConstants.java
| @@ -87,7 +87,7 @@ public interface ErrorCodeConstants { | @@ -87,7 +87,7 @@ public interface ErrorCodeConstants { | ||
| 87 | // ========== 分销提现 模块 1011008000 ========== | 87 | // ========== 分销提现 模块 1011008000 ========== |
| 88 | ErrorCode BROKERAGE_WITHDRAW_NOT_EXISTS = new ErrorCode(1011008000, "佣金提现记录不存在"); | 88 | ErrorCode BROKERAGE_WITHDRAW_NOT_EXISTS = new ErrorCode(1011008000, "佣金提现记录不存在"); |
| 89 | ErrorCode BROKERAGE_WITHDRAW_STATUS_NOT_AUDITING = new ErrorCode(1011008001, "佣金提现记录状态不是审核中"); | 89 | ErrorCode BROKERAGE_WITHDRAW_STATUS_NOT_AUDITING = new ErrorCode(1011008001, "佣金提现记录状态不是审核中"); |
| 90 | - ErrorCode BROKERAGE_WITHDRAW_MIN_PRICE = new ErrorCode(1011008002, "提现金额不能低于{}元"); | ||
| 91 | - ErrorCode BROKERAGE_WITHDRAW_USER_BALANCE_NOT_ENOUGH = new ErrorCode(1011008003, "您当前最多可提现{}元"); | 90 | + ErrorCode BROKERAGE_WITHDRAW_MIN_PRICE = new ErrorCode(1011008002, "提现金额不能低于 {} 元"); |
| 91 | + ErrorCode BROKERAGE_WITHDRAW_USER_BALANCE_NOT_ENOUGH = new ErrorCode(1011008003, "您当前最多可提现 {} 元"); | ||
| 92 | 92 | ||
| 93 | } | 93 | } |
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/brokerage/BrokerageWithdrawStatusEnum.java
| @@ -22,7 +22,9 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { | @@ -22,7 +22,9 @@ public enum BrokerageWithdrawStatusEnum implements IntArrayValuable { | ||
| 22 | WITHDRAW_FAIL(21, "提现失败"), | 22 | WITHDRAW_FAIL(21, "提现失败"), |
| 23 | ; | 23 | ; |
| 24 | 24 | ||
| 25 | + // TODO @疯狂:字典现在枚举在每个模块的 DictTypeConstants 里哈;可以创建一个出来;主要是想,治理每个模块到底有多少个枚举; | ||
| 25 | public static final String DICT_TYPE = "BROKERAGE_WITHDRAW_STATUS"; | 26 | public static final String DICT_TYPE = "BROKERAGE_WITHDRAW_STATUS"; |
| 27 | + | ||
| 26 | public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageWithdrawStatusEnum::getStatus).toArray(); | 28 | public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BrokerageWithdrawStatusEnum::getStatus).toArray(); |
| 27 | 29 | ||
| 28 | /** | 30 | /** |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageRecordController.java
| @@ -45,6 +45,7 @@ public class AppBrokerageRecordController { | @@ -45,6 +45,7 @@ public class AppBrokerageRecordController { | ||
| 45 | return success(BrokerageRecordConvert.INSTANCE.convertPage02(pageResult)); | 45 | return success(BrokerageRecordConvert.INSTANCE.convertPage02(pageResult)); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | + // TODO @疯狂:这里还有一个漏网之鱼~ | ||
| 48 | @GetMapping("/get-product-brokerage-price") | 49 | @GetMapping("/get-product-brokerage-price") |
| 49 | @Operation(summary = "获得商品的分销金额") | 50 | @Operation(summary = "获得商品的分销金额") |
| 50 | public CommonResult<AppBrokerageProductPriceRespVO> getProductBrokeragePrice(@RequestParam("spuId") Long spuId) { | 51 | public CommonResult<AppBrokerageProductPriceRespVO> getProductBrokeragePrice(@RequestParam("spuId") Long spuId) { |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageUserController.java
| @@ -55,6 +55,7 @@ public class AppBrokerageUserController { | @@ -55,6 +55,7 @@ public class AppBrokerageUserController { | ||
| 55 | @PreAuthenticated | 55 | @PreAuthenticated |
| 56 | public CommonResult<AppBrokerageUserRespVO> getBrokerageUser() { | 56 | public CommonResult<AppBrokerageUserRespVO> getBrokerageUser() { |
| 57 | Optional<BrokerageUserDO> user = Optional.ofNullable(brokerageUserService.getBrokerageUser(getLoginUserId())); | 57 | Optional<BrokerageUserDO> user = Optional.ofNullable(brokerageUserService.getBrokerageUser(getLoginUserId())); |
| 58 | + // 返回数据 | ||
| 58 | AppBrokerageUserRespVO respVO = new AppBrokerageUserRespVO() | 59 | AppBrokerageUserRespVO respVO = new AppBrokerageUserRespVO() |
| 59 | .setBrokerageEnabled(user.map(BrokerageUserDO::getBrokerageEnabled).orElse(false)) | 60 | .setBrokerageEnabled(user.map(BrokerageUserDO::getBrokerageEnabled).orElse(false)) |
| 60 | .setBrokeragePrice(user.map(BrokerageUserDO::getBrokeragePrice).orElse(0)) | 61 | .setBrokeragePrice(user.map(BrokerageUserDO::getBrokeragePrice).orElse(0)) |
| @@ -66,6 +67,7 @@ public class AppBrokerageUserController { | @@ -66,6 +67,7 @@ public class AppBrokerageUserController { | ||
| 66 | @Operation(summary = "绑定推广员") | 67 | @Operation(summary = "绑定推广员") |
| 67 | @PreAuthenticated | 68 | @PreAuthenticated |
| 68 | public CommonResult<Boolean> bindBrokerageUser(@Valid @RequestBody AppBrokerageUserBindReqVO reqVO) { | 69 | public CommonResult<Boolean> bindBrokerageUser(@Valid @RequestBody AppBrokerageUserBindReqVO reqVO) { |
| 70 | + // TODO @疯狂:是不是 isNewUser 不用传递哈,交给 service 自己计算出来? | ||
| 69 | return success(brokerageUserService.bindBrokerageUser(getLoginUserId(), reqVO.getBindUserId(), false)); | 71 | return success(brokerageUserService.bindBrokerageUser(getLoginUserId(), reqVO.getBindUserId(), false)); |
| 70 | } | 72 | } |
| 71 | 73 | ||
| @@ -74,17 +76,17 @@ public class AppBrokerageUserController { | @@ -74,17 +76,17 @@ public class AppBrokerageUserController { | ||
| 74 | @PreAuthenticated | 76 | @PreAuthenticated |
| 75 | public CommonResult<AppBrokerageUserMySummaryRespVO> getBrokerageUserSummary() { | 77 | public CommonResult<AppBrokerageUserMySummaryRespVO> getBrokerageUserSummary() { |
| 76 | Long userId = getLoginUserId(); | 78 | Long userId = getLoginUserId(); |
| 79 | + // 统计 yesterdayPrice、withdrawPrice、firstBrokerageUserCount、secondBrokerageUserCount 字段 | ||
| 77 | LocalDateTime yesterday = LocalDateTime.now().minusDays(1); | 80 | LocalDateTime yesterday = LocalDateTime.now().minusDays(1); |
| 78 | LocalDateTime beginTime = LocalDateTimeUtil.beginOfDay(yesterday); | 81 | LocalDateTime beginTime = LocalDateTimeUtil.beginOfDay(yesterday); |
| 79 | LocalDateTime endTime = LocalDateTimeUtil.endOfDay(yesterday); | 82 | LocalDateTime endTime = LocalDateTimeUtil.endOfDay(yesterday); |
| 80 | - | ||
| 81 | AppBrokerageUserMySummaryRespVO respVO = new AppBrokerageUserMySummaryRespVO() | 83 | AppBrokerageUserMySummaryRespVO respVO = new AppBrokerageUserMySummaryRespVO() |
| 82 | .setYesterdayPrice(brokerageRecordService.getSummaryPriceByUserId(userId, BrokerageRecordBizTypeEnum.ORDER.getType(), beginTime, endTime)) | 84 | .setYesterdayPrice(brokerageRecordService.getSummaryPriceByUserId(userId, BrokerageRecordBizTypeEnum.ORDER.getType(), beginTime, endTime)) |
| 83 | .setWithdrawPrice(brokerageWithdrawService.getSummaryPriceByUserIdAndStatus(userId, BrokerageWithdrawStatusEnum.AUDIT_SUCCESS.getStatus())) | 85 | .setWithdrawPrice(brokerageWithdrawService.getSummaryPriceByUserIdAndStatus(userId, BrokerageWithdrawStatusEnum.AUDIT_SUCCESS.getStatus())) |
| 84 | - .setBrokeragePrice(0) | ||
| 85 | - .setFrozenPrice(0) | 86 | + .setBrokeragePrice(0).setFrozenPrice(0) |
| 86 | .setFirstBrokerageUserCount(brokerageUserService.getBrokerageUserCountByBindUserId(userId, 1)) | 87 | .setFirstBrokerageUserCount(brokerageUserService.getBrokerageUserCountByBindUserId(userId, 1)) |
| 87 | .setSecondBrokerageUserCount(brokerageUserService.getBrokerageUserCountByBindUserId(userId, 2)); | 88 | .setSecondBrokerageUserCount(brokerageUserService.getBrokerageUserCountByBindUserId(userId, 2)); |
| 89 | + // 设置 brokeragePrice、frozenPrice 字段 | ||
| 88 | Optional.ofNullable(brokerageUserService.getBrokerageUser(userId)) | 90 | Optional.ofNullable(brokerageUserService.getBrokerageUser(userId)) |
| 89 | .ifPresent(user -> respVO.setBrokeragePrice(user.getBrokeragePrice()).setFrozenPrice(user.getFrozenPrice())); | 91 | .ifPresent(user -> respVO.setBrokeragePrice(user.getBrokeragePrice()).setFrozenPrice(user.getFrozenPrice())); |
| 90 | return success(respVO); | 92 | return success(respVO); |
| @@ -117,7 +119,6 @@ public class AppBrokerageUserController { | @@ -117,7 +119,6 @@ public class AppBrokerageUserController { | ||
| 117 | @PreAuthenticated | 119 | @PreAuthenticated |
| 118 | public CommonResult<PageResult<AppBrokerageUserChildSummaryRespVO>> getBrokerageUserChildSummaryPage( | 120 | public CommonResult<PageResult<AppBrokerageUserChildSummaryRespVO>> getBrokerageUserChildSummaryPage( |
| 119 | AppBrokerageUserChildSummaryPageReqVO pageReqVO) { | 121 | AppBrokerageUserChildSummaryPageReqVO pageReqVO) { |
| 120 | - // 分页查询 | ||
| 121 | PageResult<AppBrokerageUserChildSummaryRespVO> pageResult = brokerageUserService.getBrokerageUserChildSummaryPage(pageReqVO, getLoginUserId()); | 122 | PageResult<AppBrokerageUserChildSummaryRespVO> pageResult = brokerageUserService.getBrokerageUserChildSummaryPage(pageReqVO, getLoginUserId()); |
| 122 | return success(pageResult); | 123 | return success(pageResult); |
| 123 | } | 124 | } |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/brokerage/AppBrokerageWithdrawController.java
| @@ -30,6 +30,7 @@ import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLogi | @@ -30,6 +30,7 @@ import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLogi | ||
| 30 | @Validated | 30 | @Validated |
| 31 | @Slf4j | 31 | @Slf4j |
| 32 | public class AppBrokerageWithdrawController { | 32 | public class AppBrokerageWithdrawController { |
| 33 | + | ||
| 33 | @Resource | 34 | @Resource |
| 34 | private BrokerageWithdrawService brokerageWithdrawService; | 35 | private BrokerageWithdrawService brokerageWithdrawService; |
| 35 | 36 | ||
| @@ -44,6 +45,7 @@ public class AppBrokerageWithdrawController { | @@ -44,6 +45,7 @@ public class AppBrokerageWithdrawController { | ||
| 44 | PageResult<BrokerageWithdrawDO> pageResult = brokerageWithdrawService.getBrokerageWithdrawPage( | 45 | PageResult<BrokerageWithdrawDO> pageResult = brokerageWithdrawService.getBrokerageWithdrawPage( |
| 45 | BrokerageWithdrawConvert.INSTANCE.convert(pageReqVO, getLoginUserId())); | 46 | BrokerageWithdrawConvert.INSTANCE.convert(pageReqVO, getLoginUserId())); |
| 46 | // 拼接信息 | 47 | // 拼接信息 |
| 48 | + // TODO @疯狂:后端可以直接用 DictFrameworkUtils.getDictDataLabel() 去渲染哈;这样就不用 getDictDataLabelMap 方法了; | ||
| 47 | Map<String, String> statusNameMap = dictDataApi.getDictDataLabelMap(BrokerageWithdrawStatusEnum.DICT_TYPE); | 49 | Map<String, String> statusNameMap = dictDataApi.getDictDataLabelMap(BrokerageWithdrawStatusEnum.DICT_TYPE); |
| 48 | return success(BrokerageWithdrawConvert.INSTANCE.convertPage02(pageResult, statusNameMap)); | 50 | return success(BrokerageWithdrawConvert.INSTANCE.convertPage02(pageResult, statusNameMap)); |
| 49 | } | 51 | } |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/config/AppTradeConfigController.java
| @@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; | @@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 5 | import cn.iocoder.yudao.module.trade.controller.app.config.vo.AppTradeConfigRespVO; | 5 | import cn.iocoder.yudao.module.trade.controller.app.config.vo.AppTradeConfigRespVO; |
| 6 | import cn.iocoder.yudao.module.trade.dal.dataobject.config.TradeConfigDO; | 6 | import cn.iocoder.yudao.module.trade.dal.dataobject.config.TradeConfigDO; |
| 7 | import cn.iocoder.yudao.module.trade.service.config.TradeConfigService; | 7 | import cn.iocoder.yudao.module.trade.service.config.TradeConfigService; |
| 8 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 8 | import io.swagger.v3.oas.annotations.tags.Tag; | 9 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 9 | import lombok.RequiredArgsConstructor; | 10 | import lombok.RequiredArgsConstructor; |
| 10 | import lombok.extern.slf4j.Slf4j; | 11 | import lombok.extern.slf4j.Slf4j; |
| @@ -24,13 +25,15 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | @@ -24,13 +25,15 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 24 | @Validated | 25 | @Validated |
| 25 | @Slf4j | 26 | @Slf4j |
| 26 | public class AppTradeConfigController { | 27 | public class AppTradeConfigController { |
| 28 | + | ||
| 27 | @Resource | 29 | @Resource |
| 28 | private TradeConfigService tradeConfigService; | 30 | private TradeConfigService tradeConfigService; |
| 29 | 31 | ||
| 30 | @GetMapping("/get") | 32 | @GetMapping("/get") |
| 33 | + @Operation(summary = "获得交易配置") | ||
| 31 | public CommonResult<AppTradeConfigRespVO> getTradeConfig() { | 34 | public CommonResult<AppTradeConfigRespVO> getTradeConfig() { |
| 32 | TradeConfigDO tradeConfig = ObjUtil.defaultIfNull(tradeConfigService.getTradeConfig(), new TradeConfigDO()); | 35 | TradeConfigDO tradeConfig = ObjUtil.defaultIfNull(tradeConfigService.getTradeConfig(), new TradeConfigDO()); |
| 33 | - | 36 | + // TODO @疯狂:是不是直接 convert 就好啦; |
| 34 | AppTradeConfigRespVO respVO = new AppTradeConfigRespVO() | 37 | AppTradeConfigRespVO respVO = new AppTradeConfigRespVO() |
| 35 | .setBrokeragePosterUrls(tradeConfig.getBrokeragePostUrls()) | 38 | .setBrokeragePosterUrls(tradeConfig.getBrokeragePostUrls()) |
| 36 | .setBrokerageFrozenDays(tradeConfig.getBrokerageFrozenDays()) | 39 | .setBrokerageFrozenDays(tradeConfig.getBrokerageFrozenDays()) |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/config/vo/AppTradeConfigRespVO.java
| @@ -18,6 +18,7 @@ public class AppTradeConfigRespVO { | @@ -18,6 +18,7 @@ public class AppTradeConfigRespVO { | ||
| 18 | @Schema(description = "佣金提现最小金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") | 18 | @Schema(description = "佣金提现最小金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 19 | private Integer brokerageWithdrawMinPrice; | 19 | private Integer brokerageWithdrawMinPrice; |
| 20 | 20 | ||
| 21 | + // TODO @疯狂:如果是 list,要不加个 s,复数; | ||
| 21 | @Schema(description = "提现方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2]") | 22 | @Schema(description = "提现方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2]") |
| 22 | private List<Integer> brokerageWithdrawType; | 23 | private List<Integer> brokerageWithdrawType; |
| 23 | 24 |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/AppDeliverConfigController.java
| @@ -17,6 +17,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | @@ -17,6 +17,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 17 | @Validated | 17 | @Validated |
| 18 | public class AppDeliverConfigController { | 18 | public class AppDeliverConfigController { |
| 19 | 19 | ||
| 20 | + // TODO @芋艿:这里后面干掉,合并到 AppTradeConfigController 中 | ||
| 20 | @GetMapping("/get") | 21 | @GetMapping("/get") |
| 21 | @Operation(summary = "获得配送配置") | 22 | @Operation(summary = "获得配送配置") |
| 22 | public CommonResult<AppDeliveryConfigRespVO> getDeliveryConfig() { | 23 | public CommonResult<AppDeliveryConfigRespVO> getDeliveryConfig() { |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/brokerage/BrokerageUserConvert.java
| @@ -58,12 +58,12 @@ public interface BrokerageUserConvert { | @@ -58,12 +58,12 @@ public interface BrokerageUserConvert { | ||
| 58 | return target; | 58 | return target; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | - default PageResult<AppBrokerageUserRankByUserCountRespVO> convertPage03(PageResult<AppBrokerageUserRankByUserCountRespVO> pageResult, Map<Long, MemberUserRespDTO> userMap) { | ||
| 62 | - for (AppBrokerageUserRankByUserCountRespVO vo : pageResult.getList()) { | ||
| 63 | - copyTo(userMap.get(vo.getId()), vo); | ||
| 64 | - } | 61 | + default PageResult<AppBrokerageUserRankByUserCountRespVO> convertPage03(PageResult<AppBrokerageUserRankByUserCountRespVO> pageResult, |
| 62 | + Map<Long, MemberUserRespDTO> userMap) { | ||
| 63 | + pageResult.getList().forEach(vo -> copyTo(userMap.get(vo.getId()), vo)); | ||
| 65 | return pageResult; | 64 | return pageResult; |
| 66 | } | 65 | } |
| 67 | 66 | ||
| 68 | void copyTo(MemberUserRespDTO from, @MappingTarget AppBrokerageUserRankByUserCountRespVO to); | 67 | void copyTo(MemberUserRespDTO from, @MappingTarget AppBrokerageUserRankByUserCountRespVO to); |
| 68 | + | ||
| 69 | } | 69 | } |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageRecordMapper.java
| @@ -25,7 +25,6 @@ import java.util.List; | @@ -25,7 +25,6 @@ import java.util.List; | ||
| 25 | public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> { | 25 | public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> { |
| 26 | 26 | ||
| 27 | default PageResult<BrokerageRecordDO> selectPage(BrokerageRecordPageReqVO reqVO) { | 27 | default PageResult<BrokerageRecordDO> selectPage(BrokerageRecordPageReqVO reqVO) { |
| 28 | - // 分页查询 | ||
| 29 | return selectPage(reqVO, new LambdaQueryWrapperX<BrokerageRecordDO>() | 28 | return selectPage(reqVO, new LambdaQueryWrapperX<BrokerageRecordDO>() |
| 30 | .eqIfPresent(BrokerageRecordDO::getUserId, reqVO.getUserId()) | 29 | .eqIfPresent(BrokerageRecordDO::getUserId, reqVO.getUserId()) |
| 31 | .eqIfPresent(BrokerageRecordDO::getBizType, reqVO.getBizType()) | 30 | .eqIfPresent(BrokerageRecordDO::getBizType, reqVO.getBizType()) |
| @@ -59,7 +58,8 @@ public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> { | @@ -59,7 +58,8 @@ public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> { | ||
| 59 | @Param("bizType") Integer bizType, | 58 | @Param("bizType") Integer bizType, |
| 60 | @Param("status") Integer status); | 59 | @Param("status") Integer status); |
| 61 | 60 | ||
| 62 | - @Select("SELECT SUM(price) FROM trade_brokerage_record WHERE user_id = #{userId} AND biz_type = #{bizType} " + | 61 | + @Select("SELECT SUM(price) FROM trade_brokerage_record " + |
| 62 | + "WHERE user_id = #{userId} AND biz_type = #{bizType} " + | ||
| 63 | "AND create_time BETWEEN #{beginTime} AND #{endTime}") | 63 | "AND create_time BETWEEN #{beginTime} AND #{endTime}") |
| 64 | Integer selectSummaryPriceByUserIdAndBizTypeAndCreateTimeBetween(@Param("userId") Long userId, | 64 | Integer selectSummaryPriceByUserIdAndBizTypeAndCreateTimeBetween(@Param("userId") Long userId, |
| 65 | @Param("bizType") Integer bizType, | 65 | @Param("bizType") Integer bizType, |
| @@ -76,4 +76,5 @@ public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> { | @@ -76,4 +76,5 @@ public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> { | ||
| 76 | @Param("status") Integer status, | 76 | @Param("status") Integer status, |
| 77 | @Param("beginTime") LocalDateTime beginTime, | 77 | @Param("beginTime") LocalDateTime beginTime, |
| 78 | @Param("endTime") LocalDateTime endTime); | 78 | @Param("endTime") LocalDateTime endTime); |
| 79 | + | ||
| 79 | } | 80 | } |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageUserMapper.java
| @@ -145,4 +145,5 @@ public interface BrokerageUserMapper extends BaseMapperX<BrokerageUserDO> { | @@ -145,4 +145,5 @@ public interface BrokerageUserMapper extends BaseMapperX<BrokerageUserDO> { | ||
| 145 | default List<BrokerageUserDO> selectListByBindUserId(Long bindUserId) { | 145 | default List<BrokerageUserDO> selectListByBindUserId(Long bindUserId) { |
| 146 | return selectList(BrokerageUserDO::getBindUserId, bindUserId); | 146 | return selectList(BrokerageUserDO::getBindUserId, bindUserId); |
| 147 | } | 147 | } |
| 148 | + | ||
| 148 | } | 149 | } |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageWithdrawMapper.java
| @@ -36,6 +36,8 @@ public interface BrokerageWithdrawMapper extends BaseMapperX<BrokerageWithdrawDO | @@ -36,6 +36,8 @@ public interface BrokerageWithdrawMapper extends BaseMapperX<BrokerageWithdrawDO | ||
| 36 | .eq(BrokerageWithdrawDO::getStatus, status)); | 36 | .eq(BrokerageWithdrawDO::getStatus, status)); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | - @Select("SELECT SUM(price) FROM trade_brokerage_withdraw WHERE user_id = #{userId} AND status = #{status}") | 39 | + @Select("SELECT SUM(price) FROM trade_brokerage_withdraw " + |
| 40 | + "WHERE user_id = #{userId} AND status = #{status}") | ||
| 40 | Integer selectSummaryPriceByUserIdAndStatus(@Param("userId") Long userId, @Param("status") Integer status); | 41 | Integer selectSummaryPriceByUserIdAndStatus(@Param("userId") Long userId, @Param("status") Integer status); |
| 42 | + | ||
| 41 | } | 43 | } |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordService.java
| @@ -37,7 +37,7 @@ public interface BrokerageRecordService { | @@ -37,7 +37,7 @@ public interface BrokerageRecordService { | ||
| 37 | PageResult<BrokerageRecordDO> getBrokerageRecordPage(BrokerageRecordPageReqVO pageReqVO); | 37 | PageResult<BrokerageRecordDO> getBrokerageRecordPage(BrokerageRecordPageReqVO pageReqVO); |
| 38 | 38 | ||
| 39 | /** | 39 | /** |
| 40 | - * 增加佣金 | 40 | + * 增加佣金【多级分佣】 |
| 41 | * | 41 | * |
| 42 | * @param userId 会员编号 | 42 | * @param userId 会员编号 |
| 43 | * @param bizType 业务类型 | 43 | * @param bizType 业务类型 |
| @@ -46,7 +46,7 @@ public interface BrokerageRecordService { | @@ -46,7 +46,7 @@ public interface BrokerageRecordService { | ||
| 46 | void addBrokerage(Long userId, BrokerageRecordBizTypeEnum bizType, @Valid List<BrokerageAddReqBO> list); | 46 | void addBrokerage(Long userId, BrokerageRecordBizTypeEnum bizType, @Valid List<BrokerageAddReqBO> list); |
| 47 | 47 | ||
| 48 | /** | 48 | /** |
| 49 | - * 增加佣金 | 49 | + * 增加佣金【只针对自己】 |
| 50 | * | 50 | * |
| 51 | * @param userId 会员编号 | 51 | * @param userId 会员编号 |
| 52 | * @param bizType 业务类型 | 52 | * @param bizType 业务类型 |
| @@ -95,6 +95,7 @@ public interface BrokerageRecordService { | @@ -95,6 +95,7 @@ public interface BrokerageRecordService { | ||
| 95 | 95 | ||
| 96 | /** | 96 | /** |
| 97 | * 获得用户佣金排行分页列表(基于佣金总数) | 97 | * 获得用户佣金排行分页列表(基于佣金总数) |
| 98 | + * | ||
| 98 | * @param pageReqVO 分页查询 | 99 | * @param pageReqVO 分页查询 |
| 99 | * @return 排行榜分页 | 100 | * @return 排行榜分页 |
| 100 | */ | 101 | */ |
| @@ -108,4 +109,5 @@ public interface BrokerageRecordService { | @@ -108,4 +109,5 @@ public interface BrokerageRecordService { | ||
| 108 | * @return 用户的排名 | 109 | * @return 用户的排名 |
| 109 | */ | 110 | */ |
| 110 | Integer getUserRankByPrice(Long userId, LocalDateTime[] times); | 111 | Integer getUserRankByPrice(Long userId, LocalDateTime[] times); |
| 112 | + | ||
| 111 | } | 113 | } |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordServiceImpl.java
| @@ -240,10 +240,11 @@ public class BrokerageRecordServiceImpl implements BrokerageRecordService { | @@ -240,10 +240,11 @@ public class BrokerageRecordServiceImpl implements BrokerageRecordService { | ||
| 240 | return new PageResult<>(pageResult.getRecords(), pageResult.getTotal()); | 240 | return new PageResult<>(pageResult.getRecords(), pageResult.getTotal()); |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | + // TODO @疯狂:这个求出来,应该是不准的?例如说超过 100+ 名后? | ||
| 243 | @Override | 244 | @Override |
| 244 | public Integer getUserRankByPrice(Long userId, LocalDateTime[] times) { | 245 | public Integer getUserRankByPrice(Long userId, LocalDateTime[] times) { |
| 245 | AppBrokerageUserRankPageReqVO pageParam = new AppBrokerageUserRankPageReqVO().setTimes(times); | 246 | AppBrokerageUserRankPageReqVO pageParam = new AppBrokerageUserRankPageReqVO().setTimes(times); |
| 246 | - // 取前100名 | 247 | + // 取前 100 名 |
| 247 | pageParam.setPageSize(100); | 248 | pageParam.setPageSize(100); |
| 248 | PageResult<AppBrokerageUserRankByPriceRespVO> pageResult = getBrokerageUserChildSummaryPageByPrice(pageParam); | 249 | PageResult<AppBrokerageUserRankByPriceRespVO> pageResult = getBrokerageUserChildSummaryPageByPrice(pageParam); |
| 249 | // 获得索引 | 250 | // 获得索引 |
| @@ -255,21 +256,23 @@ public class BrokerageRecordServiceImpl implements BrokerageRecordService { | @@ -255,21 +256,23 @@ public class BrokerageRecordServiceImpl implements BrokerageRecordService { | ||
| 255 | @Override | 256 | @Override |
| 256 | @Transactional(rollbackFor = Exception.class) | 257 | @Transactional(rollbackFor = Exception.class) |
| 257 | public void addBrokerage(Long userId, BrokerageRecordBizTypeEnum bizType, String bizId, Integer brokeragePrice, String title) { | 258 | public void addBrokerage(Long userId, BrokerageRecordBizTypeEnum bizType, String bizId, Integer brokeragePrice, String title) { |
| 258 | - // 校验佣金余额 | 259 | + // 1. 校验佣金余额 |
| 259 | BrokerageUserDO user = brokerageUserService.getBrokerageUser(userId); | 260 | BrokerageUserDO user = brokerageUserService.getBrokerageUser(userId); |
| 260 | int balance = Optional.of(user) | 261 | int balance = Optional.of(user) |
| 261 | .map(BrokerageUserDO::getBrokeragePrice).orElse(0); | 262 | .map(BrokerageUserDO::getBrokeragePrice).orElse(0); |
| 262 | if (balance + brokeragePrice < 0) { | 263 | if (balance + brokeragePrice < 0) { |
| 264 | + // TODO @疯狂:要不 MoneyUtils 那,统一搞个 format 金额的方法?然后把分到元的字符串,统一收口掉; | ||
| 263 | throw exception(BROKERAGE_WITHDRAW_USER_BALANCE_NOT_ENOUGH, new Money(0, balance)); | 265 | throw exception(BROKERAGE_WITHDRAW_USER_BALANCE_NOT_ENOUGH, new Money(0, balance)); |
| 264 | } | 266 | } |
| 265 | 267 | ||
| 266 | - // 扣减佣金余额 | 268 | + // 2. 更新佣金余额 |
| 267 | boolean success = brokerageUserService.updateUserPrice(userId, brokeragePrice); | 269 | boolean success = brokerageUserService.updateUserPrice(userId, brokeragePrice); |
| 268 | if (!success) { | 270 | if (!success) { |
| 271 | + // 失败时,则抛出异常。只会出现扣减佣金时,余额不足的情况 | ||
| 269 | throw exception(BROKERAGE_WITHDRAW_USER_BALANCE_NOT_ENOUGH, new Money(0, balance)); | 272 | throw exception(BROKERAGE_WITHDRAW_USER_BALANCE_NOT_ENOUGH, new Money(0, balance)); |
| 270 | } | 273 | } |
| 271 | 274 | ||
| 272 | - // 新增记录 | 275 | + // 3. 新增记录 |
| 273 | BrokerageRecordDO record = BrokerageRecordConvert.INSTANCE.convert(user, bizType, bizId, 0, brokeragePrice, | 276 | BrokerageRecordDO record = BrokerageRecordConvert.INSTANCE.convert(user, bizType, bizId, 0, brokeragePrice, |
| 274 | null, title, null, null); | 277 | null, title, null, null); |
| 275 | brokerageRecordMapper.insert(record); | 278 | brokerageRecordMapper.insert(record); |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageUserServiceImpl.java
| @@ -67,7 +67,6 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { | @@ -67,7 +67,6 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { | ||
| 67 | public void updateBrokerageUserId(Long id, Long bindUserId) { | 67 | public void updateBrokerageUserId(Long id, Long bindUserId) { |
| 68 | // 校验存在 | 68 | // 校验存在 |
| 69 | BrokerageUserDO brokerageUser = validateBrokerageUserExists(id); | 69 | BrokerageUserDO brokerageUser = validateBrokerageUserExists(id); |
| 70 | - | ||
| 71 | // 绑定关系未发生变化 | 70 | // 绑定关系未发生变化 |
| 72 | if (Objects.equals(brokerageUser.getBindUserId(), bindUserId)) { | 71 | if (Objects.equals(brokerageUser.getBindUserId(), bindUserId)) { |
| 73 | return; | 72 | return; |
| @@ -185,6 +184,13 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { | @@ -185,6 +184,13 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { | ||
| 185 | return true; | 184 | return true; |
| 186 | } | 185 | } |
| 187 | 186 | ||
| 187 | + /** | ||
| 188 | + * 补全绑定用户的字段 | ||
| 189 | + * | ||
| 190 | + * @param bindUserId 绑定的用户编号 | ||
| 191 | + * @param brokerageUser update 对象 | ||
| 192 | + * @return 补全后的 update 对象 | ||
| 193 | + */ | ||
| 188 | private BrokerageUserDO fillBindUserData(Long bindUserId, BrokerageUserDO brokerageUser) { | 194 | private BrokerageUserDO fillBindUserData(Long bindUserId, BrokerageUserDO brokerageUser) { |
| 189 | return brokerageUser.setBindUserId(bindUserId).setBindUserTime(LocalDateTime.now()); | 195 | return brokerageUser.setBindUserId(bindUserId).setBindUserTime(LocalDateTime.now()); |
| 190 | } | 196 | } |
| @@ -255,6 +261,7 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { | @@ -255,6 +261,7 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { | ||
| 255 | } | 261 | } |
| 256 | 262 | ||
| 257 | // 下级不能绑定自己的上级 | 263 | // 下级不能绑定自己的上级 |
| 264 | + // TODO @疯狂:这里是不是查询不到的时候,应该有个 break 结束循环哈 | ||
| 258 | for (int i = 0; i <= Short.MAX_VALUE; i++) { | 265 | for (int i = 0; i <= Short.MAX_VALUE; i++) { |
| 259 | if (Objects.equals(bindUser.getBindUserId(), user.getId())) { | 266 | if (Objects.equals(bindUser.getBindUserId(), user.getId())) { |
| 260 | throw exception(BROKERAGE_BIND_LOOP); | 267 | throw exception(BROKERAGE_BIND_LOOP); |
| @@ -263,18 +270,24 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { | @@ -263,18 +270,24 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { | ||
| 263 | } | 270 | } |
| 264 | } | 271 | } |
| 265 | 272 | ||
| 273 | + /** | ||
| 274 | + * 根据绑定用户编号,获得绑定用户编号列表 | ||
| 275 | + * | ||
| 276 | + * @param bindUserId 绑定用户编号 | ||
| 277 | + * @param level 绑定用户的层级。 | ||
| 278 | + * 如果 level 为空,则查询 1+2 两个层级 | ||
| 279 | + * @return 绑定用户编号列表 | ||
| 280 | + */ | ||
| 266 | private List<Long> buildBindUserIdsByLevel(Long bindUserId, Integer level) { | 281 | private List<Long> buildBindUserIdsByLevel(Long bindUserId, Integer level) { |
| 282 | + Assert.isTrue(level == null || level <= 2, "目前只支持 level 小于等于 2"); | ||
| 267 | List<Long> bindUserIds = CollUtil.newArrayList(); | 283 | List<Long> bindUserIds = CollUtil.newArrayList(); |
| 268 | if (level == null || level == 1) { | 284 | if (level == null || level == 1) { |
| 269 | bindUserIds.add(bindUserId); | 285 | bindUserIds.add(bindUserId); |
| 270 | } | 286 | } |
| 271 | if (level == null || level == 2) { | 287 | if (level == null || level == 2) { |
| 272 | - List<Long> firstUserIds = convertList(brokerageUserMapper.selectListByBindUserId(bindUserId), BrokerageUserDO::getId); | ||
| 273 | - bindUserIds.addAll(firstUserIds); | 288 | + bindUserIds.addAll(convertList(brokerageUserMapper.selectListByBindUserId(bindUserId), BrokerageUserDO::getId)); |
| 274 | } | 289 | } |
| 275 | - | ||
| 276 | return bindUserIds; | 290 | return bindUserIds; |
| 277 | - | ||
| 278 | } | 291 | } |
| 279 | 292 | ||
| 280 | } | 293 | } |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageWithdrawService.java
| @@ -20,7 +20,6 @@ public interface BrokerageWithdrawService { | @@ -20,7 +20,6 @@ public interface BrokerageWithdrawService { | ||
| 20 | * @param status 审核状态 | 20 | * @param status 审核状态 |
| 21 | * @param auditReason 驳回原因 | 21 | * @param auditReason 驳回原因 |
| 22 | */ | 22 | */ |
| 23 | - | ||
| 24 | void auditBrokerageWithdraw(Integer id, BrokerageWithdrawStatusEnum status, String auditReason); | 23 | void auditBrokerageWithdraw(Integer id, BrokerageWithdrawStatusEnum status, String auditReason); |
| 25 | 24 | ||
| 26 | /** | 25 | /** |
yudao-module-mall/yudao-module-trade-biz/src/main/resources/mapper/brokerage/BrokerageUserMapper.xml
| @@ -4,14 +4,13 @@ | @@ -4,14 +4,13 @@ | ||
| 4 | 4 | ||
| 5 | <select id="selectSummaryPageByUserId" | 5 | <select id="selectSummaryPageByUserId" |
| 6 | resultType="cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserChildSummaryRespVO"> | 6 | resultType="cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserChildSummaryRespVO"> |
| 7 | - SELECT bu.id, bu.bind_user_time AS brokerageTime, | ||
| 8 | - u.nickname, u.avatar, | 7 | + SELECT bu.id, bu.bind_user_time AS brokerageTime, u.nickname, u.avatar, |
| 9 | (SELECT SUM(price) FROM trade_brokerage_record r | 8 | (SELECT SUM(price) FROM trade_brokerage_record r |
| 10 | - WHERE r.user_id = u.id AND biz_type = 1 AND r.status = 1 AND r.deleted = FALSE) AS brokeragePrice, | 9 | + WHERE r.user_id = u.id AND biz_type = 1 AND r.status = 1 AND r.deleted = FALSE) AS brokeragePrice, |
| 11 | (SELECT COUNT(1) FROM trade_brokerage_record r | 10 | (SELECT COUNT(1) FROM trade_brokerage_record r |
| 12 | - WHERE r.user_id = u.id AND biz_type = 1 AND r.status = 1 AND r.deleted = FALSE) AS brokerageOrderCount, | 11 | + WHERE r.user_id = u.id AND biz_type = 1 AND r.status = 1 AND r.deleted = FALSE) AS brokerageOrderCount, |
| 13 | (SELECT COUNT(1) FROM trade_brokerage_user c | 12 | (SELECT COUNT(1) FROM trade_brokerage_user c |
| 14 | - WHERE c.bind_user_id = u.id AND c.deleted = FALSE) AS brokerageUserCount | 13 | + WHERE c.bind_user_id = u.id AND c.deleted = FALSE) AS brokerageUserCount |
| 15 | FROM member_user AS u | 14 | FROM member_user AS u |
| 16 | JOIN trade_brokerage_user AS bu ON bu.id = u.id | 15 | JOIN trade_brokerage_user AS bu ON bu.id = u.id |
| 17 | <where> | 16 | <where> |
| @@ -22,8 +21,7 @@ | @@ -22,8 +21,7 @@ | ||
| 22 | AND bu.bind_user_id = #{userId} | 21 | AND bu.bind_user_id = #{userId} |
| 23 | </if> | 22 | </if> |
| 24 | <if test="param.level == 2"> | 23 | <if test="param.level == 2"> |
| 25 | - AND bu.bind_user_id = (SELECT id FROM trade_brokerage_user c WHERE c.bind_user_id = | ||
| 26 | - #{userId}) | 24 | + AND bu.bind_user_id IN (SELECT id FROM trade_brokerage_user c WHERE c.bind_user_id = #{userId}) |
| 27 | </if> | 25 | </if> |
| 28 | </where> | 26 | </where> |
| 29 | <choose> | 27 | <choose> |
| @@ -41,4 +39,5 @@ | @@ -41,4 +39,5 @@ | ||
| 41 | </otherwise> | 39 | </otherwise> |
| 42 | </choose> | 40 | </choose> |
| 43 | </select> | 41 | </select> |
| 42 | + | ||
| 44 | </mapper> | 43 | </mapper> |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApiImpl.java
| @@ -38,6 +38,7 @@ public class DictDataApiImpl implements DictDataApi { | @@ -38,6 +38,7 @@ public class DictDataApiImpl implements DictDataApi { | ||
| 38 | 38 | ||
| 39 | @Override | 39 | @Override |
| 40 | public List<DictDataRespDTO> getDictDataList(String type) { | 40 | public List<DictDataRespDTO> getDictDataList(String type) { |
| 41 | + // TODO @疯狂:不用 DictDataExportReqVO 哈;可以考虑直接加个允许传递 type 传递的 | ||
| 41 | List<DictDataDO> list = dictDataService.getDictDataList(new DictDataExportReqVO().setDictType(type)); | 42 | List<DictDataDO> list = dictDataService.getDictDataList(new DictDataExportReqVO().setDictType(type)); |
| 42 | return DictDataConvert.INSTANCE.convertList04(list); | 43 | return DictDataConvert.INSTANCE.convertList04(list); |
| 43 | } | 44 | } |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/dict/AppDictDataController.java
| @@ -28,10 +28,12 @@ public class AppDictDataController { | @@ -28,10 +28,12 @@ public class AppDictDataController { | ||
| 28 | @Resource | 28 | @Resource |
| 29 | private DictDataService dictDataService; | 29 | private DictDataService dictDataService; |
| 30 | 30 | ||
| 31 | + // TODO @疯狂:暂时不用 path 参数哈;主要考虑一些中间件支持的一般,例如说链路追踪之类的;还是作为一个参数噶; | ||
| 31 | @GetMapping("/type/{dictType}") | 32 | @GetMapping("/type/{dictType}") |
| 32 | @Operation(summary = "根据字典类型查询字典数据信息") | 33 | @Operation(summary = "根据字典类型查询字典数据信息") |
| 33 | - public CommonResult<List<AppDictDataRespVO>> getDicts(@PathVariable String dictType) { | 34 | + public CommonResult<List<AppDictDataRespVO>> getDictDataList(@PathVariable String dictType) { |
| 34 | List<DictDataDO> list = dictDataService.getDictDataList(new DictDataExportReqVO().setDictType(dictType)); | 35 | List<DictDataDO> list = dictDataService.getDictDataList(new DictDataExportReqVO().setDictType(dictType)); |
| 35 | return success(DictDataConvert.INSTANCE.convertList03(list)); | 36 | return success(DictDataConvert.INSTANCE.convertList03(list)); |
| 36 | } | 37 | } |
| 38 | + | ||
| 37 | } | 39 | } |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/dict/vo/AppDictDataRespVO.java
| @@ -14,6 +14,8 @@ import lombok.NoArgsConstructor; | @@ -14,6 +14,8 @@ import lombok.NoArgsConstructor; | ||
| 14 | @EqualsAndHashCode(callSuper = true) | 14 | @EqualsAndHashCode(callSuper = true) |
| 15 | public class AppDictDataRespVO extends DictDataBaseVO { | 15 | public class AppDictDataRespVO extends DictDataBaseVO { |
| 16 | 16 | ||
| 17 | + // TODO @疯狂:app 的接口,不集成 admin 接口的 vo 哈;看看是不是只返回必要的字段,类似 remark、sort 不好返回的哈; | ||
| 18 | + | ||
| 17 | @Schema(description = "字典数据编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 19 | @Schema(description = "字典数据编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 18 | private Long id; | 20 | private Long id; |
| 19 | 21 |