Bladeren bron

大版本更新

wuweihao 4 jaren geleden
bovenliggende
commit
c3a1742078
73 gewijzigde bestanden met toevoegingen van 2692 en 94 verwijderingen
  1. 3 0
      README.md
  2. 5 5
      gis_application/src/main/resources/data/shutdown.sh
  3. 0 29
      gis_application/src/main/resources/data/start.sh
  4. 12 0
      gis_application/src/main/resources/data/startup.sh
  5. 0 13
      gis_common/pom.xml
  6. 3 2
      gis_common/src/main/java/com/gis/common/constant/ConfigConstant.java
  7. 1 1
      gis_domain/src/main/java/com/gis/domain/dto/GoogsTypeDto.java
  8. 42 0
      gis_domain/src/main/java/com/gis/domain/dto/BookDto.java
  9. 47 0
      gis_domain/src/main/java/com/gis/domain/dto/CountAnswerDto.java
  10. 13 6
      gis_domain/src/main/java/com/gis/domain/dto/ExhibitionDto.java
  11. 8 4
      gis_domain/src/main/java/com/gis/domain/dto/GoodsDto.java
  12. 25 0
      gis_domain/src/main/java/com/gis/domain/dto/GuideDto.java
  13. 6 0
      gis_domain/src/main/java/com/gis/domain/dto/NewsDto.java
  14. 31 0
      gis_domain/src/main/java/com/gis/domain/dto/ProfileDto.java
  15. 29 0
      gis_domain/src/main/java/com/gis/domain/dto/QuestionDto.java
  16. 23 0
      gis_domain/src/main/java/com/gis/domain/dto/QuestionGroupDto.java
  17. 32 0
      gis_domain/src/main/java/com/gis/domain/dto/SlideshowDto.java
  18. 37 0
      gis_domain/src/main/java/com/gis/domain/po/BookEntity.java
  19. 51 0
      gis_domain/src/main/java/com/gis/domain/po/CountAnswerEntity.java
  20. 7 1
      gis_domain/src/main/java/com/gis/domain/po/ExhibitionEntity.java
  21. 19 0
      gis_domain/src/main/java/com/gis/domain/po/GoodsAgeEntity.java
  22. 8 3
      gis_domain/src/main/java/com/gis/domain/po/GoodsEntity.java
  23. 19 0
      gis_domain/src/main/java/com/gis/domain/po/GuideEntity.java
  24. 8 1
      gis_domain/src/main/java/com/gis/domain/po/NewsEntity.java
  25. 27 0
      gis_domain/src/main/java/com/gis/domain/po/OnlineExhibitionEntity.java
  26. 26 0
      gis_domain/src/main/java/com/gis/domain/po/ProfileEntity.java
  27. 41 0
      gis_domain/src/main/java/com/gis/domain/po/QuestionEntity.java
  28. 40 0
      gis_domain/src/main/java/com/gis/domain/po/QuestionGroupEntity.java
  29. 30 0
      gis_domain/src/main/java/com/gis/domain/po/SlideshowEntity.java
  30. 45 0
      gis_domain/src/main/java/com/gis/domain/vo/CountAnswerVo.java
  31. 16 0
      gis_mapper/src/main/java/com/gis/mapper/BookMapper.java
  32. 20 0
      gis_mapper/src/main/java/com/gis/mapper/CountAnswerMapper.java
  33. 21 0
      gis_mapper/src/main/java/com/gis/mapper/GoodsAgeMapper.java
  34. 17 0
      gis_mapper/src/main/java/com/gis/mapper/GuideMapper.java
  35. 15 0
      gis_mapper/src/main/java/com/gis/mapper/OnlineExhibitionMapper.java
  36. 18 0
      gis_mapper/src/main/java/com/gis/mapper/ProfileMapper.java
  37. 19 0
      gis_mapper/src/main/java/com/gis/mapper/QuestionGroupMapper.java
  38. 28 0
      gis_mapper/src/main/java/com/gis/mapper/QuestionMapper.java
  39. 18 0
      gis_mapper/src/main/java/com/gis/mapper/SlideshowMapper.java
  40. 26 0
      gis_service/src/main/java/com/gis/service/BookService.java
  41. 21 0
      gis_service/src/main/java/com/gis/service/CountAnswerService.java
  42. 18 0
      gis_service/src/main/java/com/gis/service/GoodsAgeService.java
  43. 2 2
      gis_service/src/main/java/com/gis/service/GoodsTypeService.java
  44. 24 0
      gis_service/src/main/java/com/gis/service/GuideService.java
  45. 23 0
      gis_service/src/main/java/com/gis/service/OnlineExhibitionService.java
  46. 24 0
      gis_service/src/main/java/com/gis/service/ProfileService.java
  47. 31 0
      gis_service/src/main/java/com/gis/service/QuestionGroupService.java
  48. 34 0
      gis_service/src/main/java/com/gis/service/QuestionService.java
  49. 24 0
      gis_service/src/main/java/com/gis/service/SlideshowService.java
  50. 110 0
      gis_service/src/main/java/com/gis/service/impl/BookServiceImpl.java
  51. 4 0
      gis_service/src/main/java/com/gis/service/impl/CommentServiceImpl.java
  52. 139 0
      gis_service/src/main/java/com/gis/service/impl/CountAnswerServiceImpl.java
  53. 8 9
      gis_service/src/main/java/com/gis/service/impl/ExhibitionServiceImpl.java
  54. 68 0
      gis_service/src/main/java/com/gis/service/impl/GoodsAgeServiceImpl.java
  55. 4 5
      gis_service/src/main/java/com/gis/service/GoodsTypeServiceImpl.java
  56. 75 0
      gis_service/src/main/java/com/gis/service/impl/GuideServiceImpl.java
  57. 61 0
      gis_service/src/main/java/com/gis/service/impl/OnlineExhibitionServiceImpl.java
  58. 95 0
      gis_service/src/main/java/com/gis/service/impl/ProfileServiceImpl.java
  59. 227 0
      gis_service/src/main/java/com/gis/service/impl/QuestionGroupServiceImpl.java
  60. 144 0
      gis_service/src/main/java/com/gis/service/impl/QuestionServiceImpl.java
  61. 95 0
      gis_service/src/main/java/com/gis/service/impl/SlideshowServiceImpl.java
  62. 81 0
      gis_web/src/main/java/com/gis/web/controller/BookController.java
  63. 59 0
      gis_web/src/main/java/com/gis/web/controller/CountAnswerController.java
  64. 55 0
      gis_web/src/main/java/com/gis/web/controller/GoodsAgeController.java
  65. 1 1
      gis_web/src/main/java/com/gis/web/controller/GoodsController.java
  66. 5 10
      gis_web/src/main/java/com/gis/web/controller/GoodsTypeController.java
  67. 69 0
      gis_web/src/main/java/com/gis/web/controller/GuideController.java
  68. 1 1
      gis_web/src/main/java/com/gis/web/controller/NewsController.java
  69. 72 0
      gis_web/src/main/java/com/gis/web/controller/OnlineExhibitionController.java
  70. 81 0
      gis_web/src/main/java/com/gis/web/controller/ProfileController.java
  71. 117 0
      gis_web/src/main/java/com/gis/web/controller/QuestionGroupController.java
  72. 83 0
      gis_web/src/main/java/com/gis/web/controller/SlideshowController.java
  73. 1 1
      gis_web/src/main/java/com/gis/web/controller/WebController.java

+ 3 - 0
README.md

@@ -1,2 +1,5 @@
 # museum_dali 大理博物馆 2021-06-07
 
+# sit
+    back: http://8.135.106.227/dali/
+

+ 5 - 5
gis_application/src/main/resources/data/shutdown.sh

@@ -1,11 +1,11 @@
 #!/bin/bash
-RESOURCE_NAME=army_zhengzhou.jar
-   tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
+RESOURCE_NAME=army_xinjiang.jar
+   Pid=`awk '{print $1}' tpid`
 
-if [ ${tpid} ]; then
+if [ ${Pid} ]; then
+kill -9 $Pid
 echo 'Kill Process!'
-kill -9 $tpid
 else
-echo 'Stop Success!'
+echo 'Stop failed!'
 fi
 

+ 0 - 29
gis_application/src/main/resources/data/start.sh

@@ -1,29 +0,0 @@
-#!/bin/sh
-RESOURCE_NAME=army_zhengzhou.jar
-tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
-if [ ${tpid} ]; then
-echo 'Stop Process...'
-kill -15 $tpid
-fi
-
-sleep 5
-
-tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
-
-if [ ${tpid} ]; then
-echo 'Kill Process!'
-kill -9 $tpid
-else
-echo 'Stop Success!'
-fi
-
-tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
-if [ ${tpid} ]; then
-    echo 'App is running.'
-else
-    echo 'App is NOT running.'
-fi
-rm -f tpid
-nohup java -jar ./$RESOURCE_NAME --spring.profiles.active=pro   &
-echo $! > tpid
-echo Start Success!

+ 12 - 0
gis_application/src/main/resources/data/startup.sh

@@ -0,0 +1,12 @@
+#!/bin/sh
+RESOURCE_NAME=army_xinjiang.jar
+rm -f tpid
+nohup java -jar ./$RESOURCE_NAME --spring.profiles.active=sit & echo $! > tpid
+echo Start Success!
+echo
+
+#tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
+
+
+
+

+ 0 - 13
gis_common/pom.xml

@@ -113,19 +113,6 @@
             <artifactId>jjwt</artifactId>
         </dependency>
 
-        <!--aliyun sdk-->
-        <!--<dependency>-->
-            <!--<groupId>com.aliyun</groupId>-->
-            <!--<artifactId>aliyun-java-sdk-core</artifactId>-->
-        <!--</dependency>-->
-        <!--<dependency>-->
-            <!--<groupId>com.aliyun</groupId>-->
-            <!--<artifactId>aliyun-java-sdk-dysmsapi</artifactId>-->
-        <!--</dependency>-->
-        <!--<dependency>-->
-            <!--<groupId>com.aliyun.oss</groupId>-->
-            <!--<artifactId>aliyun-sdk-oss</artifactId>-->
-        <!--</dependency>-->
 
 
         <!--tk.mybatis 依赖-->

+ 3 - 2
gis_common/src/main/java/com/gis/common/constant/ConfigConstant.java

