feat: 初次启动

This commit is contained in:
Blizzard
2026-04-27 21:23:13 +08:00
parent e515f6a287
commit bb8ad4d515
148 changed files with 8602 additions and 5678 deletions
@@ -1,13 +1,11 @@
// Code scaffolded by goctl. Safe to edit.
package role
import (
"context"
"fmt"
"github.com/zeromicro/go-zero/core/logx"
"sundynix-micro-go/app/system/api/internal/svc"
"sundynix-micro-go/app/system/api/internal/types"
sysModel "sundynix-micro-go/app/system/model"
"sundynix-micro-go/app/system/rpc/system"
)
type DeleteRoleLogic struct {
@@ -21,10 +19,6 @@ func NewDeleteRoleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Delete
}
func (l *DeleteRoleLogic) DeleteRole(req *types.IdsReq) error {
if err := l.svcCtx.DB.Where("id IN ?", req.Ids).Delete(&sysModel.SundynixRole{}).Error; err != nil {
return fmt.Errorf("删除角色失败")
}
// 清理角色菜单关联
l.svcCtx.DB.Where("role_id IN ?", req.Ids).Delete(&sysModel.SundynixRoleMenu{})
return nil
_, err := l.svcCtx.SystemRpc.DeleteRole(l.ctx, &system.IdsReq{Ids: req.Ids})
return err
}