|
@@ -33,7 +33,7 @@ func GetFullProjectList(ctx context.Context, pageSize, pageNum int32, condition
|
|
|
db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
|
|
|
}
|
|
|
if tag == "updated_at" && value.Interface() != "0" {
|
|
|
- db = db.Where(fmt.Sprintf("%s > ?", tag), value.Interface())
|
|
|
+ db = db.Where(fmt.Sprintf("updated_at like '%s%%'", value.Interface()))
|
|
|
}
|
|
|
if tag == "project_name" && !util.IsBlank(value) {
|
|
|
db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
|
|
@@ -49,7 +49,7 @@ func GetFullProjectList(ctx context.Context, pageSize, pageNum int32, condition
|
|
|
// 查询该页数据
|
|
|
limit := pageSize
|
|
|
offset := pageSize * pageNum // assert pageNum start with 0
|
|
|
- err := db.Order("project_id").Limit(int(limit)).Offset(int(offset)).Find(&fullProjects).Error
|
|
|
+ err := db.Order("updated_at").Limit(int(limit)).Offset(int(offset)).Find(&fullProjects).Error
|
|
|
if err != nil {
|
|
|
logrus.WithContext(ctx).Errorf("[GetFullProjectList] error query mysql find, err:%+v", err)
|
|
|
return nil, 0, err
|