添加下线数接口

This commit is contained in:
2025-06-08 22:58:12 +08:00
parent adf6331fcf
commit fd6f747e66
2 changed files with 17 additions and 0 deletions

View File

@@ -75,6 +75,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/api/system/dict-data/page",
"/api/system/organization",
"/api/system/tenant/saveByPhone",
"/api/system/user-referee/getRefereeNum",
"/lvQ4EoivKJ.txt"
)
.permitAll()

View File

@@ -180,4 +180,20 @@ public class UserRefereeController extends BaseController {
return fail("查询失败", null);
}
@ApiOperation("查询推荐人数量")
@GetMapping("/getRefereeNum/{id}")
public ApiResult<Integer> getRefereeNum(@PathVariable("id") Integer id) {
if (id == null) {
return fail("参数错误", null);
}
final List<UserReferee> refereeList = userRefereeService.list(new LambdaQueryWrapper<UserReferee>()
.eq(UserReferee::getDealerId, id)
.eq(UserReferee::getDeleted, 0));
if (ObjectUtil.isEmpty(refereeList)) {
return success("查询成功", 0);
}
return success("查询成功", refereeList.size());
}
}