SEO新增增加校验

master
rong.liu 5 months ago
parent efab276536
commit 44b9be9c6f
  1. 2
      src/main/java/com/huoran/iasf/controller/SeoController.java

@ -32,7 +32,7 @@ public class SeoController {
@PostMapping("/add") @PostMapping("/add")
@ApiOperation(value = "新增seo") @ApiOperation(value = "新增seo")
public R addUserGroup(@RequestBody Seo seo) { public R addUserGroup(@RequestBody Seo seo) {
Seo one = seoService.getOne(new QueryWrapper<Seo>().eq("title", seo.getTitle())); Seo one = seoService.getOne(new QueryWrapper<Seo>().eq("title", seo.getTitle()).eq("site_id", seo.getSiteId()));
if (ObjectUtil.isNotNull(one)) { if (ObjectUtil.isNotNull(one)) {
R.fail("seo已存在"); R.fail("seo已存在");
} }

Loading…
Cancel
Save