From 178b28d858d7d155dadd20a018920ccdcbd08992 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期五, 18 八月 2023 10:14:57 +0800 Subject: [PATCH] add temp --- api/v1/client.go | 8 ++++ model/client.go | 3 + docs/swagger.yaml | 20 ++++++++++ docs/docs.go | 16 ++++++++ docs/swagger.json | 16 ++++++++ 5 files changed, 62 insertions(+), 1 deletions(-) diff --git a/api/v1/client.go b/api/v1/client.go index b354d14..e2c09de 100644 --- a/api/v1/client.go +++ b/api/v1/client.go @@ -32,6 +32,14 @@ return } + //CreatorId, b := c.Get("claims") + //if !b { + // ctx.Fail(ecode.JWTParseErr) + // return + //} + // + //client.CreatorId = CreatorId.(int) + errCode = clientService.AddClient(client, params.SalesLeadsId) if errCode != ecode.OK { ctx.Fail(errCode) diff --git a/docs/docs.go b/docs/docs.go index 8e316af..aa37bdd 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -10751,6 +10751,10 @@ "model.Client": { "type": "object", "properties": { + "_": { + "description": "The date when the item was deleted\nexample: 2023-08-10 15:48:25", + "type": "string" + }, "business_scope": { "type": "string" }, @@ -10796,6 +10800,13 @@ "country_id": { "type": "integer" }, + "created_at": { + "description": "The date when the item was created\nexample: 2023-08-10 15:48:25", + "type": "string" + }, + "creator_id": { + "type": "integer" + }, "detail_address": { "type": "string" }, @@ -10818,6 +10829,7 @@ } }, "id": { + "description": "The ID of the item\nexample: 1", "type": "integer" }, "industry": { @@ -10873,6 +10885,10 @@ }, "service_member_id": { "type": "integer" + }, + "updated_at": { + "description": "The date when the item was last updated\nexample: 2023-08-10 15:48:25", + "type": "string" } } }, diff --git a/docs/swagger.json b/docs/swagger.json index e93cf4a..d82848e 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -10739,6 +10739,10 @@ "model.Client": { "type": "object", "properties": { + "_": { + "description": "The date when the item was deleted\nexample: 2023-08-10 15:48:25", + "type": "string" + }, "business_scope": { "type": "string" }, @@ -10784,6 +10788,13 @@ "country_id": { "type": "integer" }, + "created_at": { + "description": "The date when the item was created\nexample: 2023-08-10 15:48:25", + "type": "string" + }, + "creator_id": { + "type": "integer" + }, "detail_address": { "type": "string" }, @@ -10806,6 +10817,7 @@ } }, "id": { + "description": "The ID of the item\nexample: 1", "type": "integer" }, "industry": { @@ -10861,6 +10873,10 @@ }, "service_member_id": { "type": "integer" + }, + "updated_at": { + "description": "The date when the item was last updated\nexample: 2023-08-10 15:48:25", + "type": "string" } } }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 7ec1d54..3ae14c2 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -439,6 +439,11 @@ type: object model.Client: properties: + _: + description: |- + The date when the item was deleted + example: 2023-08-10 15:48:25 + type: string business_scope: type: string city: @@ -469,6 +474,13 @@ $ref: '#/definitions/model.Country' country_id: type: integer + created_at: + description: |- + The date when the item was created + example: 2023-08-10 15:48:25 + type: string + creator_id: + type: integer detail_address: type: string enterprise_nature_id: @@ -484,6 +496,9 @@ $ref: '#/definitions/model.FollowRecord' type: array id: + description: |- + The ID of the item + example: 1 type: integer industry: $ref: '#/definitions/model.Industry' @@ -521,6 +536,11 @@ type: string service_member_id: type: integer + updated_at: + description: |- + The date when the item was last updated + example: 2023-08-10 15:48:25 + type: string type: object model.ClientLevel: properties: diff --git a/model/client.go b/model/client.go index 7679299..084854d 100644 --- a/model/client.go +++ b/model/client.go @@ -27,12 +27,13 @@ ServiceMemberId int `json:"service_member_id" gorm:"column:service_member_id;type:int(11);comment:鏈嶅姟璐熻矗浜篒D"` DetailAddress string `json:"detail_address" gorm:"column:detail_address;type:varchar(255);comment:璇︾粏鍦板潃"` Remark string `json:"remark" gorm:"column:remark;type:varchar(255);comment:澶囨敞"` + CreatorId int `json:"creator_id" gorm:"column:creator_id;type:int;comment:鍒涘缓浜篿d"` NextVisitTime *CustomTime `json:"next_visit_time" gorm:"column:next_visit_time;type:datetime;comment:涓嬫鍥炶鏃堕棿"` LatestServiceTime *CustomTime `json:"latest_service_time" gorm:"column:latest_service_time;type:datetime;comment:鏈�鏅氭湇鍔℃椂闂�"` FollowRecord []FollowRecord `json:"follow_record" gorm:"foreignKey:ClientId"` Address Business - gorm.Model `json:"-"` + gormModel } ClientSearch struct { -- Gitblit v1.8.0