标签管理-标签项修改
This commit is contained in:
+11
-6
@@ -12,6 +12,7 @@ import com.jero.modules.tag.service.IOnlCgformTagService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -115,14 +116,18 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
@AutoLog(value = "标签管理-通过id删除")
|
||||
@ApiOperation(value="标签管理-通过id删除", notes="标签管理-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
public Result<OnlCgformTag> delete(@RequestParam(name="id",required=true) String id) {
|
||||
Result<OnlCgformTag> result = new Result<>();
|
||||
OnlCgformTag onlCgformTag = onlCgformTagService.queryById(id);
|
||||
if(onlCgformTag.getIsReadOnly() == 1 || onlCgformTag.getIsReadOnly()==2){
|
||||
return Result.error("固定字段,不可删除");
|
||||
}else{
|
||||
onlCgformTagService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
if(StringUtils.isNotBlank(String.valueOf(onlCgformTag.getIsReadOnly()))) {
|
||||
if (onlCgformTag.getIsReadOnly() == 1 || onlCgformTag.getIsReadOnly() == 2) {
|
||||
result.error("固定字段,不可删除");
|
||||
} else {
|
||||
onlCgformTagService.deleteById(id);
|
||||
result.OK("删除成功!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user