|
@@ -6,11 +6,11 @@ import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.search.TeacherStyleSearch;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.TeacherStyleVideo;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
|
|
|
-import com.yonge.cooleshow.biz.dal.enums.YesOrNoEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.service.AppVersionInfoService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.StudentStarService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.TeacherService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.TeacherStyleVideoService;
|
|
|
+import com.yonge.cooleshow.common.enums.YesOrNoEnum;
|
|
|
import com.yonge.toolset.mybatis.support.PageUtil;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherHomeVo;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherStyleVideoVo;
|
|
@@ -25,8 +25,6 @@ import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.Collection;
|
|
|
-import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -82,18 +80,19 @@ public class TeacherController extends BaseController {
|
|
|
@ApiOperation(value = "关注/取消关注")
|
|
|
@GetMapping("/starOrUnStar")
|
|
|
public HttpResponseResult<Boolean> starOrUnStar(@ApiParam(value = "老师ID", required = true) @RequestParam("userId") Long userId,
|
|
|
- @ApiParam(value = "状态 0 取消关注 1 关注", required = true) @RequestParam("starStatus") YesOrNoEnum starStatus) {
|
|
|
+ @ApiParam(value = "状态 0 取消关注 1 关注", required = true) @RequestParam("starStatus") Integer starStatus) {
|
|
|
if (null == userId) {
|
|
|
return failed("缺少老师ID");
|
|
|
}
|
|
|
- if (null == starStatus) {
|
|
|
+ YesOrNoEnum starStatusEnum = YesOrNoEnum.valueOf(starStatus);
|
|
|
+ if (null == starStatusEnum) {
|
|
|
return failed("缺少关注状态");
|
|
|
}
|
|
|
SysUser user = sysUserFeignService.queryUserInfo();
|
|
|
if (user == null || null == user.getId()) {
|
|
|
return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
}
|
|
|
- return studentStarService.starOrUnStar(user.getId(), userId, starStatus);
|
|
|
+ return studentStarService.starOrUnStar(user.getId(), userId, starStatusEnum);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "增加视频浏览量")
|