From 20f6ea1b89070f17b1d9f47e9c5e349f0c87c37d Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期四, 24 八月 2023 11:03:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 model/model.go            |   12 ++-
 model/serviceContract.go  |    4 
 model/serviceOrder.go     |    3 
 docs/swagger.yaml         |   24 ++++++++
 docs/docs.go              |   36 ++++++++++++
 api/v1/serviceFollowup.go |    4 +
 docs/swagger.json         |   36 ++++++++++++
 model/serviceFollowup.go  |    5 -
 8 files changed, 112 insertions(+), 12 deletions(-)

diff --git a/api/v1/serviceFollowup.go b/api/v1/serviceFollowup.go
index 3c2dda4..ea4f641 100644
--- a/api/v1/serviceFollowup.go
+++ b/api/v1/serviceFollowup.go
@@ -132,7 +132,9 @@
 //	@Summary	鍥炶鍗曠鐞嗗垪琛�
 //	@Produce	application/json
 //	@Param		object	body		request.GetServiceFollowupList	true	"鍙傛暟"
-//	@Success	200		{object}	contextx.Response{data=response.ServiceFollowupResponse}
+//
+// @Success	200		{object}	contextx.Response{data=response.ServiceFollowupResponse}
+//
 //	@Router		/api/serviceFollowup/list [post]
 func (con *ServiceFollowupApi) List(c *gin.Context) {
 	var params request.GetServiceFollowupList
diff --git a/docs/docs.go b/docs/docs.go
index 5d854fc..e7b3a29 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -12241,6 +12241,9 @@
                 "signTime": {
                     "type": "string"
                 },
+                "updateTime": {
+                    "type": "string"
+                },
                 "wechatOrderStatus": {
                     "$ref": "#/definitions/model.WechatOrderStatus"
                 },
@@ -12394,6 +12397,9 @@
                             "$ref": "#/definitions/constvar.RefundSourceType"
                         }
                     ]
+                },
+                "updateTime": {
+                    "type": "string"
                 }
             }
         },
@@ -12473,6 +12479,9 @@
                             "$ref": "#/definitions/constvar.SalesReturnSourceType"
                         }
                     ]
+                },
+                "updateTime": {
+                    "type": "string"
                 }
             }
         },
@@ -12623,6 +12632,12 @@
                 "contactId": {
                     "type": "integer"
                 },
+                "createTime": {
+                    "type": "string"
+                },
+                "creatorName": {
+                    "type": "string"
+                },
                 "endTime": {
                     "type": "string"
                 },
@@ -12684,6 +12699,9 @@
                     "type": "string"
                 },
                 "terms": {
+                    "type": "string"
+                },
+                "updateTime": {
                     "type": "string"
                 }
             }
@@ -12754,6 +12772,12 @@
                 "contactId": {
                     "type": "integer"
                 },
+                "createTime": {
+                    "type": "string"
+                },
+                "creatorName": {
+                    "type": "string"
+                },
                 "file": {
                     "type": "string"
                 },
@@ -12807,6 +12831,9 @@
                 },
                 "timelyRateId": {
                     "type": "integer"
+                },
+                "updateTime": {
+                    "type": "string"
                 }
             }
         },
@@ -12842,6 +12869,12 @@
                 "contactId": {
                     "description": "鑱旂郴浜篿d",
                     "type": "integer"
+                },
+                "createTime": {
+                    "type": "string"
+                },
+                "creatorName": {
+                    "type": "string"
                 },
                 "expectTime": {
                     "description": "甯屾湜澶勭悊鏃堕棿",
@@ -12963,6 +12996,9 @@
                 "timeSpentId": {
                     "description": "鑺辫垂鏃堕棿",
                     "type": "integer"
+                },
+                "updateTime": {
+                    "type": "string"
                 }
             }
         },
diff --git a/docs/swagger.json b/docs/swagger.json
index 4e3ab43..b107890 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -12229,6 +12229,9 @@
                 "signTime": {
                     "type": "string"
                 },
+                "updateTime": {
+                    "type": "string"
+                },
                 "wechatOrderStatus": {
                     "$ref": "#/definitions/model.WechatOrderStatus"
                 },
@@ -12382,6 +12385,9 @@
                             "$ref": "#/definitions/constvar.RefundSourceType"
                         }
                     ]
