Skip to content

Commit a63610b

Browse files
committed
chore: wip
1 parent f55cc6d commit a63610b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

app/admin/uploads/image.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ func (p *Image) GetList(ctx *quark.Context) error {
6565
"IMAGE",
6666
imageListReq.CategoryId,
6767
imageListReq.Name,
68-
imageListReq.Createtime[0],
69-
imageListReq.Createtime[1],
68+
imageListReq.Createtime,
7069
imageListReq.Page,
7170
)
7271
if err != nil {

engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const (
2222
AppName = "QuarkGo"
2323

2424
// 版本号
25-
Version = "3.8.9"
25+
Version = "3.8.10"
2626

2727
// 包名
2828
PkgName = "github.com/quarkcloudio/quark-go/v3"

service/attachment.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func NewAttachmentService() *AttachmentService {
2121
}
2222

2323
// 获取列表
24-
func (p *AttachmentService) GetListBySearch(adminId interface{}, attachmentType string, categoryId interface{}, name interface{}, startDate interface{}, endDate interface{}, page int) (list []model.Attachment, total int64, Error error) {
24+
func (p *AttachmentService) GetListBySearch(adminId interface{}, attachmentType string, categoryId interface{}, name interface{}, createtime []string, page int) (list []model.Attachment, total int64, Error error) {
2525
attachments := []model.Attachment{}
2626

2727
query := db.Client.Model(&model.Attachment{}).
@@ -35,8 +35,8 @@ func (p *AttachmentService) GetListBySearch(adminId interface{}, attachmentType
3535
if name != "" {
3636
query.Where("name LIKE %?%", name)
3737
}
38-
if startDate != "" && endDate != "" {
39-
query.Where("created_at BETWEEN ? AND ?", startDate, endDate)
38+
if createtime != nil && len(createtime) == 2 {
39+
query.Where("created_at BETWEEN ? AND ?", createtime[0], createtime[1])
4040
}
4141

4242
query.Count(&total)

0 commit comments

Comments
 (0)