|
@@ -8,6 +8,7 @@ import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyAccountVO;
|
|
|
import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyAccountService;
|
|
import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyAccountService;
|
|
|
import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
|
|
import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
|
|
|
import com.tzld.piaoquan.growth.common.utils.page.Page;
|
|
import com.tzld.piaoquan.growth.common.utils.page.Page;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -23,43 +24,51 @@ public class WeComThirdPartyAccountController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private WeComThirdPartyAccountService service;
|
|
private WeComThirdPartyAccountService service;
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "获取登录二维码")
|
|
|
@GetMapping("/getQrCode")
|
|
@GetMapping("/getQrCode")
|
|
|
- public CommonResponse<AccountQrCodeVO> getQrCode(@RequestParam Long id) {
|
|
|
|
|
|
|
+ public CommonResponse<AccountQrCodeVO> getQrCode(@RequestParam(required = false) Long id) {
|
|
|
return CommonResponse.success(service.getQrCode(id));
|
|
return CommonResponse.success(service.getQrCode(id));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "检查登录状态")
|
|
|
@GetMapping("/checkLogin")
|
|
@GetMapping("/checkLogin")
|
|
|
public CommonResponse<Integer> checkLogin(@RequestParam String uuid) {
|
|
public CommonResponse<Integer> checkLogin(@RequestParam String uuid) {
|
|
|
return CommonResponse.success(service.checkLogin(uuid));
|
|
return CommonResponse.success(service.checkLogin(uuid));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "设置验证码")
|
|
|
@PostMapping("/setCheckCode")
|
|
@PostMapping("/setCheckCode")
|
|
|
public CommonResponse<Void> setCheckCode(@RequestBody CheckCodeRequest param) {
|
|
public CommonResponse<Void> setCheckCode(@RequestBody CheckCodeRequest param) {
|
|
|
service.setCheckCode(param);
|
|
service.setCheckCode(param);
|
|
|
return CommonResponse.success();
|
|
return CommonResponse.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "账号列表")
|
|
|
@PostMapping("/list")
|
|
@PostMapping("/list")
|
|
|
public CommonResponse<Page<ThirdPartyAccountVO>> list(@RequestBody ThirdPartyAccountListParam param) {
|
|
public CommonResponse<Page<ThirdPartyAccountVO>> list(@RequestBody ThirdPartyAccountListParam param) {
|
|
|
return CommonResponse.success(service.list(param));
|
|
return CommonResponse.success(service.list(param));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "获取推送人员列表")
|
|
|
@GetMapping("/getPushAccountList")
|
|
@GetMapping("/getPushAccountList")
|
|
|
- public CommonResponse<List<IdNameVO<Long>>> getPushAccountList(@RequestParam Long accountId, @RequestParam String name) {
|
|
|
|
|
|
|
+ public CommonResponse<List<IdNameVO<Long>>> getPushAccountList(@RequestParam Long accountId, @RequestParam(required = false) String name) {
|
|
|
return CommonResponse.success(service.getPushAccountList(accountId, name));
|
|
return CommonResponse.success(service.getPushAccountList(accountId, name));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "获取账号配置")
|
|
|
@PostMapping("/getAccountConfig")
|
|
@PostMapping("/getAccountConfig")
|
|
|
public CommonResponse<ThirdPartyAccountConfigVO> getAccountConfig(@RequestBody ThirdPartyConfigGetParam param) {
|
|
public CommonResponse<ThirdPartyAccountConfigVO> getAccountConfig(@RequestBody ThirdPartyConfigGetParam param) {
|
|
|
return CommonResponse.success(service.getAccountConfig(param));
|
|
return CommonResponse.success(service.getAccountConfig(param));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "账号配置保存")
|
|
|
@PostMapping("/saveAccountConfig")
|
|
@PostMapping("/saveAccountConfig")
|
|
|
public CommonResponse<Void> saveAccountConfig(@RequestBody ThirdPartyAccountConfigParam param) {
|
|
public CommonResponse<Void> saveAccountConfig(@RequestBody ThirdPartyAccountConfigParam param) {
|
|
|
service.saveAccountConfig(param);
|
|
service.saveAccountConfig(param);
|
|
|
return CommonResponse.success();
|
|
return CommonResponse.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "登出")
|
|
|
@PostMapping("/logout")
|
|
@PostMapping("/logout")
|
|
|
public CommonResponse<Void> logout(@RequestBody ThirdPartyAccountLogOutParam param) {
|
|
public CommonResponse<Void> logout(@RequestBody ThirdPartyAccountLogOutParam param) {
|
|
|
service.logout(param);
|
|
service.logout(param);
|