@@ -19,8 +19,9 @@ public class ConfigConstant {
     @Value("${redis.prefix}")
     public  String redisPrefix;
 
-//    @Value("${server.url.prefix}")
-//    public String serverUrlPrefix;
+//    /**允许上传的文件后缀*/
+//    @Value("${file.allow}")
+//    public String fileAllow;
 
 //    @Value("${project.en}")
 //    public String projectEn;

+ 1 - 1
gis_domain/src/main/java/com/gis/domain/dto/GoogsTypeDto.java

@@ -9,7 +9,7 @@ import javax.validation.constraints.NotBlank;
  * Created by owen on 2021/6/8 0008 12:13
  */
 @Data
-public class GoogsTypeDto {
+public class BaseNameDto {
 
     @ApiModelProperty(value = "id, 修改时必须传,新增忽略", name = "id")
     private Long id;

+ 42 - 0
gis_domain/src/main/java/com/gis/domain/dto/BookDto.java

@@ -0,0 +1,42 @@
+package com.gis.domain.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.time.LocalDate;
+
+/**
+ * Created by owen on 2021/8/13 0013 10:45
+ * 轮播图
+ */
+@Data
+public class BookDto {
+
+
+    @ApiModelProperty(value = "id, 修改时必须传,新增忽略", name = "id")
+    private Long id;
+
+    @NotBlank(message = "名称不能为空")
+    @ApiModelProperty(value = "名称",required = true)
+    private String name;
+
+    @NotBlank(message = "出版时间不能为空")
+    @ApiModelProperty(value = "出版时间",required = true)
+    private String pubDate;
+
+    @NotBlank(message = "图片不能为空")
+    @ApiModelProperty(value = "图片",required = true)
+    private String description;
+
+    @NotBlank(message = "图片不能为空")
+    @ApiModelProperty(value = "图片, ossUrl",required = true)
+    private String thumb;
+
+
+    @ApiModelProperty(value = "文件名")
+    private String fileName;
+
+
+
+}

+ 47 - 0
gis_domain/src/main/java/com/gis/domain/dto/CountAnswerDto.java

@@ -0,0 +1,47 @@
+package com.gis.domain.dto;
+
+import com.gis.domain.po.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * Created by owen on 2021/6/24 0024 18:18
+ * 问题答案表
+ */
+@Data
+public class CountAnswerDto {
+
+
+//    @ApiModelProperty(value = "题目" )
+//    private String questionId;
+
+    @ApiModelProperty(value = "题号" )
+    private Integer num;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double a;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double b;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double c;
+
+//    @ApiModelProperty(value = "答案数量" )
+//    private Double d;
+//
+//    @ApiModelProperty(value = "答案数量" )
+//    private Double e;
+//
+//    @ApiModelProperty(value = "答案数量" )
+//    private Double f;
+//
+//    @ApiModelProperty(value = "答案数量" )
+//    private Double g;
+
+    @ApiModelProperty(value = "题组id" )
+    private Long questionGroupId;
+}

+ 13 - 6
gis_domain/src/main/java/com/gis/domain/dto/ExhibitionDto.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import javax.validation.constraints.NotBlank;
+import java.time.LocalDateTime;
 import java.util.Date;
 
 /**
@@ -23,15 +24,21 @@ public class ExhibitionDto {
     private String content;
 
     @ApiModelProperty(value = "开始时间", required = true)
-    private Date startTime;
+    private LocalDateTime startTime;
 
     @ApiModelProperty(value = "结束时间", required = true)
-    private Date endTime;
+    private LocalDateTime endTime;
 
-    @ApiModelProperty(value = "文件id, 多个以逗号分隔, 修改时:把新增加的fileId传给后端; 默认拿序号最前面的作为首页")
-    private String fileIds;
+    @ApiModelProperty(value = "图片", required = true)
+    private String thumb;
 
-    @ApiModelProperty(value = "目录")
-    private String code;
+    @ApiModelProperty(value = "文件名")
+    private String fileName;
+
+//    @ApiModelProperty(value = "文件id, 多个以逗号分隔, 修改时:把新增加的fileId传给后端; 默认拿序号最前面的作为首页")
+//    private String fileIds;
+
+//    @ApiModelProperty(value = "目录")
+//    private String code;
 
 }

+ 8 - 4
gis_domain/src/main/java/com/gis/domain/dto/GoodsDto.java

@@ -24,6 +24,10 @@ public class GoodsDto {
     @ApiModelProperty(value = "缩略图url", required = true)
     private String thumb;
 
+    @NotBlank(message = "类型不能为空")
+    @ApiModelProperty(value = "类型: 图片:img, 模型:model", required = true)
+    private String type;
+
 //    @ApiModelProperty(value = "文件地址", required = true)
 //    private String filePath;
 
@@ -37,13 +41,13 @@ public class GoodsDto {
     private Long goodsTypeId;
 
     @ApiModelProperty(value = "年代", required = true)
-    private String age;
+    private Long goodsAgeId;
 
-    @ApiModelProperty(value = "模型URL", required = true)
+    @ApiModelProperty(value = "模型URL")
     private String modelUrl;
 
-    @ApiModelProperty(value = "模型是否显示", required = true)
-    private Integer display;
+//    @ApiModelProperty(value = "模型是否显示", required = true)
+//    private Integer display;
 
 
 

+ 25 - 0
gis_domain/src/main/java/com/gis/domain/dto/GuideDto.java

@@ -0,0 +1,25 @@
+package com.gis.domain.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * Created by owen on 2021/8/13 0013 10:45
+ * 参观指南
+ */
+@Data
+public class GuideDto {
+
+
+    @ApiModelProperty(value = "id, 修改时必须传,新增忽略", name = "id")
+    private Long id;
+
+    @NotBlank(message = "内容不能为空")
+    @ApiModelProperty(value = "内容", required = true)
+    private String content;
+
+
+
+}

+ 6 - 0
gis_domain/src/main/java/com/gis/domain/dto/NewsDto.java

@@ -28,6 +28,12 @@ public class NewsDto {
     @ApiModelProperty(value = "目录", required = true)
     private String code;
 
+    @ApiModelProperty(value = "信息来源: edit:编辑, wechat:公众号")
+    private String source;
+
+    @ApiModelProperty(value = "公众号url")
+    private String wxUrl;
+
 
 
 }

+ 31 - 0
gis_domain/src/main/java/com/gis/domain/dto/ProfileDto.java

@@ -0,0 +1,31 @@
+package com.gis.domain.dto;
+
+import com.gis.domain.po.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+import javax.validation.constraints.NotBlank;
+
+/**
+ * Created by owen on 2021/8/13 0013 10:45
+ * 轮播图
+ */
+@Data
+public class ProfileDto {
+
+
+    @ApiModelProperty(value = "id, 修改时必须传,新增忽略", name = "id")
+    private Long id;
+
+    @NotBlank(message = "类型不能为空")
+    @ApiModelProperty(value = "类型:本官介绍:introduce,历史革命:history,机构职能:organ", required = true)
+    private String type;
+
+    @NotBlank(message = "内容不能为空")
+    @ApiModelProperty(value = "内容", required = true)
+    private String content;
+
+
+
+}

+ 29 - 0
gis_domain/src/main/java/com/gis/domain/dto/QuestionDto.java

@@ -0,0 +1,29 @@
+package com.gis.domain.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Created by owen on 2021/6/24 0024 18:12
+ */
+@Data
+public class QuestionDto {
+
+    @ApiModelProperty(value = "id")
+    private Long Id;
+
+    @ApiModelProperty(value = "题目" )
+    private String question;
+
+    @ApiModelProperty(value = "题号" )
+    private Integer num;
+
+    @ApiModelProperty(value = "答案" )
+    private String answer;
+
+    @ApiModelProperty(value = "正确答案" )
+    private String correct;
+
+    @ApiModelProperty(value = "排序" )
+    private Integer sort;
+}

+ 23 - 0
gis_domain/src/main/java/com/gis/domain/dto/QuestionGroupDto.java

@@ -0,0 +1,23 @@
+package com.gis.domain.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * Created by owen on 2021/6/24 0024 18:12
+ */
+@Data
+public class QuestionGroupDto {
+
+    @ApiModelProperty(value = "id")
+    private Long Id;
+
+    @NotBlank(message = "内容不能为空")
+    @ApiModelProperty(value = "内容", required = true)
+    private String name;
+
+    @ApiModelProperty(value = "问题id, 多个以逗号分隔, 修改时:把所有的questionIds传给后端(旧的id没传过来会解绑)")
+    private String questionIds;
+}

+ 32 - 0
gis_domain/src/main/java/com/gis/domain/dto/SlideshowDto.java

@@ -0,0 +1,32 @@
+package com.gis.domain.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * Created by owen on 2021/8/13 0013 11:04
+ */
+@Data
+public class SlideshowDto {
+
+
+    @ApiModelProperty(value = "id, 修改时必须传,新增忽略", name = "id")
+    private Long id;
+
+    @NotBlank(message = "链接不能为空")
+    @ApiModelProperty(value = "链接", required = true)
+    private String url;
+
+    @NotBlank(message = "oss路径不能为空")
+    @ApiModelProperty(value = "oss路径", required = true)
+    private String ossPath;
+
+    @NotBlank(message = "文件名不能为空")
+    @ApiModelProperty(value = "文件名", required = true)
+    private String fileName;
+
+    @ApiModelProperty(value = "排序")
+    private Integer sort;
+}

+ 37 - 0
gis_domain/src/main/java/com/gis/domain/po/BookEntity.java

@@ -0,0 +1,37 @@
+package com.gis.domain.po;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * Created by owen on 2021/8/16 0013 10:45
+ * 书籍表
+ */
+@Data
+@Table(name = "tb_book")
+public class BookEntity extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = -1072664317805692267L;
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    @ApiModelProperty(value = "出版时间")
+    private String pubDate;
+
+    @ApiModelProperty(value = "简介")
+    private String description;
+
+    @ApiModelProperty(value = "图片, ossUrl")
+    private String thumb;
+
+    @ApiModelProperty(value = "文件名")
+    private String fileName;
+
+
+
+}

+ 51 - 0
gis_domain/src/main/java/com/gis/domain/po/CountAnswerEntity.java

@@ -0,0 +1,51 @@
+package com.gis.domain.po;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * Created by owen on 2021/6/24 0024 18:18
+ * 问题答案表
+ */
+@Data
+@Table(name = "tb_count_answer")
+public class CountAnswerEntity extends BaseEntity implements Serializable {
+
+
+    private static final long serialVersionUID = 1661572206828041429L;
+//    @ApiModelProperty(value = "题目id" )
+//    private Long questionId;
+
+    @ApiModelProperty(value = "题组id" )
+    private Long questionGroupId;
+
+    @ApiModelProperty(value = "题号" )
+    private Integer num;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double a;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double b;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double c;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double d;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double e;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double f;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double g;
+
+
+}

+ 7 - 1
gis_domain/src/main/java/com/gis/domain/po/ExhibitionEntity.java

@@ -9,7 +9,7 @@ import java.time.LocalDateTime;
 
 /**
  * Created by owen on 2021/4/20 0010 17:39
- * 展览表
+ * 展览资讯
  */
 @Data
 @Table(name = "tb_exhibition")
@@ -36,6 +36,12 @@ public class ExhibitionEntity extends BaseEntity {
     @ApiModelProperty(value = "状态, unstart:未开始, start:开始, end:结束")
     private String status;
 
+    @ApiModelProperty(value = "图片", required = true)
+    private String thumb;
+
+    @ApiModelProperty(value = "文件名")
+    private String fileName;
+
 
 
 }

+ 19 - 0
gis_domain/src/main/java/com/gis/domain/po/GoodsAgeEntity.java

@@ -0,0 +1,19 @@
+package com.gis.domain.po;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+
+/**
+ * Created by owen on 2021/4/20 0010 17:39
+ * 臧品分类表
+ */
+@Data
+@Table(name = "tb_goods_age")
+public class GoodsAgeEntity extends BaseEntity {
+
+    @ApiModelProperty(value = "名称" )
+    private String name;
+
+}

+ 8 - 3
gis_domain/src/main/java/com/gis/domain/po/GoodsEntity.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import javax.persistence.Table;
+import javax.validation.constraints.NotBlank;
 
 /**
  * Created by owen on 2021/4/20 0010 17:39
@@ -20,7 +21,7 @@ public class GoodsEntity extends BaseEntity {
     private Long goodsTypeId;
 
     @ApiModelProperty(value = "年代")
-    private String age;
+    private Long goodsAgeId;
 
     @ApiModelProperty(value = "缩略图url")
     private String thumb;
@@ -37,12 +38,16 @@ public class GoodsEntity extends BaseEntity {
     @ApiModelProperty(value = "模型URL")
     private String modelUrl;
 
-    @ApiModelProperty(value = "模型是否显示")
-    private Integer display;
+//    @ApiModelProperty(value = "模型是否显示")
+//    private Integer display;
 
     @ApiModelProperty(value = "用户名")
     private String userName;
 
+    @NotBlank(message = "类型不能为空")
+    @ApiModelProperty(value = "类型: 图片:img, 模型:model", required = true)
+    private String type;
+
 
 
 }

+ 19 - 0
gis_domain/src/main/java/com/gis/domain/po/GuideEntity.java

@@ -0,0 +1,19 @@
+package com.gis.domain.po;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+
+/**
+ * Created by owen on 2021/6/10 0010 17:39
+ * 参观指南
+ */
+@Data
+@Table(name = "tb_guide")
+public class GuideEntity extends BaseEntity {
+
+    @ApiModelProperty(value = "模块" )
+    private String content;
+
+}

+ 8 - 1
gis_domain/src/main/java/com/gis/domain/po/NewsEntity.java

@@ -8,7 +8,7 @@ import java.util.Date;
 
 /**
  * Created by owen on 2021/4/20 0010 17:39
- * 新闻资讯
+ * 资讯-资讯内容
  */
 @Data
 @Table(name = "tb_news")
@@ -32,6 +32,13 @@ public class NewsEntity extends BaseEntity {
     @ApiModelProperty(value = "阅读量")
     private String visit;
 
+    @ApiModelProperty(value = "信息来源: edit:编辑, wechat:公众号")
+    private String source;
+
+    @ApiModelProperty(value = "公众号url")
+    private String wxUrl;
+
+
 
 
 }

+ 27 - 0
gis_domain/src/main/java/com/gis/domain/po/OnlineExhibitionEntity.java

@@ -0,0 +1,27 @@
+package com.gis.domain.po;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * Created by owen on 2021/4/20 0010 17:39
+ * 线上展览表
+ */
+@Data
+@Table(name = "tb_exhibition_online")
+public class OnlineExhibitionEntity extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 7534518954296010217L;
+
+    @ApiModelProperty(value = "链接地址" )
+    private String url;
+
+
+
+
+
+}

+ 26 - 0
gis_domain/src/main/java/com/gis/domain/po/ProfileEntity.java

@@ -0,0 +1,26 @@
+package com.gis.domain.po;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * Created by owen on 2021/8/13 0013 10:45
+ * 概况表
+ */
+@Data
+@Table(name = "tb_profile")
+public class ProfileEntity extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = -8914297978229454211L;
+    @ApiModelProperty(value = "类型:本官介绍:introduce,历史革命:history,机构职能:organ")
+    private String type;
+
+    @ApiModelProperty(value = "内容")
+    private String content;
+
+
+
+}

