mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	分销:绑定分销的 url 调整
This commit is contained in:
		| @@ -27,7 +27,7 @@ public class BrokerageApiImpl implements BrokerageApi { | |||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public boolean bindUser(Long userId, Long bindUserId, Boolean isNewUser) { |     public boolean bindUser(Long userId, Long bindUserId, Boolean isNewUser) { | ||||||
|         return brokerageUserService.bindUser(userId, bindUserId, isNewUser); |         return brokerageUserService.bindBrokerageUser(userId, bindUserId, isNewUser); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -43,6 +43,13 @@ public class AppBrokerageUserController { | |||||||
|         return success(respVO); |         return success(respVO); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @PutMapping("/bind") | ||||||
|  |     @Operation(summary = "绑定推广员") | ||||||
|  |     @PreAuthenticated | ||||||
|  |     public CommonResult<Boolean> bindBrokerageUser(@Valid @RequestBody AppBrokerageUserBindReqVO reqVO) { | ||||||
|  |         return success(brokerageUserService.bindBrokerageUser(getLoginUserId(), reqVO.getBindUserId(), false)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     // TODO 芋艿:临时 mock => |     // TODO 芋艿:临时 mock => | ||||||
|     @GetMapping("/get-summary") |     @GetMapping("/get-summary") | ||||||
|     @Operation(summary = "获得个人分销统计") |     @Operation(summary = "获得个人分销统计") | ||||||
| @@ -119,15 +126,9 @@ public class AppBrokerageUserController { | |||||||
|     @GetMapping("/get-rank-by-price") |     @GetMapping("/get-rank-by-price") | ||||||
|     @Operation(summary = "获得分销用户排行(基于佣金)") |     @Operation(summary = "获得分销用户排行(基于佣金)") | ||||||
|     @Parameter(name = "times", description = "时间段", required = true) |     @Parameter(name = "times", description = "时间段", required = true) | ||||||
|     public CommonResult<Integer> getBrokerageUserRankByPrice( |     public CommonResult<Integer> bindBrokerageUser( | ||||||
|             @RequestParam("times") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) LocalDateTime[] times) { |             @RequestParam("times") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) LocalDateTime[] times) { | ||||||
|         return success(1); |         return success(1); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @PutMapping("/bind-user") |  | ||||||
|     @Operation(summary = "绑定推广员") |  | ||||||
|     public CommonResult<Boolean> getBrokerageUserRankByPrice(@Valid AppBrokerageUserBindReqVO reqVO) { |  | ||||||
|         return success(brokerageUserService.bindUser(getLoginUserId(), reqVO.getBindUserId(), false)); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -103,6 +103,6 @@ public interface BrokerageUserService { | |||||||
|      * @param isNewUser  是否为新用户 |      * @param isNewUser  是否为新用户 | ||||||
|      * @return 是否绑定 |      * @return 是否绑定 | ||||||
|      */ |      */ | ||||||
|     boolean bindUser(Long userId, Long bindUserId, Boolean isNewUser); |     boolean bindBrokerageUser(Long userId, Long bindUserId, Boolean isNewUser); | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -135,7 +135,7 @@ public class BrokerageUserServiceImpl implements BrokerageUserService { | |||||||
|  |  | ||||||
|     // TODO @疯狂:因为现在 user 会存在使用验证码直接注册,所以 isNewUser 不太好传递;我们是不是可以约定绑定的时间,createTime 在 30 秒内,就认为新用户; |     // TODO @疯狂:因为现在 user 会存在使用验证码直接注册,所以 isNewUser 不太好传递;我们是不是可以约定绑定的时间,createTime 在 30 秒内,就认为新用户; | ||||||
|     @Override |     @Override | ||||||
|     public boolean bindUser(Long userId, Long bindUserId, Boolean isNewUser) { |     public boolean bindBrokerageUser(Long userId, Long bindUserId, Boolean isNewUser) { | ||||||
|         // TODO @疯狂:userId 为空,搞到参数校验里哇; |         // TODO @疯狂:userId 为空,搞到参数校验里哇; | ||||||
|         if (userId == null) { |         if (userId == null) { | ||||||
|             throw exception(0); |             throw exception(0); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV