Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
06af6e35b6
2 changed files with 18 additions and 4 deletions
  1. +2
    -2
      chain_transfer/svc/svc_turnchain.go
  2. +16
    -2
      chain_transfer/turn_chain.go

+ 2
- 2
chain_transfer/svc/svc_turnchain.go View File

@@ -511,7 +511,7 @@ func CommGetGoods(eg *xorm.Engine, officialEg *xorm.Engine, tmp map[string]strin
}
if pvd != md.PVD_TB && pvd != md.PVD_TM && countUrl != "" && tklWord == "" {
if urls.ShortenURL == "" {
tcPrase.Count = strings.ReplaceAll(reqCount, countUrl, "["+countUrl+"]")
tcPrase.Count = strings.ReplaceAll(reqCount, countUrl, "")
tcPrase.Count = strings.ReplaceAll(tcPrase.Count, "[[", "[")
tcPrase.Count = strings.ReplaceAll(tcPrase.Count, "]]", "]")
} else {
@@ -521,7 +521,7 @@ func CommGetGoods(eg *xorm.Engine, officialEg *xorm.Engine, tmp map[string]strin
isNull := ""
if pvd != md.PVD_TB && pvd != md.PVD_TM && oldCountUrl != "" && countUrl == "" && tklWord == "" {
isNull = "1"
tcPrase.Count = strings.ReplaceAll(reqCount, oldCountUrl, "["+oldCountUrl+"]")
tcPrase.Count = strings.ReplaceAll(reqCount, oldCountUrl, "")
tcPrase.Count = strings.ReplaceAll(tcPrase.Count, "[[", "[")
tcPrase.Count = strings.ReplaceAll(tcPrase.Count, "]]", "]")
}


+ 16
- 2
chain_transfer/turn_chain.go View File

@@ -242,12 +242,26 @@ func TurnChain(eg *xorm.Engine, officialEg *xorm.Engine, args map[string]string)
newV = strings.ReplaceAll(newV, zhios_third_party_utils.IntToStr(i), "")
}
if strings.Contains(v, "¥") == false && strings.Contains(v, "http") == false {
var numArr = []string{"、", "-", "~", ".", "。", "!", "/", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
var numArr = []string{" ", "(", "(", "、", "-", "~", ".", "。", "!", "/", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
for _, v1 := range numArr {
newV = strings.ReplaceAll(newV, v1, "")
}
}
if goodsId == "" && zhios_third_party_utils.IsAllChinese(newV) == false && (PlatType == "taobao" || PlatType == "") {
split := regexp.MustCompile("[a-zA-Z0-9]{9,14}").FindAllString(v, -1)
//split_letter := regexp.MustCompile("[a-zA-Z]{8,15}").FindAllString(reqCount, -1)
if split != nil && ((zhios_third_party_utils.IsChineseChar(v) && strings.Contains(v, "http")) || strings.Contains(v, "http") == false) {
var is_tkl = 0
for k1, v1 := range split {
if k1 == 0 {
is_tkl = 1
tklWord = v1
}
}
if is_tkl == 1 {
PlatType = "tkl"
}
}
if goodsId == "" && (zhios_third_party_utils.IsAllChinese(newV) == false && (PlatType == "taobao" || PlatType == "") || PlatType == "tkl") {

pvd, goodsId, word, _ := svc.FindTaobaoWord(eg, officialEg, args, v, user)
if goodsId == "" && pvd == "" {


Loading…
Cancel
Save