houzhongyi
2024-07-11 e7c1260db32209a078a962aaa0ad5492c35774fb
提交 | 用户 | 时间
e7c126 1 package com.iailab.module.system.api.tenant;
H 2
3 import com.iailab.framework.common.pojo.CommonResult;
4 import com.iailab.module.system.service.tenant.TenantService;
5 import org.springframework.validation.annotation.Validated;
6 import org.springframework.web.bind.annotation.RestController;
7
8 import javax.annotation.Resource;
9 import java.util.List;
10
11 import static com.iailab.framework.common.pojo.CommonResult.success;
12
13 @RestController // 提供 RESTful API 接口,给 Feign 调用
14 @Validated
15 public class TenantApiImpl implements TenantApi {
16
17     @Resource
18     private TenantService tenantService;
19
20     @Override
21     public CommonResult<List<Long>> getTenantIdList() {
22         return success(tenantService.getTenantIdList());
23     }
24
25     @Override
26     public CommonResult<Boolean> validTenant(Long id) {
27         tenantService.validTenant(id);
28         return success(true);
29     }
30
31 }