自动化立体仓库 - WMS系统
zhangchao
2024-11-22 f4be36f30a802e70038bde438d1689eb749032fd
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
package com.zy.asrs.task.handler;
 
import com.zy.asrs.entity.AgvWrkMast;
import com.zy.asrs.entity.ApiLog;
import com.zy.asrs.entity.WrkMastExecute;
import com.zy.asrs.service.ApiLogService;
import com.zy.asrs.task.AbstractHandler;
import com.zy.asrs.task.core.ReturnT;
import com.zy.system.entity.OperateLog;
import com.zy.system.service.OperateLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
import java.util.Date;
 
@Slf4j
@Service
@Transactional
public class LogClearHandler extends AbstractHandler<String> {
 
    @Autowired
    private ApiLogService apiLogService;
    @Autowired
    private OperateLogService operateLogService;
 
    public ReturnT<String> startClearApiLog(ApiLog apiLog) {//1-4
        try{
            if (apiLogService.deleteById(apiLog)) {
                return SUCCESS;
            } else {
                return FAIL;
            }
        }catch (Exception e){
            log.error("apiLog清除===》异常:"+e.getMessage());
        }
        return SUCCESS;
    }
 
    public ReturnT<String> startClearOperateLog(OperateLog operateLog) {//1-4
        try{
            if (operateLogService.deleteById(operateLog)) {
                return SUCCESS;
            } else {
                return FAIL;
            }
        }catch (Exception e){
            log.error("apiLog清除===》异常:"+e.getMessage());
        }
        return SUCCESS;
    }
}