代码提交-glj
This commit is contained in:
parent
6df1c51c0a
commit
4cf8423642
|
@ -0,0 +1,67 @@
|
||||||
|
package com.kening.vordm.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @TableName crawl_info
|
||||||
|
*/
|
||||||
|
@TableName(value ="crawl_info")
|
||||||
|
@Data
|
||||||
|
public class CrawlInfo implements Serializable {
|
||||||
|
/**
|
||||||
|
* 自增列
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 爬虫类型 1-bing,2-baidu 3-twitter,4-weibo 5 -landset.6-sentinel,7-searchone,8 word clouds,9-hotspot
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理人员
|
||||||
|
*/
|
||||||
|
private Long manageId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 爬虫状态,0-未开始,1-正在爬取 2已完成
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害id
|
||||||
|
*/
|
||||||
|
private Long disasterId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启动时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际关键词
|
||||||
|
*/
|
||||||
|
private String keywords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际爬取范围
|
||||||
|
*/
|
||||||
|
private String range;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.kening.vordm.controller;
|
||||||
|
|
||||||
|
import com.kening.vordm.entity.CrawlInfo;
|
||||||
|
import com.kening.vordm.service.CrawlInfoService;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springblade.core.tool.api.R;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RequestMapping("/ui/crawlInfo")
|
||||||
|
public class CrawlInfoController {
|
||||||
|
|
||||||
|
private CrawlInfoService crawlInfoService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/save")
|
||||||
|
public R save(@RequestBody CrawlInfo crawlInfo) {
|
||||||
|
return R.status(crawlInfoService.save(crawlInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.kening.vordm.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.kening.vordm.entity.CrawlInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author G1393
|
||||||
|
* @description 针对表【crawl_info】的数据库操作Mapper
|
||||||
|
* @createDate 2023-04-21 16:51:37
|
||||||
|
* @Entity new.domain.CrawlInfo
|
||||||
|
*/
|
||||||
|
public interface CrawlInfoMapper extends BaseMapper<CrawlInfo> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?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.kening.vordm.mapper.CrawlInfoMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.CrawlInfo">
|
||||||
|
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||||
|
<result property="manageId" column="manage_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
|
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="keywords" column="keywords" jdbcType="VARCHAR"/>
|
||||||
|
<result property="range" column="range" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,type,manage_id,
|
||||||
|
status,disaster_id,start_time,
|
||||||
|
end_time,keywords,range
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.kening.vordm.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.kening.vordm.entity.CrawlInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author G1393
|
||||||
|
* @description 针对表【crawl_info】的数据库操作Service
|
||||||
|
* @createDate 2023-04-21 16:51:37
|
||||||
|
*/
|
||||||
|
public interface CrawlInfoService extends IService<CrawlInfo> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.kening.vordm.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.kening.vordm.entity.CrawlInfo;
|
||||||
|
import com.kening.vordm.mapper.CrawlInfoMapper;
|
||||||
|
import com.kening.vordm.service.CrawlInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author G1393
|
||||||
|
* @description 针对表【crawl_info】的数据库操作Service实现
|
||||||
|
* @createDate 2023-04-21 16:51:37
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CrawlInfoServiceImpl extends ServiceImpl<CrawlInfoMapper, CrawlInfo>
|
||||||
|
implements CrawlInfoService {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue