|
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import javax.validation.Valid;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -64,7 +65,7 @@ public class OpenShareController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "老师乐谱分享分润")
|
|
|
@PostMapping(value="/musicShareProfit")
|
|
|
- public HttpResponseResult<ShareProfitVo> shareMusicSheetProfit(@RequestBody ShareProfitParam param) {
|
|
|
+ public HttpResponseResult<ShareProfitVo> shareMusicSheetProfit(@RequestBody @Valid ShareProfitParam param) {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserById(param.getUserId());
|
|
|
if (sysUser == null || sysUser.getId() == null) {
|
|
|
return failed("用户信息获取失败");
|
|
@@ -74,7 +75,7 @@ public class OpenShareController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "老师专辑分享分润")
|
|
|
@PostMapping(value="/albumShareProfit")
|
|
|
- public HttpResponseResult<ShareProfitVo> albumShareProfit(@RequestBody ShareProfitParam param) {
|
|
|
+ public HttpResponseResult<ShareProfitVo> albumShareProfit(@RequestBody @Valid ShareProfitParam param) {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserById(param.getUserId());
|
|
|
if (sysUser == null || sysUser.getId() == null) {
|
|
|
return failed("用户信息获取失败");
|
|
@@ -84,7 +85,7 @@ public class OpenShareController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "老师直播课分享分润")
|
|
|
@PostMapping(value= "/liveShareProfit")
|
|
|
- public HttpResponseResult<ShareProfitVo> shareLiveCourseProfit(@RequestBody ShareProfitParam param) {
|
|
|
+ public HttpResponseResult<ShareProfitVo> shareLiveCourseProfit(@RequestBody @Valid ShareProfitParam param) {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserById(param.getUserId());
|
|
|
if (sysUser == null || sysUser.getId() == null) {
|
|
|
return failed("用户信息获取失败");
|
|
@@ -96,7 +97,7 @@ public class OpenShareController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "老师视频课分享分润")
|
|
|
@PostMapping(value= "/videoShareProfit")
|
|
|
- public HttpResponseResult<ShareProfitVo> shareVideoCourseProfit(@RequestBody ShareProfitParam param) {
|
|
|
+ public HttpResponseResult<ShareProfitVo> shareVideoCourseProfit(@RequestBody @Valid ShareProfitParam param) {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserById(param.getUserId());
|
|
|
if (sysUser == null || sysUser.getId() == null) {
|
|
|
return failed("用户信息获取失败");
|
|
@@ -108,7 +109,7 @@ public class OpenShareController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "老师VIP分享分润")
|
|
|
@PostMapping(value="/vipProfit")
|
|
|
- public HttpResponseResult<ShareProfitVo> shareVipProfit(@RequestBody ShareProfitParam param) {
|
|
|
+ public HttpResponseResult<ShareProfitVo> shareVipProfit(@RequestBody @Valid ShareProfitParam param) {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserById(param.getUserId());
|
|
|
if (sysUser == null || sysUser.getId() == null) {
|
|
|
return failed("用户信息获取失败");
|