mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-07-18 22:35:48 +08:00
🎨 #3274【企业微信】 修复oa审批创建模板单选多选下拉组件企微信参数定义错误,拆分不共用模板详情实体
This commit is contained in:
parent
222c23cf0e
commit
e00af928c3
@ -8,6 +8,7 @@ import lombok.NoArgsConstructor;
|
|||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import me.chanjar.weixin.cp.bean.oa.templatedata.TemplateContent;
|
import me.chanjar.weixin.cp.bean.oa.templatedata.TemplateContent;
|
||||||
import me.chanjar.weixin.cp.bean.oa.templatedata.TemplateTitle;
|
import me.chanjar.weixin.cp.bean.oa.templatedata.TemplateTitle;
|
||||||
|
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -37,4 +38,12 @@ public class WxCpOaApprovalTemplate implements Serializable {
|
|||||||
@SerializedName("template_content")
|
@SerializedName("template_content")
|
||||||
private TemplateContent templateContent;
|
private TemplateContent templateContent;
|
||||||
|
|
||||||
|
public static WxCpOaApprovalTemplate fromJson(String json) {
|
||||||
|
return WxCpGsonBuilder.create().fromJson(json, WxCpOaApprovalTemplate.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toJson() {
|
||||||
|
return WxCpGsonBuilder.create().toJson(this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
package me.chanjar.weixin.cp.bean.oa;
|
package me.chanjar.weixin.cp.bean.oa;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import me.chanjar.weixin.cp.bean.oa.templatedata.TemplateContent;
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import me.chanjar.weixin.cp.bean.oa.templatedata.TemplateTitle;
|
import me.chanjar.weixin.cp.bean.oa.templatedata.TemplateTitle;
|
||||||
|
import me.chanjar.weixin.cp.bean.oa.templatedata.control.*;
|
||||||
|
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -11,9 +16,13 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 审批模板详情
|
* 审批模板详情
|
||||||
*
|
*
|
||||||
* @author gyv12345 @163.com
|
* @author gyv12345 @163.com / Wang_Wong
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
public class WxCpOaApprovalTemplateResult implements Serializable {
|
public class WxCpOaApprovalTemplateResult implements Serializable {
|
||||||
private static final long serialVersionUID = 6690547131189343887L;
|
private static final long serialVersionUID = 6690547131189343887L;
|
||||||
|
|
||||||
@ -29,4 +38,98 @@ public class WxCpOaApprovalTemplateResult implements Serializable {
|
|||||||
@SerializedName("template_content")
|
@SerializedName("template_content")
|
||||||
private TemplateContent templateContent;
|
private TemplateContent templateContent;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class TemplateContent implements Serializable {
|
||||||
|
private static final long serialVersionUID = -5640250983775840865L;
|
||||||
|
|
||||||
|
private List<TemplateControls> controls;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class TemplateControls implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -7496794407355510374L;
|
||||||
|
|
||||||
|
private TemplateProperty property;
|
||||||
|
|
||||||
|
private TemplateConfig config;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class TemplateProperty implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -3429251158540167453L;
|
||||||
|
|
||||||
|
private String control;
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private List<TemplateTitle> title;
|
||||||
|
|
||||||
|
private List<TemplateTitle> placeholder;
|
||||||
|
|
||||||
|
private Integer require;
|
||||||
|
|
||||||
|
@SerializedName("un_print")
|
||||||
|
private Integer unPrint;
|
||||||
|
|
||||||
|
private TemplateConfig config;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class TemplateConfig implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 6993937809371277669L;
|
||||||
|
|
||||||
|
private TemplateDate date;
|
||||||
|
|
||||||
|
private TemplateSelector selector;
|
||||||
|
|
||||||
|
private TemplateContact contact;
|
||||||
|
|
||||||
|
private TemplateTable table;
|
||||||
|
|
||||||
|
private TemplateAttendance attendance;
|
||||||
|
|
||||||
|
@SerializedName("vacation_list")
|
||||||
|
private TemplateVacation vacationList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class TemplateSelector implements Serializable {
|
||||||
|
private static final long serialVersionUID = 4995408101489736881L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* single-单选;multi-多选
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private List<TemplateOption> options;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class TemplateOption implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -7883792668568772078L;
|
||||||
|
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取审批模板详情,value为list类型
|
||||||
|
* https://developer.work.weixin.qq.com/document/path/91982
|
||||||
|
*/
|
||||||
|
@SerializedName("value")
|
||||||
|
private List<TemplateTitle> value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static WxCpOaApprovalTemplateResult fromJson(String json) {
|
||||||
|
return WxCpGsonBuilder.create().fromJson(json, WxCpOaApprovalTemplateResult.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toJson() {
|
||||||
|
return WxCpGsonBuilder.create().toJson(this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ package me.chanjar.weixin.cp.bean.oa.templatedata;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type Template options.
|
* The type Template options.
|
||||||
@ -17,5 +16,12 @@ public class TemplateOptions implements Serializable {
|
|||||||
|
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建审批模板,value为对象类型
|
||||||
|
* https://developer.work.weixin.qq.com/document/path/97437#%E9%99%845-%E5%8D%95%E9%80%89%E5%A4%9A%E9%80%89%E6%8E%A7%E4%BB%B6%EF%BC%88control%E5%8F%82%E6%95%B0%E4%B8%BAselector%EF%BC%89
|
||||||
|
*
|
||||||
|
* 获取审批模板详情,value为list类型
|
||||||
|
* https://developer.work.weixin.qq.com/document/path/91982
|
||||||
|
**/
|
||||||
private TemplateTitle value;
|
private TemplateTitle value;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user