This commit is contained in:
hero920103 committed 2026-10-19 01:13:17 +08:00
1 parent 5718a00e31
commit 1850ac640e
226 files changed
+37772 -12071

No files matched your search

+25 -12
View File
@@ -12,6 +12,7 @@ import (
"github.com/beego/beego/v2/client/orm"
beego "github.com/beego/beego/v2/server/web"
"server/pkg/identity"
)
// ============================== 回访 / 跟进记录 ==============================
@@ -25,7 +26,8 @@ type BackendCrmFollowController struct {
func (c *BackendCrmFollowController) List() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
page, _ := c.GetInt("page", 1)
@@ -118,7 +120,8 @@ type followPayload struct {
func (c *BackendCrmFollowController) Add() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
raw, _ := io.ReadAll(c.Ctx.Request.Body)
@@ -179,7 +182,8 @@ func (c *BackendCrmFollowController) Add() {
func (c *BackendCrmFollowController) Edit() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
raw, _ := io.ReadAll(c.Ctx.Request.Body)
@@ -223,7 +227,8 @@ func (c *BackendCrmFollowController) Edit() {
func (c *BackendCrmFollowController) Delete() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
var p struct {
@@ -279,7 +284,8 @@ type BackendCrmAttachController struct {
func (c *BackendCrmAttachController) List() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
relatedType := strings.TrimSpace(c.GetString("related_type"))
@@ -350,7 +356,8 @@ func (c *BackendCrmAttachController) List() {
func (c *BackendCrmAttachController) Add() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
var p struct {
@@ -402,7 +409,8 @@ func (c *BackendCrmAttachController) Add() {
func (c *BackendCrmAttachController) Delete() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
var p struct {
@@ -440,7 +448,8 @@ type BackendCrmEntityContactController struct {
func (c *BackendCrmEntityContactController) List() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
relatedType := strings.TrimSpace(c.GetString("related_type"))
@@ -503,7 +512,8 @@ type entityContactPayload struct {
func (c *BackendCrmEntityContactController) Add() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
raw := c.Ctx.Input.RequestBody
@@ -550,7 +560,8 @@ func (c *BackendCrmEntityContactController) Add() {
func (c *BackendCrmEntityContactController) Edit() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
raw := c.Ctx.Input.RequestBody
@@ -595,7 +606,8 @@ func (c *BackendCrmEntityContactController) Edit() {
func (c *BackendCrmEntityContactController) Delete() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
var p struct {
@@ -646,7 +658,8 @@ type BackendCrmOperateLogController struct {
func (c *BackendCrmOperateLogController) List() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
pipelineErr(&c.Controller, 401, 401, err.Error())
code := identity.Status(err)
pipelineErr(&c.Controller, code, code, err.Error())
return
}
relatedType := strings.TrimSpace(c.GetString("related_type"))