更新
This commit is contained in:
1 parent
5718a00e31
commit
1850ac640e
226 files changed
+37772
-12071
No files matched your search
@@ -9,6 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
"server/models"
|
||||
"server/pkg/identity"
|
||||
"server/services"
|
||||
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
@@ -93,7 +94,8 @@ type paybackProgress struct {
|
||||
func (c *BackendCrmPaybackController) 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)
|
||||
@@ -193,7 +195,8 @@ func (c *BackendCrmPaybackController) List() {
|
||||
func (c *BackendCrmPaybackController) Detail() {
|
||||
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
|
||||
}
|
||||
id, _ := strconv.ParseUint(c.Ctx.Input.Param(":id"), 10, 64)
|
||||
@@ -215,7 +218,8 @@ func (c *BackendCrmPaybackController) Detail() {
|
||||
func (c *BackendCrmPaybackController) Create() {
|
||||
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)
|
||||
@@ -286,7 +290,8 @@ func (c *BackendCrmPaybackController) Create() {
|
||||
func (c *BackendCrmPaybackController) Update() {
|
||||
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
|
||||
}
|
||||
id, _ := strconv.ParseUint(c.Ctx.Input.Param(":id"), 10, 64)
|
||||
@@ -382,7 +387,8 @@ func (c *BackendCrmPaybackController) Update() {
|
||||
func (c *BackendCrmPaybackController) 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
|
||||
}
|
||||
id, _ := strconv.ParseUint(c.Ctx.Input.Param(":id"), 10, 64)
|
||||
@@ -428,7 +434,8 @@ func (c *BackendCrmPaybackController) Delete() {
|
||||
func (c *BackendCrmPaybackController) ProgressList() {
|
||||
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
|
||||
}
|
||||
tenantID := pipelineTenantID(claims)
|
||||
@@ -498,7 +505,8 @@ func (c *BackendCrmPaybackController) ProgressList() {
|
||||
func (c *BackendCrmPaybackController) Receive() {
|
||||
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
|
||||
}
|
||||
id, _ := strconv.ParseUint(c.Ctx.Input.Param(":id"), 10, 64)
|
||||
@@ -735,7 +743,8 @@ func formatAmount(n float64) string {
|
||||
func (c *BackendCrmPaybackController) RecordList() {
|
||||
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
|
||||
}
|
||||
tenantID := pipelineTenantID(claims)
|
||||
@@ -780,7 +789,8 @@ func (c *BackendCrmPaybackController) RecordList() {
|
||||
func (c *BackendCrmPaybackController) CreateRecord() {
|
||||
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)
|
||||
@@ -882,7 +892,8 @@ func (c *BackendCrmPaybackController) CreateRecord() {
|
||||
func (c *BackendCrmPaybackController) DeleteRecord() {
|
||||
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
|
||||
}
|
||||
id, _ := strconv.ParseUint(c.Ctx.Input.Param(":id"), 10, 64)
|
||||
@@ -926,7 +937,8 @@ func (c *BackendCrmPaybackController) DeleteRecord() {
|
||||
func (c *BackendCrmPaybackController) UpdateRecord() {
|
||||
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
|
||||
}
|
||||
id, _ := strconv.ParseUint(c.Ctx.Input.Param(":id"), 10, 64)
|
||||
|
||||
Reference in new issue
Block a user