|
|
@ -1,20 +1,18 @@
|
|
|
|
package com.luoo.user.controller;
|
|
|
|
package com.luoo.user.controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import api.PageResult;
|
|
|
|
import api.Result;
|
|
|
|
import api.Result;
|
|
|
|
import com.luoo.user.dto.UserProcessApproveDto;
|
|
|
|
import com.luoo.user.dto.UserProcessApproveDto;
|
|
|
|
import com.luoo.user.dto.artist.ArtistRegisterDto;
|
|
|
|
import com.luoo.user.dto.artist.ArtistRegisterDto;
|
|
|
|
import com.luoo.user.dto.artist.ArtistUserBindDto;
|
|
|
|
import com.luoo.user.dto.artist.ArtistUserBindDto;
|
|
|
|
|
|
|
|
import com.luoo.user.pojo.ArtistInfo;
|
|
|
|
import com.luoo.user.service.ArtistService;
|
|
|
|
import com.luoo.user.service.ArtistService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @Author: yawei.huang
|
|
|
|
* @Author: yawei.huang
|
|
|
@ -34,28 +32,43 @@ public class ArtistController {
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "音乐人注册", notes = "音乐人注册")
|
|
|
|
@ApiOperation(value = "音乐人注册", notes = "音乐人注册")
|
|
|
|
@PostMapping("/register")
|
|
|
|
@PostMapping("/register")
|
|
|
|
public Result<Void> register(@ApiParam(value = "注册对象", required = true) @Valid @RequestBody ArtistRegisterDto artistRegisterDto) {
|
|
|
|
public Result<Void> register(@RequestHeader(value = "Authorization", required = true) String authorization,
|
|
|
|
|
|
|
|
@Validated @RequestBody ArtistRegisterDto artistRegisterDto) {
|
|
|
|
artistService.artistRegister(artistRegisterDto);
|
|
|
|
artistService.artistRegister(artistRegisterDto);
|
|
|
|
return Result.success();
|
|
|
|
return Result.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "音乐人审核",notes = "音乐人审核")
|
|
|
|
@ApiOperation(value = "未审核的音乐人列表", notes = "未审核的音乐人列表")
|
|
|
|
|
|
|
|
@GetMapping("/list/un-approve/{page}/{size}")
|
|
|
|
|
|
|
|
public Result<PageResult<ArtistInfo>> getUnApproveList(@ApiParam(value = "Header中的token信息", required = true) @RequestHeader("Authorization") String token,
|
|
|
|
|
|
|
|
@ApiParam(value = "页码", required = true) @PathVariable Integer page,
|
|
|
|
|
|
|
|
@ApiParam(value = "每页条数", required = true) @PathVariable Integer size) {
|
|
|
|
|
|
|
|
return Result.success(artistService.getUnApproveList(page, size));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "音乐人审核", notes = "音乐人审核")
|
|
|
|
@PostMapping("/approve")
|
|
|
|
@PostMapping("/approve")
|
|
|
|
public Result<Void> approve(@ApiParam(value = "音乐人审核对象", required = true) @Valid @RequestBody UserProcessApproveDto userProcessApproveDto) {
|
|
|
|
public Result<Void> approve(
|
|
|
|
|
|
|
|
@RequestHeader(value = "Authorization", required = true) String authorization,
|
|
|
|
|
|
|
|
@ApiParam(value = "音乐人审核对象", required = true) @Validated @RequestBody UserProcessApproveDto userProcessApproveDto) {
|
|
|
|
artistService.approve(userProcessApproveDto);
|
|
|
|
artistService.approve(userProcessApproveDto);
|
|
|
|
return Result.success();
|
|
|
|
return Result.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "音乐人-成员绑定", notes = "音乐人-成员绑定")
|
|
|
|
@ApiOperation(value = "音乐人-成员绑定", notes = "音乐人-成员绑定")
|
|
|
|
@PostMapping("/bind")
|
|
|
|
@PostMapping("/bind")
|
|
|
|
public Result<Void> memberBind(@ApiParam(value = "绑定对象",required = true) @Valid @RequestBody ArtistUserBindDto artistUserBindDto) {
|
|
|
|
public Result<Void> memberBind(
|
|
|
|
|
|
|
|
@RequestHeader(value = "Authorization", required = true) String authorization,
|
|
|
|
|
|
|
|
@ApiParam(value = "绑定对象", required = true) @Validated @RequestBody ArtistUserBindDto artistUserBindDto) {
|
|
|
|
artistService.bindArtistAndMember(artistUserBindDto);
|
|
|
|
artistService.bindArtistAndMember(artistUserBindDto);
|
|
|
|
return Result.success();
|
|
|
|
return Result.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "音乐人-成员解绑", notes = "音乐人-成员解绑")
|
|
|
|
@ApiOperation(value = "音乐人-成员解绑", notes = "音乐人-成员解绑")
|
|
|
|
@PostMapping("/unbind")
|
|
|
|
@PostMapping("/unbind")
|
|
|
|
public Result<Void> memberUnBind(@ApiParam(value = "解绑对象",required = true) @Valid @RequestBody ArtistUserBindDto artistUserBindDto) {
|
|
|
|
public Result<Void> memberUnBind(
|
|
|
|
|
|
|
|
@RequestHeader(value = "Authorization", required = true) String authorization,
|
|
|
|
|
|
|
|
@ApiParam(value = "解绑对象", required = true) @Validated @RequestBody ArtistUserBindDto artistUserBindDto) {
|
|
|
|
artistService.unBindArtistAndMember(artistUserBindDto);
|
|
|
|
artistService.unBindArtistAndMember(artistUserBindDto);
|
|
|
|
return Result.success();
|
|
|
|
return Result.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|