🔥 改为前后端分离形式

This commit is contained in:
李寻欢
2024-07-04 14:10:46 +08:00
parent f39f46bfbf
commit b806ade655
49 changed files with 387 additions and 62 deletions

View File

@@ -6,8 +6,8 @@ import (
"go-wechat/client"
"go-wechat/common/constant"
"go-wechat/config"
"go-wechat/entity"
"go-wechat/model"
"go-wechat/model/entity"
model2 "go-wechat/model/model"
"go-wechat/utils"
"gorm.io/gorm"
"log"
@@ -24,7 +24,7 @@ var hc = resty.New()
// Sync
// @description: 同步好友列表
func Sync() {
var base model.Response[[]model.FriendItem]
var base model2.Response[[]model2.FriendItem]
resp, err := hc.R().
SetHeader("Content-Type", "application/json;chartset=utf-8").
@@ -155,7 +155,7 @@ func Sync() {
// @description: 同步群成员
// @param gid
func syncGroupUsers(tx *gorm.DB, gid string) {
var baseResp model.Response[model.GroupUser]
var baseResp model2.Response[model2.GroupUser]
// 组装参数
param := map[string]any{
@@ -242,8 +242,8 @@ func syncGroupUsers(tx *gorm.DB, gid string) {
// @param wxid
// @return ent
// @return err
func getContactProfile(wxid string) (ent model.ContactProfile, err error) {
var baseResp model.Response[model.ContactProfile]
func getContactProfile(wxid string) (ent model2.ContactProfile, err error) {
var baseResp model2.Response[model2.ContactProfile]
// 组装参数
param := map[string]any{