|
|
@ -1,6 +1,8 @@ |
|
|
|
package com.huoran.iasf.controller; |
|
|
|
package com.huoran.iasf.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
|
|
|
import com.huoran.iasf.common.exception.NotFoundException; |
|
|
|
|
|
|
|
import com.huoran.iasf.common.exception.code.BaseResponseCode; |
|
|
|
import com.huoran.iasf.common.utils.R; |
|
|
|
import com.huoran.iasf.common.utils.R; |
|
|
|
import com.huoran.iasf.entity.SysContentClassification; |
|
|
|
import com.huoran.iasf.entity.SysContentClassification; |
|
|
|
import com.huoran.iasf.entity.SysContentLabel; |
|
|
|
import com.huoran.iasf.entity.SysContentLabel; |
|
|
@ -46,6 +48,9 @@ public class SysContentLabelController { |
|
|
|
@ApiOperation(value = "查询详情", response = SysContentLabel.class) |
|
|
|
@ApiOperation(value = "查询详情", response = SysContentLabel.class) |
|
|
|
public R findById(@ApiParam(name = "id", value = "主键", required = true) @RequestParam Integer id) { |
|
|
|
public R findById(@ApiParam(name = "id", value = "主键", required = true) @RequestParam Integer id) { |
|
|
|
SysContentLabel sysContentLabel = service.getById(id); |
|
|
|
SysContentLabel sysContentLabel = service.getById(id); |
|
|
|
|
|
|
|
if (sysContentLabel == null) { |
|
|
|
|
|
|
|
throw new NotFoundException(BaseResponseCode.DATA_DOES_NOT_EXIST); |
|
|
|
|
|
|
|
} |
|
|
|
return R.success(sysContentLabel); |
|
|
|
return R.success(sysContentLabel); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -60,9 +65,7 @@ public class SysContentLabelController { |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/checkForHeavy") |
|
|
|
@PostMapping("/checkForHeavy") |
|
|
|
@ApiOperation(value = "标签校验判重", response = SysContentLabel.class) |
|
|
|
@ApiOperation(value = "标签校验判重", response = SysContentLabel.class) |
|
|
|
public R checkForHeavy(@ApiParam(name = "siteId", value = "站点id", required = true) @RequestParam Integer siteId, |
|
|
|
public R checkForHeavy(@ApiParam(name = "siteId", value = "站点id", required = true) @RequestParam Integer siteId, @ApiParam(name = "labelName", value = "标签名称", required = true) @RequestParam String labelName, @ApiParam(name = "labelId", value = "标签id(新增不传,编辑传)", required = false) @RequestParam Integer labelId) { |
|
|
|
@ApiParam(name = "labelName", value = "标签名称", required = true) @RequestParam String labelName, |
|
|
|
|
|
|
|
@ApiParam(name = "labelId", value = "标签id(新增不传,编辑传)", required = false) @RequestParam Integer labelId) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<SysContentLabel> queryWrapper = new QueryWrapper<SysContentLabel>().eq("site_id", siteId).eq("label_name", labelName); |
|
|
|
QueryWrapper<SysContentLabel> queryWrapper = new QueryWrapper<SysContentLabel>().eq("site_id", siteId).eq("label_name", labelName); |
|
|
|
|
|
|
|
|
|
|
|