|
@@ -17,7 +17,7 @@ import (
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func CreateExaCustomer(c *gin.Context) {
|
|
|
var cu model.ExaCustomer
|
|
|
_ = c.ShouldBindJSON(&cu)
|
|
@@ -40,7 +40,7 @@ func CreateExaCustomer(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func DeleteExaCustomer(c *gin.Context) {
|
|
|
var cu model.ExaCustomer
|
|
|
_ = c.ShouldBindJSON(&cu)
|
|
@@ -59,7 +59,7 @@ func DeleteExaCustomer(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func UpdateExaCustomer(c *gin.Context) {
|
|
|
var cu model.ExaCustomer
|
|
|
_ = c.ShouldBindJSON(&cu)
|
|
@@ -78,10 +78,10 @@ func UpdateExaCustomer(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func GetExaCustomer(c *gin.Context) {
|
|
|
var cu model.ExaCustomer
|
|
|
- _ = c.ShouldBindJSON(&cu)
|
|
|
+ _ = c.ShouldBindQuery(&cu)
|
|
|
err, customer := service.GetExaCustomer(cu.ID)
|
|
|
if err != nil {
|
|
|
response.FailWithMessage(fmt.Sprintf("获取失败:%v", err), c)
|
|
@@ -97,12 +97,12 @@ func GetExaCustomer(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func GetExaCustomerList(c *gin.Context) {
|
|
|
claims, _ := c.Get("claims")
|
|
|
waitUse := claims.(*request.CustomClaims)
|
|
|
var pageInfo request.PageInfo
|
|
|
- _ = c.ShouldBindJSON(&pageInfo)
|
|
|
+ _ = c.ShouldBindQuery(&pageInfo)
|
|
|
err, customerList, total := service.GetCustomerInfoList(waitUse.AuthorityId, pageInfo)
|
|
|
if err != nil {
|
|
|
response.FailWithMessage(fmt.Sprintf("获取失败:%v", err), c)
|