|
@@ -592,13 +592,28 @@ func GetDataExportMailContent(orderCode string) (content string, err error) {
|
|
|
if err != nil {
|
|
|
return "", err
|
|
|
}
|
|
|
- selectType := "title"
|
|
|
+ keywordsMatchItemShow := "标题"
|
|
|
if sc != nil {
|
|
|
- selectType = qutil.ObjToString(sc.SelectType)
|
|
|
- if selectType == "title" {
|
|
|
- selectType = "标题匹配"
|
|
|
- } else {
|
|
|
- selectType = "全文匹配"
|
|
|
+ var keywordsMatchItemShowArr []string
|
|
|
+ for _, item := range strings.Split(sc.SelectType, ",") {
|
|
|
+ if item == "all" {
|
|
|
+ keywordsMatchItemShowArr = append(keywordsMatchItemShowArr, "全部")
|
|
|
+ } else if item == "title" {
|
|
|
+ keywordsMatchItemShowArr = append(keywordsMatchItemShowArr, "标题")
|
|
|
+ } else if item == "detail" {
|
|
|
+ keywordsMatchItemShowArr = append(keywordsMatchItemShowArr, "正文")
|
|
|
+ } else if item == "mbuyer" {
|
|
|
+ keywordsMatchItemShowArr = append(keywordsMatchItemShowArr, "采购单位")
|
|
|
+ } else if item == "mwinner" {
|
|
|
+ keywordsMatchItemShowArr = append(keywordsMatchItemShowArr, "中标企业")
|
|
|
+ } else if item == "magency" {
|
|
|
+ keywordsMatchItemShowArr = append(keywordsMatchItemShowArr, "招标代理机构")
|
|
|
+ } else if item == "filetext" {
|
|
|
+ keywordsMatchItemShowArr = append(keywordsMatchItemShowArr, "附件")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if keywordsMatchItemShowArr != nil {
|
|
|
+ keywordsMatchItemShow = strings.Join(keywordsMatchItemShowArr, " ")
|
|
|
}
|
|
|
//
|
|
|
if pay_time != "" {
|
|
@@ -648,7 +663,7 @@ func GetDataExportMailContent(orderCode string) (content string, err error) {
|
|
|
} else {
|
|
|
log.Println("用户筛选条件错误", err, sc)
|
|
|
}
|
|
|
- content = fmt.Sprintf(config.ExConf.Mail_attach_content, download_url, orderCode, create_time, pay_time, product_type, data_spec, data_count, order_money, user_mail, user_phone, publishtime, region, industry, buyerclass, keys, selectType, sc_money, subtype, buyer, winner)
|
|
|
+ content = fmt.Sprintf(config.ExConf.Mail_attach_content, download_url, orderCode, create_time, pay_time, product_type, data_spec, data_count, order_money, user_mail, user_phone, publishtime, region, industry, buyerclass, keys, keywordsMatchItemShow, sc_money, subtype, buyer, winner)
|
|
|
return content, nil
|
|
|
}
|
|
|
|