1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package com.fjhx.rocketmq.feign;
- import com.fjhx.myapp.application.feign.IRocketmqApi;
- import com.fjhx.rocketmq.service.RocketMqService;
- import org.springblade.core.tenant.annotation.NonDS;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.List;
- /**
- * 节日、生日模板 feign api
- */
- @NonDS
- @RestController
- public class RocketmqApi implements IRocketmqApi {
- @Autowired
- private RocketMqService rocketMqService;
- /**
- * 发送消息
- * @param topic
- * @param tag
- * @param key
- * @param busiId
- * @param userIds
- * @param content
- * @param msgType
- */
- @PostMapping(sendMessage)
- @Override
- public void sendMessage(@RequestParam("topic") String topic,
- @RequestParam("tag") String tag,
- @RequestParam("key") String key,
- @RequestParam("busiId") String busiId,
- @RequestParam("userIds") List<String> userIds,
- @RequestParam("content") String content,
- @RequestParam("msgType") Integer msgType) {
- rocketMqService.send(topic,tag,key,busiId,userIds,content,msgType);
- }
- }
|