| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @author Lion Li |
| | | */ |
| | | @Validated |
| | | @Tag(name = "数据字典信息控制器", description = "数据字典信息管理") |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/system/dict/type") |
| | |
| | | if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { |
| | | return R.fail("新增字典'" + dict.getDictName() + "'失败,字典类型已存在"); |
| | | } |
| | | return toAjax(dictTypeService.insertDictType(dict)); |
| | | dictTypeService.insertDictType(dict); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { |
| | | return R.fail("修改字典'" + dict.getDictName() + "'失败,字典类型已存在"); |
| | | } |
| | | return toAjax(dictTypeService.updateDictType(dict)); |
| | | dictTypeService.updateDictType(dict); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |