From 1041c15ba9f55e1be4078fc24cef9acfbc0a4326 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期三, 09 八月 2023 17:02:05 +0800 Subject: [PATCH] fix --- constvar/const.go | 256 +++++++++++++++++++++++++------------------------- model/client.go | 2 docs/swagger.yaml | 8 + docs/docs.go | 9 + docs/swagger.json | 9 + model/request/assign.go | 14 +- 6 files changed, 151 insertions(+), 147 deletions(-) diff --git a/constvar/const.go b/constvar/const.go index b73c7f0..2f599d8 100644 --- a/constvar/const.go +++ b/constvar/const.go @@ -1,128 +1,128 @@ -package constvar - -type UserStatus int - -const ( - UserBan UserStatus = iota - UserAlive - UserExamineIng -) - -type DeviceStatus int - -const ( - DeviceAll DeviceStatus = iota + 1 - DeviceAlive - DeviceOffline -) - -type ClusterStatus int - -const ( - ClusterAll ClusterStatus = iota + 1 - ClusterAlive - ClusterOffline -) - -type UserType int - -const ( - UserTypeSuper UserType = iota + 1 // 瓒呯骇绠$悊鍛� - UserTypePrimary // 涓昏处鎴� - UserTypeSub // 瀛愯处鎴� -) - -type SalesStatus int - -const ( - SalesStatusFail SalesStatus = -1 // 澶辫触 - SalesStatusNew SalesStatus = iota // 鏂板缓 - SalesStatusIng // 杩涜涓� - SalesStatusSuccess // 鎴愬姛 - SalesStatusLevelUptoClient // 鍗囩骇涓哄鎴� - SalesStatusLevelUptoClientAndSalesChance // 鍗囩骇涓哄鎴峰苟涓旀湁閿�鍞満浼� -) - -type CurrencyType int - -const ( - CurrencyTypeCNY CurrencyType = iota + 1 // 浜烘皯甯� - CurrencyTypeUSD // 缇庡厓 - CurrencyTypeEUR // 娆у厓 - CurrencyTypeGBP // 鑻遍晳 -) - -type MenuType string - -const ( - MenuTypeClient MenuType = "client" -) - -type VettingType int - -const ( - VettingTypeClient VettingType = iota + 1 - VettingTypeSales - VettingTypeSalesChance - VettingTypeSalesChanceFollow -) - -type ServiceContractQueryClass string - -const ( - ServiceContractQueryClassExpireAfter30Day ServiceContractQueryClass = "30澶╁悗杩囨湡" - ServiceContractQueryClassExpireAfter60Day ServiceContractQueryClass = "60澶╁悗杩囨湡" - ServiceContractQueryClassExpiredBefore15Day ServiceContractQueryClass = "宸茶繃鏈�15澶�" - ServiceContractQueryClassExpiredBefore60Day ServiceContractQueryClass = "宸茶繃鏈�60澶�" -) - -type ServiceContractKeywordType string - -const ( - ServiceContractKeywordContractNo ServiceContractKeywordType = "鏈嶅姟鍚堝悓缂栧彿" - ServiceContractKeywordCustomerName ServiceContractKeywordType = "瀹㈡埛鍚嶇О" - ServiceContractKeywordContractDate ServiceContractKeywordType = "绛剧害鏃ユ湡" - ServiceContractKeywordContractType ServiceContractKeywordType = "鍚堝悓绫诲瀷" - ServiceContractKeywordContractStatus ServiceContractKeywordType = "鍚堝悓鐘舵��" - ServiceContractKeywordPrincipal ServiceContractKeywordType = "璐熻矗浜�" - ServiceContractKeywordProductName ServiceContractKeywordType = "浜у搧鍚嶇О" - ServiceContractKeywordServiceBeginDate ServiceContractKeywordType = "鏈嶅姟寮�濮嬫棩" - ServiceContractKeywordServiceEndDate ServiceContractKeywordType = "鏈嶅姟鍒版湡鏃�" - ServiceContractKeywordServiceTotalPrice ServiceContractKeywordType = "浠风◣鍚堣" -) - -type ServiceFollowupKeywordType string - -const ( - ServiceFollowupKeywordFollowupNo ServiceFollowupKeywordType = "鍥炶鍗曠紪鍙�" - ServiceFollowupKeywordCustomerName ServiceFollowupKeywordType = "瀹㈡埛鍚嶇О" - ServiceFollowupKeywordContactName ServiceFollowupKeywordType = "鑱旂郴浜哄鍚�" - ServiceFollowupKeywordCustomerServiceNo ServiceFollowupKeywordType = "瀹㈡埛鏈嶅姟鍗�" - ServiceFollowupKeywordVisitor ServiceFollowupKeywordType = "鍥炶浜�" - ServiceFollowupKeywordSatisfactionDegree ServiceFollowupKeywordType = "婊℃剰搴�" -) - -type ServiceFeeQueryClass string - -const ( - ServiceFeeQueryClassExpireLessThen60Days ServiceFeeQueryClass = "杩囨湡鏈弧60澶�" - ServiceFeeQueryClassExpireLessThen30Days ServiceFeeQueryClass = "杩囨湡鏈弧30澶�" - ServiceFeeQueryClassExpireAboutTo60Day ServiceFeeQueryClass = "鍗冲皢杩囨湡60澶�" - ServiceFeeQueryClassExpireAboutTo30Day ServiceFeeQueryClass = "鍗冲皢杩囨湡30澶�" - ServiceFeeQueryClassExpired ServiceFeeQueryClass = "宸茶繃鏈�" - ServiceFeeQueryClassNoService ServiceFeeQueryClass = "鏃犳湇鍔�" -) - -type ServiceFeeKeywordType string - -const ( - ServiceFeeKeywordCustomerName ServiceFeeKeywordType = "瀹㈡埛鍚嶇О" - ServiceFeeKeywordCustomerType ServiceFeeKeywordType = "瀹㈡埛绫诲瀷" - ServiceFeeKeywordSalesPrincipal ServiceFeeKeywordType = "閿�鍞礋璐d汉" - ServiceFeeKeywordCustomerScale ServiceFeeKeywordType = "瀹㈡埛瑙勬ā" - ServiceFeeKeywordClientLevel ServiceFeeKeywordType = "閲嶈绾у埆" - ServiceFeeKeywordCustomerNo ServiceFeeKeywordType = "瀹㈡埛缂栧彿" - ServiceFeeKeywordCustomerStatus ServiceFeeKeywordType = "瀹㈡埛鐘舵��" - ServiceFeeKeywordProductName ServiceFeeKeywordType = "浜у搧鍚嶇О" - ServiceFeeKeywordServiceEndDate ServiceFeeKeywordType = "鏈嶅姟鍒版湡鏃�" -) +package constvar + +type UserStatus int + +const ( + UserBan UserStatus = iota + UserAlive + UserExamineIng +) + +type DeviceStatus int + +const ( + DeviceAll DeviceStatus = iota + 1 + DeviceAlive + DeviceOffline +) + +type ClusterStatus int + +const ( + ClusterAll ClusterStatus = iota + 1 + ClusterAlive + ClusterOffline +) + +type UserType int + +const ( + UserTypeSuper UserType = iota + 1 // 瓒呯骇绠$悊鍛� + UserTypePrimary // 涓昏处鎴� + UserTypeSub // 瀛愯处鎴� +) + +type SalesStatus int + +const ( + SalesStatusNew SalesStatus = iota // 鏂板缓 + SalesStatusIng // 杩涜涓� + SalesStatusSuccess // 鎴愬姛 + SalesStatusLevelUptoClient // 鍗囩骇涓哄鎴� + SalesStatusLevelUptoClientAndSalesChance // 鍗囩骇涓哄鎴峰苟涓旀湁閿�鍞満浼� + SalesStatusFail SalesStatus = -1 // 澶辫触 +) + +type CurrencyType int + +const ( + CurrencyTypeCNY CurrencyType = iota + 1 // 浜烘皯甯� + CurrencyTypeUSD // 缇庡厓 + CurrencyTypeEUR // 娆у厓 + CurrencyTypeGBP // 鑻遍晳 +) + +type MenuType string + +const ( + MenuTypeClient MenuType = "client" +) + +type VettingType int + +const ( + VettingTypeClient VettingType = iota + 1 + VettingTypeSales + VettingTypeSalesChance + VettingTypeSalesChanceFollow +) + +type ServiceContractQueryClass string + +const ( + ServiceContractQueryClassExpireAfter30Day ServiceContractQueryClass = "30澶╁悗杩囨湡" + ServiceContractQueryClassExpireAfter60Day ServiceContractQueryClass = "60澶╁悗杩囨湡" + ServiceContractQueryClassExpiredBefore15Day ServiceContractQueryClass = "宸茶繃鏈�15澶�" + ServiceContractQueryClassExpiredBefore60Day ServiceContractQueryClass = "宸茶繃鏈�60澶�" +) + +type ServiceContractKeywordType string + +const ( + ServiceContractKeywordContractNo ServiceContractKeywordType = "鏈嶅姟鍚堝悓缂栧彿" + ServiceContractKeywordCustomerName ServiceContractKeywordType = "瀹㈡埛鍚嶇О" + ServiceContractKeywordContractDate ServiceContractKeywordType = "绛剧害鏃ユ湡" + ServiceContractKeywordContractType ServiceContractKeywordType = "鍚堝悓绫诲瀷" + ServiceContractKeywordContractStatus ServiceContractKeywordType = "鍚堝悓鐘舵��" + ServiceContractKeywordPrincipal ServiceContractKeywordType = "璐熻矗浜�" + ServiceContractKeywordProductName ServiceContractKeywordType = "浜у搧鍚嶇О" + ServiceContractKeywordServiceBeginDate ServiceContractKeywordType = "鏈嶅姟寮�濮嬫棩" + ServiceContractKeywordServiceEndDate ServiceContractKeywordType = "鏈嶅姟鍒版湡鏃�" + ServiceContractKeywordServiceTotalPrice ServiceContractKeywordType = "浠风◣鍚堣" +) + +type ServiceFollowupKeywordType string + +const ( + ServiceFollowupKeywordFollowupNo ServiceFollowupKeywordType = "鍥炶鍗曠紪鍙�" + ServiceFollowupKeywordCustomerName ServiceFollowupKeywordType = "瀹㈡埛鍚嶇О" + ServiceFollowupKeywordContactName ServiceFollowupKeywordType = "鑱旂郴浜哄鍚�" + ServiceFollowupKeywordCustomerServiceNo ServiceFollowupKeywordType = "瀹㈡埛鏈嶅姟鍗�" + ServiceFollowupKeywordVisitor ServiceFollowupKeywordType = "鍥炶浜�" + ServiceFollowupKeywordSatisfactionDegree ServiceFollowupKeywordType = "婊℃剰搴�" +) + +type ServiceFeeQueryClass string + +const ( + ServiceFeeQueryClassExpireLessThen60Days ServiceFeeQueryClass = "杩囨湡鏈弧60澶�" + ServiceFeeQueryClassExpireLessThen30Days ServiceFeeQueryClass = "杩囨湡鏈弧30澶�" + ServiceFeeQueryClassExpireAboutTo60Day ServiceFeeQueryClass = "鍗冲皢杩囨湡60澶�" + ServiceFeeQueryClassExpireAboutTo30Day ServiceFeeQueryClass = "鍗冲皢杩囨湡30澶�" + ServiceFeeQueryClassExpired ServiceFeeQueryClass = "宸茶繃鏈�" + ServiceFeeQueryClassNoService ServiceFeeQueryClass = "鏃犳湇鍔�" +) + +type ServiceFeeKeywordType string + +const ( + ServiceFeeKeywordCustomerName ServiceFeeKeywordType = "瀹㈡埛鍚嶇О" + ServiceFeeKeywordCustomerType ServiceFeeKeywordType = "瀹㈡埛绫诲瀷" + ServiceFeeKeywordSalesPrincipal ServiceFeeKeywordType = "閿�鍞礋璐d汉" + ServiceFeeKeywordCustomerScale ServiceFeeKeywordType = "瀹㈡埛瑙勬ā" + ServiceFeeKeywordClientLevel ServiceFeeKeywordType = "閲嶈绾у埆" + ServiceFeeKeywordCustomerNo ServiceFeeKeywordType = "瀹㈡埛缂栧彿" + ServiceFeeKeywordCustomerStatus ServiceFeeKeywordType = "瀹㈡埛鐘舵��" + ServiceFeeKeywordProductName ServiceFeeKeywordType = "浜у搧鍚嶇О" + ServiceFeeKeywordServiceEndDate ServiceFeeKeywordType = "鏈嶅姟鍒版湡鏃�" +) diff --git a/docs/docs.go b/docs/docs.go index 9be43ac..8e464c9 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -9659,12 +9659,12 @@ "constvar.SalesStatus": { "type": "integer", "enum": [ - -1, + 0, 1, 2, 3, 4, - 5 + -1 ], "x-enum-comments": { "SalesStatusFail": "澶辫触", @@ -9675,12 +9675,12 @@ "SalesStatusSuccess": "鎴愬姛" }, "x-enum-varnames": [ - "SalesStatusFail", "SalesStatusNew", "SalesStatusIng", "SalesStatusSuccess", "SalesStatusLevelUptoClient", - "SalesStatusLevelUptoClientAndSalesChance" + "SalesStatusLevelUptoClientAndSalesChance", + "SalesStatusFail" ] }, "constvar.ServiceContractKeywordType": { @@ -13346,6 +13346,7 @@ "type": "integer" }, "type": { + "description": "绫诲瀷: client: 瀹㈡埛; salesLead: 閿�鍞嚎绱�; contact: 鑱旂郴浜�; followRecord: 璺熻繘璁板綍", "type": "string" } } diff --git a/docs/swagger.json b/docs/swagger.json index ab6def1..4be0e23 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -9647,12 +9647,12 @@ "constvar.SalesStatus": { "type": "integer", "enum": [ - -1, + 0, 1, 2, 3, 4, - 5 + -1 ], "x-enum-comments": { "SalesStatusFail": "澶辫触", @@ -9663,12 +9663,12 @@ "SalesStatusSuccess": "鎴愬姛" }, "x-enum-varnames": [ - "SalesStatusFail", "SalesStatusNew", "SalesStatusIng", "SalesStatusSuccess", "SalesStatusLevelUptoClient", - "SalesStatusLevelUptoClientAndSalesChance" + "SalesStatusLevelUptoClientAndSalesChance", + "SalesStatusFail" ] }, "constvar.ServiceContractKeywordType": { @@ -13334,6 +13334,7 @@ "type": "integer" }, "type": { + "description": "绫诲瀷: client: 瀹㈡埛; salesLead: 閿�鍞嚎绱�; contact: 鑱旂郴浜�; followRecord: 璺熻繘璁板綍", "type": "string" } } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 9c4a623..4b9f789 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -116,12 +116,12 @@ - ReceiptQueryClassExpireLessThen60Days constvar.SalesStatus: enum: - - -1 + - 0 - 1 - 2 - 3 - 4 - - 5 + - -1 type: integer x-enum-comments: SalesStatusFail: 澶辫触 @@ -131,12 +131,12 @@ SalesStatusNew: 鏂板缓 SalesStatusSuccess: 鎴愬姛 x-enum-varnames: - - SalesStatusFail - SalesStatusNew - SalesStatusIng - SalesStatusSuccess - SalesStatusLevelUptoClient - SalesStatusLevelUptoClientAndSalesChance + - SalesStatusFail constvar.ServiceContractKeywordType: enum: - 鏈嶅姟鍚堝悓缂栧彿 @@ -2614,6 +2614,8 @@ member_id: type: integer type: + description: '绫诲瀷: client: 瀹㈡埛; salesLead: 閿�鍞嚎绱�; contact: 鑱旂郴浜�; followRecord: + 璺熻繘璁板綍' type: string type: object request.CasbinInfo: diff --git a/model/client.go b/model/client.go index 25c3935..7cec5b9 100644 --- a/model/client.go +++ b/model/client.go @@ -174,7 +174,7 @@ db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize) } - err := db.Preload("ClientStatus").Preload("ClientType").Preload("ClientOrigin").Preload("ClientLevel").Preload("FollowRecord").Preload("EnterpriseNature").Preload("RegisteredCapital").Preload("Industry").Preload("EnterpriseScale").Preload("Contacts").Preload("Country").Preload("Province").Preload("City").Preload("Region").Find(&records).Error + err := db.Preload("Member").Preload("ClientStatus").Preload("ClientType").Preload("ClientOrigin").Preload("ClientLevel").Preload("FollowRecord").Preload("EnterpriseNature").Preload("RegisteredCapital").Preload("Industry").Preload("EnterpriseScale").Preload("Contacts").Preload("Country").Preload("Province").Preload("City").Preload("Region").Find(&records).Error return records, total, err } diff --git a/model/request/assign.go b/model/request/assign.go index 2c59c05..47f61f3 100644 --- a/model/request/assign.go +++ b/model/request/assign.go @@ -1,7 +1,7 @@ -package request - -type Assign struct { - MemberId int `json:"member_id"` - Type string `json:"type"` - Ids []int `json:"ids"` -} +package request + +type Assign struct { + MemberId int `json:"member_id"` + Type string `json:"type"` // 绫诲瀷: client: 瀹㈡埛; salesLead: 閿�鍞嚎绱�; contact: 鑱旂郴浜�; followRecord: 璺熻繘璁板綍 + Ids []int `json:"ids"` +} -- Gitblit v1.8.0