mirror of https://gitee.com/answerdev/answer.git
Merge remote-tracking branch 'origin/feat/1.0.2/user' into test
This commit is contained in:
commit
5a2fea3637
|
@ -135,21 +135,21 @@ backend:
|
|||
other: "Username is already in use."
|
||||
set_avatar:
|
||||
other: "Avatar set failed."
|
||||
config:
|
||||
read_config_failed:
|
||||
other: "Read config failed"
|
||||
database:
|
||||
connection_failed:
|
||||
other: "Database connection failed"
|
||||
create_table_failed:
|
||||
other: "Create table failed"
|
||||
install:
|
||||
create_config_failed:
|
||||
other: "Can’t create the config.yaml file."
|
||||
cannot_update_your_role:
|
||||
other: "You cannot modify your role."
|
||||
not_allowed_registration:
|
||||
other: "Currently the site is not open for registration"
|
||||
config:
|
||||
read_config_failed:
|
||||
other: "Read config failed"
|
||||
database:
|
||||
connection_failed:
|
||||
other: "Database connection failed"
|
||||
create_table_failed:
|
||||
other: "Create table failed"
|
||||
install:
|
||||
create_config_failed:
|
||||
other: "Can’t create the config.yaml file."
|
||||
report:
|
||||
spam:
|
||||
name:
|
||||
|
|
|
@ -190,9 +190,15 @@ func (qs *QuestionCommon) Info(ctx context.Context, questionID string, loginUser
|
|||
showinfo.Tags = tagmap
|
||||
|
||||
userIds := make([]string, 0)
|
||||
userIds = append(userIds, dbinfo.UserID)
|
||||
userIds = append(userIds, dbinfo.LastEditUserID)
|
||||
userIds = append(userIds, showinfo.LastAnsweredUserID)
|
||||
if checker.IsNotZeroString(dbinfo.UserID) {
|
||||
userIds = append(userIds, dbinfo.UserID)
|
||||
}
|
||||
if checker.IsNotZeroString(dbinfo.LastEditUserID) {
|
||||
userIds = append(userIds, dbinfo.LastEditUserID)
|
||||
}
|
||||
if checker.IsNotZeroString(showinfo.LastAnsweredUserID) {
|
||||
userIds = append(userIds, showinfo.LastAnsweredUserID)
|
||||
}
|
||||
userInfoMap, err := qs.userCommon.BatchUserBasicInfoByID(ctx, userIds)
|
||||
if err != nil {
|
||||
return showinfo, err
|
||||
|
|
Loading…
Reference in New Issue