From fb1aeb80f0fbb8435e095a8c9471c6231b93dc24 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期二, 17 十月 2023 20:21:06 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/crm
---
model/index.go | 1 +
api/v1/contact.go | 16 ++++++++--------
model/request/contact.go | 36 +++++++++++++++++-------------------
3 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/api/v1/contact.go b/api/v1/contact.go
index 6c60e46..2a6b72e 100644
--- a/api/v1/contact.go
+++ b/api/v1/contact.go
@@ -46,13 +46,13 @@
ctx.Fail(errCode)
return
}
- if params.CodeRule.Method == 1 {
- autoCode := model.GetAutoCode(contact.Id, ¶ms.CodeRule)
- m := map[string]interface{}{
- "number": autoCode,
- }
- _ = model.NewContactSearch(nil).SetId(contact.Id).UpdateByMap(m)
- }
+ //if params.CodeRule.Method == 1 {
+ // autoCode := model.GetAutoCode(contact.Id, ¶ms.CodeRule)
+ // m := map[string]interface{}{
+ // "number": autoCode,
+ // }
+ // _ = model.NewContactSearch(nil).SetId(contact.Id).UpdateByMap(m)
+ //}
ctx.Ok()
}
@@ -157,7 +157,7 @@
contact.Birthday = t
contact.Wechat = params.Wechat
contact.IsFirst = params.IsFirst
- contact.CodeStandID = params.CodeStandID
+ //contact.CodeStandID = params.CodeStandID
return ecode.OK, contact
}
diff --git a/model/index.go b/model/index.go
index 96b6ab8..79e158f 100644
--- a/model/index.go
+++ b/model/index.go
@@ -93,6 +93,7 @@
CourierCompany{},
InvoiceStatus{},
InvoiceType{},
+ Invoice{},
)
return err
}
diff --git a/model/request/contact.go b/model/request/contact.go
index 84dd141..072d995 100644
--- a/model/request/contact.go
+++ b/model/request/contact.go
@@ -1,29 +1,27 @@
package request
-import "aps_crm/proto/code"
-
type AddContact struct {
Contact
}
type Contact struct {
- Name string `json:"name"` // 鑱旂郴浜哄悕绉�
- Number string `json:"number"` // 鑱旂郴浜虹紪鍙�
- MemberId int `json:"member_id"` // 鎵�灞炴垚鍛業D
- ClientId int `json:"client_id"` // 鎵�灞炲叕鍙窱D
- Position string `json:"position"` // 鑱屼綅
- Phone string `json:"phone"` // 鎵嬫満鍙�
- IsFirst bool `json:"is_first"` // 鏄惁棣栬鑱旂郴浜�
- Wechat string `json:"wechat"` // 寰俊鍙�
- Birthday string `json:"birthday" example:"1970-01-01 08:00:00"` // 鐢熸棩
- Email string `json:"email"` // 閭
- Desc string `json:"desc"` // 澶囨敞
- CountryId int `json:"country_id"` // 鍥藉ID
- ProvinceId int `json:"province_id"` // 鐪佷唤ID
- CityId int `json:"city_id"` // 鍩庡競ID
- RegionId int `json:"region_id"` // 鍖哄煙ID
- CodeStandID string `json:"codeStandID"` //缂栫爜id
- CodeRule code.CodeStandard `json:"codeRule"`
+ Name string `json:"name"` // 鑱旂郴浜哄悕绉�
+ Number string `json:"number"` // 鑱旂郴浜虹紪鍙�
+ MemberId int `json:"member_id"` // 鎵�灞炴垚鍛業D
+ ClientId int `json:"client_id"` // 鎵�灞炲叕鍙窱D
+ Position string `json:"position"` // 鑱屼綅
+ Phone string `json:"phone"` // 鎵嬫満鍙�
+ IsFirst bool `json:"is_first"` // 鏄惁棣栬鑱旂郴浜�
+ Wechat string `json:"wechat"` // 寰俊鍙�
+ Birthday string `json:"birthday" example:"1970-01-01 08:00:00"` // 鐢熸棩
+ Email string `json:"email"` // 閭
+ Desc string `json:"desc"` // 澶囨敞
+ CountryId int `json:"country_id"` // 鍥藉ID
+ ProvinceId int `json:"province_id"` // 鐪佷唤ID
+ CityId int `json:"city_id"` // 鍩庡競ID
+ RegionId int `json:"region_id"` // 鍖哄煙ID
+ //CodeStandID string `json:"codeStandID"` //缂栫爜id
+ //CodeRule code.CodeStandard `json:"codeRule"`
}
type UpdateContact struct {
--
Gitblit v1.8.0