test
This commit is contained in:
parent
8d7b1fd610
commit
e4040bd8fb
@ -1,190 +0,0 @@
|
||||
package tech.riemann.bidding.entity;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import org.nutz.dao.entity.annotation.ColDefine;
|
||||
import org.nutz.dao.entity.annotation.ColType;
|
||||
import org.nutz.dao.entity.annotation.Column;
|
||||
import org.nutz.dao.entity.annotation.Comment;
|
||||
import org.nutz.dao.entity.annotation.Table;
|
||||
import org.nutz.json.JsonField;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonGetter;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@FieldNameConstants
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@Table("t_notice")
|
||||
@Comment("招标公告")
|
||||
@Schema(name = "Notice", description = "招标公告")
|
||||
public class Notice extends IdBaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "公告唯一标识(渠道内唯一)", requiredMode = RequiredMode.REQUIRED)
|
||||
@Column("n_key")
|
||||
@Comment("公告唯一标识(渠道内唯一)")
|
||||
@ColDefine(notNull = true, width = 100)
|
||||
String key;
|
||||
|
||||
@Schema(description = "公告标题", requiredMode = RequiredMode.REQUIRED)
|
||||
@Column("n_title")
|
||||
@Comment("公告标题")
|
||||
@ColDefine(notNull = true, width = 200)
|
||||
String title;
|
||||
|
||||
@Schema(description = "公告链接", requiredMode = RequiredMode.REQUIRED)
|
||||
@Column("n_url")
|
||||
@Comment("公告链接")
|
||||
@ColDefine(notNull = true, width = 500)
|
||||
String url;
|
||||
|
||||
@Schema(description = "公告渠道", requiredMode = RequiredMode.REQUIRED)
|
||||
@Column("n_channel")
|
||||
@Comment("公告渠道")
|
||||
@ColDefine(notNull = true, width = 50)
|
||||
Channel channel;
|
||||
|
||||
@Schema(description = "公告内容", requiredMode = RequiredMode.AUTO)
|
||||
@Column("n_content")
|
||||
@Comment("公告内容")
|
||||
@ColDefine(notNull = false, type = ColType.TEXT)
|
||||
String content;
|
||||
|
||||
@Schema(description = "招标金额", requiredMode = RequiredMode.AUTO)
|
||||
@Column("n_amount")
|
||||
@Comment("招标金额")
|
||||
@ColDefine(notNull = false)
|
||||
double amount;
|
||||
|
||||
@Schema(description = "发布时间", requiredMode = RequiredMode.AUTO)
|
||||
@Column("n_publish_date")
|
||||
@Comment("发布时间")
|
||||
@ColDefine(notNull = false)
|
||||
LocalDate publishDate;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum Channel {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SINOCHEMITC("sinochemitc", "中化商务",
|
||||
"https://d.sinochemitc.com/api/management/bidding/hy-bulletin-list?current=%d&size=%d&bulletinType=%d&bidType=&keyword=&startTime=%s&endTime=%s"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
CHINA_CCSSCM(
|
||||
"chinaccsscm", "中通服总部",
|
||||
"https://zb.chinaccsscm.cn/zbgg/index_%d.jhtml"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
CFCPN(
|
||||
"cfcpn", "金采网",
|
||||
"http://www.cfcpn.com/jcw/noticeinfo/noticeInfo/dataNoticeList"),
|
||||
/**
|
||||
* 1天内,北京、上海、重庆,只匹配标题
|
||||
*/
|
||||
GCZB(
|
||||
"gczb", "招标与采购网",
|
||||
"https://www.gc-zb.com/search/index.html?page=%d&keyword=%s&h_lx=&h_province=19,43,47&vague=0&date=1&search_field=1"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
BOC(
|
||||
"boc", "中国银行采购公告",
|
||||
"https://www.bankofchina.com/aboutboc/bi6/index%s.html"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
PICCEC(
|
||||
"piccec", "人保E采",
|
||||
"https://ec.picc.com/cms/api/dynamicData/queryContentPage"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GXZB(
|
||||
"gxzb", "国信招标",
|
||||
"https://ebid.gxzb.com.cn/cms/category/bulletinList.html?searchDate=1999-04-25&dates=300&word=&categoryId=88&exactSearch=&industryName=&status=&tabName=招标投标&page=%d"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
BAO_STEEL(
|
||||
"baosteel", "上海宝华国际",
|
||||
"https://baosteelbidding.zbytb.com/fuwu/"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
BOCQ(
|
||||
"bocq", "重庆银行采购供应商征集公告",
|
||||
"http://www.cqcbank.com.cn/cn/jrch/cgxx/hjjkh/ddfa/index%s.html"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SWSC(
|
||||
"swsc", "西南证券",
|
||||
"https://www.swsc.com.cn/html/goSwsc/cgxxgg/cgxmgs/"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
CQRCB(
|
||||
"cqrcb", "重庆农村商业银行",
|
||||
"https://www.cqrcb.com/cqrcb/aboutus/cgxx"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
CEBPUBSERVICE(
|
||||
"cebpubservice", "中国招标投标公共服务平台",
|
||||
"http://www.cebpubservice.com/"),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
E_BIDDING(
|
||||
"ebidding", "国信e采",
|
||||
"https://www.e-bidding.org/cms/category/bulletinList.html?searchDate=1999-06-21&dates=300&word=%s&categoryId=88&exactSearch=&industryName=&status=&tabName=招标投标&page=%d"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GTJA(
|
||||
"gtja", "国泰君安",
|
||||
"https://www.gtja.com/content/info-open/supplier/purchase-info.html?year=&keyword=%s");
|
||||
|
||||
String code;
|
||||
String description;
|
||||
String url;
|
||||
}
|
||||
|
||||
@JsonGetter
|
||||
@JsonField
|
||||
public NutMap getChannelInfo() {
|
||||
return channel == null ? null
|
||||
: NutMap.NEW()
|
||||
.addv("name", channel.name())
|
||||
.addv("code", channel.getCode())
|
||||
.addv("description",
|
||||
channel.getDescription());
|
||||
}
|
||||
|
||||
public void setChannelInfo(NutMap typeInfo) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user