AdoptMessageController.java
893 Bytes
package com.diligrp.tax.adopt.api;
import com.diligrp.tax.adopt.model.ReceiveMessageCO;
import com.diligrp.tax.adopt.service.AdoptMessageService;
import com.diligrp.tax.central.message.Message;
import lombok.AllArgsConstructor;
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 lvqi
*/
@RestController
@RequestMapping("/tax/tenant/adopt")
@AllArgsConstructor
public class AdoptMessageController {
private final AdoptMessageService adoptMessageService;
@PostMapping("/message")
public Message<?> receiveMessage(@RequestBody ReceiveMessageCO receiveMessageCO) {
adoptMessageService.convertMessage(receiveMessageCO);
return Message.success();
}
}