Browse Source

customer remark router

胡轶钦 6 years ago
parent
commit
044c893f12

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

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

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

5
 )
5
 )
6
 
6
 
7
 type TaSaleCustomerRemark struct {
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
 	"spaceofcheng/services/controllers/coupon"
7
 	"spaceofcheng/services/controllers/coupon"
8
 	"spaceofcheng/services/controllers/course"
8
 	"spaceofcheng/services/controllers/course"
9
 	"spaceofcheng/services/controllers/customer"
9
 	"spaceofcheng/services/controllers/customer"
10
+	"spaceofcheng/services/controllers/customerremark"
10
 	"spaceofcheng/services/controllers/flashbuy"
11
 	"spaceofcheng/services/controllers/flashbuy"
11
 	"spaceofcheng/services/controllers/goods"
12
 	"spaceofcheng/services/controllers/goods"
12
 	"spaceofcheng/services/controllers/gymcard"
13
 	"spaceofcheng/services/controllers/gymcard"
97
 		beego.NSRouter("/flashbuy/:customerId", &flashbuy.FlashBuyController{}, "get:GetCustomerFlashBuyByCustomerId"),
98
 		beego.NSRouter("/flashbuy/:customerId", &flashbuy.FlashBuyController{}, "get:GetCustomerFlashBuyByCustomerId"),
98
 		beego.NSRouter("/flashbuy/:customerFlashBuyId", &flashbuy.FlashBuyController{}, "get:GetCustomerFlashBuyId"),
99
 		beego.NSRouter("/flashbuy/:customerFlashBuyId", &flashbuy.FlashBuyController{}, "get:GetCustomerFlashBuyId"),
99
 		beego.NSRouter("/flashbuy/:id", &flashbuy.FlashBuyController{}, "post:FlashBuy"),
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
 }