From b90a31431164b4b0756e4ef76f08b08953b8b04d Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 13 十月 2023 14:56:23 +0800
Subject: [PATCH] 服务合同简单数据权限

---
 model/plan.go |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/model/plan.go b/model/plan.go
index 96f5e22..0ba2f15 100644
--- a/model/plan.go
+++ b/model/plan.go
@@ -3,7 +3,6 @@
 import (
 	"aps_crm/pkg/mysqlx"
 	"gorm.io/gorm"
-	"time"
 )
 
 type (
@@ -16,8 +15,8 @@
 		SubOrder       SubOrder     `json:"subOrder" gorm:"foreignKey:SubOrderId"`
 		SalesDetailsId int          `json:"salesDetailsId" gorm:"column:sales_details_id;type:int;comment:閿�鍞槑缁唅d"`
 		SalesDetails   SalesDetails `json:"salesDetails" gorm:"foreignKey:SalesDetailsId"`
-		StartTime      *time.Time   `json:"startTime" gorm:"column:start_time;type:datetime;comment:寮�濮嬫椂闂�"`
-		EndTime        *time.Time   `json:"endTime" gorm:"column:end_time;type:datetime;comment:缁撴潫鏃堕棿"`
+		StartTime      *CustomTime  `json:"startTime" gorm:"column:start_time;type:datetime;comment:寮�濮嬫椂闂�"`
+		EndTime        *CustomTime  `json:"endTime" gorm:"column:end_time;type:datetime;comment:缁撴潫鏃堕棿"`
 		Content        string       `json:"content" gorm:"column:content;type:varchar(255);comment:璁″垝鍐呭"`
 		File           string       `json:"file" gorm:"column:file;type:varchar(255);comment:闄勪欢"`
 		gorm.Model     `json:"-"`
@@ -89,7 +88,7 @@
 		db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize)
 	}
 
-	err := db.Find(&records).Error
+	err := db.Order("id desc").Find(&records).Error
 	return records, total, err
 }
 

--
Gitblit v1.8.0