+ 41 - 0
gis_domain/src/main/java/com/gis/domain/po/QuestionEntity.java

@@ -0,0 +1,41 @@
+package com.gis.domain.po;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * Created by owen on 2021/6/24 0024 18:18
+ * 问题答案表
+ */
+@Data
+@Table(name = "tb_question")
+public class QuestionEntity extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 6274674913714157921L;
+
+    @ApiModelProperty(value = "题目" )
+    private String question;
+
+    @ApiModelProperty(value = "题号" )
+    private Integer num;
+
+    @ApiModelProperty(value = "类型: radio:单选, :多选" )
+    private String type;
+
+    @ApiModelProperty(value = "答案" )
+    private String answer;
+
+    @JSONField(serialize = false)
+    @ApiModelProperty(value = "正确答案" )
+    private String correct;
+
+    @ApiModelProperty(value = "排序" )
+    private Integer sort;
+
+    @ApiModelProperty(value = "题组id" )
+    private Long questionGroupId;
+}

+ 40 - 0
gis_domain/src/main/java/com/gis/domain/po/QuestionGroupEntity.java

@@ -0,0 +1,40 @@
+package com.gis.domain.po;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import java.io.Serializable;
+
+/**
+ * Created by owen on 2021/6/24 0024 17:23
+ * 题组表
+ */
+@Data
+@Table(name = "tb_question_group")
+public class QuestionGroupEntity extends BaseEntity implements Serializable {
+
+
+    private static final long serialVersionUID = -6399165028151879372L;
+
+    @ApiModelProperty(value = "名称" )
+    private String name;
+
+    @ApiModelProperty(value = "用户名")
+    private String userName;
+
+//    @ApiModelProperty(value = "状态,0:草稿中, 1:待审核, 2:审核不通过, 3:审核通过")
+//    private Integer status;
+
+    @ApiModelProperty(value = "答题量")
+    private Integer visit;
+
+    @ApiModelProperty(value = "是否显示,1:显示, 0:不显示, 默认显示")
+    private Integer display;
+
+    @Transient
+    @ApiModelProperty(value = "题目数量")
+    private Integer questionCount;
+
+}

+ 30 - 0
gis_domain/src/main/java/com/gis/domain/po/SlideshowEntity.java

@@ -0,0 +1,30 @@
+package com.gis.domain.po;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * Created by owen on 2021/8/13 0013 10:45
+ * 轮播图
+ */
+@Data
+@Table(name = "tb_slideshow")
+public class SlideshowEntity extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = -6941760940687166194L;
+    @ApiModelProperty(value = "链接")
+    private String url;
+
+    @ApiModelProperty(value = "oss路径")
+    private String ossPath;
+
+    @ApiModelProperty(value = "文件名")
+    private String fileName;
+
+    @ApiModelProperty(value = "排序")
+    private Integer sort;
+
+}

+ 45 - 0
gis_domain/src/main/java/com/gis/domain/vo/CountAnswerVo.java

@@ -0,0 +1,45 @@
+package com.gis.domain.vo;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * Created by owen on 2021/6/24 0024 18:18
+ * 问题答案表
+ */
+@Data
+public class CountAnswerVo {
+
+
+    @ApiModelProperty(value = "题号" )
+    private Integer num;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double a;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double b;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double c;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double d;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double e;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double f;
+
+    @ApiModelProperty(value = "答案数量" )
+    private Double g;
+
+    @JSONField(serialize = false)
+    private LocalDateTime createTime;
+
+
+}

+ 16 - 0
gis_mapper/src/main/java/com/gis/mapper/BookMapper.java

@@ -0,0 +1,16 @@
+package com.gis.mapper;
+
+
+import com.gis.domain.po.BookEntity;
+import com.gis.domain.po.ProfileEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Component;
+
+
+@Component
+@Mapper
+public interface BookMapper extends IBaseMapper<BookEntity, Long> {
+
+
+
+}

+ 20 - 0
gis_mapper/src/main/java/com/gis/mapper/CountAnswerMapper.java

@@ -0,0 +1,20 @@
+package com.gis.mapper;
+
+
+import com.gis.domain.po.CountAnswerEntity;
+import com.gis.domain.po.ProfileEntity;
+import com.gis.domain.vo.CountAnswerVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+@Component
+@Mapper
+public interface CountAnswerMapper extends IBaseMapper<CountAnswerEntity, Long> {
+
+    @Select("select * from tb_count_answer where is_delete=0 and question_group_id=#{questionGroupId}")
+    List<CountAnswerVo> findByQuestionGroupId(Long questionGroupId);
+}

+ 21 - 0
gis_mapper/src/main/java/com/gis/mapper/GoodsAgeMapper.java

@@ -0,0 +1,21 @@
+package com.gis.mapper;
+
+
+import com.gis.domain.po.GoodsAgeEntity;
+import com.gis.domain.po.GoodsTypeEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Component;
+
+
+@Component
+@Mapper
+public interface GoodsAgeMapper extends IBaseMapper<GoodsAgeEntity, Long> {
+
+
+
+
+
+
+
+
+}

+ 17 - 0
gis_mapper/src/main/java/com/gis/mapper/GuideMapper.java

@@ -0,0 +1,17 @@
+package com.gis.mapper;
+
+
+import com.gis.domain.po.GuideEntity;
+import com.gis.domain.po.ProfileEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import org.springframework.stereotype.Component;
+
+
+@Component
+@Mapper
+public interface GuideMapper extends IBaseMapper<GuideEntity, Long> {
+
+
+
+}

+ 15 - 0
gis_mapper/src/main/java/com/gis/mapper/OnlineExhibitionMapper.java

@@ -0,0 +1,15 @@
+package com.gis.mapper;
+
+
+import com.gis.domain.po.OnlineExhibitionEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Component;
+
+
+@Component
+@Mapper
+public interface OnlineExhibitionMapper extends IBaseMapper<OnlineExhibitionEntity, Long> {
+
+
+
+}

+ 18 - 0
gis_mapper/src/main/java/com/gis/mapper/ProfileMapper.java

@@ -0,0 +1,18 @@
+package com.gis.mapper;
+
+
+import com.gis.domain.po.ProfileEntity;
+import com.gis.domain.po.SlideshowEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import org.springframework.stereotype.Component;
+
+
+@Component
+@Mapper
+public interface ProfileMapper extends IBaseMapper<ProfileEntity, Long> {
+
+
+    @Select("select * from tb_profile where is_delete=0 and type = #{type}")
+    ProfileEntity findByType(String type);
+}

+ 19 - 0
gis_mapper/src/main/java/com/gis/mapper/QuestionGroupMapper.java

@@ -0,0 +1,19 @@
+package com.gis.mapper;
+
+
+import com.gis.domain.po.QuestionGroupEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Update;
+import org.springframework.stereotype.Component;
+
+@Component
+@Mapper
+public interface QuestionGroupMapper extends IBaseMapper<QuestionGroupEntity, Long> {
+
+
+    @Update("update tb_question_group set display = 0 , update_time = NOW() where is_delete = 0")
+    void disableAll();
+
+    @Update("update tb_question_group set display = 1 , update_time = NOW() where is_delete = 0 and id=#{id}")
+    void enabledById(Long id);
+}

+ 28 - 0
gis_mapper/src/main/java/com/gis/mapper/QuestionMapper.java

@@ -0,0 +1,28 @@
+package com.gis.mapper;
+
+
+import com.gis.domain.po.QuestionEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+@Mapper
+public interface QuestionMapper extends IBaseMapper<QuestionEntity, Long> {
+
+
+    @Update("update tb_question set is_delete = 1 , update_time = NOW() where is_delete = 0 and question_group_id=#{questionGroupId} ")
+    void removeByQuestionGroupId(Long questionGroupId);
+
+    @Select("select * from tb_question where is_delete=0 and question_group_id=#{questionGroupId}")
+    List<QuestionEntity> findByQuestionGroupId(Long questionGroupId);
+
+    @Update("update tb_question set question_group_id = #{questionGroupId} , update_time = NOW() where is_delete = 0 and id in ( ${questionIds} ) ")
+    void updateQuestionGroupId(Long questionGroupId, String questionIds);
+
+    @Update("update tb_question set question_group_id = 0 , update_time = NOW() where is_delete = 0 and question_group_id=#{questionGroupId} ")
+    void disableByQuestionGroupId(Long groupId);
+}

+ 18 - 0
gis_mapper/src/main/java/com/gis/mapper/SlideshowMapper.java

@@ -0,0 +1,18 @@
+package com.gis.mapper;
+
+
+import com.gis.domain.po.SlideshowEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+@Component
+@Mapper
+public interface SlideshowMapper extends IBaseMapper<SlideshowEntity, Long> {
+
+    @Select("select * from tb_slideshow where is_delete=0 order by sort")
+    List<SlideshowEntity> list();
+}

+ 26 - 0
gis_service/src/main/java/com/gis/service/BookService.java

@@ -0,0 +1,26 @@
+package com.gis.service;
+
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.BookDto;
+import com.gis.domain.dto.PageDto;
+import com.gis.domain.dto.ProfileDto;
+import com.gis.domain.po.BookEntity;
+import com.gis.domain.po.ProfileEntity;
+import org.springframework.web.multipart.MultipartFile;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:14
+ */
+public interface BookService extends IBaseService<BookEntity, Long> {
+
+
+    Result<BookEntity> saveEntity(BookDto param);
+
+    Result remove(Long id);
+
+    Result upload(MultipartFile file);
+
+    Result search(PageDto param);
+}

