完成用户账号不足5元短信发送提示

This commit is contained in:
little-cat-sweet 2021-08-17 14:38:43 +08:00
parent a7131add83
commit c0603d030a
2 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,8 @@ import com.xhpc.common.api.factory.SmsFallbackFactory;
import com.xhpc.common.core.constant.ServiceNameConstants;
import com.xhpc.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* program: ruoyi
@ -14,6 +15,6 @@ import org.springframework.web.bind.annotation.PostMapping;
@FeignClient(contextId = "smsService",value = ServiceNameConstants.XHPC_GENERAL, fallbackFactory = SmsFallbackFactory.class)
public interface SmsService {
@PostMapping("/sms/send")
R sendNotice(String phone, String content);
@GetMapping("/sms/send")
R sendNotice(@RequestParam(value = "phone") String phone , @RequestParam(value = "content") String content);
}

View File

@ -41,7 +41,7 @@ public class XhpcSmsController extends BaseController {
}
@GetMapping(value = "/send")
public void send(String phone , String content){
public void send(@RequestParam(value = "phone") String phone ,@RequestParam(value = "content") String content){
xhpcSmsService.sendNotice(phone, content);
}