Merge remote-tracking branch 'origin/lichang' into lite
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
|
||||
Reference in New Issue
Block a user