提交 2f13c164 authored 作者: wangmenglong's avatar wangmenglong

增加爬虫

上级 306fdcac
...@@ -258,11 +258,21 @@ public class Recruit extends NameObj { ...@@ -258,11 +258,21 @@ public class Recruit extends NameObj {
@TableField(exist = false) @TableField(exist = false)
private String recordId; private String recordId;
/** /**
* 是否上架过 * 是否上架过
**/ **/
@TableField("launch") @TableField("launch")
private String launch; private String launch;
/**
* 是否批量 0否 1是
**/
@TableField("batch")
private String batch;
/**
* 是否批量发送过了 0否 1是
**/
@TableField("batch_send")
private String batchSend;
} }
...@@ -7,12 +7,14 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -7,12 +7,14 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.scheduling.annotation.EnableAsync;
@RefreshScope @RefreshScope
@EnableDiscoveryClient @EnableDiscoveryClient
@SpringBootApplication(scanBasePackages = {"com.jfb.recruit"}) @SpringBootApplication(scanBasePackages = {"com.jfb.recruit"})
@MapperScan(basePackages = "com.jfb.recruit.mapper") @MapperScan(basePackages = "com.jfb.recruit.mapper")
@EnableCaching // 开启缓存 @EnableCaching // 开启缓存
@EnableAsync // 开启异步(需保留,用于注入线程池)
public class JfbRecruitApplication { public class JfbRecruitApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -53,6 +53,8 @@ public class RecruitController extends BaseController { ...@@ -53,6 +53,8 @@ public class RecruitController extends BaseController {
**/ **/
@PostMapping("/c") @PostMapping("/c")
public BaseResult create(@RequestBody Recruit recruit){ public BaseResult create(@RequestBody Recruit recruit){
recruit.setBatch("0");
recruit.setBatchSend("0");
return recruitService.create(recruit)?BaseResult.success("normal_001"):BaseResult.error("error_001"); return recruitService.create(recruit)?BaseResult.success("normal_001"):BaseResult.error("error_001");
} }
......
...@@ -69,7 +69,9 @@ public class OrgServiceImpl extends ServiceImpl<OrgMapper, Org> implements OrgSe ...@@ -69,7 +69,9 @@ public class OrgServiceImpl extends ServiceImpl<OrgMapper, Org> implements OrgSe
UserContext userContext = UserUtils.getUserContext(); UserContext userContext = UserUtils.getUserContext();
String baseCode = userContext.getBaseCode(); String baseCode = userContext.getBaseCode();
if(StringUtils.isBlank(org.getId())){
org.setId(snowFlakeFactory.nextId()); org.setId(snowFlakeFactory.nextId());
}
org.setBaseCode(baseCode); org.setBaseCode(baseCode);
org.setDel(false); org.setDel(false);
org.setCreateTime(DateUtil.now()); org.setCreateTime(DateUtil.now());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论