添加岗位详情接口
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
package org.jiayunet.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司表(bg_company)
|
||||
@@ -13,7 +16,7 @@ import java.time.Instant;
|
||||
* @author zk
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "bg_company")
|
||||
@TableName(value = "bg_company", autoResultMap = true)
|
||||
public class Company {
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@@ -37,8 +40,9 @@ public class Company {
|
||||
/** 行业ID */
|
||||
private Long industryId;
|
||||
|
||||
/** 公司标签(JSON数组) */
|
||||
private String tags;
|
||||
/** 公司标签 */
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> tags;
|
||||
|
||||
/** 公司简要 */
|
||||
private String summary;
|
||||
@@ -64,8 +68,9 @@ public class Company {
|
||||
/** 最新估值 */
|
||||
private String latestValuation;
|
||||
|
||||
/** 新闻动态(JSON数组) */
|
||||
private String news;
|
||||
/** 新闻动态 */
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> news;
|
||||
|
||||
/** 状态 0=待完善 1=已完善 2=禁用 3=补充中 4=补充失败 */
|
||||
private Integer status;
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -62,7 +63,9 @@ public class CompanyCleanTransactionService {
|
||||
// tags:JSON数组
|
||||
JsonNode tagsNode = root.path("tags");
|
||||
if (tagsNode.isArray() && !tagsNode.isEmpty()) {
|
||||
company.setTags(tagsNode.toString());
|
||||
List<String> tags = new ArrayList<>();
|
||||
tagsNode.forEach(node -> tags.add(node.asText()));
|
||||
company.setTags(tags);
|
||||
}
|
||||
|
||||
// summary
|
||||
@@ -116,7 +119,9 @@ public class CompanyCleanTransactionService {
|
||||
// news:JSON数组
|
||||
JsonNode newsNode = root.path("news");
|
||||
if (newsNode.isArray() && !newsNode.isEmpty()) {
|
||||
company.setNews(newsNode.toString());
|
||||
List<String> news = new ArrayList<>();
|
||||
newsNode.forEach(node -> news.add(node.asText()));
|
||||
company.setNews(news);
|
||||
}
|
||||
|
||||
// 更新状态和时间
|
||||
|
||||
Reference in New Issue
Block a user