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

+15 -7
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"
)
// =============================================================
@@ -60,7 +61,8 @@ type tenderPayload struct {
func (c *BackendCrmBiddingTenderController) 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)
@@ -111,7 +113,8 @@ func (c *BackendCrmBiddingTenderController) List() {
func (c *BackendCrmBiddingTenderController) 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)
@@ -134,7 +137,8 @@ func (c *BackendCrmBiddingTenderController) Detail() {
func (c *BackendCrmBiddingTenderController) 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)
@@ -202,7 +206,8 @@ func (c *BackendCrmBiddingTenderController) Create() {
func (c *BackendCrmBiddingTenderController) 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)
@@ -284,7 +289,8 @@ func (c *BackendCrmBiddingTenderController) Update() {
func (c *BackendCrmBiddingTenderController) 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)
@@ -327,7 +333,8 @@ func (c *BackendCrmBiddingTenderController) Delete() {
func (c *BackendCrmBiddingTenderController) Award() {
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)
@@ -414,7 +421,8 @@ func (c *BackendCrmBiddingTenderController) Award() {
func (c *BackendCrmBiddingTenderController) AwardToContract() {
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)