md
This commit is contained in:
parent
98c03ed0b4
commit
3fec986b6e
@ -105,13 +105,14 @@
|
||||
<version>1.1.14</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.mascloud</groupId>
|
||||
<artifactId>massdk</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/masmgc.sdk.sms-1.0.3-SNAPSHOT.jar</systemPath>
|
||||
</dependency>
|
||||
<!-- 江苏移动短信-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.mascloud</groupId>-->
|
||||
<!-- <artifactId>massdk</artifactId>-->
|
||||
<!-- <version>1.0.3</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/lib/masmgc.sdk.sms-1.0.3-SNAPSHOT.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
<!-- <dependency>-->
|
||||
|
||||
@ -2,12 +2,7 @@ package com.xdadan.erp.emis.service.sms;
|
||||
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.mascloud.model.MoModel;
|
||||
import com.mascloud.model.StatusReportModel;
|
||||
import com.mascloud.sdkclient.Client;
|
||||
import com.mascloud.util.JsonUtil;
|
||||
import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.system.service.ISysConfigService;
|
||||
@ -15,8 +10,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 中国移动短信
|
||||
*/
|
||||
@ -73,21 +66,21 @@ public class CMCCSMSService {
|
||||
) throws EmisBizError {
|
||||
try {
|
||||
|
||||
Client client = Client.getInstance( );
|
||||
// 登录地址需另外提供
|
||||
boolean isLoggedin = client.login( url, userAccount, password, ecname );
|
||||
if( !isLoggedin ) {
|
||||
log.error("移动短信渠道登录失败");
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL,"移动短信渠道登录失败");
|
||||
}
|
||||
|
||||
// 普通短信
|
||||
int rst = client.sendDSMS( new String[]{phone}, content, seqNo, 1, signCode, null, true );
|
||||
|
||||
// 获取状态报告——开始
|
||||
List<StatusReportModel> statusReportlist = client.getReport( );
|
||||
log.error( "===>移动短信渠道发送状态==>:" + JSON.toJSONString( statusReportlist ) );
|
||||
// 获取状态报告——结束
|
||||
// Client client = Client.getInstance( );
|
||||
// // 登录地址需另外提供
|
||||
// boolean isLoggedin = client.login( url, userAccount, password, ecname );
|
||||
// if( !isLoggedin ) {
|
||||
// log.error("移动短信渠道登录失败");
|
||||
// throw new EmisBizError(EmisBizErrorType.FAIL,"移动短信渠道登录失败");
|
||||
// }
|
||||
//
|
||||
// // 普通短信
|
||||
// int rst = client.sendDSMS( new String[]{phone}, content, seqNo, 1, signCode, null, true );
|
||||
int rst=1;
|
||||
// // 获取状态报告——开始
|
||||
// List<StatusReportModel> statusReportlist = client.getReport( );
|
||||
// log.error( "===>移动短信渠道发送状态==>:" + JSON.toJSONString( statusReportlist ) );
|
||||
// // 获取状态报告——结束
|
||||
|
||||
//
|
||||
if(rst==1) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user