|  | @@ -1,16 +1,15 @@
 | 
	
		
			
				|  |  | -package cn.newfeifan.mall.module.distri.controller.admin.sharepath;
 | 
	
		
			
				|  |  | +package cn.newfeifan.mall.module.distri.controller.app.sharepath;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import cn.newfeifan.mall.module.distri.controller.app.sharepath.vo.*;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.annotation.Resource;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import org.springframework.validation.annotation.Validated;
 | 
	
		
			
				|  |  | -import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
		
			
				|  |  |  import io.swagger.v3.oas.annotations.tags.Tag;
 | 
	
		
			
				|  |  |  import io.swagger.v3.oas.annotations.Parameter;
 | 
	
		
			
				|  |  |  import io.swagger.v3.oas.annotations.Operation;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import javax.validation.constraints.*;
 | 
	
		
			
				|  |  |  import javax.validation.*;
 | 
	
		
			
				|  |  |  import javax.servlet.http.*;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
	
		
			
				|  | @@ -29,11 +28,10 @@ import cn.newfeifan.mall.framework.operatelog.core.annotations.OperateLog;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import static cn.newfeifan.mall.framework.operatelog.core.enums.OperateTypeEnum.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import cn.newfeifan.mall.module.distri.controller.admin.sharepath.vo.*;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.module.distri.dal.dataobject.sharepath.SharePathDO;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.module.distri.service.sharepath.SharePathService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -@Tag(name = "管理后台 - 分销用户关系")
 | 
	
		
			
				|  |  | +@Tag(name = "用户 APP - 分销用户关系")
 | 
	
		
			
				|  |  |  @RestController
 | 
	
		
			
				|  |  |  @RequestMapping("/distri/share-path")
 | 
	
		
			
				|  |  |  @Validated
 | 
	
	
		
			
				|  | @@ -44,7 +42,6 @@ public class SharePathController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @PostMapping("/create")
 | 
	
		
			
				|  |  |      @Operation(summary = "创建分销用户关系")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermission('distri:share-path:create')")
 | 
	
		
			
				|  |  |      public CommonResult<Boolean> createSharePath(@Valid @RequestBody SharePathSaveReqVO createReqVO) {
 | 
	
		
			
				|  |  |          sharePathService.createSharePathByUserId(createReqVO);
 | 
	
		
			
				|  |  |          return success(true);
 | 
	
	
		
			
				|  | @@ -52,7 +49,6 @@ public class SharePathController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @GetMapping("/getTree")
 | 
	
		
			
				|  |  |      @Operation(summary = "获取分销人员关系树")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermission('distri:share-path:query')")
 | 
	
		
			
				|  |  |      public CommonResult<SharePathRespVO> getTree() {
 | 
	
		
			
				|  |  |          TreeNode sharePath = sharePathService.getTree();
 | 
	
		
			
				|  |  |          return success(BeanUtils.toBean(sharePath, SharePathRespVO.class));
 | 
	
	
		
			
				|  | @@ -60,7 +56,6 @@ public class SharePathController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @PutMapping("/transference_rela")
 | 
	
		
			
				|  |  |      @Operation(summary = "转让分销关系")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermission('distri:share-path:update')")
 | 
	
		
			
				|  |  |      public CommonResult<Boolean> transferenceRela(SharePathtransFerenceRelaReqVO sharePathtransFerenceRelaReqVO) {
 | 
	
		
			
				|  |  |          sharePathService.transferenceRela(sharePathtransFerenceRelaReqVO);
 | 
	
		
			
				|  |  |          return success(true);
 | 
	
	
		
			
				|  | @@ -69,7 +64,6 @@ public class SharePathController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @PutMapping("/update")
 | 
	
		
			
				|  |  |      @Operation(summary = "更新分销用户关系")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermission('distri:share-path:update')")
 | 
	
		
			
				|  |  |      public CommonResult<Boolean> updateSharePath(@Valid @RequestBody SharePathSaveReqVO updateReqVO) {
 | 
	
		
			
				|  |  |          sharePathService.updateSharePath(updateReqVO);
 | 
	
		
			
				|  |  |          return success(true);
 | 
	
	
		
			
				|  | @@ -78,7 +72,6 @@ public class SharePathController {
 | 
	
		
			
				|  |  |      @DeleteMapping("/delete")
 | 
	
		
			
				|  |  |      @Operation(summary = "删除分销用户关系")
 | 
	
		
			
				|  |  |      @Parameter(name = "id", description = "编号", required = true)
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermission('distri:share-path:delete')")
 | 
	
		
			
				|  |  |      public CommonResult<Boolean> deleteSharePath(@RequestParam("id") Long id) {
 | 
	
		
			
				|  |  |          sharePathService.deleteSharePath(id);
 | 
	
		
			
				|  |  |          return success(true);
 | 
	
	
		
			
				|  | @@ -87,7 +80,6 @@ public class SharePathController {
 | 
	
		
			
				|  |  |      @GetMapping("/get")
 | 
	
		
			
				|  |  |      @Operation(summary = "获得分销用户关系")
 | 
	
		
			
				|  |  |      @Parameter(name = "id", description = "编号", required = true, example = "1024")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermission('distri:share-path:query')")
 | 
	
		
			
				|  |  |      public CommonResult<SharePathRespVO> getSharePath(@RequestParam("id") Long id) {
 | 
	
		
			
				|  |  |          SharePathDO sharePath = sharePathService.getSharePath(id);
 | 
	
		
			
				|  |  |          return success(BeanUtils.toBean(sharePath, SharePathRespVO.class));
 | 
	
	
		
			
				|  | @@ -95,7 +87,6 @@ public class SharePathController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @GetMapping("/page")
 | 
	
		
			
				|  |  |      @Operation(summary = "获得分销用户关系分页")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermission('distri:share-path:query')")
 | 
	
		
			
				|  |  |      public CommonResult<PageResult<SharePathRespVO>> getSharePathPage(@Valid SharePathPageReqVO pageReqVO) {
 | 
	
		
			
				|  |  |          PageResult<SharePathDO> pageResult = sharePathService.getSharePathPage(pageReqVO);
 | 
	
		
			
				|  |  |          return success(BeanUtils.toBean(pageResult, SharePathRespVO.class));
 | 
	
	
		
			
				|  | @@ -103,7 +94,6 @@ public class SharePathController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @GetMapping("/export-excel")
 | 
	
		
			
				|  |  |      @Operation(summary = "导出分销用户关系 Excel")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermission('distri:share-path:export')")
 | 
	
		
			
				|  |  |      @OperateLog(type = EXPORT)
 | 
	
		
			
				|  |  |      public void exportSharePathExcel(@Valid SharePathPageReqVO pageReqVO,
 | 
	
		
			
				|  |  |                                       HttpServletResponse response) throws IOException {
 | 
	
	
		
			
				|  | @@ -114,4 +104,9 @@ public class SharePathController {
 | 
	
		
			
				|  |  |                  BeanUtils.toBean(list, SharePathRespVO.class));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @GetMapping("/getTeam")
 | 
	
		
			
				|  |  | +    @Operation(summary = "获取团队")
 | 
	
		
			
				|  |  | +    public CommonResult<AppSharePathRespVO> getTeam(@Valid PageParam pageParam){
 | 
	
		
			
				|  |  | +        return success(sharePathService.getTeam(pageParam));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 |