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