更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -21,8 +21,6 @@ func (c *PlatformSiteReminderController) platformClaims() (*jwtutil.Claims, erro
|
||||
return identity.Claims(c.Ctx.Request.Header.Get("Authorization"), identity.EndPlatform)
|
||||
}
|
||||
|
||||
// mergeReminderTargetIDs 合并多选目标ID与旧版单值入参。
|
||||
// 旧版:role → target_role_id,tenant → target_tenant_id;多选参数优先。
|
||||
func mergeReminderTargetIDs(targetType string, targetIDs []uint64, legacyRoleID, legacyTenantID uint64) []uint64 {
|
||||
ids := make([]uint64, 0, len(targetIDs)+1)
|
||||
for _, id := range targetIDs {
|
||||
@@ -51,7 +49,6 @@ func (c *PlatformSiteReminderController) jsonErr(httpStatus, bizCode int, msg st
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// GetConfig GET /platform/sitereminder/config
|
||||
func (c *PlatformSiteReminderController) GetConfig() {
|
||||
if _, err := c.platformClaims(); err != nil {
|
||||
code := identity.Status(err)
|
||||
@@ -67,7 +64,6 @@ func (c *PlatformSiteReminderController) GetConfig() {
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// SaveConfig POST /platform/sitereminder/config
|
||||
func (c *PlatformSiteReminderController) SaveConfig() {
|
||||
if _, err := c.platformClaims(); err != nil {
|
||||
code := identity.Status(err)
|
||||
@@ -95,7 +91,6 @@ func (c *PlatformSiteReminderController) SaveConfig() {
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// Send POST /platform/sitereminder/send
|
||||
func (c *PlatformSiteReminderController) Send() {
|
||||
claims, err := c.platformClaims()
|
||||
if err != nil {
|
||||
@@ -111,10 +106,10 @@ func (c *PlatformSiteReminderController) Send() {
|
||||
var p struct {
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
TargetType string `json:"target_type"` // all, platform, tenant_all, tenant_role, tenant, tenant_user
|
||||
TargetType string `json:"target_type"`
|
||||
TargetIDs []uint64 `json:"target_ids"`
|
||||
TargetRoleID uint64 `json:"target_role_id"` // 兼容旧入参
|
||||
TargetTenantID uint64 `json:"target_tenant_id"` // 兼容旧入参
|
||||
TargetRoleID uint64 `json:"target_role_id"`
|
||||
TargetTenantID uint64 `json:"target_tenant_id"`
|
||||
}
|
||||
if err := json.Unmarshal(raw, &p); err != nil {
|
||||
c.jsonErr(400, 400, "参数错误")
|
||||
@@ -142,7 +137,6 @@ func (c *PlatformSiteReminderController) Send() {
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// GetMyList GET /platform/sitereminder/myList
|
||||
func (c *PlatformSiteReminderController) GetMyList() {
|
||||
claims, err := c.platformClaims()
|
||||
if err != nil {
|
||||
@@ -177,7 +171,6 @@ func (c *PlatformSiteReminderController) GetMyList() {
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// MarkRead POST /platform/sitereminder/read
|
||||
func (c *PlatformSiteReminderController) MarkRead() {
|
||||
claims, err := c.platformClaims()
|
||||
if err != nil {
|
||||
@@ -207,7 +200,6 @@ func (c *PlatformSiteReminderController) MarkRead() {
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// MarkAllRead POST /platform/sitereminder/readall
|
||||
func (c *PlatformSiteReminderController) MarkAllRead() {
|
||||
claims, err := c.platformClaims()
|
||||
if err != nil {
|
||||
@@ -224,7 +216,6 @@ func (c *PlatformSiteReminderController) MarkAllRead() {
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// Delete POST /platform/sitereminder/delete
|
||||
func (c *PlatformSiteReminderController) Delete() {
|
||||
claims, err := c.platformClaims()
|
||||
if err != nil {
|
||||
@@ -254,7 +245,6 @@ func (c *PlatformSiteReminderController) Delete() {
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// GetSentList GET /platform/sitereminder/sentList
|
||||
func (c *PlatformSiteReminderController) GetSentList() {
|
||||
claims, err := c.platformClaims()
|
||||
if err != nil {
|
||||
@@ -282,7 +272,6 @@ func (c *PlatformSiteReminderController) GetSentList() {
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// UpdateSent POST /platform/sitereminder/updateSent
|
||||
func (c *PlatformSiteReminderController) UpdateSent() {
|
||||
if _, err := c.platformClaims(); err != nil {
|
||||
code := identity.Status(err)
|
||||
@@ -298,10 +287,10 @@ func (c *PlatformSiteReminderController) UpdateSent() {
|
||||
BatchID string `json:"batch_id"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
TargetType string `json:"target_type"` // all, platform, tenant_all, tenant_role, tenant, tenant_user
|
||||
TargetType string `json:"target_type"`
|
||||
TargetIDs []uint64 `json:"target_ids"`
|
||||
TargetRoleID uint64 `json:"target_role_id"` // 兼容旧入参
|
||||
TargetTenantID uint64 `json:"target_tenant_id"` // 兼容旧入参
|
||||
TargetRoleID uint64 `json:"target_role_id"`
|
||||
TargetTenantID uint64 `json:"target_tenant_id"`
|
||||
}
|
||||
if err := json.Unmarshal(raw, &p); err != nil {
|
||||
c.jsonErr(400, 400, "参数错误")
|
||||
@@ -328,7 +317,6 @@ func (c *PlatformSiteReminderController) UpdateSent() {
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// DeleteSentBatch POST /platform/sitereminder/deleteSent
|
||||
func (c *PlatformSiteReminderController) DeleteSentBatch() {
|
||||
if _, err := c.platformClaims(); err != nil {
|
||||
code := identity.Status(err)
|
||||
|
||||
Reference in new issue
Block a user