diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/MntnUploadController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/MntnUploadController.java index 0e490da..aafca44 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/MntnUploadController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/MntnUploadController.java @@ -27,8 +27,8 @@ public class MntnUploadController extends BaseController { @GetMapping("listAll") @ApiOperation("查询全部列表") - public ResponseReult> listAll() { - List result = service.listAll(); + public ResponseReult> listAll(Integer type) { + List result = service.listAll(type); return ResponseReult.success(result); } @@ -54,4 +54,17 @@ public class MntnUploadController extends BaseController { result.setCode(0); return result; } + + @PostMapping("uploadFile") + @ApiOperation("上传文件") + public ResponseReult uploadFile(@RequestParam("file") MultipartFile file, + @RequestParam(value = "termId", required = false) Integer termId) throws Exception { + if (termId == null) { + termId = 0; + } + service.uploadLog(termId, file); + ResponseReult result = new ResponseReult(); + result.setCode(0); + return result; + } } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnUploads.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnUploads.java index 53840f1..308184b 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnUploads.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnUploads.java @@ -21,6 +21,15 @@ public class MntnUploads { */ private Integer termId; + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column mntn_uploads.type + * + * @mbg.generated + */ + private Integer type; + /** * * This field was generated by MyBatis Generator. @@ -105,6 +114,30 @@ public class MntnUploads { this.termId = termId; } + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column mntn_uploads.type + * + * @return the value of mntn_uploads.type + * + * @mbg.generated + */ + public Integer getType() { + return type; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column mntn_uploads.type + * + * @param type the value for mntn_uploads.type + * + * @mbg.generated + */ + public void setType(Integer type) { + this.type = type; + } + /** * This method was generated by MyBatis Generator. * This method returns the value of the database column mntn_uploads.file_name diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnUploadsExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnUploadsExample.java index 636b821..1af4f4e 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnUploadsExample.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnUploadsExample.java @@ -315,6 +315,66 @@ public class MntnUploadsExample { return (Criteria) this; } + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Integer value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Integer value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Integer value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Integer value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Integer value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Integer value1, Integer value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Integer value1, Integer value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + public Criteria andFileNameIsNull() { addCriterion("file_name is null"); return (Criteria) this; diff --git a/xymanager_dao/src/main/resources/mappers/MntnUploadsMapper.xml b/xymanager_dao/src/main/resources/mappers/MntnUploadsMapper.xml index 5b442c7..4c2fc74 100644 --- a/xymanager_dao/src/main/resources/mappers/MntnUploadsMapper.xml +++ b/xymanager_dao/src/main/resources/mappers/MntnUploadsMapper.xml @@ -8,6 +8,7 @@ --> + @@ -84,7 +85,7 @@ WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> - id, term_id, file_name, `path`, file_size, create_time + id, term_id, `type`, file_name, `path`, file_size, create_time