Browse Source

customer remark router

胡轶钦 6 years ago
parent
commit
044c893f12

+ 1
- 1
models/customerremark/customerremark.go View File

@@ -55,7 +55,7 @@ WHERE
55 55
 }
56 56
 
57 57
 func (m *CustomerRemarkDAO) AddRemark(remark model.TaSaleCustomerRemark) (*model.TaSaleCustomerRemark, error) {
58
-	remark.SaleCustomerRemarkId = utils.GetGUID()
58
+	remark.SalesCustomerRemarkId = utils.GetGUID()
59 59
 	remark.CreateDate = time.Now()
60 60
 	remark.Status = models.STATUS_NORMAL
61 61
 	_, err := m.db.Insert(remark)

+ 6
- 6
models/model/ta_sale_customer_remark.go View File

@@ -5,10 +5,10 @@ import (
5 5
 )
6 6
 
7 7
 type TaSaleCustomerRemark struct {
8
-	SalesCustomerRemark string    `xorm:"not null VARCHAR(64)"`
9
-	SaleCustomerId      string    `xorm:"VARCHAR(64)"`
10
-	RemarkTitle         string    `xorm:"VARCHAR(256)"`
11
-	Remark              string    `xorm:"TEXT"`
12
-	CreateDate          time.Time `xorm:"DATETIME"`
13
-	Status              int       `xorm:"SMALLINT(6)"`
8
+	SalesCustomerRemarkId string    `xorm:"not null VARCHAR(64)"`
9
+	SaleCustomerId        string    `xorm:"VARCHAR(64)"`
10
+	RemarkTitle           string    `xorm:"VARCHAR(256)"`
11
+	Remark                string    `xorm:"TEXT"`
12
+	CreateDate            time.Time `xorm:"DATETIME"`
13
+	Status                int       `xorm:"SMALLINT(6)"`
14 14
 }

+ 7
- 0
routers/wechat.go View File

@@ -7,6 +7,7 @@ import (
7 7
 	"spaceofcheng/services/controllers/coupon"
8 8
 	"spaceofcheng/services/controllers/course"
9 9
 	"spaceofcheng/services/controllers/customer"
10
+	"spaceofcheng/services/controllers/customerremark"
10 11
 	"spaceofcheng/services/controllers/flashbuy"
11 12
 	"spaceofcheng/services/controllers/goods"
12 13
 	"spaceofcheng/services/controllers/gymcard"
@@ -97,5 +98,11 @@ func getWechatRoutes(prefix string) beego.LinkNamespace {
97 98
 		beego.NSRouter("/flashbuy/:customerId", &flashbuy.FlashBuyController{}, "get:GetCustomerFlashBuyByCustomerId"),
98 99
 		beego.NSRouter("/flashbuy/:customerFlashBuyId", &flashbuy.FlashBuyController{}, "get:GetCustomerFlashBuyId"),
99 100
 		beego.NSRouter("/flashbuy/:id", &flashbuy.FlashBuyController{}, "post:FlashBuy"),
101
+
102
+		// 客户备注
103
+		beego.NSRouter("/customerremark/record/:salesId/:customerId", &customerremark.CustomerRemarkController{}, "get:GetCustomerReceiveRecord"),
104
+		beego.NSRouter("/customerremark/:salesId/:customerId", &customerremark.CustomerRemarkController{}, "get:GetCustomerRemarkList"),
105
+		beego.NSRouter("/customerremark/:salesId/:customerInfo", &customerremark.CustomerRemarkController{}, "get:SearchCustomer"),
106
+		beego.NSRouter("/customerremark", &customerremark.CustomerRemarkController{}, "post:AddRemark"),
100 107
 	)
101 108
 }