将地址改成动态地址

This commit is contained in:
刘才福 2023-07-10 15:45:46 +08:00
parent b425245c16
commit ba3d8e7eee
3 changed files with 7 additions and 2 deletions

View File

@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.validation.Valid;
/**
* 短信消息相关接口
*/
@ -28,7 +30,7 @@ public interface MNSNoticesApi {
* @return
*/
@PostMapping("mns/send/sms")
CommonResponse<Void> sendMessage(SendMessageRequestDto request);
CommonResponse<Void> sendMessage(@RequestBody @Valid SendMessageRequestDto request);
/**
* 发送验证码2.0(返回的是数字

View File

@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
*/
@FeignClient(
name = "msg-center",
url = "http://msg-center:10086"
url = "${server.serviceUrl}"
)
public interface MessageNotifyApi {

View File

@ -69,6 +69,9 @@ public class MNSNoticesApiImpl implements MNSNoticesApi {
BeanUtils.copyProperties(req,request);
SendCodeRes temp = smsService.sendPhoneCodeV2(request);
MnsSendCodeRes result=new MnsSendCodeRes();
if(temp == null){
return CommonResponse.success(result);
}
BeanUtils.copyProperties(temp,result);
return CommonResponse.success(result);
}