package com.gzzn.omms.msgexchangeapi.controller; 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; import com.gzzn.omms.msgexchangeapi.domain.primary.entity.Cminmsg; import com.gzzn.omms.msgexchangeapi.dto.ResponseDto; import com.gzzn.omms.msgexchangeapi.service.ICminmsgService; @RestController @RequestMapping("/cminmsgs") public class CminmsgsController { @Autowired private ICminmsgService cminmsgService; /*** * 发送消息到Cminmsgs数据库表 * @param msg * @param topic * @return */ @PostMapping(value = "/send") public ResponseDto send(@RequestBody String xmlmsg) { Cminmsg minmsg = cminmsgService.sendXmlMsg(xmlmsg); return ResponseDto.success(minmsg.getCminmsgsId()); } }