浏览代码

修改留言的存储

wuweihao 4 年之前
父节点
当前提交
c6ebea4ce1

+ 2 - 2
gis_cms/src/main/java/com/gis/cms/controller/WebManageController.java

@@ -109,8 +109,8 @@ public class WebManageController {
     }
 
 
-    @WebControllerLog(description = "门户网站-悼念留言", addDb = true)
-    @ApiOperation(value = "门户网站-悼念留言")
+    @WebControllerLog(description = "门户网站-保存悼念留言", addDb = true)
+    @ApiOperation(value = "门户网站-保存悼念留言")
     @PostMapping("mourn/save")
     public Result mournSave(@Valid @RequestBody MournDto param) {
         return mournService.saveEntity(param);

+ 1 - 1
gis_cms/src/main/java/com/gis/cms/mapper/MournMapper.java

@@ -23,5 +23,5 @@ public interface MournMapper extends IBaseMapper<MournEntity, Long> {
     @Select("select a.*, b.unit, b.real_name, b.nick_name " +
             "from tb_mourn a left join sys_user b on b.id=a.user_id " +
             "where a.is_delete = '0' and a.martyr_id=#{martyrId} and display=1")
-    List<MournEntity> findByMartyrIdMapper(Long martyrId);
+    List<MournVo> findByMartyrIdMapper(Long martyrId);
 }

+ 2 - 2
gis_cms/src/main/java/com/gis/cms/service/impl/FileServiceImpl.java

@@ -84,8 +84,8 @@ public class FileServiceImpl extends IBaseServiceImpl<FileEntity, Long> implemen
         if (!fileUtils.checkFile(file)) {
             throw new BaseRuntimeException("非法文件, 请重新上传");
         }
-        String timeName = getTimeName(file);
-        dir = dir + "/" + timeName;
+        String CommentVoName = getTimeName(file);
+        dir = dir + "/" + CommentVoName;
         String savePath = configConstant.serverBasePath + dir ;
         try {
             FileUtil.writeFromStream(file.getInputStream(), savePath);

+ 1 - 1
gis_cms/src/main/java/com/gis/cms/service/impl/MournServiceImpl.java

@@ -60,7 +60,7 @@ public class MournServiceImpl extends IBaseServiceImpl<MournEntity, Long> implem
 
     @Override
     public Result mournComment(Long martyrId) {
-       List<MournEntity> list = entityMapper.findByMartyrIdMapper(martyrId);
+       List<MournVo> list = entityMapper.findByMartyrIdMapper(martyrId);
         return Result.success(list);
     }