package com.fjhx.common.controller.coding;

import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.common.entity.coding.vo.CodingRulePageVo;
import com.fjhx.common.entity.coding.dto.CodingRuleSelectDto;
import com.fjhx.common.entity.coding.dto.CodingRuleDto;
import com.ruoyi.common.core.domain.BaseSelectDto;
import com.fjhx.common.service.coding.CodingRuleService;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * <p>
 * 编码规则 前端控制器
 * </p>
 *
 * @author 
 * @since 2023-04-13
 */
@RestController
@RequestMapping("/codingRule")
public class CodingRuleController {

    @Autowired
    private CodingRuleService codingRuleService;

    /**
     * 编码规则分页
     */
    @PostMapping("/page")
    public Page<CodingRulePageVo> page(@RequestBody CodingRuleSelectDto dto) {
        return codingRuleService.getPage(dto);
    }

    /**
     * 编码规则编辑
     */
    @PostMapping("/edit")
    public void edit(@RequestBody CodingRuleDto codingRuleDto) {
        codingRuleService.edit(codingRuleDto);
    }

}
