This commit is contained in:
@@ -4,7 +4,7 @@ import "time"
|
||||
|
||||
// WeComControlMappingItem 描述一个业务字段到企微模板控件的显式映射。
|
||||
type WeComControlMappingItem struct {
|
||||
BusinessField string `json:"business_field" validate:"required,min=1,max=64" description:"稳定业务字段编码"`
|
||||
BusinessField string `json:"business_field" validate:"required,min=1,max=64" description:"系统业务字段编码;按 business_type 调用 GET /api/admin/wecom/scenes/{business_type}/fields 获取可选值"`
|
||||
ControlID string `json:"control_id" validate:"required,min=1,max=128" description:"企微模板控件 ID"`
|
||||
ControlType string `json:"control_type" validate:"required,min=1,max=64" description:"企微模板控件类型,必须与模板详情一致"`
|
||||
OptionMapping map[string]string `json:"option_mapping" description:"业务枚举值到企微选择项 key 的映射;非选择控件传空对象"`
|
||||
@@ -21,6 +21,26 @@ type InspectWeComTemplateParams struct {
|
||||
InspectWeComTemplateRequest
|
||||
}
|
||||
|
||||
// WeComBusinessFieldListParams 查询企业微信审批场景可映射字段路径参数。
|
||||
type WeComBusinessFieldListParams struct {
|
||||
BusinessType string `path:"business_type" required:"true" description:"业务类型 (refund_approval:退款审批, offline_recharge_approval:员工线下代充值审批)"`
|
||||
}
|
||||
|
||||
// WeComBusinessFieldResponse 企业微信审批场景可映射业务字段响应。
|
||||
type WeComBusinessFieldResponse struct {
|
||||
Code string `json:"code" description:"control_mapping.business_field 应填写的稳定字段编码"`
|
||||
Name string `json:"name" description:"字段中文名称"`
|
||||
ValueType string `json:"value_type" description:"字段值类型 (string:字符串, integer:整数, money:两位小数的元金额字符串, file_list:对象存储文件引用列表)"`
|
||||
Description string `json:"description" description:"字段取值说明"`
|
||||
}
|
||||
|
||||
// WeComBusinessFieldListResponse 企业微信审批场景可映射业务字段列表响应。
|
||||
type WeComBusinessFieldListResponse struct {
|
||||
BusinessType string `json:"business_type" description:"业务类型"`
|
||||
BusinessTypeName string `json:"business_type_name" description:"业务类型名称(中文)"`
|
||||
Items []WeComBusinessFieldResponse `json:"items" description:"当前业务类型允许写入 control_mapping.business_field 的字段"`
|
||||
}
|
||||
|
||||
// WeComTemplateControlResponse 企业微信审批模板控件响应。
|
||||
type WeComTemplateControlResponse struct {
|
||||
ID string `json:"id" description:"企微模板控件 ID"`
|
||||
@@ -47,7 +67,7 @@ type SaveWeComApprovalSceneRequest struct {
|
||||
|
||||
// SaveWeComApprovalSceneParams 保存企业微信审批场景路径与请求参数。
|
||||
type SaveWeComApprovalSceneParams struct {
|
||||
BusinessType string `path:"business_type" required:"true" description:"业务类型 (refund_approval:退款审批, offline_recharge_approval:员工线下代充值审批)"`
|
||||
BusinessType string `path:"business_type" required:"true" description:"业务类型 (refund_approval:退款审批, offline_recharge_approval:员工线下代充值审批);可先调用 GET /api/admin/wecom/scenes/{business_type}/fields 查询允许映射的业务字段"`
|
||||
SaveWeComApprovalSceneRequest
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user