package logic import ( "context" "bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/entity" "bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/internal/svc" "bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/pb" "bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/service" "github.com/zeromicro/go-zero/core/logx" ) type DelCheckRedisLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewDelCheckRedisLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DelCheckRedisLogic { return &DelCheckRedisLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } // 清除权限缓存 func (l *DelCheckRedisLogic) DelCheckRedis(in *pb.CheckReq) (*pb.PowerCheckResp, error) { resp := &pb.PowerCheckResp{} power := service.NewPower(&entity.Conn{ Mysql: entity.Mysql, BaseMysql: entity.BaseMysql, MgoJy: entity.MgoJy, }) if power.DelRedisPower(in.PositionId) { resp.Status = 1 } else { resp.Status = -1 } return resp, nil }