All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.foxtech.common.entity.entity.UserMenuBase Maven / Gradle / Ivy

The newest version!
/* ----------------------------------------------------------------------------
 * Copyright (c) Guangzhou Fox-Tech Co., Ltd. 2020-2024. All rights reserved.
 * --------------------------------------------------------------------------- */

package cn.foxtech.common.entity.entity;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Getter(value = AccessLevel.PUBLIC)
@Setter(value = AccessLevel.PUBLIC)
public class UserMenuBase extends BaseEntity {
    /**
     * 模板名称
     */
    private String name;


    /**
     * 业务Key
     *
     * @return 业务Key
     */
    public List makeServiceKeyList() {
        List list = new ArrayList<>();
        list.add(this.name);

        return list;
    }

    /**
     * 查询过滤器
     *
     * @return 过滤器
     */
    public Object makeWrapperKey() {
        QueryWrapper queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username", this.name);

        return queryWrapper;
    }

    /**
     * 获取业务值
     *
     * @return 对象列表
     */
    public List makeServiceValueList() {
        List list = new ArrayList<>();

        return list;
    }

    public void bind(UserMenuBase other) {
        super.bind(other);

        this.name = other.name;
    }

    @Override
    public void bind(Map map) {
        super.bind(map);

        this.name = (String) map.get("name");
    }
}