(OA删除日志记录)

This commit is contained in:
gaojiabao
2023-03-29 18:49:01 +08:00
parent 82c178878e
commit b3acf75436
7 changed files with 112 additions and 0 deletions
@@ -0,0 +1,15 @@
package com.ydw.bat.wkflow.business_main.datas.controller;
import com.tmsps.fk.common.base.action.BaseAction;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(description = "OA删除日志查询")
@RestController
@RequestMapping("/datas/OASendLogController")
public class OASendLogController extends BaseAction {
}
@@ -0,0 +1,47 @@
package com.ydw.bat.wkflow.business_main.datas.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("OA_Send_LOG")
@ApiModel(value="OASendLog对象", description="")
@Data
public class OASendLog {
@ApiModelProperty(value = "主键")
@TableId(value = "ID", type = IdType.UUID)
private String id;
@ApiModelProperty(value = "类型")
@TableField("TYPE")
private String type;
@ApiModelProperty(value = "日志")
@TableField("MSG_LOG")
private String msgLog;
@ApiModelProperty(value = "方法")
@TableField("MEANS")
private String means;
@TableField("CREATE_TIME")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@TableField("UPDATE_TIME")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
}
@@ -0,0 +1,8 @@
package com.ydw.bat.wkflow.business_main.datas.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ydw.bat.wkflow.business_main.datas.entity.OASendLog;
public interface OASendLogMapper extends BaseMapper<OASendLog> {
}
@@ -0,0 +1,8 @@
package com.ydw.bat.wkflow.business_main.datas.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ydw.bat.wkflow.business_main.datas.entity.OASendLog;
public interface OASendLogService extends IService<OASendLog> {
}
@@ -0,0 +1,19 @@
package com.ydw.bat.wkflow.business_main.datas.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ydw.bat.wkflow.business_main.datas.entity.OASendLog;
import com.ydw.bat.wkflow.business_main.datas.mapper.OASendLogMapper;
import com.ydw.bat.wkflow.business_main.datas.service.OASendLogService;
import org.springframework.stereotype.Service;
@Service
public class OASendLogServiceImpl extends ServiceImpl<OASendLogMapper, OASendLog> implements OASendLogService {
public String addOASendLog(OASendLog oaSendLog) {
int insert = baseMapper.insert(oaSendLog);
if(insert==1){
return "1";
}
return null;
}
}
@@ -8,6 +8,7 @@ import com.ydw.bat.wkflow.business_main.datas.entity.*;
import com.ydw.bat.wkflow.business_main.datas.mapper.SendTodoLogMapper;
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNameService;
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNewService;
import com.ydw.bat.wkflow.business_main.datas.service.impl.OASendLogServiceImpl;
import com.ydw.bat.wkflow.business_mq.service.CreateMQService;
import com.ydw.bat.wkflow.business_oa.common.WebServiceConf;
import com.ydw.bat.wkflow.business_oa.utils.OkHttpUtil;
@@ -72,6 +73,9 @@ public class WebServiceOAServiceImpl implements WebServiceOAService {
@Autowired
private IBusProcessNameService iBusProcessNameService;
@Autowired
private OASendLogServiceImpl oaSendLogService;
public WebServiceOAServiceImpl(){
credentials = Credentials.basic(api_key,api_secret);
}
@@ -214,6 +218,12 @@ public class WebServiceOAServiceImpl implements WebServiceOAService {
map.put("list",notifyTodoSendContextArrayList);
net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(map);
log.info("调用MQ数据!!!:"+jsonObject.toString());
OASendLog oaSendLog = new OASendLog();
oaSendLog.setType("delete");
oaSendLog.setCreateTime(new Date());
oaSendLog.setMeans("deleteOAByPid");
oaSendLog.setMsgLog(jsonObject.toString());
oaSendLogService.addOASendLog(oaSendLog);
oaService.setTodoDeleteMq(jsonObject.toString());
}
}
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ydw.bat.wkflow.business_main.datas.mapper.OASendLogMapper">
</mapper>