+ 21 - 0
gis_service/src/main/java/com/gis/service/CountAnswerService.java

@@ -0,0 +1,21 @@
+package com.gis.service;
+
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.CountAnswerDto;
+import com.gis.domain.po.CountAnswerEntity;
+
+import java.util.List;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:14
+ */
+public interface CountAnswerService extends IBaseService<CountAnswerEntity, Long> {
+
+
+    Result<CountAnswerEntity> saveEntity(List<CountAnswerDto> param);
+
+
+    Result findByQuestionGroupId(Long questionGroupId, Integer type);
+}

+ 18 - 0
gis_service/src/main/java/com/gis/service/GoodsAgeService.java

@@ -0,0 +1,18 @@
+package com.gis.service;
+
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.BaseNameDto;
+import com.gis.domain.po.GoodsAgeEntity;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:14
+ */
+public interface GoodsAgeService extends IBaseService<GoodsAgeEntity, Long> {
+
+
+    Result remove(Long id);
+
+    Result saveEntity(BaseNameDto param);
+}

+ 2 - 2
gis_service/src/main/java/com/gis/service/GoodsTypeService.java

@@ -2,7 +2,7 @@ package com.gis.service;
 
 
 import com.gis.common.util.Result;
-import com.gis.domain.dto.GoogsTypeDto;
+import com.gis.domain.dto.BaseNameDto;
 import com.gis.domain.po.GoodsTypeEntity;
 
 
@@ -14,5 +14,5 @@ public interface GoodsTypeService extends IBaseService<GoodsTypeEntity, Long> {
 
     Result remove(Long id);
 
-    Result saveEntity(GoogsTypeDto param);
+    Result saveEntity(BaseNameDto param);
 }

+ 24 - 0
gis_service/src/main/java/com/gis/service/GuideService.java

@@ -0,0 +1,24 @@
+package com.gis.service;
+
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.GuideDto;
+import com.gis.domain.dto.ProfileDto;
+import com.gis.domain.po.GuideEntity;
+import com.gis.domain.po.ProfileEntity;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:14
+ */
+public interface GuideService extends IBaseService<GuideEntity, Long> {
+
+
+    Result<GuideEntity> saveEntity(GuideDto param);
+
+
+
+//    Result findById(Long id);
+
+
+}

+ 23 - 0
gis_service/src/main/java/com/gis/service/OnlineExhibitionService.java

@@ -0,0 +1,23 @@
+package com.gis.service;
+
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.ProfileDto;
+import com.gis.domain.po.OnlineExhibitionEntity;
+import com.gis.domain.po.ProfileEntity;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:14
+ */
+public interface OnlineExhibitionService extends IBaseService<OnlineExhibitionEntity, Long> {
+
+
+//    Result<ProfileEntity> saveEntity(ProfileDto param);
+
+    Result remove(Long id);
+
+    Result<OnlineExhibitionEntity> saveEntity(Long id, String url);
+
+//    Result upload(MultipartFile file);
+}

+ 24 - 0
gis_service/src/main/java/com/gis/service/ProfileService.java

@@ -0,0 +1,24 @@
+package com.gis.service;
+
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.ProfileDto;
+import com.gis.domain.po.ProfileEntity;
+import com.gis.domain.po.SlideshowEntity;
+import org.springframework.web.multipart.MultipartFile;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:14
+ */
+public interface ProfileService extends IBaseService<ProfileEntity, Long> {
+
+
+    Result<ProfileEntity> saveEntity(ProfileDto param);
+
+    Result remove(Long id);
+
+    Result findByType(String type);
+
+//    Result upload(MultipartFile file);
+}

+ 31 - 0
gis_service/src/main/java/com/gis/service/QuestionGroupService.java

@@ -0,0 +1,31 @@
+package com.gis.service;
+
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.PageDateDto;
+import com.gis.domain.dto.QuestionGroupDto;
+import com.gis.domain.po.QuestionGroupEntity;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:14
+ */
+public interface QuestionGroupService extends IBaseService<QuestionGroupEntity, Long> {
+
+
+    Result saveEntity(QuestionGroupDto param);
+
+    Result remove(Long id);
+
+    Result<QuestionGroupEntity> detail(Long id);
+
+    Result<QuestionGroupEntity> search(PageDateDto param, Integer display);
+
+//    Result apply(Long id);
+//
+////    Result audit(AuditDto param);
+//
+//    Result auditDetail(Long id);
+
+    Result updateDisplay(Long id);
+}

+ 34 - 0
gis_service/src/main/java/com/gis/service/QuestionService.java

@@ -0,0 +1,34 @@
+package com.gis.service;
+
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.QuestionDto;
+import com.gis.domain.po.QuestionEntity;
+
+import java.util.List;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:14
+ */
+public interface QuestionService extends IBaseService<QuestionEntity, Long> {
+
+
+    Result saveEntity(QuestionDto param);
+
+    Result remove(Long id);
+
+//    Result<QuestionEntityEntity> detail(Long id);
+
+    Result saveEntitys(List<QuestionDto> param);
+
+    void removeByQuestionGroupId(Long questionGroupId);
+
+    Result updateEntity(QuestionDto param);
+
+    List<QuestionEntity> findByQuestionGroupId(Long questionGroupId);
+
+    void updateQuestionGroupId(Long id, String questionIds);
+
+    void disableByQuestionGroupId(Long groupId);
+}

+ 24 - 0
gis_service/src/main/java/com/gis/service/SlideshowService.java

@@ -0,0 +1,24 @@
+package com.gis.service;
+
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.SlideshowDto;
+import com.gis.domain.po.SlideshowEntity;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.multipart.MultipartFile;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:14
+ */
+public interface SlideshowService extends IBaseService<SlideshowEntity, Long> {
+
+
+    Result<SlideshowEntity> saveEntity(SlideshowDto param);
+
+    Result remove(Long id);
+
+    Result upload(MultipartFile file);
+
+    Result<SlideshowEntity> list();
+}

+ 110 - 0
gis_service/src/main/java/com/gis/service/impl/BookServiceImpl.java

@@ -0,0 +1,110 @@
+package com.gis.service.impl;
+
+import com.gis.common.util.AliyunOssUtil;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.BookDto;
+import com.gis.domain.dto.PageDto;
+import com.gis.domain.po.BookEntity;
+import com.gis.domain.po.NewsEntity;
+import com.gis.mapper.IBaseMapper;
+import com.gis.mapper.BookMapper;
+import com.gis.service.BookService;
+import com.github.pagehelper.PageInfo;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+import tk.mybatis.mapper.entity.Condition;
+
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:16
+ */
+@Service
+public class BookServiceImpl extends IBaseServiceImpl<BookEntity, Long> implements BookService {
+
+    @Autowired
+    private BookMapper entityMapper;
+
+    @Autowired
+    AliyunOssUtil aliyunOssUtil;
+
+    @Override
+    public IBaseMapper<BookEntity, Long> getBaseMapper() {
+        return this.entityMapper;
+    }
+
+
+    @Override
+    public Result<BookEntity> saveEntity(BookDto param) {
+        Long id = param.getId();
+        BookEntity entity = null;
+        if (id == null) {
+
+            if (checkSize() > 5) {
+                return Result.failure("轮播图最多为5个");
+            }
+
+            entity = new BookEntity();
+            BeanUtils.copyProperties(param, entity);
+            this.save(entity);
+        } else {
+            entity = this.findById(id);
+            if (entity == null) {
+                return Result.failure("对象不存在: " + id);
+            }
+            BeanUtils.copyProperties(param, entity);
+            entity.setUpdateTime(LocalDateTime.now());
+            this.update(entity);
+        }
+        return Result.success(entity);
+
+    }
+
+    private Integer checkSize(){
+        List<BookEntity> all = this.findAll();
+        return all.size();
+    }
+
+
+    @Override
+    public Result remove(Long id) {
+        BookEntity entity = this.findById(id);
+        if (entity == null) {
+            return Result.success();
+        }
+        entity.setIsDelete(1);
+        entity.setUpdateTime(LocalDateTime.now());
+        this.update(entity);
+
+        return Result.success();
+    }
+
+
+    @Override
+    public Result upload(MultipartFile file) {
+        Map<String, Object> result = aliyunOssUtil.uploadByByte(file, "book/");
+        return Result.success(result);
+    }
+
+    @Override
+    public Result search(PageDto param) {
+        Condition condition = new Condition(BookEntity.class);
+        String searchKey = param.getSearchKey();
+        if (StringUtils.isNotBlank(searchKey)) {
+            searchKey = StringUtils.trim(searchKey);
+            condition.and().orLike("name", "%" + searchKey + "%");
+//                    .orLike("userName", "%" + searchKey + "%");
+        }
+
+
+        condition.orderBy("createTime").desc();
+        PageInfo<BookEntity> pageInfo = this.findAll(condition, param.getPageNum(), param.getPageSize());
+        return Result.success(pageInfo);
+    }
+}

+ 4 - 0
gis_service/src/main/java/com/gis/service/impl/CommentServiceImpl.java

@@ -48,6 +48,10 @@ public class CommentServiceImpl extends IBaseServiceImpl<CommentEntity, Long> im
             condition.and().andBetween("createTime", startTime, endTime);
         }
 
+        if (display != null) {
+            condition.and().andEqualTo("display", display);
+        }
+
         condition.orderBy("createTime").desc();
         PageInfo<CommentEntity> pageInfo = this.findAll(condition, param.getPageNum(), param.getPageSize());
         return Result.success(pageInfo);

+ 139 - 0
gis_service/src/main/java/com/gis/service/impl/CountAnswerServiceImpl.java

