更新
This commit is contained in:
1 parent
5718a00e31
commit
1850ac640e
226 files changed
+37772
-12071
No files matched your search
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
"server/pkg/identity"
|
||||
)
|
||||
|
||||
// BackendCrmContractController CRM 合同管理
|
||||
@@ -68,7 +69,8 @@ type contractResp struct {
|
||||
func (c *BackendCrmContractController) 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)
|
||||
@@ -176,7 +178,8 @@ func (c *BackendCrmContractController) List() {
|
||||
func (c *BackendCrmContractController) Stats() {
|
||||
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)
|
||||
@@ -249,7 +252,8 @@ func periodRange(period string) (string, string) {
|
||||
func (c *BackendCrmContractController) 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)
|
||||
@@ -281,7 +285,8 @@ func (c *BackendCrmContractController) Detail() {
|
||||
func (c *BackendCrmContractController) 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)
|
||||
@@ -380,7 +385,8 @@ func (c *BackendCrmContractController) Create() {
|
||||
func (c *BackendCrmContractController) 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)
|
||||
@@ -495,7 +501,8 @@ func (c *BackendCrmContractController) Update() {
|
||||
func (c *BackendCrmContractController) 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)
|
||||
@@ -537,7 +544,8 @@ func (c *BackendCrmContractController) Delete() {
|
||||
func (c *BackendCrmContractController) ChangeStatus() {
|
||||
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