package com.ydtech.modules.admin.controller; import com.ydtech.core.page.HttpResult; import com.ydtech.modules.admin.model.vo.WechatCpBindVo; import com.ydtech.modules.admin.service.WechatCpService; import com.ydtech.modules.base.controller.BaseController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.error.WxErrorException; 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; @Api(tags = "企业微信业务") @Slf4j @RestController @RequestMapping("/wxWork") @RequiredArgsConstructor public class SysUserWechatCpController extends BaseController { private final WechatCpService wechatCpService; @PostMapping("/bind") @ApiOperation(value = "绑定") public HttpResult bind(@RequestBody WechatCpBindVo wechatCpBindVo) throws WxErrorException { return wechatCpService.bind(wechatCpBindVo); } @PostMapping("/verifyBind") @ApiOperation(value = "验证用户是否绑定") public HttpResult verifyBind(@RequestBody WechatCpBindVo wechatCpBindVo) throws WxErrorException { return wechatCpService.verifyBind(wechatCpBindVo); } }