@@ -0,0 +1,139 @@
+package com.gis.service.impl;
+
+import cn.hutool.core.util.NumberUtil;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.CountAnswerDto;
+import com.gis.domain.po.CountAnswerEntity;
+import com.gis.domain.po.QuestionGroupEntity;
+import com.gis.domain.vo.CountAnswerVo;
+import com.gis.mapper.IBaseMapper;
+import com.gis.mapper.CountAnswerMapper;
+import com.gis.service.CountAnswerService;
+import com.gis.service.QuestionGroupService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:16
+ */
+@Service
+public class CountAnswerServiceImpl extends IBaseServiceImpl<CountAnswerEntity, Long> implements CountAnswerService {
+
+    @Autowired
+    private CountAnswerMapper entityMapper;
+
+    @Autowired
+    QuestionGroupService questionGroupService;
+
+
+    @Override
+    public IBaseMapper<CountAnswerEntity, Long> getBaseMapper() {
+        return this.entityMapper;
+    }
+
+
+    @Override
+    public Result<CountAnswerEntity> saveEntity(List<CountAnswerDto> param) {
+
+        for (CountAnswerDto countAnswerDto : param) {
+            CountAnswerEntity entity  = new CountAnswerEntity();
+            BeanUtils.copyProperties(countAnswerDto, entity);
+            this.save(entity);
+        }
+
+
+        return Result.success();
+
+    }
+
+    /**
+     * @param questionGroupId
+     * @param type 0:百分比, 1:计数
+     * @return
+     */
+    @Override
+    public Result findByQuestionGroupId(Long questionGroupId, Integer type) {
+        QuestionGroupEntity groupEntity = questionGroupService.findById(questionGroupId);
+
+        List<CountAnswerVo> answers = entityMapper.findByQuestionGroupId(questionGroupId);
+
+
+
+
+        CountAnswerVo vo = answers.get(0);
+        Map<String, Object> result = new HashMap<>();
+        result.put("name", groupEntity.getName());
+        result.put("createTime", vo.getCreateTime());
+
+
+        if (type == 1) {
+            result.put("answer", answers);
+        } else {
+            // 返回百分比
+            answers.forEach(p -> {
+
+                // 分母
+                Double a = p.getA()== null ? 0 : p.getA();
+                Double b = p.getB()== null ? 0 : p.getB();
+                Double c = p.getC()== null ? 0 : p.getC();
+                Double d = p.getD()== null ? 0 : p.getD();
+                Double e = p.getE()== null ? 0 : p.getE();
+                Double f = p.getF()== null ? 0 : p.getF();
+                Double g = p.getG()== null ? 0 : p.getG();
+                Double sum = a + b + c + d + e + f + g;
+
+//                a = NumberUtil.div(a, sum, 4);
+//                b = NumberUtil.div(b, sum, 4);
+//                c = NumberUtil.div(c, sum, 4);
+//                d = NumberUtil.div(d, sum, 4);
+//                e = NumberUtil.div(e, sum, 4);
+//                f = NumberUtil.div(f, sum, 4);
+//                g = NumberUtil.div(g, sum, 4);
+
+//                p.setA(a == 0 ? null : a);
+//                p.setA(b == 0 ? null : b);
+//                p.setA(c == 0 ? null : c);
+//                p.setA(d == 0 ? null : d);
+//                p.setA(e == 0 ? null : e);
+//                p.setA(f == 0 ? null : f);
+//                p.setA(g == 0 ? null : g);
+
+//                p.setA(a);
+//                p.setB(b);
+//                p.setC(c);
+//                p.setD(d);
+//                p.setE(e);
+//                p.setF(f);
+//                p.setG(g);
+
+
+
+                p.setA(NumberUtil.div(a, sum, 4));
+                p.setB(NumberUtil.div(b, sum, 4));
+                p.setC(NumberUtil.div(c, sum, 4));
+                p.setD(NumberUtil.div(d, sum, 4));
+                p.setE(NumberUtil.div(e, sum, 4));
+                p.setF(NumberUtil.div(f, sum, 4));
+                p.setG(NumberUtil.div(g, sum, 4));
+
+            });
+
+            result.put("answer", answers);
+
+
+        }
+
+        return Result.success(result);
+    }
+
+
+}

+ 8 - 9
gis_service/src/main/java/com/gis/service/impl/ExhibitionServiceImpl.java

@@ -6,7 +6,6 @@ import com.gis.common.constant.TypeCode;
 import com.gis.common.util.AliyunOssUtil;
 import com.gis.common.util.Result;
 import com.gis.domain.dto.ExhibitionDto;
-import com.gis.domain.dto.PageDto;
 import com.gis.domain.dto.TypePageDto;
 import com.gis.domain.po.ExhibitionEntity;
 import com.gis.domain.po.FileEntity;
@@ -104,14 +103,14 @@ public class ExhibitionServiceImpl extends IBaseServiceImpl<ExhibitionEntity, Lo
         }
 
         // 将模块id绑定到文件表
-        String fileIds = param.getFileIds();
-        if (StringUtils.isNotBlank(fileIds)) {
-            Long moduleId = entity.getId();
-            fileService.addModuleIdToFile(fileIds, moduleId, TypeCode.MODULE_EXHIBITION);
-
-            // 设置初始封面
-            setIndex(fileIds, moduleId);
-        }
+//        String fileIds = param.getFileIds();
+//        if (StringUtils.isNotBlank(fileIds)) {
+//            Long moduleId = entity.getId();
+//            fileService.addModuleIdToFile(fileIds, moduleId, TypeCode.MODULE_EXHIBITION);
+//
+//            // 设置初始封面
+//            setIndex(fileIds, moduleId);
+//        }
         return Result.success(entity);
     }
     

+ 68 - 0
gis_service/src/main/java/com/gis/service/impl/GoodsAgeServiceImpl.java

@@ -0,0 +1,68 @@
+package com.gis.service.impl;
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.BaseNameDto;
+import com.gis.domain.po.GoodsAgeEntity;
+import com.gis.mapper.GoodsAgeMapper;
+import com.gis.mapper.IBaseMapper;
+import com.gis.service.GoodsAgeService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:16
+ */
+@Service
+public class GoodsAgeServiceImpl extends IBaseServiceImpl<GoodsAgeEntity, Long> implements GoodsAgeService {
+
+    @Autowired
+    private GoodsAgeMapper entityMapper;
+
+    @Override
+    public IBaseMapper<GoodsAgeEntity, Long> getBaseMapper() {
+        return this.entityMapper;
+    }
+
+
+
+    @Override
+    public Result saveEntity(BaseNameDto param) {
+        Long id = param.getId();
+        GoodsAgeEntity entity = null;
+        if (id == null) {
+            entity = new GoodsAgeEntity();
+            BeanUtils.copyProperties(param, entity);
+            this.save(entity);
+        } else {
+            entity = this.findById(id);
+            if (entity == null) {
+                return Result.failure("对象不存在: " + id);
+            }
+            BeanUtils.copyProperties(param, entity);
+            entity.setUpdateTime(LocalDateTime.now());
+            this.update(entity);
+        }
+
+        return Result.success(entity);
+    }
+
+
+    @Override
+    public Result remove(Long id) {
+        GoodsAgeEntity entity = this.findById(id);
+        if (entity == null) {
+            return Result.success();
+        }
+        entity.setIsDelete(1);
+        entity.setUpdateTime(LocalDateTime.now());
+        this.update(entity);
+
+        return Result.success();
+    }
+
+
+}

+ 4 - 5
gis_service/src/main/java/com/gis/service/GoodsTypeServiceImpl.java

@@ -1,17 +1,16 @@
-package com.gis.service;
+package com.gis.service.impl;
 
 import com.gis.common.util.Result;
-import com.gis.domain.dto.GoogsTypeDto;
+import com.gis.domain.dto.BaseNameDto;
 import com.gis.domain.po.GoodsTypeEntity;
 import com.gis.mapper.GoodsTypeMapper;
 import com.gis.mapper.IBaseMapper;
-import com.gis.service.impl.IBaseServiceImpl;
+import com.gis.service.GoodsTypeService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.time.LocalDateTime;
-import java.util.Date;
 
 
 /**
@@ -31,7 +30,7 @@ public class GoodsTypeServiceImpl extends IBaseServiceImpl<GoodsTypeEntity, Long
 
 
     @Override
-    public Result saveEntity(GoogsTypeDto param) {
+    public Result saveEntity(BaseNameDto param) {
         Long id = param.getId();
         GoodsTypeEntity entity = null;
         if (id == null) {

+ 75 - 0
gis_service/src/main/java/com/gis/service/impl/GuideServiceImpl.java

@@ -0,0 +1,75 @@
+package com.gis.service.impl;
+
+import com.gis.common.util.AliyunOssUtil;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.GuideDto;
+import com.gis.domain.po.GuideEntity;
+import com.gis.mapper.IBaseMapper;
+import com.gis.mapper.GuideMapper;
+import com.gis.service.GuideService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:16
+ */
+@Service
+public class GuideServiceImpl extends IBaseServiceImpl<GuideEntity, Long> implements GuideService {
+
+    @Autowired
+    private GuideMapper entityMapper;
+
+    @Autowired
+    AliyunOssUtil aliyunOssUtil;
+
+    @Override
+    public IBaseMapper<GuideEntity, Long> getBaseMapper() {
+        return this.entityMapper;
+    }
+
+
+    @Override
+    public Result<GuideEntity> saveEntity(GuideDto param) {
+        Long id = param.getId();
+        GuideEntity entity = null;
+        if (id == null) {
+
+            entity = new GuideEntity();
+            BeanUtils.copyProperties(param, entity);
+            this.save(entity);
+        } else {
+            entity = this.findById(id);
+            if (entity == null) {
+                return Result.failure("对象不存在: " + id);
+            }
+            BeanUtils.copyProperties(param, entity);
+            entity.setUpdateTime(LocalDateTime.now());
+            this.update(entity);
+        }
+        return Result.success(entity);
+
+    }
+
+
+
+
+
+
+//    @Override
+//    public Result findByid(String type) {
+//        GuideEntity entity = entityMapper.findByType(type);
+//        return Result.success(entity);
+//    }
+
+
+//    @Override
+//    public Result upload(MultipartFile file) {
+//        Map<String, Object> result = aliyunOssUtil.uploadByByte(file, "slideshow/");
+//        return Result.success(result);
+//    }
+}

+ 61 - 0
gis_service/src/main/java/com/gis/service/impl/OnlineExhibitionServiceImpl.java

@@ -0,0 +1,61 @@
+package com.gis.service.impl;
+
+import com.gis.common.util.AliyunOssUtil;
+import com.gis.common.util.Result;
+import com.gis.domain.po.OnlineExhibitionEntity;
+import com.gis.mapper.IBaseMapper;
+import com.gis.mapper.OnlineExhibitionMapper;
+import com.gis.service.OnlineExhibitionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:16
+ */
+@Service
+public class OnlineExhibitionServiceImpl extends IBaseServiceImpl<OnlineExhibitionEntity, Long> implements OnlineExhibitionService {
+
+    @Autowired
+    private OnlineExhibitionMapper entityMapper;
+
+    @Autowired
+    AliyunOssUtil aliyunOssUtil;
+
+    @Override
+    public IBaseMapper<OnlineExhibitionEntity, Long> getBaseMapper() {
+        return this.entityMapper;
+    }
+
+
+    @Override
+    public Result remove(Long id) {
+        OnlineExhibitionEntity entity = this.findById(id);
+        if (entity == null) {
+            return Result.success();
+        }
+        entity.setIsDelete(1);
+        entity.setUpdateTime(LocalDateTime.now());
+        this.update(entity);
+
+        return Result.success();
+    }
+
+    @Override
+    public Result<OnlineExhibitionEntity> saveEntity(Long id, String url) {
+        OnlineExhibitionEntity entity = findById(id);
+        if (entity == null) {
+            return Result.failure("对象不存在");
+        }
+
+        entity.setUrl(url);
+        entity.setUpdateTime(LocalDateTime.now());
+            this.update(entity);
+        return Result.success(this.findById(id));
+    }
+
+
+
+}

+ 95 - 0
gis_service/src/main/java/com/gis/service/impl/ProfileServiceImpl.java

@@ -0,0 +1,95 @@
+package com.gis.service.impl;
+
+import com.gis.common.util.AliyunOssUtil;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.ProfileDto;
+import com.gis.domain.po.ProfileEntity;
+import com.gis.mapper.IBaseMapper;
+import com.gis.mapper.ProfileMapper;
+import com.gis.service.ProfileService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:16
+ */
+@Service
+public class ProfileServiceImpl extends IBaseServiceImpl<ProfileEntity, Long> implements ProfileService {
+
+    @Autowired
+    private ProfileMapper entityMapper;
+
+    @Autowired
+    AliyunOssUtil aliyunOssUtil;
+
+    @Override
+    public IBaseMapper<ProfileEntity, Long> getBaseMapper() {
+        return this.entityMapper;
+    }
+
+
+    @Override
+    public Result<ProfileEntity> saveEntity(ProfileDto param) {
+        Long id = param.getId();
+        ProfileEntity entity = null;
+        if (id == null) {
+
+            if (checkSize() > 5) {
+                return Result.failure("轮播图最多为5个");
+            }
+
+            entity = new ProfileEntity();
+            BeanUtils.copyProperties(param, entity);
+            this.save(entity);
+        } else {
+            entity = this.findById(id);
+            if (entity == null) {
+                return Result.failure("对象不存在: " + id);
+            }
+            BeanUtils.copyProperties(param, entity);
+            entity.setUpdateTime(LocalDateTime.now());
+            this.update(entity);
+        }
+        return Result.success(entity);
+
+    }
+
+    private Integer checkSize(){
+        List<ProfileEntity> all = this.findAll();
+        return all.size();
+    }
+
+
+    @Override
+    public Result remove(Long id) {
+        ProfileEntity entity = this.findById(id);
+        if (entity == null) {
+            return Result.success();
+        }
+        entity.setIsDelete(1);
+        entity.setUpdateTime(LocalDateTime.now());
+        this.update(entity);
+
+        return Result.success();
+    }
+
+    @Override
+    public Result findByType(String type) {
+        ProfileEntity entity = entityMapper.findByType(type);
+        return Result.success(entity);
+    }
+
+
+//    @Override
+//    public Result upload(MultipartFile file) {
+//        Map<String, Object> result = aliyunOssUtil.uploadByByte(file, "slideshow/");
+//        return Result.success(result);
+//    }
+}

