|
|
@@ -4,22 +4,18 @@ import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
|
import com.github.microservice.auth.security.helper.AuthHelper;
|
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
|
import com.zhongshu.card.client.model.base.AuthTypeParam;
|
|
|
-import com.zhongshu.card.client.model.org.OrganizationModel;
|
|
|
-import com.zhongshu.card.client.model.org.OrganizationUserSearch;
|
|
|
-import com.zhongshu.card.client.model.org.PassWordModel;
|
|
|
-import com.zhongshu.card.client.model.org.UserCountDetailsModel;
|
|
|
+import com.zhongshu.card.client.model.org.*;
|
|
|
import com.zhongshu.card.client.ret.ResultContent;
|
|
|
import com.zhongshu.card.client.service.org.OrganizationService;
|
|
|
import com.zhongshu.card.client.service.org.UserAccountService;
|
|
|
import com.zhongshu.card.client.utils.type.UserState;
|
|
|
import com.zhongshu.card.server.core.service.org.IndexService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.util.Assert;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -69,6 +65,22 @@ public class UserInfoController {
|
|
|
return userAccountService.updatePassWord(param);
|
|
|
}
|
|
|
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @Operation(summary = "修改用户头像", description = "修改用户头像")
|
|
|
+ @RequestMapping(value = {"updateUserHead"}, method = {RequestMethod.GET})
|
|
|
+ public ResultContent<UserCountDetailsModel> updateUserHead(@Parameter(name = "url", description = "头像url", example = "")
|
|
|
+ @RequestParam("url") String url) {
|
|
|
+ return userAccountService.updateUserHead(url);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @Operation(summary = "编辑当前用户的基本信息", description = "编辑当前用户的基本信息")
|
|
|
+ @RequestMapping(value = {"updateUserInfo"}, method = {RequestMethod.GET})
|
|
|
+ public ResultContent<UserCountDetailsModel> updateUserInfo(UserCountUpdateParam param) {
|
|
|
+ Assert.hasText(param.getName(), "name不能为空");
|
|
|
+ return userAccountService.updateUserInfo(param);
|
|
|
+ }
|
|
|
+
|
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
|
@Operation(summary = "查询用户加入的平台数据列表", description = "查询用户加入的 平台数据列表")
|
|
|
@RequestMapping(value = {"getUserPlatform"}, method = {RequestMethod.GET})
|