wks il y a 1 an
Parent
commit
9d56cbe9da

+ 5 - 1
src/main/java/com/ydtech/modules/admin/controller/wechat/WechatCustomerController.java

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