更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -10,13 +10,6 @@ import (
|
||||
"server/pkg/identity"
|
||||
)
|
||||
|
||||
// 移动端通讯录(企业内部通讯录)只读接口。
|
||||
//
|
||||
// 复用 AppOaController 的鉴权与响应封装(oaClaims / oaErr / oaOk):
|
||||
// 鉴权放宽到 app / platform 令牌,数据一律按 JWT 中的 TenantId 隔离,前端无法指定租户。
|
||||
// 写入能力(同步员工 / 新增 / 编辑 / 删除)仍留在 Web 管理端。
|
||||
|
||||
// appContactDTO 通讯录条目 DTO(移动端展示字段)。
|
||||
func appContactDTO(row models.BackendErpContact, orgName string) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"id": row.ID,
|
||||
@@ -42,7 +35,6 @@ func appContactDTO(row models.BackendErpContact, orgName string) map[string]inte
|
||||
}
|
||||
}
|
||||
|
||||
// appContactOrgNames 批量查询组织 ID → 名称映射,避免逐行查询。
|
||||
func appContactOrgNames(ids []uint64) map[uint64]string {
|
||||
names := make(map[uint64]string)
|
||||
if len(ids) == 0 {
|
||||
@@ -58,8 +50,6 @@ func appContactOrgNames(ids []uint64) map[uint64]string {
|
||||
return names
|
||||
}
|
||||
|
||||
// ContactList GET /app/oa/contact/list 通讯录分页列表。
|
||||
// 支持 keyword(姓名/手机号/邮箱/职位/部门)、org_id(按组织筛选)、contact_type(1 内部 2 外部)。
|
||||
func (c *AppOaController) ContactList() {
|
||||
claims, err := c.oaClaims()
|
||||
if err != nil {
|
||||
@@ -98,7 +88,6 @@ func (c *AppOaController) ContactList() {
|
||||
cond = cond.Or("email__contains", keyword)
|
||||
cond = cond.Or("position_title__contains", keyword)
|
||||
cond = cond.Or("dept_name__contains", keyword)
|
||||
// 用 GetCond().AndCond 追加,避免 SetCond 覆盖掉租户等前置过滤条件
|
||||
qs = qs.SetCond(qs.GetCond().AndCond(cond))
|
||||
}
|
||||
|
||||
@@ -131,7 +120,6 @@ func (c *AppOaController) ContactList() {
|
||||
c.oaOk(map[string]interface{}{"list": list, "total": total, "page": page, "pageSize": pageSize})
|
||||
}
|
||||
|
||||
// ContactOrgTree GET /app/oa/contact/org-tree 组织架构树(含各部门内部联系人数量)。
|
||||
func (c *AppOaController) ContactOrgTree() {
|
||||
claims, err := c.oaClaims()
|
||||
if err != nil {
|
||||
@@ -171,7 +159,6 @@ func (c *AppOaController) ContactOrgTree() {
|
||||
c.oaOk(tree)
|
||||
}
|
||||
|
||||
// ContactDetail GET /app/oa/contact/:id 联系人详情。
|
||||
func (c *AppOaController) ContactDetail() {
|
||||
claims, err := c.oaClaims()
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user