+ 227 - 0
gis_service/src/main/java/com/gis/service/impl/QuestionGroupServiceImpl.java

@@ -0,0 +1,227 @@
+package com.gis.service.impl;
+
+import com.gis.common.constant.MsgCode;
+import com.gis.common.exception.BaseRuntimeException;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.PageDateDto;
+import com.gis.domain.dto.QuestionGroupDto;
+import com.gis.domain.po.QuestionEntity;
+import com.gis.domain.po.QuestionGroupEntity;
+import com.gis.mapper.IBaseMapper;
+import com.gis.mapper.QuestionGroupMapper;
+import com.gis.service.FileService;
+import com.gis.service.QuestionGroupService;
+import com.gis.service.QuestionService;
+import com.github.pagehelper.PageInfo;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import tk.mybatis.mapper.entity.Condition;
+
+import javax.servlet.http.HttpServletRequest;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:16
+ */
+@Slf4j
+@Service
+public class QuestionGroupServiceImpl extends IBaseServiceImpl<QuestionGroupEntity, Long> implements QuestionGroupService {
+
+    @Autowired
+    private QuestionGroupMapper entityMapper;
+
+    @Autowired
+    HttpServletRequest request;
+
+
+    @Autowired
+    FileService fileService;
+
+//    @Autowired
+//    AuditLogService auditLogService;
+
+    @Autowired
+    QuestionService questionService;
+
+    @Override
+    public IBaseMapper<QuestionGroupEntity, Long> getBaseMapper() {
+        return this.entityMapper;
+    }
+
+    @Override
+    public Result<QuestionGroupEntity> search(PageDateDto param, Integer display) {
+        startPage(param);
+        Condition condition = new Condition(QuestionGroupEntity.class);
+        String searchKey = param.getSearchKey();
+        if (StringUtils.isNotBlank(searchKey)) {
+            searchKey = StringUtils.trim(searchKey);
+            condition.and().orLike("name", "%" + searchKey + "%");
+//                    .orLike("userName", "%" + searchKey + "%");
+        }
+        String startTime = param.getStartTime();
+        String endTime = param.getEndTime();
+        if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime) ) {
+            condition.and().andBetween("createTime", startTime, endTime);
+        }
+
+        if (display != null) {
+            condition.and().andEqualTo("display", display);
+        }
+        condition.orderBy("createTime").desc();
+
+        PageInfo<QuestionGroupEntity> pageInfo = this.findAll(condition, param.getPageNum(), param.getPageSize());
+//        List<QuestionGroupEntity> list = pageInfo.getList();
+//
+//        List<QuestionGroupEntity> result = new ArrayList<>();
+//
+//        for (QuestionGroupEntity q : list) {
+//            Integer count = getQuesitongCount(q.getId());
+//            q.setQuestionCount(count);
+//            result.add(q);
+//        }
+//
+//        pageInfo.setList(result);
+
+        return Result.success(pageInfo);
+
+
+    }
+
+//    private Integer getQuesitongCount(Long id){
+//        List<QuestionEntityEntity> answerEntityList = questionEntityService.findByQuestionGroupId(id);
+//        return answerEntityList.size();
+//    }
+
+//    @Override
+//    public Result apply(Long id) {
+//        // 1:审核中
+//        updateStatus(id, 1);
+//        return  Result.success();
+//    }
+
+//    @Override
+//    public Result audit(AuditDto param) {
+//        // 2:审核不通过, 3:审核通过
+//        Integer status = param.getStatus();
+//        if (status == 0) {
+//            // 审核不通过
+//            status = 2;
+//        } else if (status == 1){
+//            // 审核通过
+//            status = 3;
+//        } else {
+//            throw new BaseRuntimeException(MsgCode.e3004, "审核状态非法");
+//        }
+//        Long id = param.getId();
+//        updateStatus(id, status);
+//        // 记录审核日志
+//        auditLogService.saveAuditLog(TypeCode.MODULE_QUESTION_GROUP, id, param.getStatus(), param.getReason());
+//        return Result.success();
+//    }
+
+//    @Override
+//    public Result auditDetail(Long id) {
+//        List<AuditLogEntity> list = auditLogService.findByModuleId(id, TypeCode.MODULE_QUESTION_GROUP);
+//        return Result.success(list);
+//    }
+
+    @Override
+    public Result updateDisplay(Long id) {
+        QuestionGroupEntity entity = this.findById(id);
+        if (entity == null) {
+            log.error("对象id不存在 : {}", id);
+            return Result.failure("对象id不存在");
+        }
+
+        // 不显示全部
+        entityMapper.disableAll();
+        // 显示当前id
+        entityMapper.enabledById(id);
+
+        return Result.success();
+    }
+
+
+//    private void updateStatus(Long id, Integer status){
+//        QuestionGroupEntity entity = this.findById(id);
+//        if (entity == null) {
+//            throw new BaseRuntimeException(MsgCode.e3001, "对象不存在");
+//        }
+//        entity.setStatus(status);
+//        entity.setUpdateTime(LocalDateTime.now());
+//        this.update(entity);
+//    }
+
+    @Override
+    public Result saveEntity(QuestionGroupDto param) {
+        Long id = param.getId();
+        QuestionGroupEntity entity = null;
+        if (id == null) {
+            entity = new QuestionGroupEntity();
+            entity.setDisplay(1);
+            entity.setName(param.getName());
+            entity.setUserName(getTokenUserName(request));
+            this.save(entity);
+        } else {
+            entity = this.findById(id);
+            if (entity == null) {
+                return Result.failure("对象不存在: " + id);
+            }
+            entity.setName(param.getName());
+            entity.setUpdateTime(LocalDateTime.now());
+            this.update(entity);
+        }
+
+        Long groupId = entity.getId();
+        // 将绑定的问题组id的问题答案设置为null
+//        questionEntityService.removeByQuestionGroupId(entity.getId());
+        questionService.disableByQuestionGroupId(groupId);
+        // 绑定答案
+        String questionIds = param.getQuestionIds();
+        if (StringUtils.isNotBlank(questionIds)) {
+            questionService.updateQuestionGroupId(groupId, questionIds);
+        }
+
+
+        return Result.success(entity);
+    }
+
+    @Override
+    public Result remove(Long id) {
+        QuestionGroupEntity entity = this.findById(id);
+        if (entity == null) {
+            return Result.success();
+        }
+        // db数据软删除, 物理数据真删除
+        entity.setIsDelete(1);
+        entity.setUpdateTime(LocalDateTime.now());
+        this.update(entity);
+        // 相应的答案删除
+        questionService.removeByQuestionGroupId(id);
+
+        return  Result.success();
+    }
+
+    @Override
+    public Result<QuestionGroupEntity> detail(Long id) {
+        QuestionGroupEntity entity = this.findById(id);
+        if (entity == null) {
+            return Result.failure("对象不存在");
+        }
+        List<QuestionEntity> list = questionService.findByQuestionGroupId(id);
+        HashMap<Object, Object> result = new HashMap<>();
+        result.put("entity", entity);
+        result.put("answer", list);
+        return  Result.success(result);
+    }
+
+
+
+
+}

+ 144 - 0
gis_service/src/main/java/com/gis/service/impl/QuestionServiceImpl.java

@@ -0,0 +1,144 @@
+package com.gis.service.impl;
+
+import com.gis.common.exception.BaseRuntimeException;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.QuestionDto;
+import com.gis.domain.po.QuestionEntity;
+import com.gis.mapper.IBaseMapper;
+import com.gis.mapper.QuestionMapper;
+import com.gis.service.FileService;
+import com.gis.service.QuestionService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:16
+ */
+@Service
+public class QuestionServiceImpl extends IBaseServiceImpl<QuestionEntity, Long> implements QuestionService {
+
+    @Autowired
+    private QuestionMapper entityMapper;
+
+    @Autowired
+    FileService fileService;
+
+//    @Autowired
+//    AuditLogService auditLogService;
+
+    @Override
+    public IBaseMapper<QuestionEntity, Long> getBaseMapper() {
+        return this.entityMapper;
+    }
+
+    @Override
+    public Result saveEntitys(List<QuestionDto> param) {
+        ArrayList<Object> resList = new ArrayList<>();
+//        List<QuestionEntityDto> answer = param.getAnswer();
+        for (QuestionDto questionAnswerDto : param) {
+            Result result = saveEntity(questionAnswerDto);
+            resList.add(result.getData());
+        }
+        // 返回问题ids
+        return Result.success(resList);
+    }
+
+    @Override
+    public void removeByQuestionGroupId(Long questionGroupId) {
+        entityMapper.removeByQuestionGroupId(questionGroupId);
+    }
+
+    @Override
+    public Result updateEntity(QuestionDto param) {
+        return saveEntity(param);
+    }
+
+    @Override
+    public List<QuestionEntity> findByQuestionGroupId(Long questionGroupId) {
+        return entityMapper.findByQuestionGroupId(questionGroupId);
+    }
+
+    @Override
+    public void updateQuestionGroupId(Long questionGroupId, String questionIds) {
+        questionIds = StringUtils.trim(questionIds);
+        entityMapper.updateQuestionGroupId(questionGroupId, questionIds);
+    }
+
+    @Override
+    public void disableByQuestionGroupId(Long groupId) {
+        entityMapper.disableByQuestionGroupId(groupId);
+    }
+
+
+    @Override
+    public Result saveEntity(QuestionDto param) {
+        Long id = param.getId();
+        QuestionEntity entity = null;
+        if (id == null) {
+            entity = new QuestionEntity();
+            BeanUtils.copyProperties(param, entity);
+            this.save(entity);
+        } else {
+            entity = this.findById(id);
+            if (entity == null) {
+                return Result.failure("对象不存在: " + id);
+            }
+            BeanUtils.copyProperties(param, entity);
+            entity.setUpdateTime(LocalDateTime.now());
+            this.update(entity);
+        }
+        return Result.success(entity.getId());
+    }
+
+//    private Long saveVo(QuestionDto param){
+//        Long id = param.getId();
+//        QuestionEntity entity = null;
+//        if (id == null) {
+//            entity = new QuestionEntity();
+//            BeanUtils.copyProperties(param, entity);
+//            this.save(entity);
+//        } else {
+//            entity = this.findById(id);
+//            if (entity == null) {
+//                throw new BaseRuntimeException("对象不存在: " + id);
+//            }
+//            BeanUtils.copyProperties(param, entity);
+//            entity.setUpdateTime(LocalDateTime.now());
+//            this.update(entity);
+//        }
+//        return entity.getId();
+//    }
+
+    @Override
+    public Result remove(Long id) {
+        QuestionEntity entity = this.findById(id);
+        if (entity == null) {
+            return Result.success();
+        }
+        // db数据软删除, 物理数据真删除
+        entity.setIsDelete(1);
+        entity.setUpdateTime(LocalDateTime.now());
+        this.update(entity);
+        return  Result.success();
+    }
+
+//    @Override
+//    public Result<QuestionEntity> detail(Long id) {
+//        QuestionEntity entity = this.findById(id);
+//        if (entity == null) {
+//            return Result.failure("对象不存在");
+//        }
+//        return  Result.success(entity);
+//    }
+
+
+
+
+}

