胡轶钦 6 年之前
父節點
當前提交
3b36e20ffd
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      models/customer/customer.go

+ 2
- 1
models/customer/customer.go 查看文件

@@ -51,7 +51,7 @@ func (m *CustomerDAO) CustWithWXList(phone, username, recommendname, begindate,
51 51
 	}
52 52
 
53 53
 	if username != "" {
54
-		query += " and t.customer_name like '%" + username + "%'"
54
+		query += " and t.name like '%" + username + "%'"
55 55
 	}
56 56
 
57 57
 	if recommendname != "" {
@@ -65,6 +65,7 @@ func (m *CustomerDAO) CustWithWXList(phone, username, recommendname, begindate,
65 65
 	if enddate != "" {
66 66
 		query = query + ` AND t.create_date<'` + begindate + `'`
67 67
 	}
68
+	query = query + ` AND t.customer_name <> ''`
68 69
 
69 70
 	query = query + ` ORDER BY
70 71
 			t.create_date DESC limit ` + strconv.Itoa((page-1)*pageSize) + `, ` + strconv.Itoa(pageSize)