Compare commits

...

7 Commits

Author SHA1 Message Date
李寻欢
d8a8bf4efc Merge pull request '🎨 页面优化' (#58) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/58
2024-06-17 08:58:51 +08:00
李寻欢
42339e3c51 🎨 页面优化 2024-06-17 08:58:01 +08:00
李寻欢
8f6b7cb68d Merge pull request 'hotfix' (#57) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/57
2024-06-14 08:36:55 +08:00
李寻欢
20aeeefb3c Merge remote-tracking branch 'origin/hotfix' into hotfix 2024-06-14 08:36:27 +08:00
李寻欢
08ffd4de6c 🎨 修改一个错别字 2024-06-14 08:36:21 +08:00
李寻欢
72a2e694f8 Merge pull request '🎨 优化好友列表同步处理逻辑' (#56) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/56
2024-06-13 07:02:45 +08:00
李寻欢
2238e23c8d 🎨 优化好友列表同步处理逻辑 2024-06-13 07:02:00 +08:00
4 changed files with 19 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ mysql:
schema: public # postgres 专用
task:
enable: true
enable: false
news:
enable: true
cron: '14 11 * * *' # 每天0:30
@@ -101,6 +101,10 @@ ai:
model: moonshot-v1-128k
- name: 跃问
model: StepChat
- name: 豆包Lite-4k
model: Doubao-lite-4k
- name: 豆包Pro-4k
model: Doubao-pro-4k
# 资源配置
# map[k]v结构k 会变成全小写,所以这儿不能用大写字母

View File

@@ -44,7 +44,7 @@ func ClearGroupUser() {
for k, v := range memberMap {
ms = append(ms, fmt.Sprintf("昵称:%s\n最后活跃时间%s", k, v))
}
msg := fmt.Sprintf("#清理群成员\n\n很遗憾地通知各位就在刚刚有%d名群友活跃度不够暂时离开了我们,希望还健在的群友引以为戒、保持活跃!\n\n活跃信息: \n%s",
msg := fmt.Sprintf("#清理群成员\n\n很遗憾地通知各位就在刚刚有%d名群友活跃度不够暂时离开了我们,希望还健在的群友引以为戒、保持活跃!\n\n详细信息: \n%s",
memberCount, strings.Join(ms, "\n"))
utils.SendMessage(group.Wxid, "", msg, 0)
}

View File

@@ -134,7 +134,19 @@ func Sync() {
}
// 清理不在列表中的好友
err = tx.Model(&entity.Friend{}).Where("wxid NOT IN (?)", nowIds).Update("is_ok", false).Error
clearPm := map[string]any{
"is_ok": false,
"enable_chat_rank": false,
"enable_welcome": false,
"enable_summary": false,
"enable_news": false,
"clear_member": false,
"enable_ai": false,
}
err = tx.Model(&entity.Friend{}).Where("wxid NOT IN (?)", nowIds).Updates(clearPm).Error
if err != nil {
log.Printf("清理好友失败: %s", err.Error())
}
log.Println("同步好友列表完成")
}

View File

@@ -82,10 +82,6 @@
<select id="location" name="location"
class="mt-2 block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-green-600 sm:text-sm sm:leading-6"
onchange="aiModelChange(event, {{.Wxid}})">
<option value="" {{ if eq .AiModel
"" }}selected{{ end }}>默认(gpt-3.5-turbo-0613)
</option>
{{$useModel := .AiModel}}
{{ range $.aiModels }}
<option value="{{.Model}}" {{ if eq $useModel .Model}}selected{{ end }}>