|
|
@ -247,7 +247,6 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
Page<CityTrends> page1 = cityTrendsService |
|
|
|
.lambdaQuery() |
|
|
|
.orderByDesc(CityTrends::getCreateTime) |
|
|
|
.eq(CityTrends::getIsState,1) |
|
|
|
.page(page); |
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(classId)){ |
|
|
@ -255,7 +254,6 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
.lambdaQuery() |
|
|
|
.eq(CityTrends::getClassId,classId) |
|
|
|
.orderByDesc(CityTrends::getCreateTime) |
|
|
|
.eq(CityTrends::getIsState,1) |
|
|
|
.page(page); |
|
|
|
|
|
|
|
|
|
|
@ -474,7 +472,11 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
|
|
|
|
|
|
|
|
//验证 |
|
|
|
this.sendMsgSecCheck(hanHaiMember.getAppletOpenid(), cityTrends.getTitle()); |
|
|
|
Integer i = this.sendMsgSecCheck(hanHaiMember.getAppletOpenid(), cityTrends.getTitle()); |
|
|
|
if(i>100){ |
|
|
|
return Result.error("内容含有敏感词"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//设置配置 |
|
|
|
cityTrends.setUserId(hanHaiMember.getId()); |
|
|
@ -797,8 +799,10 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); |
|
|
|
|
|
|
|
//验证 |
|
|
|
this.sendMsgSecCheck(hanHaiMember.getAppletOpenid(), cityComment.getUserValue()); |
|
|
|
|
|
|
|
Integer i = this.sendMsgSecCheck(hanHaiMember.getAppletOpenid(), cityComment.getUserValue()); |
|
|
|
if(i>100){ |
|
|
|
return Result.error("内容含有敏感词"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cityComment.setUserId(hanHaiMember.getId()); |
|
|
@ -833,7 +837,7 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<?> sendMsgSecCheck(String openid,String content){ |
|
|
|
public Integer sendMsgSecCheck(String openid,String content){ |
|
|
|
int scene = 1; // 场景枚举值(1 资料;2 评论;3 论坛;4 社交日志) |
|
|
|
int version = 2; // 接口版本号 |
|
|
|
try { |
|
|
@ -859,36 +863,13 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
int label = (int) labelDouble; |
|
|
|
|
|
|
|
System.out.println(label); |
|
|
|
if(label == 10001){ |
|
|
|
return Result.error("内容含有敏感信息"); |
|
|
|
} |
|
|
|
if(label == 20001){ |
|
|
|
return Result.error("内容含有敏感信息"); |
|
|
|
} |
|
|
|
if(label == 20002){ |
|
|
|
return Result.error("内容含有敏感信息"); |
|
|
|
} |
|
|
|
if(label == 20003){ |
|
|
|
return Result.error("内容含有敏感信息"); |
|
|
|
} |
|
|
|
if(label == 20006){ |
|
|
|
return Result.error("内容含有敏感信息"); |
|
|
|
} |
|
|
|
if(label == 20008){ |
|
|
|
return Result.error("内容含有敏感信息"); |
|
|
|
} |
|
|
|
if(label == 20012){ |
|
|
|
return Result.error("内容含有敏感信息"); |
|
|
|
} |
|
|
|
if(label == 20013){ |
|
|
|
return Result.error("内容含有敏感信息"); |
|
|
|
} |
|
|
|
|
|
|
|
return Result.OK(label ); |
|
|
|
|
|
|
|
return label; |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
return Result.OK(); |
|
|
|
return 100; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|