|
@@ -11,10 +11,12 @@ import com.yonge.cooleshow.admin.io.request.TenantAlbumCategoryVo;
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
import com.yonge.cooleshow.biz.dal.entity.TenantAlbumCategory;
|
|
import com.yonge.cooleshow.biz.dal.entity.TenantAlbumCategory;
|
|
-import com.yonge.cooleshow.biz.dal.mapper.SysUserMapper;
|
|
|
|
|
|
+import com.yonge.cooleshow.biz.dal.entity.TenantAlbumCategoryDetail;
|
|
import com.yonge.cooleshow.biz.dal.service.SysUserService;
|
|
import com.yonge.cooleshow.biz.dal.service.SysUserService;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.service.TenantAlbumCategoryDetailService;
|
|
import com.yonge.cooleshow.biz.dal.service.TenantAlbumCategoryService;
|
|
import com.yonge.cooleshow.biz.dal.service.TenantAlbumCategoryService;
|
|
import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumCategoryWrapper;
|
|
import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumCategoryWrapper;
|
|
|
|
+import com.yonge.toolset.base.exception.BizException;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -46,6 +48,9 @@ public class TenantAlbumCategoryController {
|
|
@Autowired
|
|
@Autowired
|
|
private TenantAlbumCategoryService tenantAlbumCategoryService;
|
|
private TenantAlbumCategoryService tenantAlbumCategoryService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private TenantAlbumCategoryDetailService tenantAlbumCategoryDetailService;
|
|
|
|
+
|
|
@Resource
|
|
@Resource
|
|
private SysUserFeignService sysUserFeignService;
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
|
|
|
@@ -53,9 +58,6 @@ public class TenantAlbumCategoryController {
|
|
private SysUserService sysUserService;
|
|
private SysUserService sysUserService;
|
|
|
|
|
|
@ApiOperation(value = "详情", notes = "机构专辑分类-根据详情ID查询单条, 传入id")
|
|
@ApiOperation(value = "详情", notes = "机构专辑分类-根据详情ID查询单条, 传入id")
|
|
- @ApiImplicitParams({
|
|
|
|
- @ApiImplicitParam(name = "id", value = "id", dataType = "long")
|
|
|
|
- })
|
|
|
|
@PreAuthorize("@auditsvc.hasPermissions('tenantAlbumCategory/detail', {'BACKEND'})")
|
|
@PreAuthorize("@auditsvc.hasPermissions('tenantAlbumCategory/detail', {'BACKEND'})")
|
|
@GetMapping("/detail/{id}")
|
|
@GetMapping("/detail/{id}")
|
|
public R<TenantAlbumCategoryWrapper.TenantAlbumCategory> detail(@PathVariable("id") Long id) {
|
|
public R<TenantAlbumCategoryWrapper.TenantAlbumCategory> detail(@PathVariable("id") Long id) {
|
|
@@ -118,13 +120,25 @@ public class TenantAlbumCategoryController {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除", notes = "机构专辑分类- 传入id")
|
|
@ApiOperation(value = "删除", notes = "机构专辑分类- 传入id")
|
|
- @ApiImplicitParams({
|
|
|
|
- @ApiImplicitParam(name = "id", value = "id", dataType = "long")
|
|
|
|
- })
|
|
|
|
@PreAuthorize("@auditsvc.hasPermissions('tenantAlbumCategory/remove', {'BACKEND'})")
|
|
@PreAuthorize("@auditsvc.hasPermissions('tenantAlbumCategory/remove', {'BACKEND'})")
|
|
@PostMapping("/remove")
|
|
@PostMapping("/remove")
|
|
public R<Boolean> remove(@RequestParam Long id) {
|
|
public R<Boolean> remove(@RequestParam Long id) {
|
|
|
|
|
|
return R.from(tenantAlbumCategoryService.delete(id));
|
|
return R.from(tenantAlbumCategoryService.delete(id));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "获取专辑分类值列表")
|
|
|
|
+ @PreAuthorize("@auditsvc.hasPermissions('tenantAlbumCategory/queryCategoryValue', {'BACKEND'})")
|
|
|
|
+ @GetMapping("/queryCategoryValue")
|
|
|
|
+ public R<List<TenantAlbumCategoryDetail>> queryCategoryValue(@RequestParam("id") Long id) {
|
|
|
|
+ TenantAlbumCategory albumCategory = tenantAlbumCategoryService.getById(id);
|
|
|
|
+ if (albumCategory == null) {
|
|
|
|
+ throw new BizException("专辑分类不存在");
|
|
|
|
+ }
|
|
|
|
+ List<TenantAlbumCategoryDetail> detailList = tenantAlbumCategoryDetailService.lambdaQuery()
|
|
|
|
+ .eq(TenantAlbumCategoryDetail::getTenantAlbumCategoryId, id)
|
|
|
|
+ .list();
|
|
|
|
+ return R.from(detailList);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|