Blame view

美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IPartnerAppService.cs 4.31 KB
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  using FoodLabeling.Application.Contracts.Dtos.Common;
  using FoodLabeling.Application.Contracts.Dtos.Partner;
  using Microsoft.AspNetCore.Mvc;
  using Volo.Abp.Application.Dtos;
  using Volo.Abp.Application.Services;
  
  namespace FoodLabeling.Application.Contracts.IServices;
  
  /// <summary>
  /// 合作伙伴管理接口(fl_partner
  /// </summary>
  public interface IPartnerAppService : IApplicationService
  {
      /// <summary>
      /// 合作伙伴分页列表(与导出使用相同筛选条件)
      /// </summary>
10fd1324   李曜臣   5-17接口优化
17
18
19
20
21
22
23
      /// <remarks>
      /// 数据范围(按登录 Token):
      /// <list type="bullet">
      /// <item>管理员(角色码 <c>admin</c>、用户名为 <c>admin</c> 或权限 <c>*:*:*</c>):可查看全部公司;</item>
      /// <item>其它角色:仅可查看当前用户在 <c>userlocation</c> 中绑定门店所属的合作伙伴(<c>location.Partner</c>  <c>fl_partner</c> 按名称或 Id 匹配)。</item>
      /// </list>
      /// </remarks>
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
24
25
26
27
28
29
30
31
32
33
      /// <param name="input">分页与筛选;SkipCount 为页码(从 1 起)</param>
      /// <returns>分页数据</returns>
      /// <response code="200">成功</response>
      /// <response code="400">参数错误</response>
      /// <response code="500">服务器错误</response>
      Task<PagedResultWithPageDto<PartnerGetListOutputDto>> GetListAsync(PartnerGetListInputVo input);
  
      /// <summary>
      /// 合作伙伴详情
      /// </summary>
10fd1324   李曜臣   5-17接口优化
34
      /// <param name="id">主键(Guid,与 <c>fl_partner.Id</c> 一致;约定路由 <c>{id:guid}</c>,避免与 <c>export-pdf</c> 等路径冲突)</param>
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
35
36
37
38
      /// <returns>详情</returns>
      /// <response code="200">成功</response>
      /// <response code="400">Id 无效</response>
      /// <response code="500">服务器错误</response>
10fd1324   李曜臣   5-17接口优化
39
      Task<PartnerGetOutputDto> GetAsync(Guid id);
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
40
41
42
43
  
      /// <summary>
      /// 新增合作伙伴
      /// </summary>
10fd1324   李曜臣   5-17接口优化
44
      /// <param name="input">名称、联系信息、地址、启用状态</param>
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
45
46
47
48
49
50
51
52
      /// <returns>新建后的详情</returns>
      /// <remarks>
      /// 示例请求:
      /// ```json
      /// {
      ///   "partnerName": "Global Foods Inc.",
      ///   "contactEmail": "admin@globalfoods.com",
      ///   "phoneNumber": "+1 (555) 100-2000",
10fd1324   李曜臣   5-17接口优化
53
54
55
56
57
      ///   "street": "123 Main St",
      ///   "city": "New York",
      ///   "stateCode": "NY",
      ///   "country": "USA",
      ///   "zipCode": "10001",
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
58
59
60
      ///   "state": true
      /// }
      /// ```
10fd1324   李曜臣   5-17接口优化
61
      /// 地址中的州/省请传 <c>stateCode</c>(如 NY);<c>state</c>boolean)表示是否启用。
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
62
63
64
65
66
67
68
69
70
71
      /// </remarks>
      /// <response code="200">成功</response>
      /// <response code="400">校验失败</response>
      /// <response code="500">服务器错误</response>
      Task<PartnerGetOutputDto> CreateAsync(PartnerCreateInputVo input);
  
      /// <summary>
      /// 编辑合作伙伴
      /// </summary>
      /// <param name="id">主键 Id</param>
10fd1324   李曜臣   5-17接口优化
72
      /// <param name="input">名称、联系信息、地址、启用状态(字段同新增)</param>
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
73
74
75
76
      /// <returns>更新后的详情</returns>
      /// <response code="200">成功</response>
      /// <response code="400">校验失败或记录不存在</response>
      /// <response code="500">服务器错误</response>
10fd1324   李曜臣   5-17接口优化
77
      Task<PartnerGetOutputDto> UpdateAsync(Guid id, PartnerUpdateInputVo input);
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
78
79
80
81
82
83
84
85
  
      /// <summary>
      /// 删除合作伙伴(逻辑删除)
      /// </summary>
      /// <param name="id">主键 Id</param>
      /// <response code="200">成功</response>
      /// <response code="400">Id 无效或记录不存在</response>
      /// <response code="500">服务器错误</response>
10fd1324   李曜臣   5-17接口优化
86
      Task DeleteAsync(Guid id);
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
87
88
  
      /// <summary>
a7684ddb   李曜臣   批量导入导出,批量编辑
89
      /// 按当前列表筛选条件批量导出合作伙伴为 PDFAccount ManagementCompany」页签;不分页,上限 5000 条)
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
90
91
92
93
      /// </summary>
      /// <param name="input">与列表相同的 KeywordState;分页字段忽略</param>
      /// <returns>PDF 文件流</returns>
      /// <remarks>
10fd1324   李曜臣   5-17接口优化
94
      /// 筛选条件与数据范围需与 <see cref="GetListAsync"/> 完全一致(含 Token 权限:管理员全部公司,其它角色仅绑定门店所属公司;见 PartnerScopeHelper)。
4d328ec2   李曜臣   平台端报表reports,仪表盘D...
95
96
97
98
99
100
      /// </remarks>
      /// <response code="200">成功返回 application/pdf</response>
      /// <response code="400">参数错误</response>
      /// <response code="500">服务器错误</response>
      Task<IActionResult> ExportPdfAsync(PartnerGetListInputVo input);
  }