|
@@ -118,10 +118,11 @@ func (this *CustomerOperation) CList(searchCode string, isCliam int64, entUserId
|
|
//count = MQFW.Count(fc, query)
|
|
//count = MQFW.Count(fc, query)
|
|
customerList := Mysql.SelectBySql("SELECT ec.name,euu.customer_id FROM entniche_user_customer euu LEFT JOIN entniche_customer ec ON ec.id = euu.customer_id WHERE user_id = ? AND (source_type =1 or source_type =4) ", entUserId)
|
|
customerList := Mysql.SelectBySql("SELECT ec.name,euu.customer_id FROM entniche_user_customer euu LEFT JOIN entniche_customer ec ON ec.id = euu.customer_id WHERE user_id = ? AND (source_type =1 or source_type =4) ", entUserId)
|
|
customerMap := map[string]interface{}{}
|
|
customerMap := map[string]interface{}{}
|
|
- for _, value := range *customerList {
|
|
|
|
- customerMap[qutil.ObjToString(value["name"])] = value["customer_id"]
|
|
|
|
|
|
+ if customerList != nil && len(*customerList) > 0 {
|
|
|
|
+ for _, value := range *customerList {
|
|
|
|
+ customerMap[qutil.ObjToString(value["name"])] = value["customer_id"]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
clist, ok := MQFW.Find(fc, query, `{"date":-1}`, `{"name":1,"date":1}`, false, 0, countLimit)
|
|
clist, ok := MQFW.Find(fc, query, `{"date":-1}`, `{"name":1,"date":1}`, false, 0, countLimit)
|
|
if ok && clist != nil && len(*clist) > 0 {
|
|
if ok && clist != nil && len(*clist) > 0 {
|
|
count = len(*clist)
|
|
count = len(*clist)
|