package com.ruoyi.project.business.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.business.domain.TpCommonParam;
import com.ruoyi.project.business.enums.DelFlagEnum;
import com.ruoyi.project.business.service.ITpCommonParamService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 常用参数配置Controller
 *
 * @author ruoyi
 * @date 2024-05-08
 */
@RestController
@RequestMapping("/business/commonParam")
public class TpCommonParamController extends BaseController {
    @Resource
    private ITpCommonParamService iTpCommonParamService;


    @GetMapping("/getCommonList")
    public AjaxResult getCommonList() {
        return AjaxResult.success(iTpCommonParamService.list(
                Wrappers.<TpCommonParam>lambdaQuery()
                        .eq(TpCommonParam::getDelFlag, DelFlagEnum.NORMAL.getValue())
        ));
    }

}
