Compare commits
2 Commits
56c1c93f7c
...
d7474209c0
Author | SHA1 | Date | |
---|---|---|---|
d7474209c0 | |||
68fc831da0 |
@ -132,8 +132,12 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
|||||||
data.setApprovalTime(new Date());
|
data.setApprovalTime(new Date());
|
||||||
//遍历 list的每条数据与data对比,如果两条数据相似度大于70% 提出预警
|
//遍历 list的每条数据与data对比,如果两条数据相似度大于70% 提出预警
|
||||||
for (BusiNotice busiNotice : list) {
|
for (BusiNotice busiNotice : list) {
|
||||||
double v1 = NoticeUtils.computeJaccardSimilarity(data.getTitle(), busiNotice.getTitle());
|
String tempTitle1 = data.getTitle().replaceAll("<br>","");
|
||||||
double v2 = NoticeUtils.computeJaccardSimilarity(data.getDetail(), busiNotice.getDetail());
|
String tempTitle2 = busiNotice.getTitle().replaceAll("<br>","");
|
||||||
|
String tempDetail1 = data.getDetail().replaceAll("<br>","");
|
||||||
|
String tempDetail2 = busiNotice.getDetail().replaceAll("<br>","");
|
||||||
|
double v1 = NoticeUtils.computeJaccardSimilarity(tempTitle1, tempTitle2);
|
||||||
|
double v2 = NoticeUtils.computeJaccardSimilarity(tempDetail1, tempDetail2);
|
||||||
if (v1>=0.7&&v2>=0.7){
|
if (v1>=0.7&&v2>=0.7){
|
||||||
//title 和 detail 相似度大于70% 待审核
|
//title 和 detail 相似度大于70% 待审核
|
||||||
data.setApprovalStatus("0");
|
data.setApprovalStatus("0");
|
||||||
|
@ -163,7 +163,7 @@ public class MemberUserController extends BaseController {
|
|||||||
* 赠送新人好礼
|
* 赠送新人好礼
|
||||||
*/
|
*/
|
||||||
@Log(title = "赠送新人好礼", businessType = BusinessType.INSERT)
|
@Log(title = "赠送新人好礼", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping("/sendNewGift")
|
||||||
public AjaxResult sendNewGift() {
|
public AjaxResult sendNewGift() {
|
||||||
memberUserService.sendNewGift();
|
memberUserService.sendNewGift();
|
||||||
return success();
|
return success();
|
||||||
|
Loading…
Reference in New Issue
Block a user