小程序一些功能更新
This commit is contained in:
@@ -184,7 +184,7 @@ func AdminUserList(ctx context.Context, req *v1.UserListReq) (*v1.UserListRes, e
|
||||
item := v1.AdminUserItem{
|
||||
Id: r["id"].Int64(),
|
||||
Nickname: r["nickname"].String(),
|
||||
AvatarUrl: r["avatar_url"].String(),
|
||||
AvatarUrl: absoluteURL(ctx, r["avatar_url"].String()),
|
||||
Openid: r["openid"].String(),
|
||||
LevelKey: r["level_key"].String(),
|
||||
LevelName: levelNames[r["level_key"].String()],
|
||||
@@ -811,6 +811,14 @@ func AdminFeedbackHandle(ctx context.Context, id int64, reply string) (*v1.Feedb
|
||||
if len(reply) > 1000 {
|
||||
reply = reply[:1000]
|
||||
}
|
||||
// 先取反馈归属(站内信收件人);反馈不存在直接报错,避免把状态写到空气里
|
||||
fb, err := g.Model(consts.TableFeedbacks).Where("id", id).One()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if fb.IsEmpty() {
|
||||
return nil, gerror.New("反馈不存在")
|
||||
}
|
||||
data := g.Map{"status": 1}
|
||||
if reply != "" {
|
||||
data["reply_content"] = reply
|
||||
@@ -822,6 +830,8 @@ func AdminFeedbackHandle(ctx context.Context, id int64, reply string) (*v1.Feedb
|
||||
return nil, err
|
||||
}
|
||||
if reply != "" {
|
||||
// 站内信:反馈收到官方回复(尽力而为,失败不影响回复本身)
|
||||
PushMessage(ctx, fb["user_id"].Int64(), consts.MsgTypeFeedbackReplied, "你的反馈有了新回复", reply, "")
|
||||
WriteAudit(ctx, AuditEntry{
|
||||
Action: "feedback.reply",
|
||||
TargetType: "feedback",
|
||||
|
||||
Reference in New Issue
Block a user