|
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
6
|
6
|
import com.shigongli.common.BaseController;
|
7
|
7
|
import com.shigongli.common.ResponseBean;
|
8
|
8
|
import com.shigongli.constants.StatusConstant;
|
|
9
|
+import com.shigongli.entity.TaMateTag;
|
|
10
|
+import com.shigongli.service.ITaMateTagService;
|
9
|
11
|
import io.swagger.annotations.Api;
|
10
|
12
|
import io.swagger.annotations.ApiOperation;
|
11
|
13
|
import io.swagger.annotations.ApiParam;
|
|
@@ -21,6 +23,8 @@ import com.shigongli.service.ITaMateTagGroupService;
|
21
|
23
|
import com.shigongli.entity.TaMateTagGroup;
|
22
|
24
|
import org.springframework.web.bind.annotation.RestController;
|
23
|
25
|
|
|
26
|
+import java.util.List;
|
|
27
|
+
|
24
|
28
|
/**
|
25
|
29
|
* <p>
|
26
|
30
|
* 素材标签组 前端控制器
|
|
@@ -40,6 +44,9 @@ public class TaMateTagGroupController extends BaseController {
|
40
|
44
|
@Autowired
|
41
|
45
|
public ITaMateTagGroupService iTaMateTagGroupService;
|
42
|
46
|
|
|
47
|
+ @Autowired
|
|
48
|
+ public ITaMateTagService iTaMateTagService;
|
|
49
|
+
|
43
|
50
|
|
44
|
51
|
/**
|
45
|
52
|
* 分页查询列表
|
|
@@ -58,6 +65,15 @@ public class TaMateTagGroupController extends BaseController {
|
58
|
65
|
queryWrapper.orderByDesc("create_date");
|
59
|
66
|
|
60
|
67
|
IPage<TaMateTagGroup> result = iTaMateTagGroupService.page(pg, queryWrapper);
|
|
68
|
+
|
|
69
|
+ // 获取组下所有标签
|
|
70
|
+ if (null != result.getRecords()) {
|
|
71
|
+ for (TaMateTagGroup item: result.getRecords()) {
|
|
72
|
+ List<TaMateTag> taMateTagList = iTaMateTagService.getByGroup(item.getGroupId());
|
|
73
|
+ item.setTaMateTagList(taMateTagList);
|
|
74
|
+ }
|
|
75
|
+ }
|
|
76
|
+
|
61
|
77
|
return ResponseBean.success(result);
|
62
|
78
|
}
|
63
|
79
|
|