From cc967be03d754403ab4159a7229d50f46e731a2d Mon Sep 17 00:00:00 2001
From: Jinquan_Ou <Jinquan@gdut.com>
Date: 星期一, 24 四月 2023 22:56:49 +0800
Subject: [PATCH] 1
---
zhang-content/src/main/java/com/ruoyi/service/impl/ZAutobiographyServiceImpl.java | 4 ++--
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZAutobiographyController.java | 4 ++--
zhang-content/src/main/java/com/ruoyi/domain/ZAutobiography.java | 13 ++++++++++++-
zhang-content/src/main/java/com/ruoyi/service/ZAutobiographyService.java | 2 +-
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java | 30 ++++++++++++++++--------------
5 files changed, 33 insertions(+), 20 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZAutobiographyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZAutobiographyController.java
index 634a6f8..eff923f 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZAutobiographyController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZAutobiographyController.java
@@ -52,10 +52,10 @@
* 杩斿洖鐗瑰畾鏃舵湡鐨勪釜浜鸿嚜浼�
*/
@GetMapping("/byTerm")
- public AjaxResult listByTerm(@PathParam("termId")Integer termId){
+ public AjaxResult listByTerm(@PathParam("term")String term){
SysUser user = SecurityUtils.getLoginUser().getUser();
Long userId = user.getUserId();
- List<ZAutobiography> zAutobiographys=zAutobiographyService.listByTerm(userId,termId);
+ List<ZAutobiography> zAutobiographys=zAutobiographyService.listByTerm(userId,term);
return AjaxResult.success(zAutobiographys);
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java
index 82753e6..264df42 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java
@@ -39,7 +39,7 @@
private ZfEventService zfEventService;
@GetMapping("/all")
- public AjaxResult listAll(ZfEvent zfEvent){
+ public AjaxResult listAll(ZfEvent zfEvent) {
Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
return zfEventService.selectDataList(zfEvent, pageNum, pageSize);
@@ -52,12 +52,16 @@
// @PreAuthorize("@ss.hasPermi('system:property:export')")
@Log(title = "瀹跺涵澶т簨浠惰褰�", businessType = BusinessType.EXPORT)
@PostMapping("/export")
- public void export(HttpServletResponse response, ZfEvent zfEvent)
- {
+ public void export(HttpServletResponse response, ZfEvent zfEvent) {
List<ZfEvent> list = zfEventService.selectByCondition(zfEvent);
- log.info("瀵煎嚭璁板綍涓�:{}",list);
+ log.info("瀵煎嚭璁板綍涓�:{}", list);
ExcelUtil<ZfEvent> util = new ExcelUtil<>(ZfEvent.class);
util.exportExcel(response, list, "瀹跺涵澶т簨浠惰褰曟暟鎹�");
+
+ }
+
+ public static void main(String[] args) {
+ System.out.println();
}
/**
@@ -65,8 +69,8 @@
*/
@Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.IMPORT)
@PostMapping("/importData")
- public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception
- {
+ public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception {
+
return zfEventService.importExcel(file);
}
@@ -76,19 +80,18 @@
*/
// @PreAuthorize("@ss.hasPermi('system:property:query')")
@GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id)
- {
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(zfEventService.getById(id));
}
//
+
/**
* 鏂板瀹跺涵澶т簨浠惰褰�
*/
// @PreAuthorize("@ss.hasPermi('system:property:add')")
@Log(title = "瀹跺涵澶т簨浠惰褰�", businessType = BusinessType.INSERT)
@PostMapping
- public AjaxResult add(@RequestBody ZfEvent zfEvent)
- {
+ public AjaxResult add(@RequestBody ZfEvent zfEvent) {
return zfEventService.addData2(zfEvent);
}
@@ -98,19 +101,18 @@
// @PreAuthorize("@ss.hasPermi('system:property:edit')")
@Log(title = "瀹跺涵澶т簨浠惰褰�", businessType = BusinessType.UPDATE)
@PutMapping
- public AjaxResult edit(@RequestBody ZfEvent zfEvent)
- {
+ public AjaxResult edit(@RequestBody ZfEvent zfEvent) {
return toAjax(zfEventService.updateById(zfEvent));
}
//
+
/**
* 鎵归噺鍒犻櫎瀹跺涵澶т簨浠惰褰�
*/
// @PreAuthorize("@ss.hasPermi('system:property:remove')")
@Log(title = "瀹跺涵澶т簨浠惰褰�", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids)
- {
+ public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(zfEventService.removeByIds(Arrays.asList(ids)));
}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZAutobiography.java b/zhang-content/src/main/java/com/ruoyi/domain/ZAutobiography.java
index 848395f..e4c2731 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZAutobiography.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZAutobiography.java
@@ -32,11 +32,22 @@
/**
* 鏃舵湡
*/
- private Integer type;
+ private String term;
/**
* 鑷紶鍐呭
*/
private String content;
+ /**
+ * 寮�濮嬪勾榫�
+ */
+ private String ageBegin;
+
+ /**
+ * 缁撴潫骞撮緞
+ */
+ private String ageEnd;
+
+
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZAutobiographyService.java b/zhang-content/src/main/java/com/ruoyi/service/ZAutobiographyService.java
index c028f34..9aa51e9 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZAutobiographyService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZAutobiographyService.java
@@ -18,5 +18,5 @@
List<ZAutobiography> selectAutobiographyList(Long userId);
- List<ZAutobiography> listByTerm(Long userId,Integer termId);
+ List<ZAutobiography> listByTerm(Long userId,String term);
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZAutobiographyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZAutobiographyServiceImpl.java
index 6e8ee6e..b06d071 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZAutobiographyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZAutobiographyServiceImpl.java
@@ -29,11 +29,11 @@
}
@Override
- public List<ZAutobiography> listByTerm(Long userId,Integer termId) {
+ public List<ZAutobiography> listByTerm(Long userId,String term) {
LambdaQueryWrapper<ZAutobiography> lqw = new LambdaQueryWrapper<>();
lqw.eq(ZAutobiography::getUserId,userId);
- lqw.eq(ZAutobiography::getType,termId);
+ lqw.eq(ZAutobiography::getTerm,term);
return list(lqw);
}
}
--
Gitblit v1.9.1