|
@@ -0,0 +1,69 @@
|
|
|
+package com.tzld.piaoquan.api.controller.contentplatform;
|
|
|
+
|
|
|
+import com.tzld.piaoquan.api.model.param.IdParam;
|
|
|
+import com.tzld.piaoquan.api.model.param.contentplatform.CooperateAccountListParam;
|
|
|
+import com.tzld.piaoquan.api.model.param.contentplatform.CooperateAccountSaveParam;
|
|
|
+import com.tzld.piaoquan.api.model.param.contentplatform.GzhAuthResultParam;
|
|
|
+import com.tzld.piaoquan.api.model.vo.contentplatform.CooperateAccountItemVO;
|
|
|
+import com.tzld.piaoquan.api.model.vo.contentplatform.GenerateQrcodeVO;
|
|
|
+import com.tzld.piaoquan.api.model.vo.contentplatform.GzhAccountItem;
|
|
|
+import com.tzld.piaoquan.api.model.vo.contentplatform.GzhAuthResultVO;
|
|
|
+import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformCooperateAccountService;
|
|
|
+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.*;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/contentPlatform/cooperateAccount")
|
|
|
+public class ContentPlatformCooperateAccountController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ ContentPlatformCooperateAccountService cooperateAccountService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "公众号列表")
|
|
|
+ @PostMapping("/gzh/list")
|
|
|
+ public CommonResponse<List<CooperateAccountItemVO>> gzhList(@RequestBody CooperateAccountListParam param) {
|
|
|
+ return CommonResponse.success(cooperateAccountService.gzhList(param));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "公众号创建/更新")
|
|
|
+ @PostMapping("/gzh/save")
|
|
|
+ public CommonResponse<Void> gzhSave(@RequestBody CooperateAccountSaveParam param) {
|
|
|
+ cooperateAccountService.gzhSave(param);
|
|
|
+ return CommonResponse.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "公众号授权二维码获取")
|
|
|
+ @GetMapping("/gzh/getAuthQrCode")
|
|
|
+ public CommonResponse<GenerateQrcodeVO> getGzhAuthQrCode(@RequestBody GzhAuthResultParam param) {
|
|
|
+ return CommonResponse.success(cooperateAccountService.getGzhAuthQrCode(param));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "公众号授权结果获取")
|
|
|
+ @PostMapping("/gzh/getAuthResult")
|
|
|
+ public CommonResponse<GzhAuthResultVO> getGzhAuthResult(@RequestBody GzhAuthResultParam param) {
|
|
|
+ return CommonResponse.success(cooperateAccountService.sendMessageVerifyCode(param));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "内容类别下拉框")
|
|
|
+ @GetMapping("/gzh/getContentType")
|
|
|
+ public CommonResponse<List<String>> getGzhContentType() {
|
|
|
+ return CommonResponse.success(cooperateAccountService.getGzhContentType());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "公众号下拉框")
|
|
|
+ @GetMapping("/gzh/accountList")
|
|
|
+ public CommonResponse<List<GzhAccountItem>> getGzhAccountList() {
|
|
|
+ return CommonResponse.success(cooperateAccountService.getGzhAccountList());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "公众号删除")
|
|
|
+ @PostMapping("/gzh/delete")
|
|
|
+ public CommonResponse<Void> gzhDelete(@RequestBody IdParam<Long> param) {
|
|
|
+ cooperateAccountService.gzhDelete(param.getId());
|
|
|
+ return CommonResponse.success();
|
|
|
+ }
|
|
|
+}
|