|
@@ -3,6 +3,7 @@ package com.ydtech.modules.admin.controller;
|
|
|
import com.ydtech.core.page.HttpResult;
|
|
import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.exception.SystemException;
|
|
import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.admin.model.vo.WechatBindVo;
|
|
import com.ydtech.modules.admin.model.vo.WechatBindVo;
|
|
|
|
|
+import com.ydtech.modules.admin.model.vo.WechatCustomerCallbackVo;
|
|
|
import com.ydtech.modules.admin.model.vo.WechatLoginVo;
|
|
import com.ydtech.modules.admin.model.vo.WechatLoginVo;
|
|
|
import com.ydtech.modules.admin.model.vo.WechatVo;
|
|
import com.ydtech.modules.admin.model.vo.WechatVo;
|
|
|
import com.ydtech.modules.admin.service.WechatService;
|
|
import com.ydtech.modules.admin.service.WechatService;
|
|
@@ -12,6 +13,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
|
|
+import org.springframework.http.MediaType;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -39,7 +41,7 @@ public class WechatController extends BaseController {
|
|
|
|
|
|
|
|
@PostMapping("/bind")
|
|
@PostMapping("/bind")
|
|
|
@ApiOperation(value = "工号绑定微信")
|
|
@ApiOperation(value = "工号绑定微信")
|
|
|
- HttpResult<Object> bind(@RequestBody WechatBindVo wechatBindVo) throws WxErrorException {
|
|
|
|
|
|
|
+ public HttpResult<Object> bind(@RequestBody WechatBindVo wechatBindVo) throws WxErrorException {
|
|
|
try {
|
|
try {
|
|
|
String userId = getUserId();
|
|
String userId = getUserId();
|
|
|
return wechatService.bind(wechatBindVo, userId);
|
|
return wechatService.bind(wechatBindVo, userId);
|
|
@@ -49,4 +51,11 @@ public class WechatController extends BaseController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @PostMapping(path = "/customer/callback", consumes = MediaType.APPLICATION_XML_VALUE)
|
|
|
|
|
+ @ApiOperation(value = "客服回调")
|
|
|
|
|
+ HttpResult<String> customerCallback(@RequestBody WechatCustomerCallbackVo wechatCustomerCallbackVo) {
|
|
|
|
|
+ log.info(wechatCustomerCallbackVo.toString());
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|