更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -10,7 +10,6 @@ import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
)
|
||||
|
||||
// BackendErpWarehouseController 仓库档案
|
||||
type BackendErpWarehouseController struct {
|
||||
BackendErpBaseController
|
||||
}
|
||||
@@ -26,7 +25,6 @@ type erpWarehousePayload struct {
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
// List GET /backend/erp/warehouse/list
|
||||
func (c *BackendErpWarehouseController) List() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -45,7 +43,6 @@ func (c *BackendErpWarehouseController) List() {
|
||||
c.ok(map[string]interface{}{"list": rows})
|
||||
}
|
||||
|
||||
// Detail GET /backend/erp/warehouse/:id
|
||||
func (c *BackendErpWarehouseController) Detail() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -62,7 +59,6 @@ func (c *BackendErpWarehouseController) Detail() {
|
||||
c.ok(row)
|
||||
}
|
||||
|
||||
// Create POST /backend/erp/warehouse
|
||||
func (c *BackendErpWarehouseController) Create() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -109,7 +105,6 @@ func (c *BackendErpWarehouseController) Create() {
|
||||
c.ok(map[string]interface{}{"id": id})
|
||||
}
|
||||
|
||||
// Update PUT /backend/erp/warehouse/:id
|
||||
func (c *BackendErpWarehouseController) Update() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -163,7 +158,6 @@ func (c *BackendErpWarehouseController) Update() {
|
||||
c.ok(nil)
|
||||
}
|
||||
|
||||
// Delete DELETE /backend/erp/warehouse/:id
|
||||
func (c *BackendErpWarehouseController) Delete() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -202,7 +196,6 @@ func (c *BackendErpWarehouseController) Delete() {
|
||||
c.ok(nil)
|
||||
}
|
||||
|
||||
// erpStatusOr status 用指针区分「未传」与「显式传 0(停用)」,未传时回落到调用方给的默认值。
|
||||
func erpStatusOr(v *int8, def int8) int8 {
|
||||
if v == nil {
|
||||
return def
|
||||
@@ -210,8 +203,6 @@ func erpStatusOr(v *int8, def int8) int8 {
|
||||
return *v
|
||||
}
|
||||
|
||||
// erpWarehouseFieldTaken 仓库名称/编号在租户内是否已被占用(excludeID>0 时排除自身)。
|
||||
// 名称唯一是硬约束:ERP 基础设置里的默认仓库按名称存储,重名会让设置指向错误的仓。
|
||||
func erpWarehouseFieldTaken(tid, field, value string, excludeID uint64) bool {
|
||||
if strings.TrimSpace(value) == "" {
|
||||
return false
|
||||
@@ -226,7 +217,6 @@ func erpWarehouseFieldTaken(tid, field, value string, excludeID uint64) bool {
|
||||
return n > 0
|
||||
}
|
||||
|
||||
// erpClearDefaultWarehouse 默认仓库全租户唯一
|
||||
func erpClearDefaultWarehouse(tid string, keepID uint64) {
|
||||
_, _ = models.Orm.QueryTable(new(models.ErpWarehouse)).
|
||||
Filter("tenant_id", tid).Filter("is_default", 1).Exclude("id", keepID).
|
||||
|
||||
Reference in new issue
Block a user