|
@@ -1,16 +1,19 @@
|
|
|
package com.tzld.piaoquan.api.controller.contentplatform;
|
|
|
|
|
|
-import com.tzld.piaoquan.api.model.param.contentplatform.AccountLoginParam;
|
|
|
-import com.tzld.piaoquan.api.model.param.contentplatform.AccountSendMessageParam;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.tzld.piaoquan.api.annotation.JwtIgnore;
|
|
|
+import com.tzld.piaoquan.api.model.param.IdParam;
|
|
|
+import com.tzld.piaoquan.api.model.param.contentplatform.*;
|
|
|
import com.tzld.piaoquan.api.model.vo.contentplatform.AccountLoginVO;
|
|
|
+import com.tzld.piaoquan.api.model.vo.contentplatform.AccountVO;
|
|
|
import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformAccountService;
|
|
|
import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.http.MediaType;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/contentPlatform/account")
|
|
@@ -21,14 +24,39 @@ public class ContentPlatformAccountController {
|
|
|
|
|
|
@ApiOperation(value = "手机号登录")
|
|
|
@PostMapping("/login")
|
|
|
+ @JwtIgnore
|
|
|
public CommonResponse<AccountLoginVO> login(@RequestBody AccountLoginParam param) {
|
|
|
return CommonResponse.success(accountService.login(param));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "发送短信验证码")
|
|
|
@PostMapping("/sendMessageVerifyCode")
|
|
|
+ @JwtIgnore
|
|
|
public CommonResponse<Void> sendMessageVerifyCode(@RequestBody AccountSendMessageParam param) {
|
|
|
accountService.sendMessageVerifyCode(param);
|
|
|
return CommonResponse.success();
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "分页获取账户")
|
|
|
+ @PostMapping(value = "/list")
|
|
|
+ @JwtIgnore
|
|
|
+ public CommonResponse<List<AccountVO>> pageAccount(@RequestBody AccountListParam param) {
|
|
|
+ return CommonResponse.success(accountService.pageAccount(param));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "账户封禁")
|
|
|
+ @PostMapping(value = "/forbidden")
|
|
|
+ @JwtIgnore
|
|
|
+ public CommonResponse<Void> accountForbidden(@RequestBody AccountForbiddenParam param) {
|
|
|
+ accountService.accountForbidden(param);
|
|
|
+ return CommonResponse.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "账户创建/更新")
|
|
|
+ @PostMapping(value = "/save")
|
|
|
+ @JwtIgnore
|
|
|
+ public CommonResponse<Void> saveAccount(@RequestBody AccountSaveParam param) {
|
|
|
+ accountService.saveAccount(param);
|
|
|
+ return CommonResponse.success();
|
|
|
+ }
|
|
|
}
|