|
@@ -94,4 +94,19 @@ public class YqzjNewsController extends YqzjBaseController { |
|
|
return new ResultData(); |
|
|
return new ResultData(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("取消置顶") |
|
|
|
|
|
@PostMapping("cancelfirst") |
|
|
|
|
|
public ResultData cancelfirst(@RequestBody YqzjNews record) { |
|
|
|
|
|
if (null == record.getId()) { |
|
|
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
|
|
} |
|
|
|
|
|
YqzjNews yn = yqzjService.findNewsById(record.getId()); |
|
|
|
|
|
if (null == yn ) { |
|
|
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"新闻未查询到"); |
|
|
|
|
|
} |
|
|
|
|
|
yn.setFirst(EnumYesOrNo.No.getCode()); |
|
|
|
|
|
this.yqzjService.saveOrUpdateNews(yn); |
|
|
|
|
|
return new ResultData(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |