完成用户账号不足5元短信发送提示
This commit is contained in:
parent
a7131add83
commit
c0603d030a
@ -4,7 +4,8 @@ import com.xhpc.common.api.factory.SmsFallbackFactory;
|
|||||||
import com.xhpc.common.core.constant.ServiceNameConstants;
|
import com.xhpc.common.core.constant.ServiceNameConstants;
|
||||||
import com.xhpc.common.core.domain.R;
|
import com.xhpc.common.core.domain.R;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
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
|
* program: ruoyi
|
||||||
@ -14,6 +15,6 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||||||
@FeignClient(contextId = "smsService",value = ServiceNameConstants.XHPC_GENERAL, fallbackFactory = SmsFallbackFactory.class)
|
@FeignClient(contextId = "smsService",value = ServiceNameConstants.XHPC_GENERAL, fallbackFactory = SmsFallbackFactory.class)
|
||||||
public interface SmsService {
|
public interface SmsService {
|
||||||
|
|
||||||
@PostMapping("/sms/send")
|
@GetMapping("/sms/send")
|
||||||
R sendNotice(String phone, String content);
|
R sendNotice(@RequestParam(value = "phone") String phone , @RequestParam(value = "content") String content);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public class XhpcSmsController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/send")
|
@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);
|
xhpcSmsService.sendNotice(phone, content);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user