package com.keyware.shandan.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.keyware.shandan.system.constants.FormTypeEnum;
import com.keyware.shandan.system.entity.SysFormConfig;
import com.keyware.shandan.system.mapper.SysFormConfigMapper;
import com.keyware.shandan.system.service.SysFormConfigService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 系统表单配置服务实现类
 *
 * @author GuoXin
 * @date 2023/8/23
 */
@Service
public class SysFormConfigServiceImpl extends ServiceImpl<SysFormConfigMapper, SysFormConfig> implements SysFormConfigService {
    @Override
    public List<SysFormConfig> listByFormType(FormTypeEnum formTypeEnum) {
        QueryWrapper<SysFormConfig> query = new QueryWrapper<>();
        query.eq("FORM_TYPE", formTypeEnum.getValue());
        return list(query);
    }
}
