Antiloveg 8 years ago
parent
commit
2fd0b30cd0

+ 2 - 0
src/main/java/com/goafanti/common/constant/ErrorConstants.java

@@ -99,4 +99,6 @@ public class ErrorConstants {
 	public static final String	OVER_MAX_WRONG_COUNT			= "OVER_MAX_WRONG_COUNT";
 
 	public static final String	WRONG_MONEY						= "WRONG_MONEY";
+
+	public static final String	M_CODE_ERROR					= "M_CODE_ERROR";
 }

+ 3 - 3
src/main/java/com/goafanti/common/utils/MobileMessageUtils.java

@@ -26,7 +26,7 @@ public class MobileMessageUtils {
 			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Sms", "sms.aliyuncs.com");
 		} catch (ClientException e1) {
 			LoggerUtils.fmtError(MobileMessageUtils.class, e1, CLIENT_EXCEPTION, e1.getMessage());
-			return ErrorConstants.MCODE_ERROR;
+			return ErrorConstants.M_CODE_ERROR;
 		}
 		IAcsClient client = new DefaultAcsClient(profile);
 		SingleSendSmsRequest request = new SingleSendSmsRequest();
@@ -38,10 +38,10 @@ public class MobileMessageUtils {
 			SingleSendSmsResponse httpResponse = client.getAcsResponse(request);
 		} catch (ServerException e) {
 			LoggerUtils.fmtError(MobileMessageUtils.class, e, SERVER_EXCEPTION, e.getMessage());
-			return ErrorConstants.MCODE_ERROR;
+			return ErrorConstants.M_CODE_ERROR;
 		} catch (ClientException e) {
 			LoggerUtils.fmtError(MobileMessageUtils.class, e, CLIENT_EXCEPTION, e.getMessage());
-			return ErrorConstants.MCODE_ERROR;
+			return ErrorConstants.M_CODE_ERROR;
 		}
 		return null;
 	}

+ 2 - 0
src/main/resources/props/error.properties

@@ -86,3 +86,5 @@ IDENTITY_PAY_OVER_TIME=\u8d85\u8fc7\u6253\u6b3e\u65e5\u671f5\u65e5\uff0c\u65e0\u
 OVER_MAX_WRONG_COUNT=\u8f93\u5165\u9519\u8bef\u91d1\u989d\u6b21\u6570\u8fc7\u591a\uff01
 
 WRONG_MONEY=\u8f93\u5165\u6253\u6b3e\u91d1\u989d\u9519\u8bef\uff0c\u60a8\u8fd8\u6709{0}\u6b21\u673a\u4f1a\uff01
+
+M_CODE_ERROR=\u624b\u673a\u9a8c\u8bc1\u7801\u83b7\u53d6\u5f02\u5e38\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5\uff01