perf: filter by condition

This commit is contained in:
zchengo
2023-02-03 19:55:45 +08:00
parent 20dd98ec35
commit 54c3653197
7 changed files with 321 additions and 121 deletions
+6 -2
View File
@@ -62,8 +62,12 @@ func (c *CustomerDao) IsExists(name string, uid int64) bool {
func (c *CustomerDao) GetList(param *models.CustomerQueryParam) ([]*models.CustomerList, int64, error) {
customer := models.Customer{
Name: param.Name,
Creator: param.Creator,
Name: param.Name,
Source: param.Source,
Industry: param.Industry,
Level: param.Level,
Status: param.Status,
Creator: param.Creator,
}
customerList := make([]*models.CustomerList, 0)
rows, err := restPage(param.Page, CUSTOMER, customer, &customerList, &[]*models.CustomerList{})