Skip to content

Commit

Permalink
Update ResourceController.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Thecosy committed Apr 21, 2024
1 parent e77fa9b commit 030b8d6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 57,8 @@ public Result add(@RequestBody Resource resource) throws ParseException {
// 生成随机数注入
int number = MathUtils.randomDigitNumber(7);
resource.setResourceStatus(number);
// 设置资源状态为已发布
resource.setStatus("published");
// 查询分类名称对应的id值
QueryWrapper<Resource> wrapper = new QueryWrapper<>();
wrapper.eq("title", resource.getTitle());
Expand Down

0 comments on commit 030b8d6

Please sign in to comment.