|
@@ -227,9 +227,9 @@ func MyCustomerService(state, updateTimeStart, updateTimeEnd, companyName, phone
|
|
|
salesperson := util.CusTiDb.FindOne("jy_salesperson_info", map[string]interface{}{"phone": adminPhone}, "seatNumber", "")
|
|
|
if salesperson != nil && len(*salesperson) > 0 {
|
|
|
code := qutil.ObjToString((*salesperson)["seatNumber"])
|
|
|
- sql := "SELECT company,id,phone,status999,lastUpdateTime FROM customer where owner = '" + code + "' "
|
|
|
+ sql := "SELECT company,id,phone,status999,lastUpdateTime FROM customer where owner in (" + code + ") "
|
|
|
str := ""
|
|
|
- sqlc := "SELECT COUNt(id) FROM customer where owner = '" + code + "' "
|
|
|
+ sqlc := "SELECT COUNT(*) FROM customer where owner in (" + code + ") "
|
|
|
|
|
|
if state != "" {
|
|
|
str += " and status999 = '" + state + "'"
|
|
@@ -246,11 +246,11 @@ func MyCustomerService(state, updateTimeStart, updateTimeEnd, companyName, phone
|
|
|
if phone != "" {
|
|
|
str += " and phone like '%" + phone + "%'"
|
|
|
}
|
|
|
- log.Println(sql, sqlc)
|
|
|
if str != "" {
|
|
|
- sql += str + " order by id desc limit " + fmt.Sprint(offSet) + " " + "," + " " + fmt.Sprint(pageSize)
|
|
|
+ sql += str
|
|
|
sqlc += str
|
|
|
}
|
|
|
+ sql += " order by lastUpdateTime desc limit " + fmt.Sprint(offSet) + " " + "," + " " + fmt.Sprint(pageSize)
|
|
|
log.Println("sql:", sql)
|
|
|
log.Println("sqlc:", sqlc)
|
|
|
count = util.CusTiDb.CountBySql(sqlc)
|