Files
FrameTour-BE/src/main/java/com/ycwl/basic/controller/mobile/AppWxNotifyController.java
2024-12-06 11:14:23 +08:00

39 lines
1.3 KiB
Java

package com.ycwl.basic.controller.mobile;
import com.alibaba.fastjson.JSONObject;
import com.ycwl.basic.annotation.IgnoreToken;
import com.ycwl.basic.model.wx.WechatMessageSubscribeForm;
import com.ycwl.basic.service.mobile.WxNotifyService;
import com.ycwl.basic.utils.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* @Author: songmingsong
* @CreateTime: 2024-12-06
* @Description: 微信消息模板通知
* @Version: 1.0
*/
@RestController
@RequestMapping("/api/mobile/wx/notify/v1")
@Api(tags = "微信消息模板通知")
public class AppWxNotifyController {
@Autowired
private WxNotifyService wxNotifyService;
@ApiOperation(value = "通知", notes = "通知")
@PostMapping("/pushMessage")
@IgnoreToken
public ApiResponse<?> pushMessage(@RequestBody WechatMessageSubscribeForm req) {
JSONObject resJson = wxNotifyService.pushMessage(req);
return ApiResponse.success(resJson);
}
}