+ 95 - 0
gis_service/src/main/java/com/gis/service/impl/SlideshowServiceImpl.java

@@ -0,0 +1,95 @@
+package com.gis.service.impl;
+
+import com.gis.common.util.AliyunOssUtil;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.SlideshowDto;
+import com.gis.domain.po.SlideshowEntity;
+import com.gis.mapper.IBaseMapper;
+import com.gis.mapper.SlideshowMapper;
+import com.gis.service.SlideshowService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:16
+ */
+@Service
+public class SlideshowServiceImpl extends IBaseServiceImpl<SlideshowEntity, Long> implements SlideshowService {
+
+    @Autowired
+    private SlideshowMapper entityMapper;
+
+    @Autowired
+    AliyunOssUtil aliyunOssUtil;
+
+    @Override
+    public IBaseMapper<SlideshowEntity, Long> getBaseMapper() {
+        return this.entityMapper;
+    }
+
+
+    @Override
+    public Result<SlideshowEntity> saveEntity(SlideshowDto param) {
+        Long id = param.getId();
+        SlideshowEntity entity = null;
+        if (id == null) {
+
+            if (checkSize() > 5) {
+                return Result.failure("轮播图最多为5个");
+            }
+
+            entity = new SlideshowEntity();
+            BeanUtils.copyProperties(param, entity);
+            this.save(entity);
+        } else {
+            entity = this.findById(id);
+            if (entity == null) {
+                return Result.failure("对象不存在: " + id);
+            }
+            BeanUtils.copyProperties(param, entity);
+            entity.setUpdateTime(LocalDateTime.now());
+            this.update(entity);
+        }
+        return Result.success(entity);
+
+    }
+
+    private Integer checkSize(){
+        List<SlideshowEntity> all = this.findAll();
+        return all.size();
+    }
+
+
+    @Override
+    public Result remove(Long id) {
+        SlideshowEntity entity = this.findById(id);
+        if (entity == null) {
+            return Result.success();
+        }
+        entity.setIsDelete(1);
+        entity.setUpdateTime(LocalDateTime.now());
+        this.update(entity);
+
+        return Result.success();
+    }
+
+
+    @Override
+    public Result upload(MultipartFile file) {
+        Map<String, Object> result = aliyunOssUtil.uploadByByte(file, "slideshow/");
+        return Result.success(result);
+    }
+
+    @Override
+    public Result<SlideshowEntity> list() {
+        List<SlideshowEntity> result = entityMapper.list();
+        return Result.success(result);
+    }
+}

+ 81 - 0
gis_web/src/main/java/com/gis/web/controller/BookController.java

@@ -0,0 +1,81 @@
+package com.gis.web.controller;
+
+import com.gis.common.constant.MsgCode;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.BookDto;
+import com.gis.domain.dto.PageDto;
+import com.gis.domain.po.BookEntity;
+import com.gis.service.BookService;
+import com.gis.service.aop.WebControllerLog;
+import com.github.pagehelper.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+
+
+/**
+ * Created by owen on 2021/6/7 0008 9:54
+ */
+@Api(tags = "资讯-出版书籍")
+@RestController
+@RequestMapping("manage/book")
+public class BookController extends BaseController {
+
+    @Autowired
+    private BookService entityService;
+
+
+
+    @ApiOperation("列表")
+    @PostMapping("list")
+    public Result<PageInfo<BookEntity>> list(@RequestBody PageDto param) {
+        return entityService.search(param);
+    }
+
+    @WebControllerLog(description = "概况-新增/编辑", addDb = true)
+    @ApiOperation("新增/编辑")
+    @PostMapping("save")
+    public Result<BookEntity> save(@Valid @RequestBody BookDto param) {
+        return entityService.saveEntity(param);
+    }
+
+
+    @ApiOperation(value = "删除", notes = "db数据软删除, 物理数据真删除")
+    @GetMapping("remove/{id}")
+    public Result remove(@PathVariable Long id) {
+        return entityService.remove(id);
+    }
+
+    @WebControllerLog(description = "出版书籍-详情")
+    @ApiOperation(value = "详情")
+    @GetMapping("detail/{id}")
+    public Result detail(@PathVariable Long id) {
+        BookEntity entity = entityService.findById(id);
+        if (entity == null) {
+            return Result.failure(MsgCode.e3001,"对象不存在,id: " + id);
+        }
+        return Result.success(entity);
+    }
+
+
+    @ApiOperation(value = "上传", notes = "重命名文件")
+    @PostMapping("upload")
+    public Result upload(MultipartFile file) {
+        return entityService.upload(file);
+    }
+
+
+
+
+
+
+
+
+
+
+
+}

+ 59 - 0
gis_web/src/main/java/com/gis/web/controller/CountAnswerController.java

