This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
package com.yunhai.svchall.model.oapi;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 开放接口(供 CMS)出参模型收口(V2.0 Part C.2 契约冻结件)。
|
||||
* 平台统一响应信封 {code,msg,data} 由 starter 包装,本类只定义 data 部分。
|
||||
* 签名/信封纪律:未签名 401(RequireAppSignFilter);缺参/不存在/未发布 → HTTP 200 + code=2。
|
||||
*/
|
||||
public final class OapiModels {
|
||||
|
||||
private OapiModels() {
|
||||
}
|
||||
|
||||
/** GET /oapi/svc/items 行(id 为办事大厅主键——CMS 门户 /sv/{id} 路由直接携带) */
|
||||
@Data
|
||||
public static class ItemRow {
|
||||
private Integer id;
|
||||
private String itemCode;
|
||||
private String title;
|
||||
private String summary;
|
||||
private String coverImage;
|
||||
private String deptName;
|
||||
private String categoryName;
|
||||
private Integer handleMode;
|
||||
private Integer onlineFlag;
|
||||
private LocalDateTime publishTime;
|
||||
}
|
||||
|
||||
/** GET /oapi/svc/items 出参 */
|
||||
@Data
|
||||
public static class ListData {
|
||||
private Long total = 0L;
|
||||
private Integer page = 1;
|
||||
private Integer pageSize = 10;
|
||||
private Integer totalPages = 0;
|
||||
private List<ItemRow> items = new ArrayList<>();
|
||||
}
|
||||
|
||||
/** 筛选项(key 或 id 二选一:object/category 用 key,dept 用组 id) */
|
||||
@Data
|
||||
public static class FilterOption {
|
||||
private final String key;
|
||||
private final Integer id;
|
||||
private final String name;
|
||||
private final long count;
|
||||
}
|
||||
|
||||
/** GET /oapi/svc/filters 出参 */
|
||||
@Data
|
||||
public static class Filters {
|
||||
private List<FilterOption> objects = new ArrayList<>();
|
||||
private List<FilterOption> categories = new ArrayList<>();
|
||||
private List<FilterOption> depts = new ArrayList<>();
|
||||
}
|
||||
|
||||
/** 指南附件(fileUrl 为完整可达地址) */
|
||||
@Data
|
||||
public static class AttachmentRow {
|
||||
private Integer id;
|
||||
private String fileName;
|
||||
private String fileUrl;
|
||||
private Long fileSize;
|
||||
}
|
||||
|
||||
/** 关联事项行 */
|
||||
@Data
|
||||
public static class RelatedItemRow {
|
||||
private Integer id;
|
||||
private String itemCode;
|
||||
private String title;
|
||||
private String deptName;
|
||||
private Integer handleMode;
|
||||
}
|
||||
|
||||
/** GET /oapi/svc/item/detail 出参(三段 HTML 与封面已绝对化) */
|
||||
@Data
|
||||
public static class Detail {
|
||||
private Integer id;
|
||||
private String itemCode;
|
||||
private String title;
|
||||
private String summary;
|
||||
private String objectKey;
|
||||
private String objectName;
|
||||
private String categoryKey;
|
||||
private String categoryName;
|
||||
private Integer deptGroupId;
|
||||
private String deptName;
|
||||
private Integer handleMode;
|
||||
private Integer onlineFlag;
|
||||
private String handlePlace;
|
||||
private String handleTimeLimit;
|
||||
private String promiseTimeLimit;
|
||||
private String contactPhone;
|
||||
private String supervisePhone;
|
||||
private String processHtml;
|
||||
private String materialHtml;
|
||||
private String noticeHtml;
|
||||
private String coverImage;
|
||||
private LocalDateTime publishTime;
|
||||
private Integer viewCount;
|
||||
/** 关联 CMS 栏目(不透明引用,CMS 侧解析为 URL) */
|
||||
private Integer faqCategoryId;
|
||||
private Integer noticeCategoryId;
|
||||
private Integer ruleCategoryId;
|
||||
private List<AttachmentRow> attachments = new ArrayList<>();
|
||||
private List<RelatedItemRow> relatedItems = new ArrayList<>();
|
||||
/** 办事大厅发起页地址({front-base}/#/apply?siteCode=&itemCode=;CMS 三态兜底用) */
|
||||
private String applyUrl;
|
||||
/** 绑定流程 GUID(§3.7:CMS"自动生成"分支在线条件=onlineFlag==1 且 flowGuid 非空;null=未绑流程) */
|
||||
private String flowGuid;
|
||||
}
|
||||
|
||||
/** GET /oapi/svc/item/snapshot 出参(docs/17 §1.1 契约原样平移,11 字段) */
|
||||
@Data
|
||||
public static class Snapshot {
|
||||
private String siteCode;
|
||||
private String itemCode;
|
||||
private String title;
|
||||
private String summary;
|
||||
private String deptName;
|
||||
private Integer handleMode;
|
||||
private Integer onlineFlag;
|
||||
private String handleTimeLimit;
|
||||
private String contactPhone;
|
||||
private String applyUrl;
|
||||
private LocalDateTime publishTime;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user