refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,46 @@
package basic
import (
"context"
"time"
"git.apinb.com/bsm-sdk/core/errcode"
"git.apinb.com/bsm-sdk/core/printer"
"git.apinb.com/bsm-sdk/core/service"
"git.apinb.com/bsm-sdk/core/utils"
"git.apinb.com/bsm-sdk/core/vars"
"bsm/full/module/social/group/internal/impl"
"bsm/full/module/social/group/internal/models"
pb "bsm/full/module/social/group/pb"
)
// 修改群组信息
func Modify(ctx context.Context, in *pb.GroupItem) (reply *pb.StatusReply, err error) {
auth, err := service.ParseMetaCtx(ctx, nil)
if err != nil {
return nil, err
}
record := &models.GroupBasic{
Name: in.GetName(),
Introduce: in.GetIntroduce(),
Avatar: in.GetAvatar(),
Background: in.GetBackground(),
Notice: in.GetNotice(),
EnableSearchByNumber: in.GetEnableSearchByNumber(),
EnableSearchByName: in.GetEnableSearchByName(),
}
record.Identity = utils.UUID()
err = impl.DBService.Where("identity=? and creator_id=?", in.Identity, auth.ID).UpdateColumns(record).Error
if err != nil {
printer.Error(err.Error())
return nil, errcode.ErrDB
}
return &pb.StatusReply{
Data: vars.OK,
Timeseq: time.Now().UnixMilli(),
}, nil
}