entity.go 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package entity
  2. import "regexp"
  3. const (
  4. //角色
  5. Role_admin_system = 1 //系统管理员
  6. Role_admin_department = 2 //部门管理员
  7. RedisPoly = "poly" // 查白名单用户用的redis
  8. WhitelistRedisKey = "white_%s" // 白名单用户用的redis key
  9. MedicalFunctionCode = "lyh_yl_ylbxss"
  10. BIPropertyFunctionCode = "bi_yx_wyzb"
  11. MobileTagSearchFunctionCode = "zbcgss_zgydbqjs" //超级搜索页面 移动定制搜索标签(仅工作台内展示)
  12. )
  13. var (
  14. MobileReg = regexp.MustCompile("(?i)(Android|Mobile|Phone)")
  15. MobileTagItemsValOptions = []*SearchItemsValOptions{
  16. {Key: "all", Label: "全部"},
  17. {Key: "军队类", Label: "军队类"},
  18. {Key: "武警类", Label: "武警类"},
  19. {Key: "融通类", Label: "融通类"},
  20. {Key: "退役类", Label: "退役类"},
  21. {Key: "融办类", Label: "融办类"},
  22. {Key: "某某类", Label: "“某某”类"},
  23. }
  24. MobileTagItemsValOptionsAll = []string{"军队类", "武警类", "融通类", "退役类", "融办类", "某某类"}
  25. FilterReg_3 = regexp.MustCompile("(项目|公告|公示)$")
  26. FilterReg_2 = regexp.MustCompile("^[)\\)>》】\\]}}〕,,;;::'\"“”。.\\??、/+=\\_—*&……\\^%$¥@!!`~·(\\(<《【\\[{{〔]+$")
  27. FilterReg_1 = regexp.MustCompile("^([0-9]{1,3}|[零一二三四五六七八九十]{1,2}|联系人?|电话|地址|编号|采购|政府采购|成交|更正|招标|中标|变更|结果)$")
  28. FilterReg = regexp.MustCompile("^[的人号时元万公告项目地址电话邮编日期联系招标中结果成交项目项目采购采购项目政府采购公告更正公告]+$")
  29. )
  30. // KeyWord /*筛选条件--关键词*/
  31. type (
  32. KeyWord struct {
  33. Keyword string `json:"keyword"` //关键词
  34. Appended []string `json:"appended"` //附加词
  35. Exclude []string `json:"exclude"` //排除词
  36. }
  37. SearchItemsValOptions struct {
  38. Key string `json:"key" doc:"后端接受值"`
  39. Label string `json:"label" doc:"展示标签"`
  40. }
  41. )
  42. // BiddingSearchParams /*招标信息搜索筛选条件*/
  43. type BiddingSearchParams struct {
  44. Id string `json:"id"`
  45. PublishTime string `json:"publishtime"` //发布时间
  46. Province []string `json:"province"` //地区-省份
  47. City []string `json:"city"` //地区-城市
  48. Region []string `json:"region"` //地区-省份+城市
  49. Industry []string `json:"industry"` //行业
  50. Keyword []KeyWord `json:"keywords"` //关键词
  51. Buyer []string `json:"buyer"` //招标单位(采购单位)
  52. BuyerClass []string `json:"buyerclass"` //采购单位类型
  53. HasBuyerTel string `json:"hasBuyertel"` //是否有采购单位电话
  54. Winner []string `json:"winner"` //中标单位
  55. HasWinnerTel string `json:"hasWinnertel"` //是否有中标单位电话
  56. ComeInTime int64 `json:"comeintime"` //入库时间(秒)
  57. OpenId string `json:"openid"` //用户openid
  58. MinPrice string `json:"minprice"` //金额——最少
  59. MaxPrice string `json:"maxprice"` //金额——最多
  60. SelectType string `json:"selectType"` //筛选(正文 or 标题)
  61. Subtype string `json:"subtype"` //信息类型
  62. Toptype string `json:"toptype,omitempty"` //信息类型-一级分类
  63. SelectIds []string `json:"selectId"` //选择信息导出
  64. ComeInFrom string `json:"comeinfrom"` //查询来源
  65. FileExists string `json:"fileExists"` //是否有附件
  66. SearchTypeSwitch bool `json:"searchTypeSwitch"` //是否开启 正文 标题同时搜索只搜正文的开关
  67. PageNum int64 `json:"pageNum,omitempty"` //当前页码
  68. PageSize int64 `json:"pageSize,omitempty"` //每页数量
  69. Price string `json:"price,omitempty"` //价格
  70. UserId string `json:"userId,omitempty"` //用户id
  71. }