@@ -0,0 +1,59 @@
+package com.gis.web.controller;
+
+import com.gis.common.constant.MsgCode;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.CountAnswerDto;
+import com.gis.domain.po.CountAnswerEntity;
+import com.gis.service.CountAnswerService;
+import com.gis.service.aop.WebControllerLog;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+
+/**
+ * Created by owen on 2021/6/7 0008 9:54
+ */
+@Api(tags = "问卷统计")
+@RestController
+@RequestMapping("manage/countAnswer")
+public class CountAnswerController extends BaseController {
+
+    @Autowired
+    private CountAnswerService entityService;
+
+
+    @WebControllerLog(description = "问卷统计-新增", addDb = true)
+    @ApiOperation("新增")
+    @PostMapping("save")
+    public Result<CountAnswerEntity> save(@Valid @RequestBody List<CountAnswerDto> param) {
+        return entityService.saveEntity(param);
+    }
+
+
+    @WebControllerLog(description = "问卷统计-详情")
+    @ApiOperation(value = "详情", notes = "0:百分比, 1:计数")
+    @GetMapping("detail/{questionGroupId}/{type}")
+    public Result detail(@PathVariable Long questionGroupId, @PathVariable Integer type) {
+
+        return entityService.findByQuestionGroupId(questionGroupId, type);
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}

+ 55 - 0
gis_web/src/main/java/com/gis/web/controller/GoodsAgeController.java

@@ -0,0 +1,55 @@
+package com.gis.web.controller;
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.BaseNameDto;
+import com.gis.domain.po.GoodsAgeEntity;
+import com.gis.service.GoodsAgeService;
+import com.gis.service.aop.WebControllerLog;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import tk.mybatis.mapper.entity.Condition;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * Created by owen on 2021/6/8 0008 9:54
+ */
+@Api(tags = "臧品信息-臧品年代")
+@RestController
+@RequestMapping("manage/goodsAge")
+public class GoodsAgeController extends BaseController {
+
+    @Autowired
+    private GoodsAgeService entityService;
+
+
+
+    @ApiOperation("列表")
+    @GetMapping("list")
+    public Result<List<GoodsAgeEntity>> list() {
+        Condition condition = new Condition(GoodsAgeEntity.class);
+        condition.orderBy("createTime").desc();
+        return Result.success(entityService.findAll(condition));
+    }
+
+    @WebControllerLog(description = "臧品年代-新增/修改", addDb = true)
+    @ApiOperation("新增/修改")
+    @PostMapping("save")
+    public Result save(@Valid @RequestBody BaseNameDto param) {
+        return entityService.saveEntity(param);
+    }
+
+    @WebControllerLog(description = "臧品年代-删除", addDb = true)
+    @ApiOperation("删除")
+    @GetMapping("remove/{id}")
+    public Result remove(@PathVariable Long id) {
+        return entityService.remove(id);
+    }
+
+
+
+
+}

+ 1 - 1
gis_web/src/main/java/com/gis/web/controller/GoodsController.java

@@ -17,7 +17,7 @@ import javax.validation.Valid;
 /**
  * Created by owen on 2021/5/14 0008 9:54
  */
-@Api(tags = "臧品信息")
+@Api(tags = "臧品信息-臧品详情")
 @RestController
 @RequestMapping("manage/goods")
 public class GoodsController extends BaseController {

+ 5 - 10
gis_web/src/main/java/com/gis/web/controller/GoodsTypeController.java

@@ -1,19 +1,14 @@
 package com.gis.web.controller;
 
 import com.gis.common.util.Result;
-import com.gis.domain.dto.GoodsDto;
-import com.gis.domain.dto.GoodsPageDto;
-import com.gis.domain.dto.GoogsTypeDto;
-import com.gis.domain.po.GoodsEntity;
+import com.gis.domain.dto.BaseNameDto;
 import com.gis.domain.po.GoodsTypeEntity;
-import com.gis.service.GoodsService;
 import com.gis.service.GoodsTypeService;
 import com.gis.service.aop.WebControllerLog;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
 import tk.mybatis.mapper.entity.Condition;
 
 import javax.validation.Valid;
@@ -22,7 +17,7 @@ import java.util.List;
 /**
  * Created by owen on 2021/6/8 0008 9:54
  */
-@Api(tags = "臧品分类")
+@Api(tags = "臧品信息-臧品分类")
 @RestController
 @RequestMapping("manage/goodsType")
 public class GoodsTypeController extends BaseController {
@@ -40,14 +35,14 @@ public class GoodsTypeController extends BaseController {
         return Result.success(entityService.findAll(condition));
     }
 
-    @WebControllerLog(description = "文物管理-新增/修改", addDb = true)
+    @WebControllerLog(description = "臧品分类-新增/修改", addDb = true)
     @ApiOperation("新增/修改")
     @PostMapping("save")
-    public Result save(@Valid @RequestBody GoogsTypeDto param) {
+    public Result save(@Valid @RequestBody BaseNameDto param) {
         return entityService.saveEntity(param);
     }
 
-    @WebControllerLog(description = "文物管理-删除", addDb = true)
+    @WebControllerLog(description = "臧品分类-删除", addDb = true)
     @ApiOperation("删除")
     @GetMapping("remove/{id}")
     public Result remove(@PathVariable Long id) {

+ 69 - 0
gis_web/src/main/java/com/gis/web/controller/GuideController.java

@@ -0,0 +1,69 @@
+package com.gis.web.controller;
+
+import com.gis.common.constant.MsgCode;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.GuideDto;
+import com.gis.domain.po.GuideEntity;
+import com.gis.service.GuideService;
+import com.gis.service.aop.WebControllerLog;
+import com.github.pagehelper.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+
+/**
+ * Created by owen on 2021/6/7 0008 9:54
+ */
+@Api(tags = "参观指南")
+@RestController
+@RequestMapping("manage/guide")
+public class GuideController extends BaseController {
+
+    @Autowired
+    private GuideService entityService;
+
+
+
+
+
+    @WebControllerLog(description = "概况-新增/编辑", addDb = true)
+    @ApiOperation("新增/编辑")
+    @PostMapping("save")
+    public Result<GuideEntity> save(@Valid @RequestBody GuideDto param) {
+        return entityService.saveEntity(param);
+    }
+
+
+    @WebControllerLog(description = "参观指南-详情")
+    @ApiOperation(value = "详情", notes = "默认id为1")
+    @GetMapping("detail/{id}")
+    public Result detail(@PathVariable Long id) {
+        GuideEntity entity = entityService.findById(id);
+        if (entity == null) {
+            return Result.failure(MsgCode.e3001,"对象不存在,id: " + id);
+        }
+        return Result.success(entity);
+    }
+
+
+//    @ApiOperation(value = "上传", notes = "重命名文件")
+//    @PostMapping("upload")
+//    public Result upload(MultipartFile file) {
+//        return entityService.upload(file);
+//    }
+
+
+
+
+
+
+
+
+
+
+
+}

+ 1 - 1
gis_web/src/main/java/com/gis/web/controller/NewsController.java

@@ -21,7 +21,7 @@ import javax.validation.Valid;
 /**
  * Created by owen on 2021/6/7 0008 9:54
  */
-@Api(tags = "新闻资讯")
+@Api(tags = "资讯-资讯内容")
 @RestController
 @RequestMapping("manage/news")
 public class NewsController extends BaseController {

+ 72 - 0
gis_web/src/main/java/com/gis/web/controller/OnlineExhibitionController.java

@@ -0,0 +1,72 @@
+package com.gis.web.controller;
+
+import com.gis.common.constant.MsgCode;
+import com.gis.common.util.Result;
+import com.gis.domain.po.OnlineExhibitionEntity;
+import com.gis.service.OnlineExhibitionService;
+import com.gis.service.aop.WebControllerLog;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+
+/**
+ * Created by owen on 2021/6/7 0008 9:54
+ */
+@Api(tags = "展览大全-线上展览")
+@RestController
+@RequestMapping("manage/onlineExhibition")
+public class OnlineExhibitionController extends BaseController {
+
+    @Autowired
+    private OnlineExhibitionService entityService;
+
+
+
+
+
+    @WebControllerLog(description = "线上展览-新增/编辑", addDb = true)
+    @ApiOperation("新增/编辑")
+    @GetMapping("save/{id}")
+    public Result<OnlineExhibitionEntity> save(@PathVariable Long id, String url) {
+        return entityService.saveEntity(id, url);
+    }
+
+
+//    @ApiOperation(value = "删除", notes = "db数据软删除, 物理数据真删除")
+//    @GetMapping("remove/{id}")
+//    public Result remove(@PathVariable Long id) {
+//        return entityService.remove(id);
+//    }
+
+    @WebControllerLog(description = "出版书籍-详情")
+    @ApiOperation(value = "详情")
+    @GetMapping("detail/{id}")
+    public Result detail(@PathVariable Long id) {
+        OnlineExhibitionEntity entity = entityService.findById(id);
+        if (entity == null) {
+            return Result.failure(MsgCode.e3001,"对象不存在,id: " + id);
+        }
+        return Result.success(entity);
+    }
+
+
+//    @ApiOperation(value = "上传", notes = "重命名文件")
+//    @PostMapping("upload")
+//    public Result upload(MultipartFile file) {
+//        return entityService.upload(file);
+//    }
+
+
+
+
+
+
+
+
+
+
+
+}

+ 81 - 0
gis_web/src/main/java/com/gis/web/controller/ProfileController.java

@@ -0,0 +1,81 @@
+package com.gis.web.controller;
+
+import com.gis.common.constant.MsgCode;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.ProfileDto;
+import com.gis.domain.po.ProfileEntity;
+import com.gis.service.ProfileService;
+import com.gis.service.aop.WebControllerLog;
+import com.github.pagehelper.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+
+
+/**
+ * Created by owen on 2021/6/7 0008 9:54
+ */
+@Api(tags = "首页-概况")
+@RestController
+@RequestMapping("manage/profile")
+public class ProfileController extends BaseController {
+
+    @Autowired
+    private ProfileService entityService;
+
+
+
+    @ApiOperation("列表")
+    @PostMapping("list/{type}")
+    public Result<PageInfo<ProfileEntity>> findByType(@PathVariable String type) {
+        return entityService.findByType(type);
+    }
+
+    @WebControllerLog(description = "概况-新增/编辑", addDb = true)
+    @ApiOperation("新增/编辑")
+    @PostMapping("save")
+    public Result<ProfileEntity> save(@Valid @RequestBody ProfileDto param) {
+        return entityService.saveEntity(param);
+    }
+
+
+    @WebControllerLog(description = "轮播图-删除", addDb = true)
+    @ApiOperation(value = "删除", notes = "db数据软删除, 物理数据真删除")
+    @GetMapping("remove/{id}")
+    public Result remove(@PathVariable Long id) {
+        return entityService.remove(id);
+    }
+
+    @WebControllerLog(description = "轮播图-详情")
+    @ApiOperation(value = "详情")
+    @GetMapping("detail/{id}")
+    public Result detail(@PathVariable Long id) {
+        ProfileEntity entity = entityService.findById(id);
+        if (entity == null) {
+            return Result.failure(MsgCode.e3001,"对象不存在,id: " + id);
+        }
+        return Result.success(entity);
+    }
+
+
+//    @ApiOperation(value = "上传", notes = "重命名文件")
+//    @PostMapping("upload")
+//    public Result upload(MultipartFile file) {
+//        return entityService.upload(file);
+//    }
+
+
+
+
+
+
+
+
+
+
+
+}

+ 117 - 0
gis_web/src/main/java/com/gis/web/controller/QuestionGroupController.java

@@ -0,0 +1,117 @@
+package com.gis.web.controller;
+
+import com.gis.common.util.Result;
+import com.gis.domain.dto.PageDateDto;
+import com.gis.domain.dto.QuestionDto;
+import com.gis.domain.dto.QuestionGroupDto;
+import com.gis.domain.po.QuestionGroupEntity;
+import com.gis.service.QuestionGroupService;
+import com.gis.service.QuestionService;
+import com.gis.service.aop.WebControllerLog;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * Created by owen on 2021/6/24 0008 9:54
+ */
+@Slf4j
+@Api(tags = "题组管理")
+@RestController
+@RequestMapping("cms/questionGroup")
+public class QuestionGroupController {
+
+    @Autowired
+    private QuestionGroupService entityService;
+
+    @Autowired
+    QuestionService questionService;
+
+
+
+    @ApiOperation("题组管理-列表")
+    @PostMapping("list")
+    public Result<QuestionGroupEntity> search(@Valid @RequestBody PageDateDto param) {
+        return entityService.search(param, 1);
+    }
+
+    @WebControllerLog(description = "题组管理-新增/修改", addDb = true)
+    @ApiOperation("题组管理-新增/修改")
+    @PostMapping("save")
+    public Result save(@Valid @RequestBody QuestionGroupDto param) {
+        return entityService.saveEntity(param);
+    }
+
+
+
+
+    @WebControllerLog(description = "题组管理-删除", addDb = true)
+    @ApiOperation("题组管理-删除")
+    @GetMapping("remove/{id}")
+    public Result remove(@PathVariable Long id) {
+        return entityService.remove(id);
+    }
+
+    @ApiOperation("题组管理-详情")
+    @GetMapping("detail/{id}")
+    public Result<QuestionGroupEntity> detail(@PathVariable Long id) {
+        return entityService.detail(id);
+    }
+
+    @ApiOperation(value = "是否显示")
+    @GetMapping("display/{id}")
+    public Result updateDisplay(@PathVariable Long id) {
+        return entityService.updateDisplay(id);
+    }
+
+
+//    @WebControllerLog(description = "题组管理-提审", addDb = true)
+//    @ApiOperation("题组管理-提审")
+//    @GetMapping("apply/{id}")
+//    public Result apply(@PathVariable Long id) {
+//        return entityService.apply(id);
+//    }
+
+//    @WebControllerLog(description = "题组管理-审核", addDb = true)
+//    @ApiOperation(value = "题组管理-审核", notes = "审核状态,1:通过, 0:不通过")
+//    @PostMapping("audit")
+//    public Result apply(@RequestBody AuditDto param) {
+//        return entityService.audit(param);
+//    }
+
+//    @WebControllerLog(description = "题组管理-审核详情")
+//    @ApiOperation("题组管理-审核详情")
+//    @GetMapping("auditDetail/{id}")
+//    public Result auditDetail(@PathVariable Long id) {
+//        return entityService.auditDetail(id);
+//    }
+
+
+    @WebControllerLog(description = "题组管理-问题新增/修改", addDb = true)
+    @ApiOperation(value = "问题-新增/修改", notes = "数组,允许多个提交")
+    @PostMapping("question/save")
+    public Result saveQuestionEntity(@Valid @RequestBody List<QuestionDto> param) {
+        return questionService.saveEntitys(param);
+    }
+
+    @WebControllerLog(description = "题组管理-问题修改", addDb = true)
+    @ApiOperation(value = "问题-修改", notes = "单个实体提交")
+    @PostMapping("question/update")
+    public Result saveQuestionEntityUpdate(@Valid @RequestBody QuestionDto param) {
+        return questionService.updateEntity(param);
+    }
+
+    @WebControllerLog(description = "题组管理-问题删除", addDb = true)
+    @ApiOperation("问题-删除")
+    @PostMapping("question/remove/{questionId}")
+    public Result removeQuestionEntityEntity(@PathVariable Long questionId) {
+        return questionService.remove(questionId);
+    }
+
+
+}

+ 83 - 0
gis_web/src/main/java/com/gis/web/controller/SlideshowController.java

@@ -0,0 +1,83 @@
+package com.gis.web.controller;
+
+import com.gis.common.constant.MsgCode;
+import com.gis.common.util.Result;
+import com.gis.domain.dto.SlideshowDto;
+import com.gis.domain.dto.TypePageDto;
+import com.gis.domain.po.SlideshowEntity;
+import com.gis.service.SlideshowService;
+import com.gis.service.SlideshowService;
+import com.gis.service.aop.WebControllerLog;
+import com.github.pagehelper.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+
+
+/**
+ * Created by owen on 2021/6/7 0008 9:54
+ */
+@Api(tags = "首页-轮播图")
+@RestController
+@RequestMapping("manage/slideshow")
+public class SlideshowController extends BaseController {
+
+    @Autowired
+    private SlideshowService entityService;
+
+
+
+    @ApiOperation("列表")
+    @PostMapping("list")
+    public Result<SlideshowEntity> list() {
+        return entityService.list();
+    }
+
+    @WebControllerLog(description = "轮播图-新增/编辑", addDb = true)
+    @ApiOperation("新增/编辑")
+    @PostMapping("save")
+    public Result<SlideshowEntity> save(@Valid @RequestBody SlideshowDto param) {
+        return entityService.saveEntity(param);
+    }
+
+
+    @WebControllerLog(description = "轮播图-删除", addDb = true)
+    @ApiOperation(value = "删除", notes = "db数据软删除, 物理数据真删除")
+    @GetMapping("remove/{id}")
+    public Result remove(@PathVariable Long id) {
+        return entityService.remove(id);
+    }
+
+    @WebControllerLog(description = "轮播图-详情")
+    @ApiOperation(value = "详情")
+    @GetMapping("detail/{id}")
+    public Result detail(@PathVariable Long id) {
+        SlideshowEntity entity = entityService.findById(id);
+        if (entity == null) {
+            return Result.failure(MsgCode.e3001,"对象不存在,id: " + id);
+        }
+        return Result.success(entity);
+    }
+
+
+    @ApiOperation(value = "上传", notes = "重命名文件")
+    @PostMapping("upload")
+    public Result upload(MultipartFile file) {
+        return entityService.upload(file);
+    }
+
+
+
+
+
+
+
+
+
+
+
+}

+ 1 - 1
gis_web/src/main/java/com/gis/web/controller/WebController.java

@@ -59,7 +59,7 @@ public class WebController {
         VisitEntity entity = new VisitEntity();
         entity.setModule(type);
         visitService.save(entity);
-        return Result.success();
+        return Result.success(visitService.countTotal(type));
     }
 
     @ApiOperation(value = "保存新闻访问记录", notes = "type, news:新闻, activity:活动")