+                },
+                "updateTime": {
+                    "type": "string"
                 }
             }
         },
@@ -12461,6 +12467,9 @@
                             "$ref": "#/definitions/constvar.SalesReturnSourceType"
                         }
                     ]
+                },
+                "updateTime": {
+                    "type": "string"
                 }
             }
         },
@@ -12611,6 +12620,12 @@
                 "contactId": {
                     "type": "integer"
                 },
+                "createTime": {
+                    "type": "string"
+                },
+                "creatorName": {
+                    "type": "string"
+                },
                 "endTime": {
                     "type": "string"
                 },
@@ -12672,6 +12687,9 @@
                     "type": "string"
                 },
                 "terms": {
+                    "type": "string"
+                },
+                "updateTime": {
                     "type": "string"
                 }
             }
@@ -12742,6 +12760,12 @@
                 "contactId": {
                     "type": "integer"
                 },
+                "createTime": {
+                    "type": "string"
+                },
+                "creatorName": {
+                    "type": "string"
+                },
                 "file": {
                     "type": "string"
                 },
@@ -12795,6 +12819,9 @@
                 },
                 "timelyRateId": {
                     "type": "integer"
+                },
+                "updateTime": {
+                    "type": "string"
                 }
             }
         },
@@ -12830,6 +12857,12 @@
                 "contactId": {
                     "description": "鑱旂郴浜篿d",
                     "type": "integer"
+                },
+                "createTime": {
+                    "type": "string"
+                },
+                "creatorName": {
+                    "type": "string"
                 },
                 "expectTime": {
                     "description": "甯屾湜澶勭悊鏃堕棿",
@@ -12951,6 +12984,9 @@
                 "timeSpentId": {
                     "description": "鑺辫垂鏃堕棿",
                     "type": "integer"
+                },
+                "updateTime": {
+                    "type": "string"
                 }
             }
         },
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index d175423..647faa9 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -1419,6 +1419,8 @@
         type: integer
       signTime:
         type: string
+      updateTime:
+        type: string
       wechatOrderStatus:
         $ref: '#/definitions/model.WechatOrderStatus'
       wechatOrderStatusId:
@@ -1521,6 +1523,8 @@
         allOf:
         - $ref: '#/definitions/constvar.RefundSourceType'
         description: 鏉ユ簮绫诲瀷锛�1閿�鍞��璐э級
+      updateTime:
+        type: string
     type: object
   model.SalesReturn:
     properties:
@@ -1573,6 +1577,8 @@
         allOf:
         - $ref: '#/definitions/constvar.SalesReturnSourceType'
         description: 婧愬崟绫诲瀷锛�1閿�鍞槑缁嗭級
+      updateTime:
+        type: string
     type: object
   model.SalesReturnStatus:
     properties:
@@ -1674,6 +1680,10 @@
         $ref: '#/definitions/model.Contact'
       contactId:
         type: integer
+      createTime:
+        type: string
+      creatorName:
+        type: string
       endTime:
         type: string
       id:
@@ -1715,6 +1725,8 @@
       startTime:
         type: string
       terms:
+        type: string
+      updateTime:
         type: string
     type: object
   model.ServiceContractStatus:
@@ -1760,6 +1772,10 @@
         $ref: '#/definitions/model.Contact'
       contactId:
         type: integer
+      createTime:
+        type: string
+      creatorName:
+        type: string
       file:
         type: string
       id:
@@ -1796,6 +1812,8 @@
         $ref: '#/definitions/model.TimelyRate'
       timelyRateId:
         type: integer
+      updateTime:
+        type: string
     type: object
   model.ServiceOrder:
     properties:
@@ -1823,6 +1841,10 @@
       contactId:
         description: 鑱旂郴浜篿d
         type: integer
+      createTime:
+        type: string
+      creatorName:
+        type: string
       expectTime:
         description: 甯屾湜澶勭悊鏃堕棿
         type: string
@@ -1909,6 +1931,8 @@
       timeSpentId:
         description: 鑺辫垂鏃堕棿
         type: integer
+      updateTime:
+        type: string
     type: object
   model.ServiceOrderStatus:
     properties:
