|
|
@ -187,14 +187,14 @@ public class SysContentController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/checkIfTheTitleIsRepeat") |
|
|
|
@PostMapping("/checkIfTheTitleIsRepeat") |
|
|
|
@Decrypt |
|
|
|
// @Decrypt
|
|
|
|
@ApiOperation(value = "标题判重——只对已发布的判重(新增,编辑,点击发布时候都要调用判断))", response = ContentHeavyTitleReqVO.class) |
|
|
|
@ApiOperation(value = "标题判重——只对已发布的判重(新增,编辑,点击发布时候都要调用判断))", response = ContentHeavyTitleReqVO.class) |
|
|
|
public R checkIfTheTitleIsRepeat(@RequestBody @Valid ContentHeavyTitleReqVO content) throws UnsupportedEncodingException { |
|
|
|
public R checkIfTheTitleIsRepeat(@RequestBody @Valid ContentHeavyTitleReqVO content) throws UnsupportedEncodingException { |
|
|
|
if (!org.springframework.util.StringUtils.isEmpty(content.getTitle())) { |
|
|
|
// if (!org.springframework.util.StringUtils.isEmpty(content.getTitle())) {
|
|
|
|
//中文转码
|
|
|
|
// //中文转码
|
|
|
|
String name = URLDecoder.decode(content.getTitle(), StandardCharsets.UTF_8.toString()); |
|
|
|
// String name = URLDecoder.decode(content.getTitle(), StandardCharsets.UTF_8.toString());
|
|
|
|
content.setTitle(name); |
|
|
|
// content.setTitle(name);
|
|
|
|
} |
|
|
|
// }
|
|
|
|
return service.checkIfTheTitleIsRepeat(content) ? R.success() : R.fail("该标题已重复!"); |
|
|
|
return service.checkIfTheTitleIsRepeat(content) ? R.success() : R.fail("该标题已重复!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|