说明:1、各个天数数据接口细微修改
This commit is contained in:
parent
9adad5c1bf
commit
3a21f45e3c
|
|
@ -11,7 +11,7 @@
|
|||
<!-- 来源-->
|
||||
<div class="source_div">
|
||||
{{responseCopyWriting.source}}
|
||||
|
||||
<el-button type="info" icon="el-icon-check" @click="getCopyWriting" circle></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ public class ApiConst {
|
|||
|
||||
public static final String TIANXING_MMMY= "天行-名人名言";
|
||||
|
||||
public static final String TEN_YY= "Ten-一言";
|
||||
|
||||
|
||||
//-------------------url------------------------------
|
||||
|
||||
|
|
@ -36,4 +38,6 @@ public class ApiConst {
|
|||
|
||||
public static final String TIANXING_MMMY_URL= "http://api.tianapi.com/mingyan/index";
|
||||
|
||||
public static final String TEN_YY_URL= "https://tenapi.cn/yiyan/";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.xjs.common.consts;
|
|||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc
|
||||
* @desc 请求是否成功常量
|
||||
* @create 2021-12-26
|
||||
*/
|
||||
public class ReqConst {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.xjs.common.consts;
|
|||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 天行数据平台常量类
|
||||
* @desc 各个数据平台常量类
|
||||
* @create 2021-12-28
|
||||
*/
|
||||
public class TianXingConst {
|
||||
|
|
@ -15,4 +15,6 @@ public class TianXingConst {
|
|||
public static final Integer JDTC= 3;
|
||||
//名人名言
|
||||
public static final Integer MMMY= 4;
|
||||
//Ten-API 一言
|
||||
public static final Integer YY= 5;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.xjs.common.consts;
|
|||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc
|
||||
* @desc 翻译类型常量
|
||||
* @create 2021-12-25
|
||||
*/
|
||||
public interface TranslationTypeConst {
|
||||
|
|
|
|||
|
|
@ -154,6 +154,4 @@ public class CopyWritingController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class CopyWriting implements Serializable {
|
|||
@Excel(name = "文案来源")
|
||||
private String source;
|
||||
|
||||
@Excel(name = "创建时间")
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
|
|
|||
|
|
@ -13,4 +13,10 @@ public class RequestBody {
|
|||
* 平台key密钥
|
||||
*/
|
||||
private String key;
|
||||
|
||||
|
||||
/**
|
||||
* 请求类型 json/js/text
|
||||
*/
|
||||
private String format;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ public interface CopyWritingFactory {
|
|||
/**
|
||||
* 统一调用第三方api接口
|
||||
*
|
||||
* @param requestBody
|
||||
* @return
|
||||
* @param requestBody 请求体
|
||||
* @return CopyWriting
|
||||
*/
|
||||
CopyWriting productCopyWriting(RequestBody requestBody);
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class TianXingJDTCCopyWritingFactory implements CopyWritingFactory {
|
|||
}else {
|
||||
//调用服务失败的降级之后的处理
|
||||
if (jsonObject.containsKey("error")) {
|
||||
return copyWritingMapper.getOneToNew();
|
||||
return copyWritingMapper.getOneToRandom();
|
||||
}
|
||||
return new CopyWriting();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class TianXingMMMYCopyWritingFactory implements CopyWritingFactory {
|
|||
}else {
|
||||
//调用服务失败的降级之后的处理
|
||||
if (jsonObject.containsKey("error")) {
|
||||
return copyWritingMapper.getOneToNew();
|
||||
return copyWritingMapper.getOneToRandom();
|
||||
}
|
||||
return new CopyWriting();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class TianXingPYQCopyWritingFactory implements CopyWritingFactory {
|
|||
}else {
|
||||
//调用服务失败的降级之后的处理
|
||||
if (jsonObject.containsKey("error")) {
|
||||
return copyWritingMapper.getOneToNew();
|
||||
return copyWritingMapper.getOneToRandom();
|
||||
}
|
||||
return new CopyWriting();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class TianXingWYYCopyWritingFactory implements CopyWritingFactory {
|
|||
}else {
|
||||
//调用服务失败的降级之后的处理
|
||||
if (jsonObject.containsKey("error")) {
|
||||
return copyWritingMapper.getOneToNew();
|
||||
return copyWritingMapper.getOneToRandom();
|
||||
}
|
||||
return new CopyWriting();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue