Commit 1b4b0861 by ljb

保存返回id、提高日志输出级别

parent 8fbf4e8e
......@@ -9,12 +9,6 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
/**
* @program: instrument-cloud
* @description: 强制医疗数据模型
* @author: xiaoliang
* @create: 2023-05-06 15:13
*/
@RestController
@RequestMapping("/model/qzyl")
public class QzylController {
......
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zq.common.utils.AssertUtils;
import com.zq.common.utils.PagingUtils;
import com.zq.common.vo.PageVo;
import com.zq.common.vo.ResultVo;
......@@ -136,7 +137,7 @@ public class SpiderFlowService extends ServiceImpl<SpiderFlowMapper, SpiderFlow>
} catch (IOException e) {
logger.error("保存历史记录出错",e);
}
return ResultVo.success();
return ResultVo.success(spiderFlow.getId());
}
// SpiderFlow byId = sfMapper.selectById(spiderFlow.getId());
......@@ -189,6 +190,7 @@ public class SpiderFlowService extends ServiceImpl<SpiderFlowMapper, SpiderFlow>
public void resetExecuteCount(String id){
sfMapper.resetExecuteCount(id);
}
public void remove(String id){
sfMapper.deleteById(id);
spiderJobManager.remove(id);
......@@ -257,6 +259,7 @@ public class SpiderFlowService extends ServiceImpl<SpiderFlowMapper, SpiderFlow>
public PageVo<SpiderFlow> getPageList(SpiderFlowVo vo) {
LambdaQueryWrapper<SpiderFlow> queryWrapper = new LambdaQueryWrapper<>();
return PagingUtils.paging(vo,sfMapper,queryWrapper,SpiderFlow.class);
queryWrapper.orderByDesc(SpiderFlow::getCreateDate);
return PagingUtils.paging(vo, sfMapper, queryWrapper, SpiderFlow.class);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<springProperty scope="context" name="LOG_LEVEL" source="logging.level.root" defaultValue="DEBUG"/>
<logger name="org.apache" level="WARN"/>
<logger name="com.netflix" level="WARN"/>
<springProperty scope="context" name="LOG_LEVEL" source="logging.level.root" defaultValue="INFO"/>
<springProperty scope="context" name="WORKSPACE" source="spider.workspace" defaultValue="/data/spider/logs"/>
<!-- 控制台输出 -->
<appender name="Stdout" class="ch.qos.logback.core.ConsoleAppender">
......
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