parent
add64ea618
commit
856166612a
|
|
@ -7,6 +7,7 @@
|
|||
placeholder="请输入"
|
||||
clearable
|
||||
size="small"
|
||||
@change="handleQuery"
|
||||
style="width: 180px">
|
||||
<el-option
|
||||
v-for="index in apiName"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
placeholder="请输入"
|
||||
clearable
|
||||
size="small"
|
||||
@change="handleQuery"
|
||||
style="width: 180px">
|
||||
<el-option
|
||||
v-for="index in apiName"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<include refid="selectApiRecordVo"/>
|
||||
<where>
|
||||
<if test="apiName != null and apiName != ''"> and api_name like concat('%', #{apiName}, '%')</if>
|
||||
<if test="status != null">status = #{status}</if>
|
||||
<if test="status != null">and status = #{status}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -75,10 +75,7 @@ public class _36wallpaperServiceImpl extends ServiceImpl<_36wallpaperMapper, _36
|
|||
|
||||
@Override
|
||||
public boolean updateSettings(String json) {
|
||||
//判断爬虫是否正在执行,正在执行不可修改!
|
||||
if(redisService.hasKey(REPTILE_COUNT)){
|
||||
throw new BusinessException("爬虫正在执行中!暂时无法修改,请稍后再试");
|
||||
}
|
||||
this.checkRunning();
|
||||
|
||||
//校验json格式是否正确
|
||||
try {
|
||||
|
|
@ -116,6 +113,8 @@ public class _36wallpaperServiceImpl extends ServiceImpl<_36wallpaperMapper, _36
|
|||
|
||||
@Override
|
||||
public boolean resetSettings() {
|
||||
this.checkRunning();
|
||||
|
||||
//构建json
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("path",PATH);
|
||||
|
|
@ -128,4 +127,15 @@ public class _36wallpaperServiceImpl extends ServiceImpl<_36wallpaperMapper, _36
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 检测是否正在运行
|
||||
*/
|
||||
private void checkRunning() {
|
||||
//判断爬虫是否正在执行,正在执行不可修改!
|
||||
if(redisService.hasKey(REPTILE_COUNT)){
|
||||
throw new BusinessException("爬虫正在执行中!暂时无法修改,请稍后再试");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class CopyWritingNetworkServiceImpl extends ServiceImpl<CopyWritingNetwor
|
|||
@Override
|
||||
public List<CopyWritingNetwork> selectCopyWritingNetworkList(CopyWritingNetwork copyWritingNetwork) {
|
||||
List<CopyWritingNetwork> list = copyWritingNetworkMapper.selectCopyWritingNetworkList(copyWritingNetwork);
|
||||
list.forEach(data ->{
|
||||
list.forEach(data -> {
|
||||
data.setContent(this.filterContent(data.getContent()));
|
||||
});
|
||||
return list;
|
||||
|
|
@ -67,23 +67,33 @@ public class CopyWritingNetworkServiceImpl extends ServiceImpl<CopyWritingNetwor
|
|||
char index0 = oldStr.charAt(0);
|
||||
char index1 = oldStr.charAt(1);
|
||||
char index2 = oldStr.charAt(2);
|
||||
char index3 = oldStr.charAt(3);
|
||||
boolean matches0 = pattern.matcher(String.valueOf(index0)).matches();
|
||||
boolean matches1 = pattern.matcher(String.valueOf(index1)).matches();
|
||||
boolean matches2 = pattern.matcher(String.valueOf(index2)).matches();
|
||||
// 1、
|
||||
if (matches0 && index1=='、') {
|
||||
return oldStr.substring(2,oldStr.length()-2);
|
||||
if (matches0 && index1 == '、') {
|
||||
return oldStr.substring(2);
|
||||
}
|
||||
// 15、
|
||||
if (matches0 && matches1 && index2 == '、') {
|
||||
return oldStr.substring(3,oldStr.length()-3);
|
||||
return oldStr.substring(3);
|
||||
}
|
||||
//100、
|
||||
if (matches0 && matches1 && matches2 && index3 == '、') {
|
||||
return oldStr.substring(4);
|
||||
}
|
||||
//1.
|
||||
if (matches0 && index1=='.') {
|
||||
return oldStr.substring(2,oldStr.length()-2);
|
||||
if (matches0 && index1 == '.') {
|
||||
return oldStr.substring(2);
|
||||
}
|
||||
//13.
|
||||
if (matches0 && matches1 && index2 == '.') {
|
||||
return oldStr.substring(3,oldStr.length()-3);
|
||||
return oldStr.substring(3);
|
||||
}
|
||||
//100.
|
||||
if (matches0 && matches1 && matches2 && index3 == '.') {
|
||||
return oldStr.substring(4);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
|
|
|
|||
Loading…
Reference in New Issue