|
|
@@ -63,6 +63,21 @@ public class DemoController {
|
|
|
@Autowired
|
|
|
private OSSUtil oSSUtil;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("listdict")
|
|
|
+ public TestDemoDto listdict(@RequestBody TestDemoDto dto) {
|
|
|
+ log.info("listdict=:{}", dto);
|
|
|
+
|
|
|
+ TestDemoDto dto1 = new TestDemoDto();
|
|
|
+ //将中文的 字典类型,字典标签转换为字典的value
|
|
|
+ //比如 用户性别,男 转换为 1
|
|
|
+ dto1.setDictValue(DictUtil.getDictCodeStr(dto.getDictTypeNameCn(),dto.getDictNameCn()));
|
|
|
+ Integer val=DictUtil.getDictCodeInt(dto.getDictTypeNameCn(),dto.getDictNameCn());
|
|
|
+ log.info("val=:{}", val);
|
|
|
+ return dto1;
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("listoss")
|
|
|
public TestDemoDto listoss(@RequestPart("file") FilePart filePart,
|
|
|
@RequestPart("description") String description,
|