package com.qmth.ops.api.controller.sms; import com.qmth.boot.api.annotation.Aac; import com.qmth.boot.core.sms.api.SmsApiClient; import com.qmth.boot.core.sms.model.SmsConstants; import com.qmth.boot.core.sms.model.SmsSendRequest; import com.qmth.boot.core.sms.model.SmsSendResponse; import com.qmth.boot.tools.signature.SignatureType; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @RestController @Aac(auth = true, signType = SignatureType.SECRET) public class SmsController { @Resource private SmsApiClient smsApiClient; @PostMapping(SmsConstants.API_PATH_SEND_SMS) public SmsSendResponse send(@RequestBody @Validated SmsSendRequest request) { return smsApiClient.sendSms(request); } }