xiaoyong931011
2022-07-05 9035f78fbcd60c452b5e37e5687813c35e9c4ff2
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
package com.xcong.farmer.cms.modules.core.service.impl;
 
import cn.hutool.core.util.StrUtil;
import com.xcong.farmer.cms.core.template.TemplateConfiguration;
import com.xcong.farmer.cms.modules.core.service.ICmsCoreService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.HashMap;
import java.util.Map;
 
/**
 * @author wzy
 * @date 2022-07-03
 **/
@Slf4j
@Service
public class CmsCoreServiceImpl implements ICmsCoreService {
 
    @Autowired
    private TemplateConfiguration cfg;
 
    @Override
    public void articleProcess(Long id, String templateName) {
        Map<String, Object> data = new HashMap<>();
        data.put("id", id);
        data.put("companyId", 0L);
        if (StrUtil.isEmpty(templateName)) {
            templateName = "artile.defualt.html";
        }
        cfg.process(data, templateName);
    }
 
    @Override
    public void columnProcess(String code, String templateName, boolean article) {
 
    }
 
    @Override
    public void columnProcess(Long id, String templateName, boolean article) {
 
    }
}