WePoster.java
2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package com.linkwechat.wecom.domain;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.linkwechat.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.ArrayList;
import java.util.List;
/**
* 海报
* @author ws
*/
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "we_poster")
public class WePoster extends BaseEntity {
@TableId
private Long id;
/**
* 海报标题
*/
@TableField
private String title;
/**
* 背景图片
*/
@TableField
private String backgroundImgPath;
/**
* 示例图片
*/
@TableField
private String sampleImgPath;
/**
* 海报类型 1 通用海报
*/
@TableField
private Long type;
@TableField
private Integer delFlag;
@TableField
private Integer width;
@TableField
private Integer height;
/**
* 海报组件数组
*/
@TableField(exist = false)
private List<WePosterSubassembly> posterSubassemblyList;
public static void main(String[] args) {
WePoster wePoster = new WePoster();
wePoster.setDelFlag(1);
wePoster.setTitle("你好世界");
wePoster.setHeight(1000);
wePoster.setWidth(1000);
wePoster.setType(1L);
wePoster.setBackgroundImgPath("1");
wePoster.setPosterSubassemblyList(new ArrayList<>());
for(int i = 0; i < 1; i++){
WePosterSubassembly subassembly = new WePosterSubassembly();
subassembly.setFontColor("#544875");
subassembly.setFontId(1L);
subassembly.setHeight(100);
subassembly.setWidth(100);
subassembly.setDelFlag(1);
subassembly.setLeft(1);
subassembly.setTop(1);
subassembly.setFontTextAlign(1);
wePoster.getPosterSubassemblyList().add(subassembly);
}
System.out.println(JSON.toJSONString(wePoster));
}
}