first commit

This commit is contained in:
abcv7
2026-02-25 15:08:40 +08:00
commit 7f1d83ada7
2003 changed files with 144362 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.itheima.sfbx</groupId>
<artifactId>sfbx-sms</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>sms-interface</artifactId>
<dependencies>
<dependency>
<groupId>com.itheima.sfbx</groupId>
<artifactId>framework-feign</artifactId>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,13 @@
package com.itheima.sfbx.sms.config;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;
/**
* @ClassName DictFenginConfig.java
* @Description feign的最优化配置
*/
@EnableFeignClients(basePackages = "com.itheima.sfbx.sms")
@Configuration
public class SmsFeignConfig {
}
@@ -0,0 +1,45 @@
package com.itheima.sfbx.sms.feign;
import com.itheima.sfbx.framework.commons.dto.sms.SendMessageVO;
import com.itheima.sfbx.framework.commons.dto.sms.SmsSendRecordVO;
import com.itheima.sfbx.sms.hystrix.SmsSendHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
/**
* @ClassName SmsSendFace.java
* @Description 邮件发送Face接口
*/
@FeignClient(value = "sms-web",fallback = SmsSendHystrix.class)
public interface SmsSendFeign {
/***
* @description 发送短信接口:削峰方式
* @param sendMessageVO 发送对象
*/
@PostMapping("sms-send-feign/send-sms-mq")
Boolean sendSmsForMq(SendMessageVO sendMessageVO);
/***
* @description 发送短信接口:非削峰方式
* @param sendMessageVO 发送对象
*/
@PostMapping("sms-send-feign/send-sms")
Boolean sendSms(SendMessageVO sendMessageVO);
/***
* @description 查询短信接受情况
* @param smsSendRecordVO 发送记录
* @return
*/
@PostMapping("sms-send-feign/query-send-sms")
Boolean querySendSms(SmsSendRecordVO smsSendRecordVO);
/***
* @description 重试发送
* @param smsSendRecordVO 发送记录
* @return
*/
@PostMapping("sms-send-feign/retry-send-sms")
Boolean retrySendSms(SmsSendRecordVO smsSendRecordVO);
}
@@ -0,0 +1,24 @@
package com.itheima.sfbx.sms.feign;
import com.itheima.sfbx.framework.commons.dto.sms.SmsSendRecordVO;
import com.itheima.sfbx.sms.hystrix.SmsSendRecordHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import java.util.List;
/**
* @ClassName SmsSendRecordFegin.java
* @Description TODO
*/
@FeignClient(value = "sms-web",fallback = SmsSendRecordHystrix.class)
public interface SmsSendRecordFegin {
/***
* @description 查询回调结果的记录
*
* @return: com.itheima.easy.basic.ResponseResult<java.util.List<com.itheima.easy.vo.sms.SmsSendRecordVO>>
*/
@PostMapping("/sms-send-record-feign/call-back-sms-send-records")
List<SmsSendRecordVO> callBackSmsSendRecords();
}
@@ -0,0 +1,35 @@
package com.itheima.sfbx.sms.hystrix;
import com.itheima.sfbx.sms.feign.SmsSendFeign;
import com.itheima.sfbx.framework.commons.dto.sms.SendMessageVO;
import com.itheima.sfbx.framework.commons.dto.sms.SmsSendRecordVO;
import org.springframework.stereotype.Component;
/**
* @ClassName SmsSendHystrix.java
* @Description SmsSendFeign的Hystrix
*/
@Component
public class SmsSendHystrix implements SmsSendFeign {
@Override
public Boolean sendSmsForMq(SendMessageVO sendMessageVO) {
return null;
}
@Override
public Boolean sendSms(SendMessageVO sendMessageVO) {
return null;
}
@Override
public Boolean querySendSms(SmsSendRecordVO smsSendRecordVO) {
return null;
}
@Override
public Boolean retrySendSms(SmsSendRecordVO smsSendRecordVO) {
return null;
}
}
@@ -0,0 +1,21 @@
package com.itheima.sfbx.sms.hystrix;
import com.itheima.sfbx.framework.commons.dto.sms.SmsSendRecordVO;
import com.itheima.sfbx.sms.feign.SmsSendRecordFegin;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @ClassName SmsSendRecordHystrix.java
* @Description TODO
*/
@Component
public class SmsSendRecordHystrix implements SmsSendRecordFegin {
@Override
public List<SmsSendRecordVO> callBackSmsSendRecords() {
return null;
}
}