You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.7 KiB
44 lines
1.7 KiB
package com.tptj.demo.hg.third.sms; |
|
|
|
import com.fr.intelli.record.Focus; |
|
import com.fr.json.JSONArray; |
|
import com.fr.json.JSONObject; |
|
import com.fr.log.FineLoggerFactory; |
|
import com.fr.record.analyzer.EnableMetrics; |
|
import com.fr.stable.fun.impl.AbstractSMSServiceProvider; |
|
import com.fr.web.utils.WebUtils; |
|
|
|
import java.util.List; |
|
import java.util.Map; |
|
|
|
/** |
|
* @author 秃破天际 |
|
* @version 10.0 |
|
* Created by 秃破天际 on 2021/7/23 |
|
**/ |
|
@EnableMetrics |
|
public class ThirdSMSSender extends AbstractSMSServiceProvider { |
|
@Override |
|
public Map<String, String> mapping() { |
|
return SMSUserInfo.getTpls(); |
|
} |
|
|
|
@Override |
|
public Response sendTest(String mobile) { |
|
FineLoggerFactory.getLogger().info("ThirdSMSSender#sendTest-> {} ",mobile); |
|
return Response.create(Response.RES_STATUS_SUCCESS, "Send Test Sms Message", JSONObject.create().put("mobile",mobile) ); |
|
} |
|
|
|
@Override |
|
@Focus(id = "com.tptj.demo.hg.third.sms.v10",text = "Third SMS") |
|
public Response send(String template, String mobile, JSONObject para, String receiver) throws Exception { |
|
FineLoggerFactory.getLogger().info("ThirdSMSSender#send-> {}:{},{}=== {}",mobile,template,para.toString(),receiver); |
|
return Response.create(Response.RES_STATUS_SUCCESS, "Send Sms Message", JSONObject.create().put("mobile",mobile) ); |
|
} |
|
|
|
@Override |
|
public Response batchSendSMS(String template, List<String> mobiles, JSONArray params, List<String> receivers) throws Exception { |
|
FineLoggerFactory.getLogger().info("ThirdSMSSender#batchSendSMS({})",template); |
|
return Response.create(Response.RES_STATUS_SUCCESS,"123",JSONObject.create().put("template",template)); |
|
} |
|
}
|
|
|