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;
|
}
|
}
|