From b6f3c2160c7633b3492575c1de39735a04c9e63e Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 24 八月 2023 10:40:47 +0800
Subject: [PATCH] 回访单列表返回增加修改时间创建时间
---
docs/swagger.yaml | 18 +++++++++
docs/docs.go | 32 ++++++++++++++++
api/v1/serviceFollowup.go | 4 +
docs/swagger.json | 32 ++++++++++++++++
model/serviceFollowup.go | 13 +++++-
5 files changed, 95 insertions(+), 4 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 942f99c..f559814 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -11845,6 +11845,14 @@
"description": "璐︽埛id",
"type": "integer"
},
+ "client": {
+ "description": "瀹㈡埛id",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.Client"
+ }
+ ]
+ },
"clientId": {
"description": "瀹㈡埛id",
"type": "integer"
@@ -12746,6 +12754,10 @@
"contactId": {
"type": "integer"
},
+ "createTime": {
+ "description": "鍒涘缓鏃堕棿",
+ "type": "string"
+ },
"file": {
"type": "string"
},
@@ -12799,6 +12811,10 @@
},
"timelyRateId": {
"type": "integer"
+ },
+ "updateTime": {
+ "description": "淇敼鏃堕棿",
+ "type": "string"
}
}
},
@@ -13876,6 +13892,14 @@
"bankAccountId": {
"description": "璐︽埛id",
"type": "integer"
+ },
+ "client": {
+ "description": "瀹㈡埛id",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.Client"
+ }
+ ]
},
"clientId": {
"description": "瀹㈡埛id",
@@ -16930,6 +16954,14 @@
"description": "璐︽埛id",
"type": "integer"
},
+ "client": {
+ "description": "瀹㈡埛id",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.Client"
+ }
+ ]
+ },
"clientId": {
"description": "瀹㈡埛id",
"type": "integer"
diff --git a/docs/swagger.json b/docs/swagger.json
index 67b8d09..0617a73 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -11833,6 +11833,14 @@
"description": "璐︽埛id",
"type": "integer"
},
+ "client": {
+ "description": "瀹㈡埛id",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.Client"
+ }
+ ]
+ },
"clientId": {
"description": "瀹㈡埛id",
"type": "integer"
@@ -12734,6 +12742,10 @@
"contactId": {
"type": "integer"
},
+ "createTime": {
+ "description": "鍒涘缓鏃堕棿",
+ "type": "string"
+ },
"file": {
"type": "string"
},
@@ -12787,6 +12799,10 @@
},
"timelyRateId": {
"type": "integer"
+ },
+ "updateTime": {
+ "description": "淇敼鏃堕棿",
+ "type": "string"
}
}
},
@@ -13864,6 +13880,14 @@
"bankAccountId": {
"description": "璐︽埛id",
"type": "integer"
+ },
+ "client": {
+ "description": "瀹㈡埛id",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.Client"
+ }
+ ]
},
"clientId": {
"description": "瀹㈡埛id",
@@ -16918,6 +16942,14 @@
"description": "璐︽埛id",
"type": "integer"
},
+ "client": {
+ "description": "瀹㈡埛id",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.Client"
+ }
+ ]
+ },
"clientId": {
"description": "瀹㈡埛id",
"type": "integer"
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index eae5e70..0945a65 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -1158,6 +1158,10 @@
bankAccountId:
description: 璐︽埛id
type: integer
+ client:
+ allOf:
+ - $ref: '#/definitions/model.Client'
+ description: 瀹㈡埛id
clientId:
description: 瀹㈡埛id
type: integer
@@ -1756,6 +1760,9 @@
$ref: '#/definitions/model.Contact'
contactId:
type: integer
+ createTime:
+ description: 鍒涘缓鏃堕棿
+ type: string
file:
type: string
id:
@@ -1792,6 +1799,9 @@
$ref: '#/definitions/model.TimelyRate'
timelyRateId:
type: integer
+ updateTime:
+ description: 淇敼鏃堕棿
+ type: string
type: object
model.ServiceOrder:
properties:
@@ -2523,6 +2533,10 @@
bankAccountId:
description: 璐︽埛id
type: integer
+ client:
+ allOf:
+ - $ref: '#/definitions/model.Client'
+ description: 瀹㈡埛id
clientId:
description: 瀹㈡埛id
type: integer
@@ -4613,6 +4627,10 @@
bankAccountId:
description: 璐︽埛id
type: integer
+ client:
+ allOf:
+ - $ref: '#/definitions/model.Client'
+ description: 瀹㈡埛id
clientId:
description: 瀹㈡埛id
type: integer
diff --git a/model/serviceFollowup.go b/model/serviceFollowup.go
index a5fb79d..d66f9e7 100644
--- a/model/serviceFollowup.go
+++ b/model/serviceFollowup.go
@@ -33,8 +33,9 @@
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:"-"`
+ CreateTime string `json:"createTime"` //鍒涘缓鏃堕棿
+ UpdateTime string `json:"updateTime"` //淇敼鏃堕棿
+ gorm.Model `json:"-"`
}
ServiceFollowupSearch struct {
@@ -49,10 +50,16 @@
}
)
-func (ServiceFollowup) TableName() string {
+func (*ServiceFollowup) TableName() string {
return "service_followup"
}
+func (slf *ServiceFollowup) AfterFind(db *gorm.DB) error {
+ slf.CreateTime = slf.CreatedAt.Format("2006-01-02 15:04")
+ slf.UpdateTime = slf.UpdatedAt.Format("2006-01-02 15:04")
+ return nil
+}
+
func NewServiceFollowupSearch() *ServiceFollowupSearch {
return &ServiceFollowupSearch{
Orm: mysqlx.GetDB(),
--
Gitblit v1.8.0