|
|
@@ -326,4 +326,28 @@ public class BasicEnumController {
|
|
326
|
326
|
return modelMap;
|
|
327
|
327
|
}
|
|
328
|
328
|
|
|
|
329
|
+ /**
|
|
|
330
|
+ * 根据id获取name
|
|
|
331
|
+ * @param id 数据ID
|
|
|
332
|
+ * @return
|
|
|
333
|
+ */
|
|
|
334
|
+ @RequestMapping(value="/getEnumName", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
|
|
|
335
|
+ @ApiOperation(value="根据id获取name", notes = "根据id获取name")
|
|
|
336
|
+ @ApiImplicitParams({
|
|
|
337
|
+ @ApiImplicitParam(name = "id", value = "数据ID", paramType = "query")
|
|
|
338
|
+ })
|
|
|
339
|
+ public String getEnumName(Integer id) {
|
|
|
340
|
+ BasicEnum basicEnum = new BasicEnum();
|
|
|
341
|
+ try {
|
|
|
342
|
+ if (id != null) {
|
|
|
343
|
+ basicEnum = enumService.findByParmeryKeyEnum(id);
|
|
|
344
|
+ } else {
|
|
|
345
|
+ basicEnum.setDelflag(1);
|
|
|
346
|
+ }
|
|
|
347
|
+ } catch (Exception e) {
|
|
|
348
|
+ e.printStackTrace();
|
|
|
349
|
+ }
|
|
|
350
|
+ return basicEnum.getEnumname();
|
|
|
351
|
+ }
|
|
|
352
|
+
|
|
329
|
353
|
}
|