vince
2023-09-04 803697bd4f3ac5262e0acd69d6d7cc519ec45b2a
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
package com.ld.igds.view;
 
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.ld.igds.models.SnapSer;
import com.ld.igds.util.ContextUtil;
import com.ld.igds.view.service.SnapSerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
import java.util.List;
 
 
@Component
public class SnapSerPR {
 
    @Autowired
    private SnapSerService serService;
 
    /**
     * snapSerPR#getAllSer
     *
     * @return
     * @throws Exception
     */
    @DataProvider
    public List<SnapSer> getAllSer() throws Exception {
        return serService.getAllSer(ContextUtil.getCompanyId());
    }
 
 
    /**
     * snapSerPR#updateSer
     *
     * @param ser
     * @throws Exception
     */
    @DataResolver
    public void updateSer(SnapSer ser) throws Exception {
        serService.updateSer(ser);
    }
 
 
    /**
     * snapSerPR#delSer
     * 根据分机id和名称删除分机
     */
    @Expose
    public void delSer(SnapSer ser) {
        serService.delSerById(ser);
    }
 
 
    /**
     * snapSerPR#refreshCache
     */
    @Expose
    public void refreshCache() {
        serService.refreshCache(ContextUtil.getCompanyId());
    }
}