添加故障信息代码
parent
04670ad9e2
commit
19e0fcbf48
|
@ -0,0 +1,43 @@
|
|||
package com.february.fault.controller;
|
||||
|
||||
/**
|
||||
* @program: february-fault-information
|
||||
* @description:
|
||||
* @author: Mr.Wang
|
||||
* @create: 2023-11-21 22:18
|
||||
**/
|
||||
|
||||
import com.february.common.core.domain.R;
|
||||
import com.february.common.core.domain.Result;
|
||||
import com.february.fault.domain.FaultCode;
|
||||
import com.february.fault.domain.FaultLog;
|
||||
import com.february.fault.service.FaultLogService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 故障日志
|
||||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/faultLog")
|
||||
public class FaultLogController {
|
||||
@Autowired
|
||||
private FaultLogService faultLogService;
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
@PostMapping("/list")
|
||||
public Result<List<FaultLog>> faultLogList(@RequestBody FaultLog faultLog){
|
||||
log.info("功能名称:故障日志列表,请求路径:{},请求方式:{}",request.getRequestURI(),request.getMethod());
|
||||
Result<List<FaultLog>> result=faultLogService.faultLogList(faultLog);
|
||||
log.info("响应结果:{}",result);
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.february.fault.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.february.fault.domain.FaultLog;
|
||||
|
||||
/**
|
||||
* @program: february-fault-information
|
||||
* @description:
|
||||
* @author: Mr.Wang
|
||||
* @create: 2023-11-21 22:19
|
||||
**/
|
||||
public interface FaultLogMapper extends BaseMapper<FaultLog> {
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.february.fault.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.february.common.core.domain.Result;
|
||||
import com.february.fault.domain.FaultLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @program: february-fault-information
|
||||
* @description:
|
||||
* @author: Mr.Wang
|
||||
* @create: 2023-11-21 22:19
|
||||
**/
|
||||
public interface FaultLogService extends IService<FaultLog> {
|
||||
Result<List<FaultLog>> faultLogList(FaultLog faultLog);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.february.fault.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.february.common.core.domain.Result;
|
||||
import com.february.fault.domain.FaultLog;
|
||||
import com.february.fault.mapper.FaultLogMapper;
|
||||
import com.february.fault.service.FaultLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @program: february-fault-information
|
||||
* @description:
|
||||
* @author: Mr.Wang
|
||||
* @create: 2023-11-21 22:19
|
||||
**/
|
||||
@Service
|
||||
public class FaultLogServiceImpl extends ServiceImpl<FaultLogMapper, FaultLog> implements FaultLogService {
|
||||
@Override
|
||||
public Result<List<FaultLog>> faultLogList(FaultLog faultLog) {
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue