package com.dk.mdm.service.sys;

import com.dk.common.mapper.BaseMapper;
import com.dk.common.response.ResponseResultUtil;
import com.dk.common.response.ResponseResultVO;
import com.dk.common.service.BaseService;
import com.dk.mdm.mapper.sys.ModuleMapper;
import com.dk.mdm.model.pojo.sys.Module;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @desc   : 功能模块
 * @date   : 2022/5/20 16:52
 * @author : 寇珊珊
 */
@Service
@Transactional
public class ModuleService extends BaseService<Module> {

    @Override
    public BaseMapper<Module> getRepository() {
        return moduleMapper;
    }

    @Autowired
    private ModuleMapper moduleMapper;


    /**
     * @desc : 查询功能模块列表
     * @date : 2022/5/11 12:26
     * @author : 寇珊珊
     */
    public ResponseResultVO selectModule(Module module) {
        List<Module> modules = moduleMapper.selectModuleList(module);
        return ResponseResultUtil.success(modules);
    }


}
