java110
2020-03-29 e52452de27673c6d794fc2d8ae96f33abc25dc0c
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
package com.java110.code.relationship;
 
 
import com.alibaba.fastjson.JSONObject;
import com.java110.code.back.BaseGenerator;
import com.java110.code.web.GeneratorStart;
 
public class GeneratorFlow extends BaseGenerator {
 
    public void generator(JSONObject data) {
 
        //处理组件
        generatorComponentHtml(data);
 
 
 
 
    }
 
    /**
     * 生成 html js java 类
     *
     * @param data
     */
    private void generatorComponentHtml(JSONObject data) {
 
        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/flow.html").getFile());
        String fileContext = sb.toString();
 
        fileContext = super.replaceBindingTemplateContext(fileContext, data);
 
 
        String writePath = this.getClass().getResource("/").getPath()
                + "out/relationship/" + data.getString("templateCode") + "/" + data.getString("templateCode") + "Flow.html";
        System.out.printf("writePath: " + writePath);
        writeFile(writePath,
                fileContext);
 
 
    }
 
 
 
 
}