日志工具类-Mapper静态调用

@Component
public class MatchLogUtil {
@Autowired
private OtcMatchLogMapper otcMatchLogMapper;
private static MatchLogUtil matchLogUtil;
@PostConstruct
public void init() {
matchLogUtil = this;
matchLogUtil.otcMatchLogMapper = this.otcMatchLogMapper;
}
public static int add(String orderId,
Integer matchOrderId,
String msg,
Integer state,
String remark,
Date updateTime,
Date createTime) {
return matchLogUtil.otcMatchLogMapper.insert(orderId,matchOrderId,msg,state,remark,updateTime,createTime);
}
}

原文地址:https://www.cnblogs.com/LoveShare/p/14019326.html