|
@@ -16,10 +16,10 @@ import (
|
|
|
"app.yhyue.com/moapp/jybase/date"
|
|
|
"app.yhyue.com/moapp/jybase/encrypt"
|
|
|
"app.yhyue.com/moapp/jybase/esv1"
|
|
|
+ P "app.yhyue.com/moapp/jybase/mapping"
|
|
|
"app.yhyue.com/moapp/jybase/mongodb"
|
|
|
"app.yhyue.com/moapp/jybase/mysql"
|
|
|
"app.yhyue.com/moapp/jybase/redis"
|
|
|
- P "bp.jydev.jianyu360.cn/BaseService/pushpkg/p"
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
)
|
|
@@ -413,8 +413,8 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
//城市
|
|
|
city := []string{}
|
|
|
for _, v := range strings.Split(spqp.City, ",") {
|
|
|
- if P.PushMapping.City[v] > 0 {
|
|
|
- city = append(city, fmt.Sprint(P.PushMapping.City[v]))
|
|
|
+ if P.BidCodeMapping.City[v] != "" {
|
|
|
+ city = append(city, fmt.Sprint(P.BidCodeMapping.City[v]))
|
|
|
} else {
|
|
|
city = append(city, "-1")
|
|
|
}
|
|
@@ -429,8 +429,8 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
var sqlArea = ""
|
|
|
area := []string{}
|
|
|
for _, v := range strings.Split(spqp.Area, ",") {
|
|
|
- if P.PushMapping.Area[v] > 0 {
|
|
|
- area = append(area, fmt.Sprint(P.PushMapping.Area[v]))
|
|
|
+ if P.BidCodeMapping.Area[v] != "" {
|
|
|
+ area = append(area, fmt.Sprint(P.BidCodeMapping.Area[v]))
|
|
|
} else {
|
|
|
area = append(area, "-1")
|
|
|
}
|
|
@@ -454,7 +454,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
if spqp.Buyerclass != "" {
|
|
|
buyerclass := []string{}
|
|
|
for _, v := range strings.Split(spqp.Buyerclass, ",") {
|
|
|
- buyerclass = append(buyerclass, fmt.Sprint(P.PushMapping.Buyerclass[v]))
|
|
|
+ buyerclass = append(buyerclass, fmt.Sprint(P.BidCodeMapping.Buyerclass[v]))
|
|
|
}
|
|
|
if len(buyerclass) == 1 {
|
|
|
buyerclass = append(buyerclass, "9999")
|
|
@@ -468,20 +468,20 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
if spqp.Subtype != "" {
|
|
|
subtype := []string{}
|
|
|
for _, v := range strings.Split(spqp.Subtype, ",") {
|
|
|
- subtype = append(subtype, fmt.Sprintf("find_in_set('%d',a.subscopeclass)", P.PushMapping.Subscopeclass[v]))
|
|
|
+ subtype = append(subtype, P.BidCodeMapping.Subtype[v])
|
|
|
}
|
|
|
if len(subtype) == 1 {
|
|
|
subtype = append(subtype, "9999")
|
|
|
}
|
|
|
if len(subtype) > 0 {
|
|
|
- querys = append(querys, fmt.Sprintf("a.subtype_code in (%s)", strings.Join(subtype, ",")))
|
|
|
+ querys = append(querys, fmt.Sprintf("subtype in (%s)", strings.Join(subtype, ",")))
|
|
|
}
|
|
|
}
|
|
|
//信息行业
|
|
|
if spqp.Subscopeclass != "" {
|
|
|
find_in_set := []string{}
|
|
|
for _, v := range strings.Split(spqp.Subscopeclass, ",") {
|
|
|
- find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%d',a.subscopeclass)", P.PushMapping.Subscopeclass[v]))
|
|
|
+ find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%s',a.subscopeclass)", P.BidCodeMapping.Subscopeclass[v]))
|
|
|
}
|
|
|
if len(find_in_set) == 1 {
|
|
|
querys = append(querys, find_in_set[0])
|
|
@@ -521,146 +521,145 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
} else if spqp.FileExists == "-1" {
|
|
|
querys = append(querys, fmt.Sprintf("a.attachment_count is null"))
|
|
|
}
|
|
|
- // 是否已读
|
|
|
- if spqp.IsRead != "" {
|
|
|
- if spqp.IsRead == "0" {
|
|
|
- userStr += " and a.isvisit IS NULL"
|
|
|
- } else if spqp.IsRead == "1" {
|
|
|
- userStr += " and a.isvisit=1"
|
|
|
- }
|
|
|
- }
|
|
|
- // 信息来源
|
|
|
- if spqp.Source == "1" || spqp.Source == "2" || spqp.Source == "3" {
|
|
|
- userStr += " and a.source=" + spqp.Source
|
|
|
- }
|
|
|
- if spqp.IsEnt {
|
|
|
- var staffs []string
|
|
|
- userStr += fmt.Sprintf(" and a.entid='%s' ", spqp.EntId)
|
|
|
- //判断是企业管理员还是部门管理员 部门管理员获取所有子部门
|
|
|
- userEnt := EntInfo(common.IntAll(spqp.EntId), common.IntAll(spqp.EntUserId))
|
|
|
- if !(userEnt.Role_admin_system || userEnt.Role_admin_department) {
|
|
|
- result = []*bxsubscribe.SubscribeInfo{}
|
|
|
- return
|
|
|
- }
|
|
|
- if userEnt.Role_admin_department { //部门管理员 获取所有部门和子部门员工
|
|
|
- users := GetDisUsers(common.IntAll(spqp.EntId), userEnt.Dept.Id)
|
|
|
- if users != nil && len(*users) > 0 {
|
|
|
- for _, v := range *users {
|
|
|
- if len(spqp.Staffs) > 0 {
|
|
|
- for _, vv := range spqp.Staffs {
|
|
|
- if fmt.Sprintf("%d", v.Id) == vv {
|
|
|
- staffs = append(staffs, common.InterfaceToStr(v.Id))
|
|
|
- }
|
|
|
+ }
|
|
|
+ // 是否已读
|
|
|
+ if spqp.IsRead != "" {
|
|
|
+ if spqp.IsRead == "0" {
|
|
|
+ userStr += " and a.isvisit IS NULL"
|
|
|
+ } else if spqp.IsRead == "1" {
|
|
|
+ userStr += " and a.isvisit=1"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 信息来源
|
|
|
+ if spqp.Source == "1" || spqp.Source == "2" || spqp.Source == "3" {
|
|
|
+ userStr += " and a.source=" + spqp.Source
|
|
|
+ }
|
|
|
+ if spqp.IsEnt {
|
|
|
+ var staffs []string
|
|
|
+ userStr += fmt.Sprintf(" and a.entid='%s' ", spqp.EntId)
|
|
|
+ //判断是企业管理员还是部门管理员 部门管理员获取所有子部门
|
|
|
+ userEnt := EntInfo(common.IntAll(spqp.EntId), common.IntAll(spqp.EntUserId))
|
|
|
+ if !(userEnt.Role_admin_system || userEnt.Role_admin_department) {
|
|
|
+ result = []*bxsubscribe.SubscribeInfo{}
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if userEnt.Role_admin_department { //部门管理员 获取所有部门和子部门员工
|
|
|
+ users := GetDisUsers(common.IntAll(spqp.EntId), userEnt.Dept.Id)
|
|
|
+ if users != nil && len(*users) > 0 {
|
|
|
+ for _, v := range *users {
|
|
|
+ if len(spqp.Staffs) > 0 {
|
|
|
+ for _, vv := range spqp.Staffs {
|
|
|
+ if fmt.Sprintf("%d", v.Id) == vv {
|
|
|
+ staffs = append(staffs, common.InterfaceToStr(v.Id))
|
|
|
}
|
|
|
- } else {
|
|
|
- staffs = append(staffs, common.InterfaceToStr(v.Id))
|
|
|
}
|
|
|
+ } else {
|
|
|
+ staffs = append(staffs, common.InterfaceToStr(v.Id))
|
|
|
}
|
|
|
- } else {
|
|
|
- log.Printf("部门管理员为获取到部门员工:%s", spqp.EntUserId)
|
|
|
- result = []*bxsubscribe.SubscribeInfo{}
|
|
|
- return
|
|
|
}
|
|
|
- } else if len(spqp.Staffs) > 0 {
|
|
|
- staffs = spqp.Staffs
|
|
|
- }
|
|
|
- //老板商机管理需要查询全部来源
|
|
|
- isNew := true
|
|
|
- //商机管理判断
|
|
|
- newCount := IC.MainMysql.CountBySql("select count(id) from entniche_info where id =? and isNew != 1 and status=1", spqp.EntId)
|
|
|
- if newCount > 0 {
|
|
|
- isNew = false
|
|
|
- }
|
|
|
- // 无查询分配人员、是否已读
|
|
|
- if spqp.IsRead == "" && len(staffs) == 0 {
|
|
|
- //查询数量(需要去重)
|
|
|
- countSql = fmt.Sprintf("select count(1) from %s a where %s %s %s", aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""))
|
|
|
- //列表查询
|
|
|
- findSql = fmt.Sprintf("select a.id,a.infoid,a.matchkeys,a.attachment_count from %s a where %s %s %s order by a.date desc,a.id desc",
|
|
|
- aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, common.If(isNew, " and a.source = 2 ", ""))
|
|
|
} else {
|
|
|
- //查询分配人员或是否已读
|
|
|
- staffQuery := " 1=1 "
|
|
|
- if len(staffs) > 0 {
|
|
|
- staffQuery += fmt.Sprintf(" and a.userid in ('%s') ", strings.Join(staffs, "','"))
|
|
|
- }
|
|
|
- if spqp.IsRead != "" {
|
|
|
- if spqp.IsRead == "0" {
|
|
|
- staffQuery += " and a.isvisit IS NULL"
|
|
|
- } else if spqp.IsRead == "1" {
|
|
|
- staffQuery += " and a.isvisit=1"
|
|
|
- }
|
|
|
- }
|
|
|
- countSql = fmt.Sprintf("select count(1) from %s a s where %s %s %s and ((%s) or EXISTS (SELECT 1 from %s c WHERE c.source=3 %s and %s and a.id=c.pid and (%s))) ", aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""), staffQuery, aboutDbMsg[s.ModuleFlag].MysqlTable, strings.ReplaceAll(userStr, "a.", "c."), strings.Join(querys, " and "), strings.ReplaceAll(staffQuery, "a.", "c."))
|
|
|
- //列表查询
|
|
|
- findSql = fmt.Sprintf("select a.id,a.infoid,a.matchkeys,a.attachment_count from %s a where %s %s %s and ((%s) or EXISTS (SELECT 1 from %s c WHERE c.source=3 %s and %s and a.id=c.pid and (%s))) order by a.date desc,a.id desc ", aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""), staffQuery, aboutDbMsg[s.ModuleFlag].MysqlTable, strings.ReplaceAll(userStr, "a.", "c."), strings.Join(querys, " and "), strings.ReplaceAll(staffQuery, "a.", "c."))
|
|
|
+ log.Printf("部门管理员为获取到部门员工:%s", spqp.EntUserId)
|
|
|
+ result = []*bxsubscribe.SubscribeInfo{}
|
|
|
+ return
|
|
|
}
|
|
|
+ } else if len(spqp.Staffs) > 0 {
|
|
|
+ staffs = spqp.Staffs
|
|
|
+ }
|
|
|
+ //老板商机管理需要查询全部来源
|
|
|
+ isNew := true
|
|
|
+ //商机管理判断
|
|
|
+ newCount := IC.MainMysql.CountBySql("select count(id) from entniche_info where id =? and isNew != 1 and status=1", spqp.EntId)
|
|
|
+ if newCount > 0 {
|
|
|
+ isNew = false
|
|
|
+ }
|
|
|
+ // 无查询分配人员、是否已读
|
|
|
+ if spqp.IsRead == "" && len(staffs) == 0 {
|
|
|
+ //查询数量(需要去重)
|
|
|
+ countSql = fmt.Sprintf("select count(1) from %s a where %s %s %s", aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""))
|
|
|
+ //列表查询
|
|
|
+ findSql = fmt.Sprintf("select a.id,a.infoid,a.matchkeys,a.attachment_count from %s a where %s %s %s order by a.date desc,a.id desc",
|
|
|
+ aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, common.If(isNew, " and a.source = 2 ", ""))
|
|
|
} else {
|
|
|
- // 是否已读
|
|
|
+ //查询分配人员或是否已读
|
|
|
+ staffQuery := " 1=1 "
|
|
|
+ if len(staffs) > 0 {
|
|
|
+ staffQuery += fmt.Sprintf(" and a.userid in ('%s') ", strings.Join(staffs, "','"))
|
|
|
+ }
|
|
|
if spqp.IsRead != "" {
|
|
|
if spqp.IsRead == "0" {
|
|
|
- userStr += " and a.isvisit IS NULL"
|
|
|
+ staffQuery += " and a.isvisit IS NULL"
|
|
|
} else if spqp.IsRead == "1" {
|
|
|
- userStr += " and a.isvisit=1"
|
|
|
+ staffQuery += " and a.isvisit=1"
|
|
|
}
|
|
|
}
|
|
|
- // 信息来源
|
|
|
- if spqp.Source == "1" || spqp.Source == "2" || spqp.Source == "3" {
|
|
|
- userStr += " and a.source=" + spqp.Source
|
|
|
+ countSql = fmt.Sprintf("select count(1) from %s a s where %s %s %s and ((%s) or EXISTS (SELECT 1 from %s c WHERE c.source=3 %s and %s and a.id=c.pid and (%s))) ", aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""), staffQuery, aboutDbMsg[s.ModuleFlag].MysqlTable, strings.ReplaceAll(userStr, "a.", "c."), strings.Join(querys, " and "), strings.ReplaceAll(staffQuery, "a.", "c."))
|
|
|
+ //列表查询
|
|
|
+ findSql = fmt.Sprintf("select a.id,a.infoid,a.matchkeys,a.attachment_count from %s a where %s %s %s and ((%s) or EXISTS (SELECT 1 from %s c WHERE c.source=3 %s and %s and a.id=c.pid and (%s))) order by a.date desc,a.id desc ", aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""), staffQuery, aboutDbMsg[s.ModuleFlag].MysqlTable, strings.ReplaceAll(userStr, "a.", "c."), strings.Join(querys, " and "), strings.ReplaceAll(staffQuery, "a.", "c."))
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 是否已读
|
|
|
+ if spqp.IsRead != "" {
|
|
|
+ if spqp.IsRead == "0" {
|
|
|
+ userStr += " and a.isvisit IS NULL"
|
|
|
+ } else if spqp.IsRead == "1" {
|
|
|
+ userStr += " and a.isvisit=1"
|
|
|
}
|
|
|
- if spqp.PositionType == 1 {
|
|
|
- //企业主体是企业的个人查询
|
|
|
- if spqp.UserType == SubVipFlag {
|
|
|
- userStr += fmt.Sprintf(" and a.userid='%s' and ( a.product=1 or a.product=3 or a.source>1 ) ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
- } else if spqp.UserType == MemberFlag {
|
|
|
- userStr += fmt.Sprintf(" and a.userid='%s' and ( a.product=2 or a.product=3 or a.source>1 ) ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
- } else if spqp.UserType == EntnicheFlag {
|
|
|
- userStr += fmt.Sprintf(" and a.userid='%s' and ( a.product is null or a.product=3 or a.source>1 ) ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
- } else {
|
|
|
- userStr += fmt.Sprintf(" and a.userid='%s' ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
- }
|
|
|
+ }
|
|
|
+ // 信息来源
|
|
|
+ if spqp.Source == "1" || spqp.Source == "2" || spqp.Source == "3" {
|
|
|
+ userStr += " and a.source=" + spqp.Source
|
|
|
+ }
|
|
|
+ if spqp.PositionType == 1 {
|
|
|
+ //企业主体是企业的个人查询
|
|
|
+ if spqp.UserType == SubVipFlag {
|
|
|
+ userStr += fmt.Sprintf(" and a.userid='%s' and ( a.product=1 or a.product=3 or a.source>1 ) ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
+ } else if spqp.UserType == MemberFlag {
|
|
|
+ userStr += fmt.Sprintf(" and a.userid='%s' and ( a.product=2 or a.product=3 or a.source>1 ) ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
+ } else if spqp.UserType == EntnicheFlag {
|
|
|
+ userStr += fmt.Sprintf(" and a.userid='%s' and ( a.product is null or a.product=3 or a.source>1 ) ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
} else {
|
|
|
- if s.ModuleFlag == EntnicheFlag {
|
|
|
- //老商机管理个人订阅查询
|
|
|
- userStr += fmt.Sprintf(" and a.userid='%s' and a.product is null", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
- } else {
|
|
|
- //个人订阅查询
|
|
|
- userStr += fmt.Sprintf(" and a.userid='%s'", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
- }
|
|
|
+ userStr += fmt.Sprintf(" and a.userid='%s' ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
}
|
|
|
- //查询数量
|
|
|
- countSql = fmt.Sprintf("select count(1) as count from %s a where 1=1 %s and %s", aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "))
|
|
|
- //列表查询语句
|
|
|
- findSql = "select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,a.attachment_count"
|
|
|
+ } else {
|
|
|
if s.ModuleFlag == EntnicheFlag {
|
|
|
- findSql += ", IF(a.source is NULL,1,a.source) as source "
|
|
|
- }
|
|
|
- if s.ModuleFlag != MemberFlag && s.ModuleFlag != EntnicheFlag {
|
|
|
- findSql += ",a.isvip"
|
|
|
+ //老商机管理个人订阅查询
|
|
|
+ userStr += fmt.Sprintf(" and a.userid='%s' and a.product is null", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
+ } else {
|
|
|
+ //个人订阅查询
|
|
|
+ userStr += fmt.Sprintf(" and a.userid='%s'", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
}
|
|
|
- findSql = fmt.Sprintf("%s from %s a where %s %s "+
|
|
|
- " order by a.date desc,a.id desc", findSql, aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr)
|
|
|
}
|
|
|
- //查询总数
|
|
|
- logx.Info("countSql", countSql)
|
|
|
- count = spqp.BaseServiceMysql.CountBySql(countSql)
|
|
|
- }
|
|
|
- if isLimit {
|
|
|
- findSql += fmt.Sprintf(" limit %d,%d", (spqp.PageNum-1)*size, size)
|
|
|
- }
|
|
|
- logx.Info(spqp.NewUserId, "subscribePush query sql:", findSql)
|
|
|
- list := spqp.BaseServiceMysql.SelectBySql(findSql)
|
|
|
- if list != nil && len(*list) > 0 {
|
|
|
- pushCas := s.GetJyPushs(*list)
|
|
|
- if !spqp.Export {
|
|
|
- result = s.GetInfoByIds(spqp.Mgo_bidding, spqp.Bidding, spqp.Bidding_back, pushCas, spqp.IsPayUser)
|
|
|
- } else {
|
|
|
- result = s.GetOnlyExportInfo(pushCas)
|
|
|
+ //查询数量
|
|
|
+ countSql = fmt.Sprintf("select count(1) as count from %s a where 1=1 %s and %s", aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "))
|
|
|
+ //列表查询语句
|
|
|
+ findSql = "select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,a.attachment_count"
|
|
|
+ if s.ModuleFlag == EntnicheFlag {
|
|
|
+ findSql += ", IF(a.source is NULL,1,a.source) as source "
|
|
|
}
|
|
|
+ if s.ModuleFlag != MemberFlag && s.ModuleFlag != EntnicheFlag {
|
|
|
+ findSql += ",a.isvip"
|
|
|
+ }
|
|
|
+ findSql = fmt.Sprintf("%s from %s a where %s %s "+
|
|
|
+ " order by a.date desc,a.id desc", findSql, aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr)
|
|
|
+ }
|
|
|
+ //查询总数
|
|
|
+ logx.Info("countSql", countSql)
|
|
|
+ count = spqp.BaseServiceMysql.CountBySql(countSql)
|
|
|
+ }
|
|
|
+ if isLimit {
|
|
|
+ findSql += fmt.Sprintf(" limit %d,%d", (spqp.PageNum-1)*size, size)
|
|
|
+ }
|
|
|
+ logx.Info(spqp.NewUserId, "subscribePush query sql:", findSql)
|
|
|
+ list := spqp.BaseServiceMysql.SelectBySql(findSql)
|
|
|
+ if list != nil && len(*list) > 0 {
|
|
|
+ pushCas := s.GetJyPushs(*list)
|
|
|
+ if !spqp.Export {
|
|
|
+ result = s.GetInfoByIds(spqp.Mgo_bidding, spqp.Bidding, spqp.Bidding_back, pushCas, spqp.IsPayUser)
|
|
|
} else {
|
|
|
- result = []*bxsubscribe.SubscribeInfo{}
|
|
|
+ result = s.GetOnlyExportInfo(pushCas)
|
|
|
}
|
|
|
- return
|
|
|
+ } else {
|
|
|
+ result = []*bxsubscribe.SubscribeInfo{}
|
|
|
}
|
|
|
return
|
|
|
}
|
|
@@ -1072,11 +1071,11 @@ func (s *subscribePush) listManager(spqp *SubPushQueryParam, list []map[string]i
|
|
|
matchkeys := getKeys(title, keyword)
|
|
|
matchkey := strings.Join(matchkeys, " ")
|
|
|
subscopeclassStr := ""
|
|
|
- area := common.If(v["area"] == nil, nil, common.If(common.ObjToString(v["area"]) == "A", 0, common.If(P.PushMapping.Area[common.ObjToString(v["area"])] > 0, P.PushMapping.Area[common.ObjToString(v["area"])], 0)))
|
|
|
- city := common.If(P.PushMapping.City[common.ObjToString(v["city"])] == 0, nil, P.PushMapping.City[common.ObjToString(v["city"])])
|
|
|
- subtype := common.If(P.PushMapping.Subtype[common.ObjToString(v["subtype"])] == 0, nil, P.PushMapping.Subtype[common.ObjToString(v["subtype"])])
|
|
|
- toptype := common.If(P.PushMapping.Toptype[common.ObjToString(v["toptype"])] == 0, nil, P.PushMapping.Toptype[common.ObjToString(v["toptype"])])
|
|
|
- buyerclass := common.If(P.PushMapping.Buyerclass[common.ObjToString(v["buyerclass"])] == 0, nil, P.PushMapping.Buyerclass[common.ObjToString(v["buyerclass"])])
|
|
|
+ area := common.If(v["area"] == nil, nil, common.If(common.ObjToString(v["area"]) == "A", 0, common.If(P.BidCodeMapping.Area[common.ObjToString(v["area"])] != "", P.BidCodeMapping.Area[common.ObjToString(v["area"])], 0)))
|
|
|
+ city := common.If(P.BidCodeMapping.City[common.ObjToString(v["city"])] != "", nil, P.BidCodeMapping.City[common.ObjToString(v["city"])])
|
|
|
+ subtype := common.If(P.BidCodeMapping.Subtype[common.ObjToString(v["subtype"])] != "", nil, P.BidCodeMapping.Subtype[common.ObjToString(v["subtype"])])
|
|
|
+ toptype := common.If(P.BidCodeMapping.Toptype[common.ObjToString(v["toptype"])] != "", nil, P.BidCodeMapping.Toptype[common.ObjToString(v["toptype"])])
|
|
|
+ buyerclass := common.If(P.BidCodeMapping.Buyerclass[common.ObjToString(v["buyerclass"])] != "", nil, P.BidCodeMapping.Buyerclass[common.ObjToString(v["buyerclass"])])
|
|
|
attachment_count := 0
|
|
|
if v["isValidFile"] != nil {
|
|
|
isValidFile, _ := v["isValidFile"].(bool)
|
|
@@ -1087,7 +1086,7 @@ func (s *subscribePush) listManager(spqp *SubPushQueryParam, list []map[string]i
|
|
|
if s_subscopeclass := common.ObjToString(v["s_subscopeclass"]); s_subscopeclass != "" {
|
|
|
subscopeclass := []string{}
|
|
|
for _, v := range strings.Split(s_subscopeclass, ",") {
|
|
|
- if subscopeclass_mapping, ok := P.PushMapping.Subscopeclass[v]; ok {
|
|
|
+ if subscopeclass_mapping, ok := P.BidCodeMapping.Subscopeclass[v]; ok {
|
|
|
subscopeclass = append(subscopeclass, fmt.Sprint(subscopeclass_mapping))
|
|
|
}
|
|
|
}
|