# 文档模板相关接口API

注意事项

  • 所有API接口的域名前缀:http://gateway--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/openx/
  • 所有接口未显性指明申请JWT的方式,统一为用户名+密码的方式
  • 所有接口统一认证方式:Header请求头中添加Authorization字段,值为"Bearer " +JWT

# 添加创作模板

接口地址:/psmc/template/add

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:添加创作模板

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
fileCode fileCode query false string
templetType templetType query false integer(int32)
titleName titleName query false string
uploadFileCode uploadFileCode query false string

响应状态:

状态码 说明
200 OK
404001 系统异常
404011 参数缺失
404401 参数校验失败
404402 接口权益异常
404406 会员权限不足
404500 参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 AddUploadResult AddUploadResult
  documentId string
  message string
  readUrl string
  result boolean
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
	"code": 0,
	"content": {
		"documentId": "",
		"message": "",
		"readUrl": "",
		"result": true
	},
	"count": 0,
	"message": "",
	"success": true,
	"total": 0
}

# 编辑模板名字

接口地址:/psmc/template/edit/name

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:编辑模板名字

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
contentTempletId contentTempletId query true string
newName newName query true string

响应状态:

状态码 说明
200 OK
404001 系统异常
404011 参数缺失
404401 参数校验失败
404402 接口权益异常
404406 会员权限不足
404500 参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 AddUploadResult AddUploadResult
  documentId string
  message string
  readUrl string
  result boolean
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
	"code": 0,
	"content": {
		"documentId": "",
		"message": "",
		"readUrl": "",
		"result": true
	},
	"count": 0,
	"message": "",
	"success": true,
	"total": 0
}

# 获取详情

接口地址:/psmc/template/detail

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取模板详情

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
tempId tempId query true string
categoryId categoryId query false string

响应状态:

状态码 说明
200 OK
404001 系统异常
404011 参数缺失
404401 参数校验失败
404402 接口权益异常
404406 会员权限不足
404500 参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 PsmcUserContentTemplateView
  count integer(int32)
  result array PsmcUserContentTemplate
    bookId 新增模板编辑功能,作为创作存储模板 string
    categoryId 内容模板分类ID(0表示为创建创作上传) string
    content 模板内容(用于内容模板预览) string
    departmentCode 部门code(-1属于机构;orgid+级别) string
    departmentId 部门ID string
    filecodeCover 文件上传网盘唯一标示符(Image) string
    filecodePdf 文件上传网盘唯一标示符(pdf) string
    filecodeUpload 用户上传时的filecode string
    filecodeXml 文件上传网盘唯一标示符 string
    id 内容模板表主键 string
    ifPublic 是否公开(机构的都是公开的,部门的不一定公开) 0:公开 ,1 :不公开 integer
    organzationId 机构ID string
    pdfLastModifyTime 最后一次生成pdf时间 string
    postTime 提交时间 string
    remarks 备注 object
    status 内容模板状态(0:可用;1:不可用) integer
    templateName 内容模板名称 string
    templetType 来源类型(1创作中手动上传、2模板) integer
    userId 模板创建者 string
  xmlEditorUrl string
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
	"code": 0,
	"content": {
		"count": 0,
		"result": [
			{
				"bookId": "",
				"categoryId": "",
				"content": "",
				"departmentCode": "",
				"departmentId": "",
				"filecodeCover": "",
				"filecodePdf": "",
				"filecodeUpload": "",
				"filecodeXml": "",
				"id": "",
				"ifPublic": 0,
				"organzationId": "",
				"pdfLastModifyTime": "",
				"postTime": "",
				"remarks": {},
				"status": 0,
				"templateName": "",
				"templetType": 0,
				"userId": ""
			}
		],
		"xmlEditorUrl": ""
	},
	"count": 0,
	"message": "",
	"success": true,
	"total": 0
}

# 获取分类下模板列表

接口地址:/psmc/template/category/info

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取分类下的模板列表

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
categoryId categoryId query true string
pageIndex pageIndex query false integer(int32)
pageSize pageSize query false integer(int32)
templateName templateName query false string

响应状态:

状态码 说明
200 OK
404001 系统异常
404011 参数缺失
404401 参数校验失败
404402 接口权益异常
404406 会员权限不足
404500 参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 object
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "success": true,
    "message": "SUCCESS",
    "content": {
        "result": [
            {
                "categoryId": "0",
                "id": "e0d94231-40f7-****-8d03-b10acb84bd99",
                "bookId": null,
                "content": null,
                "userId": null,
                "departmentCode": null,
                "departmentId": null,
                "filecodeCover": "8E7A8041-F797-****-8798-A5191BA2D17C.PNG",
                "filecodePdf": null,
                "filecodeUpload": null,
                "filecodeXml": null,
                "ifPublic": null,
                "organzationId": null,
                "pdfLastModifyTime": "2024-04-12 00:00:00",
                "postTime": "2024-04-12 09:16:58",
                "remarks": null,
                "status": null,
                "templateName": "【附件1】工作安排",
                "templetType": null
            },
            {
                "categoryId": "0",
                "id": "eb825847-7cbb-****-947a-f5e51d1df375",
                "bookId": null,
                "content": null,
                "userId": null,
                "departmentCode": null,
                "departmentId": null,
                "filecodeCover": "5aaacf02-eb93-****-91e4-a02e156c43fc.png",
                "filecodePdf": null,
                "filecodeUpload": null,
                "filecodeXml": null,
                "ifPublic": null,
                "organzationId": null,
                "pdfLastModifyTime": "2024-01-11 00:00:00",
                "postTime": "2024-01-11 09:41:23",
                "remarks": null,
                "status": null,
                "templateName": "说明书v20240108",
                "templetType": null
            }
        ],
        "count": 2,
        "xmlEditorUrl": null
    },
    "count": null,
    "total": null,
    "code": 200
}

# 获取历史模板列表

接口地址:/psmc/template/histories

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取历史模板列表

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
keyword keyword query false string
pageIndex pageIndex query false integer(int32)
pageSize pageSize query false integer(int32)

响应状态:

状态码 说明
200 OK
404001 系统异常
404011 参数缺失
404401 参数校验失败
404402 接口权益异常
404406 会员权限不足
404500 参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 object
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
	"code": 0,
	"content": {},
	"count": 0,
	"message": "",
	"success": true,
	"total": 0
}