|
1 | 1 | package com.mumu.image.controller;
|
2 | 2 |
|
3 | 3 |
|
| 4 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 5 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
5 | 6 | import com.fasterxml.jackson.databind.ObjectMapper;
|
6 | 7 | import com.mumu.image.DTO.ImageInfo;
|
7 | 8 | import com.mumu.image.DTO.ImgDTO;
|
8 | 9 | import com.mumu.image.entity.Img;
|
| 10 | +import com.mumu.image.entity.People; |
| 11 | +import com.mumu.image.entity.Tag; |
9 | 12 | import com.mumu.image.service.*;
|
10 | 13 | import com.mumu.utils.AjaxJson;
|
11 | 14 | import com.mumu.utils.MinioUtils;
|
@@ -176,7 +179,28 @@ public AjaxJson changeName(int imgId,int userId,
|
176 | 179 | ));
|
177 | 180 | }
|
178 | 181 |
|
| 182 | + @ApiOperation(value = "获取图片数量", tags = "图片类") |
| 183 | + @GetMapping("/getimgcnt") |
| 184 | + public AjaxJson getimgcnt(int userId) { |
| 185 | + return AjaxJson.getSuccessData(imgService.count(new LambdaQueryWrapper<Img>() |
| 186 | + .eq(Img::getUserId, userId) |
| 187 | + )); |
| 188 | + } |
179 | 189 |
|
| 190 | + @ApiOperation(value = "获取people数量", tags = "图片类") |
| 191 | + @GetMapping("/getpeoplecnt") |
| 192 | + public AjaxJson getpeoplecnt(int userId) { |
| 193 | + return AjaxJson.getSuccessData(peopleService.count(new LambdaQueryWrapper<People>() |
| 194 | + .eq(People::getUserId, userId) |
| 195 | + )); |
| 196 | + } |
| 197 | + @ApiOperation(value = "获取tag数量", tags = "图片类") |
| 198 | + @GetMapping("/gettagcnt") |
| 199 | + public AjaxJson gettagcnt(int userId) { |
| 200 | + return AjaxJson.getSuccessData(tagService.count(new LambdaQueryWrapper<Tag>() |
| 201 | + .eq(Tag::getUserId, userId) |
| 202 | + )); |
| 203 | + } |
180 | 204 |
|
181 | 205 | @ApiOperation(value = "添加图片带信息", tags = "图片类")
|
182 | 206 | @PostMapping("/add")
|
|
0 commit comments