From d7aa0c40191ac24bdf7c546bbed52066a61e2033 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 24 八月 2023 10:55:24 +0800
Subject: [PATCH] Merge branch 'hotfix'
---
model/model.go | 12 +-
model/serviceContract.go | 4
model/serviceOrder.go | 3
docs/swagger.yaml | 36 +++++++++
docs/docs.go | 60 +++++++++++++++
api/v1/serviceFollowup.go | 4
docs/swagger.json | 60 +++++++++++++++
model/serviceFollowup.go | 5
8 files changed, 172 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 942f99c..2be434c 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"
@@ -12233,6 +12241,9 @@
"signTime": {
"type": "string"
},
+ "updateTime": {
+ "type": "string"
+ },
"wechatOrderStatus": {
"$ref": "#/definitions/model.WechatOrderStatus"
},
@@ -12386,6 +12397,9 @@
"$ref": "#/definitions/constvar.RefundSourceType"
}
]
+ },
+ "updateTime": {
+ "type": "string"
}
}
},
@@ -12465,6 +12479,9 @@
"$ref": "#/definitions/constvar.SalesReturnSourceType"
}
]
+ },
+ "updateTime": {
+ "type": "string"
}
}
},
@@ -12615,6 +12632,12 @@
"contactId": {
"type": "integer"
},
+ "createTime": {
+ "type": "string"
+ },
+ "creatorName": {
+ "type": "string"
+ },
"endTime": {
"type": "string"
},
@@ -12676,6 +12699,9 @@
"type": "string"
},
"terms": {
+ "type": "string"
+ },
+ "updateTime": {
"type": "string"
}
}
@@ -12746,6 +12772,12 @@
"contactId": {
"type": "integer"
},
+ "createTime": {
+ "type": "string"
+ },
+ "creatorName": {
+ "type": "string"
+ },
"file": {
"type": "string"
},
@@ -12799,6 +12831,9 @@
},
"timelyRateId": {
"type": "integer"
+ },
+ "updateTime": {
+ "type": "string"
}
}
},
@@ -12834,6 +12869,12 @@
"contactId": {
"description": "鑱旂郴浜篿d",
"type": "integer"
+ },
+ "createTime": {
+ "type": "string"
+ },
+ "creatorName": {
+ "type": "string"
},
"expectTime": {
"description": "甯屾湜澶勭悊鏃堕棿",
@@ -12955,6 +12996,9 @@
"timeSpentId": {
"description": "鑺辫垂鏃堕棿",
"type": "integer"
+ },
+ "updateTime": {
+ "type": "string"
}
}
},
@@ -13876,6 +13920,14 @@
"bankAccountId": {
"description": "璐︽埛id",
"type": "integer"
+ },
+ "client": {
+ "description": "瀹㈡埛id",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.Client"
+ }
+ ]
},
"clientId": {
"description": "瀹㈡埛id",
@@ -16930,6 +16982,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..484cf0a 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"
@@ -12221,6 +12229,9 @@
"signTime": {
"type": "string"
},
+ "updateTime": {
+ "type": "string"
+ },
"wechatOrderStatus": {
"$ref": "#/definitions/model.WechatOrderStatus"
},
@@ -12374,6 +12385,9 @@
"$ref": "#/definitions/constvar.RefundSourceType"
}
]
+ },
+ "updateTime": {
+ "type": "string"
}
}
},
@@ -12453,6 +12467,9 @@
"$ref": "#/definitions/constvar.SalesReturnSourceType"
}
]
+ },
+ "updateTime": {
+ "type": "string"
}
}
},
@@ -12603,6 +12620,12 @@
"contactId": {
"type": "integer"
},
+ "createTime": {
+ "type": "string"
+ },
+ "creatorName": {
+ "type": "string"
+ },
"endTime": {
"type": "string"
},
@@ -12664,6 +12687,9 @@
"type": "string"
},
"terms": {
+ "type": "string"
+ },
+ "updateTime": {
"type": "string"
}
}
@@ -12734,6 +12760,12 @@
"contactId": {
"type": "integer"
},
+ "createTime": {
+ "type": "string"
+ },
+ "creatorName": {
+ "type": "string"
+ },
"file": {
"type": "string"
},
@@ -12787,6 +12819,9 @@
},
"timelyRateId": {
"type": "integer"
+ },
+ "updateTime": {
+ "type": "string"
}
}
},
@@ -12822,6 +12857,12 @@
"contactId": {
"description": "鑱旂郴浜篿d",
"type": "integer"
+ },
+ "createTime": {
+ "type": "string"
+ },
+ "creatorName": {
+ "type": "string"
},
"expectTime": {
"description": "甯屾湜澶勭悊鏃堕棿",
@@ -12943,6 +12984,9 @@
"timeSpentId": {
"description": "鑺辫垂鏃堕棿",
"type": "integer"
+ },
+ "updateTime": {
+ "type": "string"
}
}
},
@@ -13864,6 +13908,14 @@
"bankAccountId": {
"description": "璐︽埛id",
"type": "integer"
+ },
+ "client": {
+ "description": "瀹㈡埛id",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.Client"
+ }
+ ]
},
"clientId": {
"description": "瀹㈡埛id",
@@ -16918,6 +16970,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..a2e23cf 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
@@ -1415,6 +1419,8 @@
type: integer
signTime:
type: string
+ updateTime:
+ type: string
wechatOrderStatus:
$ref: '#/definitions/model.WechatOrderStatus'
wechatOrderStatusId:
@@ -1517,6 +1523,8 @@
allOf:
- $ref: '#/definitions/constvar.RefundSourceType'
description: 鏉ユ簮绫诲瀷锛�1閿�鍞��璐э級
+ updateTime:
+ type: string
type: object
model.SalesReturn:
properties:
@@ -1569,6 +1577,8 @@
allOf:
- $ref: '#/definitions/constvar.SalesReturnSourceType'
description: 婧愬崟绫诲瀷锛�1閿�鍞槑缁嗭級
+ updateTime:
+ type: string
type: object
model.SalesReturnStatus:
properties:
@@ -1670,6 +1680,10 @@
$ref: '#/definitions/model.Contact'
contactId:
type: integer
+ createTime:
+ type: string
+ creatorName:
+ type: string
endTime:
type: string
id:
@@ -1711,6 +1725,8 @@
startTime:
type: string
terms:
+ type: string
+ updateTime:
type: string
type: object
model.ServiceContractStatus:
@@ -1756,6 +1772,10 @@
$ref: '#/definitions/model.Contact'
contactId:
type: integer
+ createTime:
+ type: string
+ creatorName:
+ type: string
file:
type: string
id:
@@ -1792,6 +1812,8 @@
$ref: '#/definitions/model.TimelyRate'
timelyRateId:
type: integer
+ updateTime:
+ type: string
type: object
model.ServiceOrder:
properties:
@@ -1819,6 +1841,10 @@
contactId:
description: 鑱旂郴浜篿d
type: integer
+ createTime:
+ type: string
+ creatorName:
+ type: string
expectTime:
description: 甯屾湜澶勭悊鏃堕棿
type: string
@@ -1905,6 +1931,8 @@
timeSpentId:
description: 鑺辫垂鏃堕棿
type: integer
+ updateTime:
+ type: string
type: object
model.ServiceOrderStatus:
properties:
@@ -2523,6 +2551,10 @@
bankAccountId:
description: 璐︽埛id
type: integer
+ client:
+ allOf:
+ - $ref: '#/definitions/model.Client'
+ description: 瀹㈡埛id
clientId:
description: 瀹㈡埛id
type: integer
@@ -4613,6 +4645,10 @@
bankAccountId:
description: 璐︽埛id
type: integer
+ client:
+ allOf:
+ - $ref: '#/definitions/model.Client'
+ description: 瀹㈡埛id
clientId:
description: 瀹㈡埛id
type: integer
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