Commit 4ab967e2 authored by suichenguang's avatar suichenguang

解析日志查询

parent c16f2a49
......@@ -3,6 +3,7 @@ package com.yxproject.start.api;
import com.yxproject.start.entity.CountyDicEntity;
import com.yxproject.start.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
......@@ -61,6 +62,22 @@ public class LogApi {
return total;
}
/**
* 查询解析日志
* @param fileName
* @param analysisTime
* @return
*/
@RequestMapping("selectByAnalysisLog")
@Transactional(rollbackFor = Exception.class)
public List<Map<String,Object>> selectByAnalysisLog(@RequestParam("fileName")String fileName,@RequestParam("analysisTime")String analysisTime, @RequestParam("currPage")String currPage, @RequestParam("pageSize")String pageSize){
List<Map<String,Object>> resultList = logService.selectAnalysisLog(fileName,analysisTime,Long.valueOf(currPage),Long.valueOf(pageSize));
return resultList;
}
/**
* 去除字符串中中线
* @param str
......
......@@ -13,8 +13,7 @@ import java.util.Map;
public interface LogMapper {
@Insert("")
public boolean insertAnalysisLog();
@Select("<script> " +
"SELECT * FROM " +
......
......@@ -138,8 +138,4 @@ public interface TaskListMapper {
public boolean updateState(@Param("taskId") String taskId);
}
......@@ -12,6 +12,7 @@ public interface LogService {
public String selectNewFileLogCount(String newFileName,String cardId,String createDate,String uploadCountyCode);
public List<Map<String,Object>> selectAnalysisLog(String fileName,String analysisDate,long currPage,long pageSize);
public List<CountyDicEntity> getCountyList();
......
......@@ -25,6 +25,12 @@ public class LogServiceImpl implements LogService {
return count;
}
@Override
public List<Map<String, Object>> selectAnalysisLog(String fileName, String analysisDate,long currPage, long pageSize) {
List<Map<String,Object>> resultList = logMapper.selectAnalysisLog(fileName,analysisDate,currPage * pageSize, (currPage - 1) * pageSize + 1);
return resultList;
}
@Override
public List<CountyDicEntity> getCountyList() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment