add
yj
2024-12-05 b9900893177c78fc559223521fe839aa21000017
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.dobbinsoft.fw.support.sms;
 
import com.dobbinsoft.fw.core.exception.ServiceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
 
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: rize
 * Date: 2019/11/17
 * Time: 15:50
 */
public class MockSMSClient implements SMSClient {
 
    private static final Logger logger = LoggerFactory.getLogger(MockSMSClient.class);
 
    @Override
    public SMSResult sendRegisterVerify(String phone, String verifyCode) throws ServiceException {
        return send(phone, verifyCode);
    }
 
    @Override
    public SMSResult sendBindPhoneVerify(String phone, String verifyCode) throws ServiceException {
        return send(phone, verifyCode);
    }
 
    @Override
    public SMSResult sendResetPasswordVerify(String phone, String verifyCode) throws ServiceException {
        return send(phone, verifyCode);
    }
 
    @Override
    public SMSResult sendAdminLoginVerify(String phone, String verifyCode) throws ServiceException {
        return send(phone, verifyCode);
    }
 
    public SMSResult send(String phone, String verifyCode) {
        logger.info("[模拟短信发送] phone=" + phone + "; verifyCode=" + verifyCode);
        SMSResult smsResult = new SMSResult();
        smsResult.setSucc(true);
        smsResult.setMsg("OK");
        return smsResult;
    }
}