Fancy
2024-07-04 ddd56a8f37eb47d933a7064be9341feb8dbd8165
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
package com.dy.pmsGlobal.aop;
 
import com.dy.pmsGlobal.daoBa.BaLogMapper;
import com.dy.pmsGlobal.pojoBa.BaLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
import java.util.Date;
 
@Service
public class LogService {
 
    private BaLogMapper dao;
    @Autowired
    public void setDao(BaLogMapper dao) {
        this.dao = dao;
    }
    @Transactional
    public void save(long operator,String operatorName, String operation,String ip,String code,String msg) {
        BaLog log = new BaLog();
        log.userId=operator;
        log.userName=operatorName;
        log.content = operation;
        log.dt = new Date();
        log.ip = ip;
        log.code = code;
        log.msg = msg;
        dao.insert(log);
    }
 
}