|
@@ -8,6 +8,7 @@ import com.yonge.cooleshow.biz.dal.dto.search.QueryMyFollowSearch;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.Subject;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.service.SysUserService;
|
|
|
+import com.yonge.cooleshow.biz.dal.vo.StudentVo;
|
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
|
import com.yonge.toolset.mybatis.support.PageUtil;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.MyFollow;
|
|
@@ -43,9 +44,30 @@ public class StudentController extends BaseController {
|
|
|
private SysUserService sysUserService;
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "查询指定学员信息")
|
|
|
+ @GetMapping("/queryUserById")
|
|
|
+ public HttpResponseResult<StudentVo> queryUserById(String rongCloudUserId) {
|
|
|
+
|
|
|
+ if (StringUtil.isEmpty(rongCloudUserId)) {
|
|
|
+ return failed("用户信息获取失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ Long userId = null;
|
|
|
+ String[] split = rongCloudUserId.split(":");
|
|
|
+ if (split.length == 2 && !StringUtil.isEmpty(split[0])) {
|
|
|
+ try {
|
|
|
+ userId = Long.parseLong(split[0]);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ return failed("用户信息获取失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return succeed(studentService.detail(userId));
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "查询学员")
|
|
|
@GetMapping("/queryUser")
|
|
|
- public HttpResponseResult<Student> queryUser() throws Exception {
|
|
|
+ public HttpResponseResult<Student> queryUser() {
|
|
|
SysUser user = sysUserFeignService.queryUserInfo();
|
|
|
if (user == null || null == user.getId()) {
|
|
|
return failed(HttpStatus.FORBIDDEN, "请登录");
|