- service_item 加 7 列(协办部门/经办人/办理时段/跑动次数/快递/收费标准+依据) - /api/hall/items 出参补 applyUrl 与承诺字段 - 新增 GET /api/hall/item(匿名,指南详情) - url-pattern 收窄至写入面,/api/hall/** 匿名只读 - url-pattern 另补 /api/base/*(契约 §1 表格未列,页头用户信息与左侧菜单必须 CAS 会话)
146 lines
5.0 KiB
Java
146 lines
5.0 KiB
Java
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;
|
||
/** 三态最高优先:非空=外链事项,前端新窗口打开(一期契约 §5) */
|
||
private String applyUrl;
|
||
private String promiseTimeLimit;
|
||
private String handleTimeLimit;
|
||
/** 服务承诺字段(P1-1,§3.1):全部可空,空=未维护,消费方必须容忍 null */
|
||
private Integer runCount;
|
||
private Integer expressFlag;
|
||
private String coopDepts;
|
||
private String handlerName;
|
||
private String handleTimeDesc;
|
||
private String feeDesc;
|
||
private String feeBasis;
|
||
}
|
||
|
||
/** 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;
|
||
}
|
||
}
|