xing
2023-02-23 c75e6f4696634d626c5569794c6349593853223a
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
package com.yssh.utils;
 
import com.yssh.service.IDictRecordService;
import com.yssh.service.Yssh2dreliService;
import com.yssh.service.Yssh3dreliService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
import javax.annotation.PostConstruct;
 
/**
 * 项目启动检查
 *
 * @author xing
 * @date 2023/02/08
 */
@Component
public class DealDataUtils {
 
    @Autowired
    private Yssh2dreliService yssh2dreliService;
 
    @Autowired
    private Yssh3dreliService yssh3dreliService;
 
    @Autowired
    private IDictRecordService dictRecordService;
 
 
    //方式1
    @PostConstruct
    public void method() {
        System.out.println(" == 运行启动项目检查是否存在当日数据表,不存在则自动创建 == ");
        dictRecordService.createDictRecoTable();
        System.out.println("========创建字典记录表执行完毕======== ");
        yssh2dreliService.preReate2dreliTable();
        System.out.println("========创建当天2维热力表执行完毕======== ");
        yssh3dreliService.preRreate3dreliTable();
        System.out.println("========创建当天3维热力执行完毕======== ");
 
 
    }
 
 
    //方式2
//    public @PostConstruct void methodTwo() {
//        System.out.println("方式2 = ");
//
//    }
 
}