package com.sckw.message.dubbo;

import com.sckw.message.api.dubbo.SmsInfoService;
import com.sckw.redis.constant.RedisConstant;
import com.sckw.redis.utils.RedissonUtils;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @desc: 短信信息相关
 * @author: yzc
 * @date: 2023-06-13 14:10
 */
@DubboService(group = "design", version = "1.0.0")
public class SmsInfoServiceImpl implements SmsInfoService {
    @Override
    public String getVerifyCode(String type, String phone) {
        String key = String.format(RedisConstant.MESSAGE_SMS_VERIFY_CODE_VALUE_KEY, type, phone);
        return RedissonUtils.getString(key);
    }
}
