修改基础短信链接 修改注释

master
bynt 3 years ago
parent d3881d2039
commit ef1b5f0cdd

@ -8,37 +8,49 @@ package me.zhengjie.common.http;
* History:
* <author> <time> <version> <desc>
* x 2019/12/11 v 1.0
* modify Enzo
*/
public enum ResponseCode {
/** 成功*/
SUCCESS(0,"SUCCESS"),
/** 失败*/
ERROR(1,"ERROR"),
/**成功的一些特殊提示*/
FAILURE(1,"FAILURE"),
// 成功的一些特殊提示
SUCCESS_ONCE_LINK_MSG(0,"下载成功,一次性链接已经失效"),
// 通用请求参数校验
/**通用请求参数校验*/
ILLEGAL_ARGUMENT(1,"请求参数格式错误"),
/**请求参数为空*/
EMPTY_ARGUMENT(1,"请求参数为空"),
/**不能满足要求的参数设置*/
NO_MATCH_ARGUMENT_SET(1,"不能满足要求的参数设置"),
/**没有文件输入*/
NO_FILE_INPUT(1,"没有文件输入"),
/** modeify by wzx
*/
NO_WORD_INPUT(1,"短信和url链接不能为空"),
/**文件格式不对*/
NO_FILE_FORMAT(1,"文件格式不对"),
// 特殊需要进行前端返回说明的参数定义
/**特殊需要进行前端返回说明的参数定义*/
TASK_NAME_IS_EXIST(1,"任务名称已经存在"),
/**文件存储失败*/
TASK_FILE_SAVE_FAIL(1,"文件存储失败"),
/**文件已经在上传*/
TASK_STAETING(1,"文件已经在上传!"),
/**链接失效,下载文件失败~*/
ONCE_LINK_MSG_ERROR(1,"链接失效,下载文件失败~"),
// 请求结果性的错误
/**请求结果性的错误*/
NODATA_ERROR(1,"查询结果为空"),
/**任务建立失败*/
TASK_BUILD_ERROR(1,"任务建立失败"),
/**未查询到相关内容*/
NO_RELEVANT_CONTENT_WAS_FOUND(1,"未查询到相关内容"),
/**解密错误,请联系我*/
DECRYPT_ERROR(1,"解密错误,请联系我");
private final int code;
private final String desc;

@ -20,10 +20,10 @@ public class SmsConstant {
public static final String TOKEN = "f625d0a23493cd8aeb8ada97da7a7b65";
/** 服务前缀*/
public static final String SHORT_CHAIN_PREFIX = "t.p.tuoz.net/s/";
public static final String SHORT_CHAIN_PREFIX = "t.tuoz.net/s/";
/** 生成短链*/
public static final String SHORT_GENERATION_LINK = "http://t.p.tuoz.net/trans";
public static final String SHORT_GENERATION_LINK = "http://t.tuoz.net/trans";
/*** 短信url*/
public static final String SMS_LINK = "http://api.hzdaba.cn/v2/Accounts/baiyekeji_label/Sms/send";

@ -30,8 +30,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@Data
public class TbBlacklistDto implements Serializable {
/** 防止精度丢失 */
@JsonSerialize(using= ToStringSerializer.class)
private Long id;
/** 手机号码 */

@ -156,6 +156,7 @@ public class TbSendSmsServiceImpl implements TbSendSmsService {
lruCache.put(info.getTaskName(), template,
DateUnit.MINUTE.getMillis() * DefaultConstant.FIVE_NUMBER);
}
log.info(" template as [{}]" , template);
if (template == null) {
log.info("send Sms fail the Template is null ");
throw new BadRequestException("模板信息为空");
@ -169,6 +170,7 @@ public class TbSendSmsServiceImpl implements TbSendSmsService {
(SmsConstant.SHORT_GENERATION_LINK,
JSON.toJSONString(map)),
ShortLinkUrlDto.class);
log.info(" urlDto response message [{}]" , urlDto);
if (urlDto == null || urlDto.getData() == null ||
urlDto.getStatus() != DefaultConstant.ZERO_NUMBER) {
log.info("send Sms fail the urlDto is fail urlResponse message [{}]" , urlDto != null ? urlDto.getMsg() : null);

Loading…
Cancel
Save