|
@@ -2,6 +2,7 @@ package com.ydtech.modules.admin.controller.wechat;
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
|
+import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.modules.admin.service.WechatCustomerService;
|
|
import com.ydtech.modules.admin.service.WechatCustomerService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -10,6 +11,8 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
+
|
|
|
@Api(tags = "微信业务")
|
|
@Api(tags = "微信业务")
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@RestController
|
|
@RestController
|
|
@@ -30,8 +33,9 @@ public class WechatCustomerController {
|
|
|
|
|
|
|
|
@PostMapping(path = "/callback", consumes = MediaType.TEXT_XML_VALUE, produces = MediaType.TEXT_XML_VALUE)
|
|
@PostMapping(path = "/callback", consumes = MediaType.TEXT_XML_VALUE, produces = MediaType.TEXT_XML_VALUE)
|
|
|
@ApiOperation(value = "客服回调(处理事件发送欢迎语)")
|
|
@ApiOperation(value = "客服回调(处理事件发送欢迎语)")
|
|
|
- public void customerCallback(@RequestBody String wechatEncrypt) throws JsonProcessingException {
|
|
|
|
|
|
|
+ public HttpResult<String> customerCallback(@RequestBody String wechatEncrypt) throws JsonProcessingException {
|
|
|
customerService.callbackSendMsgOnEvent(wechatEncrypt);
|
|
customerService.callbackSendMsgOnEvent(wechatEncrypt);
|
|
|
|
|
+ return HttpResult.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|