
com.quhaodian.plug.data.service.impl.CodeServiceImpl Maven / Gradle / Ivy
package com.quhaodian.plug.data.service.impl;
import com.quhaodian.plug.api.SendCodePlugin;
import com.quhaodian.plug.data.service.CodeService;
import com.quhaodian.plug.data.service.PluginService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Service("codeServiceImpl")
public class CodeServiceImpl implements CodeService {
@Resource(name = "pluginServiceImpl")
private PluginService pluginService;
@Override
public boolean sendCode(String code, String template, String phone) {
for (SendCodePlugin plugin : pluginService.getSendCodePlugins(true)) {
Map params=new HashMap();
params.put("code",code);
params.put("template",template);
params.put("phone",phone);
plugin.sendCode(params);
}
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy