Merge remote-tracking branch 'origin/lichang' into lite

This commit is contained in:
TsMask
2025-03-05 19:37:37 +08:00
parent 2c71040499
commit d9ef522f1c
26 changed files with 83 additions and 67 deletions

View File

@@ -1,6 +1,7 @@
package repository
import (
"fmt"
"time"
"be.ems/src/framework/database/db"
@@ -31,7 +32,7 @@ func (r NeLicense) SelectByPage(query map[string]string) ([]model.NeLicense, int
tx = tx.Where("serial_num = ?", v)
}
if v, ok := query["createBy"]; ok && v != "" {
tx = tx.Where("create_by like concat(?, '%')", v)
tx = tx.Where("create_by like ?", fmt.Sprintf("%s%%", v))
}
// 查询结果
@@ -69,7 +70,7 @@ func (r NeLicense) Select(param model.NeLicense) []model.NeLicense {
tx = tx.Where("expiry_date = ?", param.ExpiryDate)
}
if param.CreateBy != "" {
tx = tx.Where("create_by like concat(?, '%')", param.CreateBy)
tx = tx.Where("create_by like ?", fmt.Sprintf("%s%%", param.CreateBy))
}
// 查询数据