更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -13,25 +13,10 @@ import (
|
||||
"server/pkg/identity"
|
||||
)
|
||||
|
||||
// =============================================================
|
||||
// CRM 招投标管理 - 子表 CRUD(统一接口)
|
||||
// =============================================================
|
||||
//
|
||||
// 每个子表控制器提供统一的接口:
|
||||
// - List 按外键 bid_id / tender_id 列出
|
||||
// - Create 新增(关联外键由请求体传入)
|
||||
// - Delete 软删除
|
||||
// - Update 更新(用于文件改名、任务进度等)
|
||||
// =============================================================
|
||||
|
||||
// ------------------------------ 投标文件 ------------------------------
|
||||
|
||||
// BackendCrmBiddingBidFileController 投标文件
|
||||
type BackendCrmBiddingBidFileController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
// bidFilePayload
|
||||
type bidFilePayload struct {
|
||||
BidID uint64 `json:"bid_id"`
|
||||
FileType string `json:"file_type"`
|
||||
@@ -45,7 +30,6 @@ type bidFilePayload struct {
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
// List GET /backend/crm/bidding/bid-file/list?bid_id=1
|
||||
func (c *BackendCrmBiddingBidFileController) List() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -67,7 +51,6 @@ func (c *BackendCrmBiddingBidFileController) List() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"list": list})
|
||||
}
|
||||
|
||||
// Create POST /backend/crm/bidding/bid-file
|
||||
func (c *BackendCrmBiddingBidFileController) Create() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -114,7 +97,6 @@ func (c *BackendCrmBiddingBidFileController) Create() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"id": id})
|
||||
}
|
||||
|
||||
// Delete DELETE /backend/crm/bidding/bid-file/:id
|
||||
func (c *BackendCrmBiddingBidFileController) Delete() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -142,9 +124,6 @@ func (c *BackendCrmBiddingBidFileController) Delete() {
|
||||
pipelineOk(&c.Controller, nil)
|
||||
}
|
||||
|
||||
// ------------------------------ 投标任务 ------------------------------
|
||||
|
||||
// BackendCrmBiddingBidTaskController 投标任务
|
||||
type BackendCrmBiddingBidTaskController struct {
|
||||
beego.Controller
|
||||
}
|
||||
@@ -164,7 +143,6 @@ type bidTaskPayload struct {
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
// List
|
||||
func (c *BackendCrmBiddingBidTaskController) List() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -186,7 +164,6 @@ func (c *BackendCrmBiddingBidTaskController) List() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"list": list})
|
||||
}
|
||||
|
||||
// Create
|
||||
func (c *BackendCrmBiddingBidTaskController) Create() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -233,7 +210,6 @@ func (c *BackendCrmBiddingBidTaskController) Create() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"id": id})
|
||||
}
|
||||
|
||||
// Update
|
||||
func (c *BackendCrmBiddingBidTaskController) Update() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -286,7 +262,6 @@ func (c *BackendCrmBiddingBidTaskController) Update() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"id": row.ID})
|
||||
}
|
||||
|
||||
// Delete
|
||||
func (c *BackendCrmBiddingBidTaskController) Delete() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -314,14 +289,10 @@ func (c *BackendCrmBiddingBidTaskController) Delete() {
|
||||
pipelineOk(&c.Controller, nil)
|
||||
}
|
||||
|
||||
// ------------------------------ 投标结果 ------------------------------
|
||||
|
||||
// BackendCrmBiddingBidResultController 投标结果
|
||||
type BackendCrmBiddingBidResultController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
// List
|
||||
func (c *BackendCrmBiddingBidResultController) List() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -343,7 +314,6 @@ func (c *BackendCrmBiddingBidResultController) List() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"list": list})
|
||||
}
|
||||
|
||||
// Detail
|
||||
func (c *BackendCrmBiddingBidResultController) Detail() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -368,9 +338,6 @@ func (c *BackendCrmBiddingBidResultController) Detail() {
|
||||
pipelineOk(&c.Controller, row)
|
||||
}
|
||||
|
||||
// ------------------------------ 投标报价 ------------------------------
|
||||
|
||||
// BackendCrmBiddingBidQuoteController 投标报价
|
||||
type BackendCrmBiddingBidQuoteController struct {
|
||||
beego.Controller
|
||||
}
|
||||
@@ -389,7 +356,6 @@ type bidQuotePayload struct {
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
// List
|
||||
func (c *BackendCrmBiddingBidQuoteController) List() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -411,7 +377,6 @@ func (c *BackendCrmBiddingBidQuoteController) List() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"list": list})
|
||||
}
|
||||
|
||||
// Create
|
||||
func (c *BackendCrmBiddingBidQuoteController) Create() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -458,7 +423,6 @@ func (c *BackendCrmBiddingBidQuoteController) Create() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"id": id})
|
||||
}
|
||||
|
||||
// Delete
|
||||
func (c *BackendCrmBiddingBidQuoteController) Delete() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -486,9 +450,6 @@ func (c *BackendCrmBiddingBidQuoteController) Delete() {
|
||||
pipelineOk(&c.Controller, nil)
|
||||
}
|
||||
|
||||
// ------------------------------ 投标竞争对手 ------------------------------
|
||||
|
||||
// BackendCrmBiddingBidCompetitorController
|
||||
type BackendCrmBiddingBidCompetitorController struct {
|
||||
beego.Controller
|
||||
}
|
||||
@@ -504,7 +465,6 @@ type bidCompetitorPayload struct {
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
// List
|
||||
func (c *BackendCrmBiddingBidCompetitorController) List() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -526,7 +486,6 @@ func (c *BackendCrmBiddingBidCompetitorController) List() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"list": list})
|
||||
}
|
||||
|
||||
// Create
|
||||
func (c *BackendCrmBiddingBidCompetitorController) Create() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -569,7 +528,6 @@ func (c *BackendCrmBiddingBidCompetitorController) Create() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"id": id})
|
||||
}
|
||||
|
||||
// Delete
|
||||
func (c *BackendCrmBiddingBidCompetitorController) Delete() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -597,9 +555,6 @@ func (c *BackendCrmBiddingBidCompetitorController) Delete() {
|
||||
pipelineOk(&c.Controller, nil)
|
||||
}
|
||||
|
||||
// ------------------------------ 投标费用 ------------------------------
|
||||
|
||||
// BackendCrmBiddingBidExpenseController
|
||||
type BackendCrmBiddingBidExpenseController struct {
|
||||
beego.Controller
|
||||
}
|
||||
@@ -616,7 +571,6 @@ type bidExpensePayload struct {
|
||||
VoucherURL string `json:"voucher_url"`
|
||||
}
|
||||
|
||||
// List
|
||||
func (c *BackendCrmBiddingBidExpenseController) List() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -638,7 +592,6 @@ func (c *BackendCrmBiddingBidExpenseController) List() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"list": list})
|
||||
}
|
||||
|
||||
// Create
|
||||
func (c *BackendCrmBiddingBidExpenseController) Create() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -682,7 +635,6 @@ func (c *BackendCrmBiddingBidExpenseController) Create() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"id": id})
|
||||
}
|
||||
|
||||
// Delete
|
||||
func (c *BackendCrmBiddingBidExpenseController) Delete() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -710,9 +662,6 @@ func (c *BackendCrmBiddingBidExpenseController) Delete() {
|
||||
pipelineOk(&c.Controller, nil)
|
||||
}
|
||||
|
||||
// ------------------------------ 招标文件 ------------------------------
|
||||
|
||||
// BackendCrmBiddingTenderFileController 招标文件
|
||||
type BackendCrmBiddingTenderFileController struct {
|
||||
beego.Controller
|
||||
}
|
||||
@@ -729,7 +678,6 @@ type tenderFilePayload struct {
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
// List
|
||||
func (c *BackendCrmBiddingTenderFileController) List() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -751,7 +699,6 @@ func (c *BackendCrmBiddingTenderFileController) List() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"list": list})
|
||||
}
|
||||
|
||||
// Create
|
||||
func (c *BackendCrmBiddingTenderFileController) Create() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -793,7 +740,6 @@ func (c *BackendCrmBiddingTenderFileController) Create() {
|
||||
pipelineOk(&c.Controller, map[string]interface{}{"id": id})
|
||||
}
|
||||
|
||||
// Delete
|
||||
func (c *BackendCrmBiddingTenderFileController) Delete() {
|
||||
claims, err := pipelineClaims(&c.Controller)
|
||||
if err != nil {
|
||||
@@ -821,11 +767,6 @@ func (c *BackendCrmBiddingTenderFileController) Delete() {
|
||||
pipelineOk(&c.Controller, nil)
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// 工具函数
|
||||
// =====================================================================
|
||||
|
||||
// firstNonEmptyInt8 返回第一个非零的 int8
|
||||
func firstNonEmptyInt8(v, def int8) int8 {
|
||||
if v == 0 {
|
||||
return def
|
||||
|
||||
Reference in new issue
Block a user