|
@@ -733,7 +733,7 @@ func BuyerList(partyA, supplier, heterotophy, intermediary, agency string, posit
|
|
|
func ProjectHandle(buyerArr []string, area, businessStr string, dataMap *map[string]map[string]interface{}, startIndex, PageSize int64, sourceType string) (*map[string]map[string]interface{}, int64) {
|
|
|
projectMap := &map[string]map[string]interface{}{}
|
|
|
count := int64(0)
|
|
|
- sqlStr := "select buyer,buyer_id,groupUniqArray(area) as area,count(1) as ocount,SUM(project_money) as project_money ,MAX(zbtime) as zbtime from transaction_info_all " +
|
|
|
+ sqlStr := "select buyer,buyer_id,groupUniqArray(area) as areaStr,count(1) as ocount,SUM(project_money) as project_money ,MAX(zbtime) as zbtime from transaction_info_all " +
|
|
|
"where"
|
|
|
countSql := "select count(1) as count from (%s) b "
|
|
|
if len(buyerArr) > 0 {
|
|
@@ -742,7 +742,7 @@ func ProjectHandle(buyerArr []string, area, businessStr string, dataMap *map[str
|
|
|
}
|
|
|
if len(area) > 0 && area != "" {
|
|
|
areaStr, areaArgs := ConditionHandle(strings.Split(area, ","))
|
|
|
- sqlStr += fmt.Sprintf(fmt.Sprintf(" area in (%s)", areaStr), areaArgs...)
|
|
|
+ sqlStr += fmt.Sprintf(fmt.Sprintf(" and area in (%s)", areaStr), areaArgs...)
|
|
|
}
|
|
|
if len(businessStr) > 0 {
|
|
|
business, businessArgs := ConditionHandle(strings.Split(businessStr, ","))
|
|
@@ -790,7 +790,7 @@ func ProjectHandle(buyerArr []string, area, businessStr string, dataMap *map[str
|
|
|
type BuyerAggStruct struct {
|
|
|
Buyer string `ch:"buyer"`
|
|
|
BuyerId string `ch:"buyer_id"`
|
|
|
- Area []string `ch:"area"`
|
|
|
+ Area []string `ch:"areaStr"`
|
|
|
ProjectMoney decimal.Decimal `ch:"project_money"`
|
|
|
Zbtime int64 `ch:"zbtime"`
|
|
|
Ocount uint64 `ch:"ocount"`
|