diff --git a/model/model.go b/model/model.go
index 922de37..d8f51a2 100644
--- a/model/model.go
+++ b/model/model.go
@@ -25,14 +25,16 @@
 
 type CrmModel struct {
 	gorm.Model  `json:"-"`
-	CreatorId   int       `json:"-" gorm:"column:creator_id;type:int;comment:鍒涘缓浜篿d"`
-	Creator     User      `json:"-"  gorm:"foreignKey:CreatorId"`
-	CreateTime  time.Time `json:"createTime"  gorm:"-"`
-	CreatorName string    `json:"creatorName" gorm:"-"`
+	CreatorId   int    `json:"-" gorm:"column:creator_id;type:int;comment:鍒涘缓浜篿d"`
+	Creator     User   `json:"-"  gorm:"foreignKey:CreatorId"`
+	CreateTime  string `json:"createTime"  gorm:"-"`
+	UpdateTime  string `json:"updateTime"  gorm:"-"`
+	CreatorName string `json:"creatorName" gorm:"-"`
 }
 
 func (slf *CrmModel) AfterFind(tx *gorm.DB) (err error) {
 	slf.CreatorName = slf.Creator.Username
-	slf.CreateTime = slf.CreatedAt
+	slf.CreateTime = slf.CreatedAt.Format("2006-01-02 15:04")
+	slf.UpdateTime = slf.UpdatedAt.Format("2006-01-02 15:04")
 	return nil
 }
diff --git a/model/serviceContract.go b/model/serviceContract.go
index 9d253af..d4b8744 100644
--- a/model/serviceContract.go
+++ b/model/serviceContract.go
@@ -42,7 +42,7 @@
 		AmountUnInvoiced        decimal.Decimal       `gorm:"column:amount_not_invoiced;type:decimal(12,2);comment:鏈紑绁ㄩ噾棰�" json:"amountUnInvoiced"` // 鏈紑绁ㄩ噾棰�
 		AmountTotal             decimal.Decimal       `gorm:"column:amount_total;type:decimal(12,2);comment:浠风◣鍚堣" json:"amountTotal"`              // 浠风◣鍚堣
 		Products                []*Product            `json:"products" gorm:"many2many:service_contract_product;"`
-		gorm.Model              `json:"-"`
+		CrmModel
 	}
 
 	ServiceContractSearch struct {
@@ -58,7 +58,7 @@
 	}
 )
 
-func (ServiceContract) TableName() string {
+func (slf *ServiceContract) TableName() string {
 	return "service_contract"
 }
 
diff --git a/model/serviceFollowup.go b/model/serviceFollowup.go
index a5fb79d..fc3b09d 100644
--- a/model/serviceFollowup.go
+++ b/model/serviceFollowup.go
@@ -33,8 +33,7 @@
 		OldMember      User         `json:"oldMember" gorm:"foreignKey:OldMemberId"`
 		Remark         string       `json:"remark" gorm:"column:remark;type:text;comment:澶囨敞"`
 		File           string       `json:"file" gorm:"column:file;type:varchar(255);comment:闄勪欢"`
-
-		gorm.Model `json:"-"`
+		CrmModel
 	}
 
 	ServiceFollowupSearch struct {
@@ -49,7 +48,7 @@
 	}
 )
 
-func (ServiceFollowup) TableName() string {
+func (*ServiceFollowup) TableName() string {
 	return "service_followup"
 }
 
diff --git a/model/serviceOrder.go b/model/serviceOrder.go
index 92109e7..e5a5f6e 100644
--- a/model/serviceOrder.go
+++ b/model/serviceOrder.go
@@ -54,6 +54,7 @@
 		Solution             string             `gorm:"column:solution;type:varchar(255);not null;default:'';comment:瑙e喅鏂规硶" json:"solution"`              // 瑙e喅鏂规硶
 		SolutionRemark       string             `gorm:"column:solution_remark;type:varchar(255);not null;default:'';comment:鍐呴儴澶囨敞" json:"solutionRemark"` // 鍐呴儴澶囨敞
 		Remark               string             `gorm:"column:remark;type:varchar(255);not null;default:'';comment:澶囨敞" json:"remark"`                    // 澶囨敞
+		CrmModel
 	}
 
 	// ServiceOrderSearch 鏈嶅姟鍗曟悳绱㈡潯浠�
@@ -69,7 +70,7 @@
 	}
 )
 
-func (ServiceOrder) TableName() string {
+func (slf *ServiceOrder) TableName() string {
 	return "service_order"
 }
 

--
Gitblit v1.8.0