工作组
This commit is contained in:
+3
-6
@@ -38,21 +38,18 @@ public class WorkGroupController extends BaseController<WorkGroup> {
|
|||||||
@ApiModelProperty("新增工作组")
|
@ApiModelProperty("新增工作组")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public ResponseMessage addWorkGroup(WorkGroup workGroup) {
|
public ResponseMessage addWorkGroup(WorkGroup workGroup) {
|
||||||
ResponseMessage<Object> result = Result.success();
|
|
||||||
|
|
||||||
if (isDistinct(workGroup.getWorkGroup(),null)){
|
if (isDistinct(workGroup.getWorkGroup(),null)){
|
||||||
if (iWorkGroupService.add(workGroup)){
|
if (iWorkGroupService.add(workGroup)){
|
||||||
result=Result.success("200","新增成功");
|
return Result.success("200",null,true);
|
||||||
}else {
|
}else {
|
||||||
result=Result.error("201","新增失败");
|
return Result.error("201","新增失败",false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
result=Result.error("202","组名已存在");
|
return Result.error("202","组名已存在",false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user