Browse Source

注释无用模块

wuweihao 4 năm trước cách đây
mục cha
commit
298aebfb0f
55 tập tin đã thay đổi với 1294 bổ sung1478 xóa
  1. 1 1
      pom.xml
  2. 2 1
      zhoushan-system-api/pom.xml
  3. 7 16
      zhoushan-system-api/src/main/java/com/fdage/controller/ApiController.java
  4. 63 54
      zhoushan-system-api/src/main/java/com/fdage/controller/CollectionController.java
  5. 171 151
      zhoushan-system-api/src/main/java/com/fdage/controller/DataStatisticsController.java
  6. 112 112
      zhoushan-system-api/src/main/java/com/fdage/controller/EquipmentController.java
  7. 287 289
      zhoushan-system-api/src/main/java/com/fdage/controller/ExhibitionController.java
  8. 181 181
      zhoushan-system-api/src/main/java/com/fdage/controller/InformationController.java
  9. 4 5
      zhoushan-system-api/src/main/java/com/fdage/controller/LogController.java
  10. 3 2
      zhoushan-system-api/src/main/java/com/fdage/controller/LoginController.java
  11. 32 32
      zhoushan-system-api/src/main/java/com/fdage/controller/PositionController.java
  12. 1 1
      zhoushan-system-api/src/main/java/com/fdage/controller/ResourceController.java
  13. 27 1
      zhoushan-system-api/src/main/java/com/fdage/controller/RoleController.java
  14. 120 117
      zhoushan-system-api/src/main/java/com/fdage/controller/SseController.java
  15. 3 3
      zhoushan-system-api/src/main/java/com/fdage/controller/UserController.java
  16. 27 8
      zhoushan-system-api/src/main/resources/application-dev.yml
  17. 1 6
      zhoushan-system-api/src/main/resources/application.yml
  18. BIN
      zhoushan-system-api/src/main/resources/static/collection/importData.xlsx
  19. 8 0
      zhoushan-system-common/pom.xml
  20. 2 2
      zhoushan-system-common/src/main/java/com/fdage/constant/ConfigConstant.java
  21. 7 16
      zhoushan-system-common/src/main/java/com/fdage/request/RequestCollection.java
  22. 0 4
      zhoushan-system-common/src/main/java/com/fdage/request/RequestExhibition.java
  23. 6 18
      zhoushan-system-common/src/main/java/com/fdage/respon/ResponCollection.java
  24. 0 4
      zhoushan-system-common/src/main/java/com/fdage/respon/ResponExhibition.java
  25. 0 35
      zhoushan-system-common/src/main/java/com/fdage/respon/ResponLog.java
  26. 1 1
      zhoushan-system-common/src/main/java/com/fdage/respon/ResponStatistics.java
  27. 12 11
      zhoushan-system-common/src/main/java/com/fdage/util/ExcelUtil.java
  28. 4 0
      zhoushan-system-dao/src/main/java/com/fdage/dao/base/TbCollectionMapper.java
  29. 1 3
      zhoushan-system-dao/src/main/java/com/fdage/dao/cust/TbCollectionMapperCust.java
  30. 1 0
      zhoushan-system-dao/src/main/java/com/fdage/dao/cust/TbExhibitionCollectionMapperCust.java
  31. 0 2
      zhoushan-system-dao/src/main/java/com/fdage/dao/cust/TbExhibitionMapperCust.java
  32. 1 2
      zhoushan-system-dao/src/main/java/com/fdage/dao/cust/TbLogMapperCust.java
  33. 24 77
      zhoushan-system-dao/src/main/java/com/fdage/pojo/TbCollection.java
  34. 0 30
      zhoushan-system-dao/src/main/java/com/fdage/pojo/TbExhibition.java
  35. 0 10
      zhoushan-system-dao/src/main/java/com/fdage/pojo/TbExhibitionCollection.java
  36. 13 0
      zhoushan-system-dao/src/main/java/com/fdage/pojo/TbLog.java
  37. 41 121
      zhoushan-system-dao/src/main/resources/mapper/base/TbCollectionMapper.xml
  38. 4 15
      zhoushan-system-dao/src/main/resources/mapper/base/TbExhibitionCollectionMapper.xml
  39. 8 34
      zhoushan-system-dao/src/main/resources/mapper/base/TbExhibitionMapper.xml
  40. 21 43
      zhoushan-system-dao/src/main/resources/mapper/cust/TbCollectionMapperCust.xml
  41. 2 2
      zhoushan-system-dao/src/main/resources/mapper/cust/TbExhibitionCollectionMapperCust.xml
  42. 8 17
      zhoushan-system-dao/src/main/resources/mapper/cust/TbExhibitionMapperCust.xml
  43. 3 0
      zhoushan-system-dao/src/main/resources/mapper/cust/TbInformationMapperCust.xml
  44. 4 4
      zhoushan-system-dao/src/main/resources/mapper/cust/TbLogMapperCust.xml
  45. 3 4
      zhoushan-system-dao/src/main/resources/mapper/cust/TbUserMapperCust.xml
  46. 9 1
      zhoushan-system-service/src/main/java/com/fdage/service/ICollectionService.java
  47. 1 2
      zhoushan-system-service/src/main/java/com/fdage/service/ILogService.java
  48. 62 23
      zhoushan-system-service/src/main/java/com/fdage/service/impl/CollectionServiceImpl.java
  49. 0 2
      zhoushan-system-service/src/main/java/com/fdage/service/impl/EquipmentServiceImpl.java
  50. 3 2
      zhoushan-system-service/src/main/java/com/fdage/service/impl/ExhibitionServiceImpl.java
  51. 2 2
      zhoushan-system-service/src/main/java/com/fdage/service/impl/InformationServiceImpl.java
  52. 1 4
      zhoushan-system-service/src/main/java/com/fdage/service/impl/LogServiceImpl.java
  53. 0 2
      zhoushan-system-service/src/main/java/com/fdage/service/impl/ResourceServiceImpl.java
  54. 0 2
      zhoushan-system-service/src/main/java/com/fdage/service/impl/RoleServiceImpl.java
  55. 0 3
      zhoushan-system-service/src/main/java/com/fdage/service/impl/UserServiceImpl.java

+ 1 - 1
pom.xml

@@ -3,7 +3,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.fdage</groupId>
-  <artifactId>museum_changshu</artifactId>
+  <artifactId>museum_zhuhai</artifactId>
   <version>0.0.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 

+ 2 - 1
zhoushan-system-api/pom.xml

@@ -11,7 +11,7 @@
 	<groupId>com.fdage</groupId>
 	<artifactId>zhoushan-system-api</artifactId>
 	<version>0.0.1-SNAPSHOT</version>
-	<packaging>war</packaging>
+	<packaging>jar</packaging>
 	<name>zhoushan-system-api</name>
 	<description>Demo project for Spring Boot</description>
 
@@ -68,6 +68,7 @@
 				<artifactId>spring-boot-maven-plugin</artifactId>
 			</plugin>
 		</plugins>
+		<finalName>museum_zhuhai</finalName>
 	</build>
 
 </project>

+ 7 - 16
zhoushan-system-api/src/main/java/com/fdage/controller/ApiController.java

@@ -33,7 +33,7 @@ import java.util.List;
 /**
  * Created by Hb_zzZ on 2020/7/30.
  */
-@Api(tags = "对外api模块")
+@Api(tags = "w-门户网站")
 @Controller
 @RequestMapping("/api")
 @Slf4j
@@ -64,7 +64,7 @@ public class ApiController {
                 information.setCreateTime(String.valueOf(DateUtil.convert2CST(information.getCreateTime())));
             }
 
-            information.setUrlArray(information.getContentUrl() == null ? null : information.getContentUrl().replace("\"", "").replace("[", "").replace("]", "").split(","));
+            information.setUrlArray(information.getContentUrl().replace("\"", "").replace("[", "").replace("]", "").split(","));
         }
         return AjaxJson.success(list);
     }
@@ -98,9 +98,6 @@ public class ApiController {
     @ApiOperation("获取所有文物列表")
     public AjaxJson collectionList(){
         List<ResponCollection> list = collectionService.findList(null);
-        for(ResponCollection responCollection : list){
-            responCollection.setTypeImagesArray(responCollection.getTypeImages() == null ? null : responCollection.getTypeImages().replace("\"", "").replace("[", "").replace("]", "").split(","));
-        }
         return AjaxJson.success(list);
     }
 
@@ -113,9 +110,8 @@ public class ApiController {
         if(bo == null || bo.getId() == null){
             return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
         }
-        ResponCollection responCollection = collectionService.findById(bo.getId());
-        responCollection.setTypeImagesArray(responCollection.getTypeImages() == null ? null : responCollection.getTypeImages().replace("\"", "").replace("[", "").replace("]", "").split(","));
-        return AjaxJson.success(responCollection);
+
+        return AjaxJson.success(collectionService.findById(bo.getId()));
     }
 
     @PostMapping("likeCollection")
@@ -143,12 +139,6 @@ public class ApiController {
 
         ResponExhibition responExhibition = exhibitionService.getExhibitionById(bo.getId());
 
-        List<ResponCollection> list = responExhibition.getCollectionList();
-        for(ResponCollection responCollection : list){
-            responCollection.setTypeImagesArray(responCollection.getTypeImages() == null ? null : responCollection.getTypeImages().replace("\"", "").replace("[", "").replace("]", "").split(","));
-        }
-        responExhibition.setCollectionList(list);
-
         exhibitionService.addOpenNum(bo.getId());
         return AjaxJson.success(responExhibition);
     }
@@ -157,7 +147,9 @@ public class ApiController {
     @ResponseBody
     @ApiOperation("获取文物类别列表")
     public AjaxJson typeList(){
-        return AjaxJson.success(collectionService.typeList(null));
+        RequestCollection bo = new RequestCollection();
+        bo.setState(0);
+        return AjaxJson.success(collectionService.typeList(bo));
     }
 
     @PostMapping("searchCollection")
@@ -195,5 +187,4 @@ public class ApiController {
         collectionService.addDownloadNum(bo.getId());
         return AjaxJson.success();
     }
-
 }

+ 63 - 54
zhoushan-system-api/src/main/java/com/fdage/controller/CollectionController.java

@@ -1,6 +1,7 @@
 package com.fdage.controller;
 
 import com.fdage.aop.WebControllerLog;
+import com.fdage.constant.ConfigConstant;
 import com.fdage.constant.ConstantUrl;
 import com.fdage.enums.ResponEnum;
 import com.fdage.pojo.TbCollection;
@@ -40,6 +41,9 @@ public class CollectionController {
     @Value("${upload.collection}")
     private String uploadPath;
 
+    @Autowired
+    ConfigConstant configConstant;
+
     @PostMapping("timeList")
     @ResponseBody
     @ApiOperation("获取年代列表")
@@ -58,28 +62,19 @@ public class CollectionController {
     @ResponseBody
     @WebControllerLog(description = "文物库-新增文物")
     @ApiOperation("新增文物")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = "文物名称", dataType = "String"),
-            @ApiImplicitParam(name = "verticalName", value = "竖排名称", dataType = "String"),
-            @ApiImplicitParam(name = "description", value = "文物描述", dataType = "String"),
-            @ApiImplicitParam(name = "timeId", value = "年代id", dataType = "String"),
-            @ApiImplicitParam(name = "typeId", value = "类型id", dataType = "String"),
-            @ApiImplicitParam(name = "modelUrl", value = "文物模型url", dataType = "String"),
-            @ApiImplicitParam(name = "discoveryTime", value = "文物发现时间", dataType = "String"),
-            @ApiImplicitParam(name = "repairTime", value = "文物维修时间", dataType = "String"),
-            @ApiImplicitParam(name = "venue", value = "文物所在场馆", dataType = "String"),
-            @ApiImplicitParam(name = "contentUrl", value = "多媒体内容Url", dataType = "String"),
-            @ApiImplicitParam(name = "pic", value = "4dmodel文物的封面图", dataType = "String"),
-            @ApiImplicitParam(name = "num", value = "藏品编号", dataType = "String"),
-            @ApiImplicitParam(name = "purpose", value = "文物用途", dataType = "String"),
-            @ApiImplicitParam(name = "texture", value = "文物材质", dataType = "String"),
-            @ApiImplicitParam(name = "size", value = "文物尺寸", dataType = "String"),
-            @ApiImplicitParam(name = "remarks", value = "备注信息", dataType = "String"),
-            @ApiImplicitParam(name = "type", value = "文物类型:2D,3D", dataType = "String"),
-            @ApiImplicitParam(name = "typeImages", value = "2D时需要上传图片集合地址", dataType = "String"),
-            @ApiImplicitParam(name = "typeTime", value = "分类年代", dataType = "String"),
-            @ApiImplicitParam(name = "qrCode", value = "二维码地址", dataType = "String"),
-            @ApiImplicitParam(name = "state", value = "状态,0:展示,1:隐藏", dataType = "String")})
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "name", value = "文物名称", dataType = "String"),
+//            @ApiImplicitParam(name = "description", value = "文物描述", dataType = "String"),
+//            @ApiImplicitParam(name = "timeId", value = "年代id", dataType = "String"),
+//            @ApiImplicitParam(name = "typeId", value = "类型id", dataType = "String"),
+//            @ApiImplicitParam(name = "modelUrl", value = "文物模型url", dataType = "String"),
+//            @ApiImplicitParam(name = "discoveryTime", value = "文物发现时间", dataType = "String"),
+//            @ApiImplicitParam(name = "repairTime", value = "文物维修时间", dataType = "String"),
+//            @ApiImplicitParam(name = "venue", value = "文物所在场馆", dataType = "String"),
+//            @ApiImplicitParam(name = "contentUrl", value = "多媒体内容Url", dataType = "String"),
+//            @ApiImplicitParam(name = "pic", value = "4dmodel文物的封面图", dataType = "String"),
+//            @ApiImplicitParam(name = "num", value = "藏品编号", dataType = "String"),
+//            @ApiImplicitParam(name = "state", value = "状态,0:展示,1:隐藏", dataType = "String")})
     public AjaxJson addCollection(@RequestBody RequestCollection bo){
         if(bo == null || StringUtils.isEmpty(bo.getName())  ||
                 bo.getTimeId() == null  || bo.getTypeId() == null){
@@ -88,8 +83,8 @@ public class CollectionController {
 
         TbCollection collection = new TbCollection();
         BeanUtils.copyProperties(bo, collection);
-//        collection.setPic(ConstantUrl.FDMODEL_PIC + bo.getModelUrl().substring(
-//                bo.getModelUrl().indexOf("m=") + 2) + "/thumbnail.jpg");
+        collection.setUnityUrl("/collection/unity/" + bo.getDirCode());
+//        collection.setUnityUrl(configConstant.serverBasePath + "/collection/unity/" + bo.getDirCode());
         service.insert(collection);
         return AjaxJson.success();
     }
@@ -98,32 +93,23 @@ public class CollectionController {
     @ResponseBody
     @WebControllerLog(description = "文物库-修改文物")
     @ApiOperation("修改文物")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "文物id", dataType = "String"),
-            @ApiImplicitParam(name = "name", value = "文物名称", dataType = "String"),
-            @ApiImplicitParam(name = "verticalName", value = "竖排名称", dataType = "String"),
-            @ApiImplicitParam(name = "description", value = "文物描述", dataType = "String"),
-            @ApiImplicitParam(name = "timeId", value = "年代id", dataType = "String"),
-            @ApiImplicitParam(name = "typeId", value = "类型id", dataType = "String"),
-            @ApiImplicitParam(name = "modelUrl", value = "文物模型url", dataType = "String"),
-            @ApiImplicitParam(name = "discoveryTime", value = "文物发现时间", dataType = "String"),
-            @ApiImplicitParam(name = "repairTime", value = "文物维修时间", dataType = "String"),
-            @ApiImplicitParam(name = "venue", value = "文物所在场馆", dataType = "String"),
-            @ApiImplicitParam(name = "contentUrl", value = "多媒体内容Url", dataType = "String"),
-            @ApiImplicitParam(name = "pic", value = "4dmodel文物的封面图", dataType = "String"),
-            @ApiImplicitParam(name = "num", value = "藏品编号", dataType = "String"),
-            @ApiImplicitParam(name = "purpose", value = "文物用途", dataType = "String"),
-            @ApiImplicitParam(name = "texture", value = "文物材质", dataType = "String"),
-            @ApiImplicitParam(name = "size", value = "文物尺寸", dataType = "String"),
-            @ApiImplicitParam(name = "remarks", value = "备注信息", dataType = "String"),
-            @ApiImplicitParam(name = "type", value = "文物类型:2D,3D", dataType = "String"),
-            @ApiImplicitParam(name = "typeImages", value = "2D时需要上传图片集合地址", dataType = "String"),
-            @ApiImplicitParam(name = "typeTime", value = "分类年代", dataType = "String"),
-            @ApiImplicitParam(name = "qrCode", value = "二维码地址", dataType = "String"),
-            @ApiImplicitParam(name = "state", value = "状态,0:展示,1:隐藏", dataType = "String")})
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "文物id", dataType = "String"),
+//            @ApiImplicitParam(name = "name", value = "文物名称", dataType = "String"),
+//            @ApiImplicitParam(name = "description", value = "文物描述", dataType = "String"),
+//            @ApiImplicitParam(name = "timeId", value = "年代id", dataType = "String"),
+//            @ApiImplicitParam(name = "typeId", value = "类型id", dataType = "String"),
+//            @ApiImplicitParam(name = "modelUrl", value = "文物模型url", dataType = "String"),
+//            @ApiImplicitParam(name = "discoveryTime", value = "文物发现时间", dataType = "String"),
+//            @ApiImplicitParam(name = "repairTime", value = "文物维修时间", dataType = "String"),
+//            @ApiImplicitParam(name = "venue", value = "文物所在场馆", dataType = "String"),
+//            @ApiImplicitParam(name = "contentUrl", value = "多媒体内容Url", dataType = "String"),
+//            @ApiImplicitParam(name = "pic", value = "4dmodel文物的封面图", dataType = "String"),
+//            @ApiImplicitParam(name = "num", value = "藏品编号", dataType = "String"),
+//            @ApiImplicitParam(name = "state", value = "状态,0:展示,1:隐藏", dataType = "String")})
     public AjaxJson updateCollection(@RequestBody RequestCollection bo){
         if(bo == null || StringUtils.isEmpty(bo.getName()) ||
-                bo.getTimeId() == null  || bo.getTypeId() == null){
+                bo.getTimeId() == null  || bo.getTypeId() == null ){
             return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
         }
 
@@ -177,7 +163,7 @@ public class CollectionController {
         return AjaxJson.success(pageInfo);
     }
 
-    @RequestMapping("/upload")
+    @PostMapping("/upload")
     @ResponseBody
     @ApiOperation("上传文物图片")
     @ApiImplicitParams({
@@ -206,17 +192,31 @@ public class CollectionController {
         return AjaxJson.success((Object) ("/collection/" + fileName));
     }
 
-    @RequestMapping("/importCollection")
+
+    /**
+     * 2021-08-09
+     * @param file
+     * @param code
+     * @return
+     */
+    @PostMapping("/uploadCode")
+    @ApiOperation("上传Unity")
+    @ResponseBody
+    public AjaxJson uploadCode(MultipartFile file, String code){
+
+        return service.uploadCode(file, code);
+    }
+
+
+    @PostMapping("/importCollection")
     @ResponseBody
-    @ApiOperation("导入文物数据")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "file", value = "文件流", dataType = "String")})
+    @ApiOperation("导入文物Excel")
     public AjaxJson importCollection(@RequestParam("file") MultipartFile file){
         if(file == null){
             return AjaxJson.failure("参数不能为空");
         }
         String fileName = System.currentTimeMillis() + "_" +  file.getOriginalFilename();
-        log.info("导入文物数据地址:" + fileName);
+        log.info("导入文件保存地址:" + fileName);
         boolean flag = FileUtil.upload(file, uploadPath, fileName);
 
         if(!flag){
@@ -225,4 +225,13 @@ public class CollectionController {
 
         return service.importCollection(uploadPath + "/" + fileName);
     }
+
+
+
+    @GetMapping("addVisit/{id}")
+    @ResponseBody
+    @ApiOperation("保存访问量")
+    public AjaxJson addVisit(@PathVariable Long id){
+        return service.addVisit(id);
+    }
 }

+ 171 - 151
zhoushan-system-api/src/main/java/com/fdage/controller/DataStatisticsController.java

@@ -1,151 +1,171 @@
-package com.fdage.controller;
-
-import com.fdage.aop.WebControllerLog;
-import com.fdage.constant.ConstantExcel;
-import com.fdage.respon.ResponCollection;
-import com.fdage.respon.ResponStatistics;
-import com.fdage.service.ICollectionService;
-import com.fdage.service.IExhibitionService;
-import com.fdage.util.AjaxJson;
-import com.fdage.util.ExcelUtil;
-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.beans.factory.annotation.Value;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.*;
-import java.net.URLEncoder;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-/**
- * Created by Hb_zzZ on 2020/9/8.
- */
-@Api(tags = "数据统计模块")
-@Controller
-@RequestMapping("/zhoushan/statistics")
-@Slf4j
-public class DataStatisticsController {
-
-    @Autowired
-    private IExhibitionService exhibitionService;
-
-    @Autowired
-    private ICollectionService collectionService;
-
-    @Value("${upload.collection}")
-    private String collectionPath;
-
-    @PostMapping("collectionTotal")
-    @ResponseBody
-    @ApiOperation("数据总量")
-    public AjaxJson collectionTotal(){
-        return AjaxJson.success(collectionService.findList(null));
-    }
-
-    @PostMapping("exportCollectionTotal")
-    @ResponseBody
-    @ApiOperation("数据总量")
-    public void exportCollectionTotal(HttpServletRequest request, HttpServletResponse response){
-        List<ResponCollection> list = collectionService.findList(null);
-
-        //导出的数据
-        int serNum = 1;
-        Map<String, Object> item = null;
-        List<Map> dataList = new ArrayList<Map>();
-
-        for(ResponCollection collection : list){
-            item = new HashMap();
-            item.put(ConstantExcel.COLLECTION_NAME[0], String.valueOf(serNum));
-            item.put(ConstantExcel.COLLECTION_NAME[1], collection.getName());
-            item.put(ConstantExcel.COLLECTION_NAME[2], collection.getTypeName());
-            item.put(ConstantExcel.COLLECTION_NAME[3], collection.getTypeName());
-            item.put(ConstantExcel.COLLECTION_NAME[4], collection.getLikeNum());
-            item.put(ConstantExcel.COLLECTION_NAME[5], collection.getDownloadNum());
-            item.put(ConstantExcel.COLLECTION_NAME[6], collection.getSearchNum());
-
-            serNum++;
-            dataList.add(item);
-        }
-
-        try{
-            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
-            String dateStr = dateFormat.format(new Date());
-            String fileName = "发票数据-" + dateStr + ".xls";
-            File file = new File(collectionPath + File.separator + fileName + ".xls");
-
-            ExcelUtil.writeExcel(dataList, collectionPath + File.separator + fileName + ".xls");
-
-            String agent = request.getHeader("User-Agent");
-            if (agent != null && (agent.contains("MSIE")||agent.contains("Trident"))) {
-                fileName = URLEncoder.encode(fileName, "UTF-8");
-            } else {
-                //非IE浏览器的处理:
-                fileName = new String(fileName.getBytes("UTF-8"), "ISO-8859-1");
-            }
-            response.setHeader("Content-Disposition", "attachment; filename=\""+fileName+"\"");
-            response.setContentType(request.getServletContext().getMimeType(fileName));
-            response.setContentLength((int) file.length());
-            output(response, file);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-    }
-
-    @PostMapping("total")
-    @ResponseBody
-    @ApiOperation("数据总量")
-    public AjaxJson total(){
-
-        ResponStatistics result = collectionService.collectionTotal();
-
-        Long exhibitionTotal = exhibitionService.exhibitionTotal();
-        result.setExhibitionTotal(exhibitionTotal);
-
-        result.setExhibitionList(exhibitionService.findListOrderBy());
-
-        Map<String, String> map = new HashMap<>();
-        map.put("orderBy", "search_num");
-        result.setCollectionSearchList(collectionService.findListOrderBy(map).subList(0, 5));
-        map.put("orderBy", "like_num");
-        result.setCollectionLikeList(collectionService.findListOrderBy(map).subList(0, 10));
-        map.put("orderBy", "open_num");
-        result.setCollectionOpenList(collectionService.findListOrderBy(map).subList(0, 3));
-
-        result.setCollectionTypeTotal(collectionService.typeTotal());
-
-        return AjaxJson.success(result);
-    }
-
-
-    private static void output(HttpServletResponse resp, File file) {
-        OutputStream os = null;
-        BufferedInputStream bis = null;
-        byte[] buff = new byte[1024];
-        try {
-            os = resp.getOutputStream();
-            bis = new BufferedInputStream(new FileInputStream(file));
-            int i = 0;
-            while ((i = bis.read(buff)) != -1) {
-                os.write(buff, 0, i);
-                os.flush();
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                bis.close();
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-}
+//package com.fdage.controller;
+//
+//import com.fdage.constant.ConstantExcel;
+//import com.fdage.respon.ResponCollection;
+//import com.fdage.respon.ResponStatistics;
+//import com.fdage.service.ICollectionService;
+//import com.fdage.service.IExhibitionService;
+//import com.fdage.util.AjaxJson;
+//import com.fdage.util.ExcelUtil;
+//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.beans.factory.annotation.Value;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.web.bind.annotation.PostMapping;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.ResponseBody;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//import java.io.*;
+//import java.net.URLEncoder;
+//import java.text.DateFormat;
+//import java.text.SimpleDateFormat;
+//import java.util.*;
+//
+///**
+// * Created by Hb_zzZ on 2020/9/8.
+// */
+//@Api(tags = "数据统计模块")
+//@Controller
+//@RequestMapping("/zhoushan/statistics")
+//@Slf4j
+//public class DataStatisticsController {
+//
+//    @Autowired
+//    private IExhibitionService exhibitionService;
+//
+//    @Autowired
+//    private ICollectionService collectionService;
+//
+//    @Value("${upload.collection}")
+//    private String collectionPath;
+//
+//    @PostMapping("collectionTotal")
+//    @ResponseBody
+//    @ApiOperation("数据总量")
+//    public AjaxJson collectionTotal(){
+//        return AjaxJson.success(collectionService.findList(null));
+//    }
+//
+//    @PostMapping("exportCollectionTotal")
+//    @ResponseBody
+//    @ApiOperation("数据总量")
+//    public void exportCollectionTotal(HttpServletRequest request, HttpServletResponse response){
+//        List<ResponCollection> list = collectionService.findList(null);
+//
+//        //导出的数据
+//        int serNum = 1;
+//        Map<String, Object> item = null;
+//        List<Map> dataList = new ArrayList<Map>();
+//
+//        for(ResponCollection collection : list){
+//            item = new HashMap();
+//            item.put(ConstantExcel.COLLECTION_NAME[0], String.valueOf(serNum));
+//            item.put(ConstantExcel.COLLECTION_NAME[1], collection.getName());
+//            item.put(ConstantExcel.COLLECTION_NAME[2], collection.getTypeName());
+//            item.put(ConstantExcel.COLLECTION_NAME[3], collection.getTimeName());
+//            item.put(ConstantExcel.COLLECTION_NAME[4], collection.getLikeNum());
+//            item.put(ConstantExcel.COLLECTION_NAME[5], collection.getDownloadNum());
+//            item.put(ConstantExcel.COLLECTION_NAME[6], collection.getSearchNum());
+//
+//            serNum++;
+//            dataList.add(item);
+//        }
+//
+//        try{
+//            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+//            String dateStr = dateFormat.format(new Date());
+//            String fileName = "文物数据-" + dateStr + ".xls";
+//            File file = new File(collectionPath + File.separator + fileName + ".xls");
+//
+//            ExcelUtil.writeExcel(dataList, collectionPath + File.separator + fileName + ".xls");
+//
+//            String agent = request.getHeader("User-Agent");
+//            if (agent != null && (agent.contains("MSIE")||agent.contains("Trident"))) {
+//                fileName = URLEncoder.encode(fileName, "UTF-8");
+//            } else {
+//                //非IE浏览器的处理:
+//                fileName = new String(fileName.getBytes("UTF-8"), "ISO-8859-1");
+//            }
+//            response.setHeader("Content-Disposition", "attachment; filename=\""+fileName+"\"");
+//            response.setContentType(request.getServletContext().getMimeType(fileName));
+//            response.setContentLength((int) file.length());
+//            output(response, file);
+//        }catch (Exception e){
+//            e.printStackTrace();
+//        }
+//    }
+//
+//    @PostMapping("total")
+//    @ResponseBody
+//    @ApiOperation("数据总量")
+//    public AjaxJson total(){
+//
+//        ResponStatistics result = collectionService.collectionTotal();
+//
+//        // 2021-08-16 by owen 改用流量量
+////        Long exhibitionTotal = exhibitionService.exhibitionTotal();
+//        Long exhibitionTotal = collectionService.countVisit();
+//
+//
+//
+//        result.setExhibitionTotal(exhibitionTotal);
+//
+//        result.setExhibitionList(exhibitionService.findListOrderBy());
+//
+//        Map<String, String> map = new HashMap<>();
+//        map.put("order", "desc");
+//        map.put("sidx", "a.search_num");
+////        result.setCollectionSearchList(collectionService.findListOrderBy(map).subList(0, 5));
+//
+//        List<ResponCollection> listOrderBy = collectionService.findListOrderBy(map);
+//        int max = listOrderBy.size() > 5 ? 5 : listOrderBy.size();
+//        result.setCollectionSearchList(listOrderBy.subList(0, max));
+//
+//
+//
+//
+//        map.put("sidx", "a.like_num");
+////        result.setCollectionLikeList(collectionService.findListOrderBy(map).subList(0, 10));
+//
+//        List<ResponCollection> listOrderBy2 = collectionService.findListOrderBy(map);
+//        int max2 = listOrderBy2.size() > 10 ? 10 : listOrderBy2.size();
+//        result.setCollectionLikeList(listOrderBy2.subList(0, max2));
+//        map.put("sidx", "a.open_num");
+////        result.setCollectionOpenList(collectionService.findListOrderBy(map).subList(0, 3));
+//        List<ResponCollection> list3 = collectionService.findListOrderBy(map);
+//        int max3 = listOrderBy2.size() > 3 ? 3 : listOrderBy2.size();
+//
+//        result.setCollectionOpenList(list3.subList(0, max3));
+//
+//        result.setCollectionTypeTotal(collectionService.typeTotal());
+//
+//        return AjaxJson.success(result);
+//    }
+//
+//    private static void output(HttpServletResponse resp, File file) {
+//        OutputStream os = null;
+//        BufferedInputStream bis = null;
+//        byte[] buff = new byte[1024];
+//        try {
+//            os = resp.getOutputStream();
+//            bis = new BufferedInputStream(new FileInputStream(file));
+//            int i = 0;
+//            while ((i = bis.read(buff)) != -1) {
+//                os.write(buff, 0, i);
+//                os.flush();
+//            }
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//        } finally {
+//            try {
+//                bis.close();
+//            } catch (IOException e) {
+//                e.printStackTrace();
+//            }
+//        }
+//    }
+//}

+ 112 - 112
zhoushan-system-api/src/main/java/com/fdage/controller/EquipmentController.java

@@ -1,112 +1,112 @@
-package com.fdage.controller;
-
-import com.fdage.aop.WebControllerLog;
-import com.fdage.enums.ResponEnum;
-import com.fdage.pojo.TbEquipment;
-import com.fdage.pojo.TbUser;
-import com.fdage.request.RequestEquipment;
-import com.fdage.request.RequestUser;
-import com.fdage.respon.ResponEquipment;
-import com.fdage.service.IEquipmentService;
-import com.fdage.util.AjaxJson;
-import com.fdage.util.PasswordUtils;
-import com.github.pagehelper.PageInfo;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import java.util.List;
-
-/**
- * Created by Hb_zzZ on 2019/9/11.
- */
-@Controller
-@RequestMapping("/zhoushan/equipment")
-@Slf4j
-@Api(tags = "设备管理模块")
-public class EquipmentController {
-
-    @Autowired
-    private IEquipmentService service;
-
-    @PostMapping("addEquipment")
-    @ResponseBody
-    @WebControllerLog(description = "设备管理-新增设备")
-    @ApiOperation("新增设备")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = "设备名称", dataType = "String"),
-            @ApiImplicitParam(name = "uuid", value = "设备id", dataType = "String"),
-            @ApiImplicitParam(name = "positionId", value = "位置id", dataType = "String"),
-            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
-    public AjaxJson addEquipment(@RequestBody RequestEquipment bo){
-        if(bo == null || StringUtils.isEmpty(bo.getName()) || bo.getPositionId() == null ||
-                StringUtils.isEmpty(bo.getUuid()) || bo.getState() == null){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-        TbEquipment equipment = new TbEquipment();
-        BeanUtils.copyProperties(bo, equipment);
-        service.insert(equipment);
-        return AjaxJson.success();
-    }
-
-    @PostMapping("updateEquipment")
-    @ResponseBody
-    @WebControllerLog(description = "设备管理-修改设备")
-    @ApiOperation("修改设备")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "文物id", dataType = "String"),
-            @ApiImplicitParam(name = "name", value = "设备名称", dataType = "String"),
-            @ApiImplicitParam(name = "uuid", value = "设备id", dataType = "String"),
-            @ApiImplicitParam(name = "positionId", value = "位置id", dataType = "String"),
-            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
-    public AjaxJson updateEquipment(@RequestBody RequestEquipment bo){
-        if(bo == null || StringUtils.isEmpty(bo.getName()) || bo.getPositionId() == null ||
-                StringUtils.isEmpty(bo.getUuid()) || bo.getState() == null || bo.getId() == null){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-        TbEquipment equipment = new TbEquipment();
-        BeanUtils.copyProperties(bo, equipment);
-        service.update(equipment);
-        return AjaxJson.success();
-    }
-
-    @PostMapping("updateState")
-    @ResponseBody
-    @WebControllerLog(description = "设备管理-设备启用/停用")
-    @ApiOperation("设备启用/停用")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "文物id", dataType = "String"),
-            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
-    public AjaxJson updateState(@RequestBody RequestEquipment bo){
-        if(bo == null || bo.getState() == null || bo.getId() == null){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-        TbEquipment equipment = new TbEquipment();
-        BeanUtils.copyProperties(bo, equipment);
-        service.update(equipment);
-        return AjaxJson.success();
-    }
-
-    @PostMapping("list")
-    @ResponseBody
-    @WebControllerLog(description = "设备管理-获取设备列表")
-    @ApiOperation("获取设备列表")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "String"),
-            @ApiImplicitParam(name = "pageSize", value = "每页数量", dataType = "String")})
-    public AjaxJson list(@RequestBody RequestEquipment bo){
-        List<ResponEquipment> list = service.findList(bo);
-        PageInfo<ResponEquipment> pageInfo = new PageInfo<>(list);
-        return AjaxJson.success(pageInfo);
-    }
-}
+//package com.fdage.controller;
+//
+//import com.fdage.aop.WebControllerLog;
+//import com.fdage.enums.ResponEnum;
+//import com.fdage.pojo.TbEquipment;
+//import com.fdage.pojo.TbUser;
+//import com.fdage.request.RequestEquipment;
+//import com.fdage.request.RequestUser;
+//import com.fdage.respon.ResponEquipment;
+//import com.fdage.service.IEquipmentService;
+//import com.fdage.util.AjaxJson;
+//import com.fdage.util.PasswordUtils;
+//import com.github.pagehelper.PageInfo;
+//import io.swagger.annotations.Api;
+//import io.swagger.annotations.ApiImplicitParam;
+//import io.swagger.annotations.ApiImplicitParams;
+//import io.swagger.annotations.ApiOperation;
+//import lombok.extern.slf4j.Slf4j;
+//import org.apache.commons.lang3.StringUtils;
+//import org.springframework.beans.BeanUtils;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.web.bind.annotation.PostMapping;
+//import org.springframework.web.bind.annotation.RequestBody;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.ResponseBody;
+//
+//import java.util.List;
+//
+///**
+// * Created by Hb_zzZ on 2019/9/11.
+// */
+//@Controller
+//@RequestMapping("/zhoushan/equipment")
+//@Slf4j
+//@Api(tags = "设备管理模块")
+//public class EquipmentController {
+//
+//    @Autowired
+//    private IEquipmentService service;
+//
+//    @PostMapping("addEquipment")
+//    @ResponseBody
+//    @WebControllerLog(description = "设备管理-新增设备")
+//    @ApiOperation("新增设备")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "name", value = "设备名称", dataType = "String"),
+//            @ApiImplicitParam(name = "uuid", value = "设备id", dataType = "String"),
+//            @ApiImplicitParam(name = "positionId", value = "位置id", dataType = "String"),
+//            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
+//    public AjaxJson addEquipment(@RequestBody RequestEquipment bo){
+//        if(bo == null || StringUtils.isEmpty(bo.getName()) || bo.getPositionId() == null ||
+//                StringUtils.isEmpty(bo.getUuid()) || bo.getState() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//        TbEquipment equipment = new TbEquipment();
+//        BeanUtils.copyProperties(bo, equipment);
+//        service.insert(equipment);
+//        return AjaxJson.success();
+//    }
+//
+//    @PostMapping("updateEquipment")
+//    @ResponseBody
+//    @WebControllerLog(description = "设备管理-修改设备")
+//    @ApiOperation("修改设备")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "文物id", dataType = "String"),
+//            @ApiImplicitParam(name = "name", value = "设备名称", dataType = "String"),
+//            @ApiImplicitParam(name = "uuid", value = "设备id", dataType = "String"),
+//            @ApiImplicitParam(name = "positionId", value = "位置id", dataType = "String"),
+//            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
+//    public AjaxJson updateEquipment(@RequestBody RequestEquipment bo){
+//        if(bo == null || StringUtils.isEmpty(bo.getName()) || bo.getPositionId() == null ||
+//                StringUtils.isEmpty(bo.getUuid()) || bo.getState() == null || bo.getId() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//        TbEquipment equipment = new TbEquipment();
+//        BeanUtils.copyProperties(bo, equipment);
+//        service.update(equipment);
+//        return AjaxJson.success();
+//    }
+//
+//    @PostMapping("updateState")
+//    @ResponseBody
+//    @WebControllerLog(description = "设备管理-设备启用/停用")
+//    @ApiOperation("设备启用/停用")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "文物id", dataType = "String"),
+//            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
+//    public AjaxJson updateState(@RequestBody RequestEquipment bo){
+//        if(bo == null || bo.getState() == null || bo.getId() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//        TbEquipment equipment = new TbEquipment();
+//        BeanUtils.copyProperties(bo, equipment);
+//        service.update(equipment);
+//        return AjaxJson.success();
+//    }
+//
+//    @PostMapping("list")
+//    @ResponseBody
+//    @WebControllerLog(description = "设备管理-获取设备列表")
+//    @ApiOperation("获取设备列表")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "String"),
+//            @ApiImplicitParam(name = "pageSize", value = "每页数量", dataType = "String")})
+//    public AjaxJson list(@RequestBody RequestEquipment bo){
+//        List<ResponEquipment> list = service.findList(bo);
+//        PageInfo<ResponEquipment> pageInfo = new PageInfo<>(list);
+//        return AjaxJson.success(pageInfo);
+//    }
+//}

+ 287 - 289
zhoushan-system-api/src/main/java/com/fdage/controller/ExhibitionController.java

@@ -1,289 +1,287 @@
-package com.fdage.controller;
-
-import com.alibaba.fastjson.JSONObject;
-import com.fdage.aop.WebControllerLog;
-import com.fdage.enums.ResponEnum;
-import com.fdage.pojo.TbExhibition;
-import com.fdage.pojo.TbExhibitionCollection;
-import com.fdage.request.RequestCollection;
-import com.fdage.request.RequestExhibition;
-import com.fdage.respon.ResponExhibition;
-import com.fdage.respon.ResponInformation;
-import com.fdage.service.IExhibitionService;
-import com.fdage.util.AjaxJson;
-import com.fdage.util.DateUtil;
-import com.fdage.util.FileUtil;
-import com.github.pagehelper.PageInfo;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Controller;
-import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * Created by Hb_zzZ on 2019/9/12.
- */
-@Controller
-@RequestMapping("/zhoushan/exhibition")
-@Slf4j
-@Api(tags = "展示管理模块")
-public class ExhibitionController {
-
-    @Value("${upload.exhibition}")
-    private String uploadPath;
-
-    @Autowired
-    private IExhibitionService service;
-
-    @PostMapping("insertExhibitionCollection")
-    @ResponseBody
-    @ApiOperation("新增展览方案-推送给文通")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "exhibitionId", value = "展览id", dataType = "String"),
-            @ApiImplicitParam(name = "collectionId", value = "文物id", dataType = "String")})
-    public AjaxJson insertExhibitionCollection(@RequestBody RequestExhibition bo){
-        if(bo == null || bo.getExhibitionId() == null || StringUtils.isEmpty(bo.getCollectionId())){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-        String[] ids = bo.getCollectionId().split(",");
-        TbExhibitionCollection exhibitionCollection = new TbExhibitionCollection();
-        for(int i = 0, len = ids.length; i < len; i++){
-            exhibitionCollection.setExhibitionId(bo.getExhibitionId());
-            exhibitionCollection.setCollectionId(Long.valueOf(ids[i]));
-            exhibitionCollection.setOrderNum(i + 1);
-            service.insertExhibitionCollection(exhibitionCollection);
-        }
-
-        //发送sse消息
-        SseController.send("data:" + "0\r\n");
-        return AjaxJson.success();
-    }
-
-    @PostMapping("updateExhibitionCollection")
-    @ResponseBody
-    @ApiOperation("修改展览方案-推送给文通")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "exhibitionId", value = "展览id", dataType = "String"),
-            @ApiImplicitParam(name = "collectionId", value = "文物id", dataType = "String")})
-    public AjaxJson updateExhibitionCollection(@RequestBody RequestExhibition bo){
-        if(bo == null || bo.getExhibitionId() == null || StringUtils.isEmpty(bo.getCollectionId())){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-
-        service.deleteExhibitionCollection(bo.getExhibitionId());
-
-
-        String[] ids = bo.getCollectionId().split(",");
-        TbExhibitionCollection exhibitionCollection = new TbExhibitionCollection();
-        for(int i = 0, len = ids.length; i < len; i++){
-            exhibitionCollection.setExhibitionId(bo.getExhibitionId());
-            exhibitionCollection.setCollectionId(Long.valueOf(ids[i]));
-            exhibitionCollection.setOrderNum(i + 1);
-            service.insertExhibitionCollection(exhibitionCollection);
-        }
-
-        //发送sse消息
-        SseController.send("data:" + "0\r\n");
-        return AjaxJson.success();
-    }
-
-    @PostMapping("addExhibition")
-    @ResponseBody
-    @WebControllerLog(description = "展览管理-新增展览方案")
-    @ApiOperation("新增展览方案")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = "展览方案名称", dataType = "String"),
-            @ApiImplicitParam(name = "exhibitionId", value = "展览id", dataType = "String"),
-            @ApiImplicitParam(name = "equipmentId", value = "关联设备id", dataType = "String"),
-            @ApiImplicitParam(name = "webUrl", value = "展示封面", dataType = "String"),
-            @ApiImplicitParam(name = "webUrl2", value = "展示封面浅色", dataType = "String"),
-            @ApiImplicitParam(name = "orderNum", value = "排序顺序", dataType = "String"),
-            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
-    public AjaxJson addExhibition(@RequestBody RequestExhibition bo){
-        if(bo == null || StringUtils.isEmpty(bo.getName()) || bo.getTypeId() == null ||
-                bo.getEquipmentId() == null || bo.getState() == null){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-
-        TbExhibition exhibition = new TbExhibition();
-        BeanUtils.copyProperties(bo, exhibition);
-        service.insert(exhibition);
-        return AjaxJson.success(exhibition);
-    }
-
-    @PostMapping("updateExhibition")
-    @ResponseBody
-    @WebControllerLog(description = "展览管理-修改展览方案")
-    @ApiOperation("修改展览方案")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "isSend", value = "是否推送给问题,1推送", dataType = "String"),
-            @ApiImplicitParam(name = "id", value = "展览方案id", dataType = "String"),
-            @ApiImplicitParam(name = "name", value = "展览方案名称", dataType = "String"),
-            @ApiImplicitParam(name = "exhibitionId", value = "展览id", dataType = "String"),
-            @ApiImplicitParam(name = "equipmentId", value = "关联设备id", dataType = "String"),
-            @ApiImplicitParam(name = "webUrl", value = "展示封面", dataType = "String"),
-            @ApiImplicitParam(name = "webUrl2", value = "展示封面浅色", dataType = "String"),
-            @ApiImplicitParam(name = "orderNum", value = "排序顺序", dataType = "String"),
-            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
-    public AjaxJson updateExhibition(@RequestBody RequestExhibition bo){
-        if(bo == null || StringUtils.isEmpty(bo.getName()) || bo.getTypeId() == null ||
-                bo.getEquipmentId() == null || bo.getState() == null){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-
-        TbExhibition exhibition = new TbExhibition();
-        BeanUtils.copyProperties(bo, exhibition);
-        exhibition.setCreateTime(new Date());
-        service.update(exhibition);
-        if(bo.getIsSend() != null && bo.getIsSend() == 1){
-            //发送sse消息
-            SseController.send("data:" + "0\r\n");
-        }
-        return AjaxJson.success(exhibition);
-    }
-
-    @PostMapping("deleteExhibition")
-    @ResponseBody
-    @WebControllerLog(description = "展览管理-删除展览方案")
-    @ApiOperation("删除展览方案")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "展览方案id", dataType = "String")})
-    public AjaxJson deleteExhibition(@RequestBody RequestExhibition bo){
-        if(bo == null || bo.getId() == null){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-
-        service.delete(bo.getId());
-        return AjaxJson.success();
-    }
-
-    @PostMapping("copyExhibition")
-    @ResponseBody
-    @WebControllerLog(description = "展览管理-复制展览方案")
-    @ApiOperation("复制展览方案")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "展览方案id", dataType = "String")})
-    public AjaxJson copyExhibition(@RequestBody RequestExhibition bo){
-        if(bo == null || bo.getId() == null){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-
-        TbExhibition exhibition = service.findById(bo.getId());
-        exhibition.setId(null);
-        exhibition.setState(1);
-        service.insert(exhibition);
-
-        List<ResponExhibition> list = service.findExhibitionCollection(bo.getId());
-        TbExhibitionCollection exhibitionCollection = new TbExhibitionCollection();
-        for(ResponExhibition responExhibition : list){
-            exhibitionCollection.setExhibitionId(exhibition.getId());
-            exhibitionCollection.setCollectionId(responExhibition.getCollectionId());
-            service.insertExhibitionCollection(exhibitionCollection);
-        }
-        return AjaxJson.success();
-    }
-
-    @PostMapping("findCollectionByExhibition")
-    @ResponseBody
-    @ApiOperation("通过展示方案找文物")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "exhibitionId", value = "展览方案id", dataType = "String")})
-    public AjaxJson findCollectionByExhibition(@RequestBody RequestExhibition bo){
-        if(bo == null || bo.getExhibitionId() == null){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-
-        return AjaxJson.success(service.findCollectionByExhibition(bo.getExhibitionId()));
-    }
-
-    @PostMapping("list")
-    @ResponseBody
-    @WebControllerLog(description = "展览管理-获取展览方案列表")
-    @ApiOperation("获取展览方案列表")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = "方案名称", dataType = "String"),
-            @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "String"),
-            @ApiImplicitParam(name = "pageSize", value = "每页数量", dataType = "String")})
-    public AjaxJson list(@RequestBody RequestExhibition bo){
-        List<ResponExhibition> list = service.findList(bo);
-        for(ResponExhibition exhibition : list){
-            exhibition.setCreateTime(String.valueOf(DateUtil.convert2CST(exhibition.getCreateTime())));
-        }
-        PageInfo<ResponExhibition> pageInfo = new PageInfo<>(list);
-        return AjaxJson.success(pageInfo);
-    }
-
-    @PostMapping("getExhibitionByEquipmentId")
-    @ResponseBody
-    @ApiOperation("通过设备id获取展示方案")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "equipmentId", value = "设备id", dataType = "String")})
-    public AjaxJson getExhibitionByEquipmentId(@RequestBody RequestExhibition bo){
-        if(bo == null || bo.getEquipmentId() == null){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-
-        ResponExhibition responExhibition = service.getExhibitionByEquipmentId(bo.getEquipmentId());
-        return AjaxJson.success(responExhibition);
-    }
-
-    @PostMapping("getExhibitionById")
-    @ResponseBody
-    @ApiOperation("通过id获取展示方案")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "id", dataType = "String")})
-    public AjaxJson getExhibitionById(@RequestBody RequestExhibition bo){
-        if(bo == null || bo.getId() == null){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-
-        ResponExhibition responExhibition = service.getExhibitionById(bo.getId());
-        return AjaxJson.success(responExhibition);
-    }
-
-    @PostMapping("/upload")
-    @ResponseBody
-    @ApiOperation("上传展示方案图片")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "file", value = "文件流", dataType = "String")})
-    public AjaxJson upload(@RequestParam(value = "filename", defaultValue = "") String name, @RequestParam("file") MultipartFile file){
-        if(file == null){
-            return AjaxJson.failure("参数不能为空");
-        }
-        String fileName = System.currentTimeMillis() + "_";
-        if(org.apache.commons.lang3.StringUtils.isNotEmpty(name)){
-            fileName = fileName + name;
-        }else {
-            fileName = fileName + file.getOriginalFilename();
-        }
-        log.info("图片地址:" + fileName);
-        boolean flag = FileUtil.upload(file, uploadPath, fileName);
-
-        if(!flag){
-            return AjaxJson.failure("上传图片失败");
-        }
-
-//        Map<String, String> map = new HashMap<>();
-//        map.put(path + "/" + fileName, "company/" + fileName);
-//        uploadToAlibabaService.upload(map);
-
-        return AjaxJson.success((Object) ("/exhibition/" + fileName));
-    }
-
-    @PostMapping("typeList")
-    @ResponseBody
-    @ApiOperation("获取展示类别列表")
-    public AjaxJson typeList(){
-        return AjaxJson.success(service.typeList());
-    }
-}
+//package com.fdage.controller;
+//
+//import com.alibaba.fastjson.JSONObject;
+//import com.fdage.aop.WebControllerLog;
+//import com.fdage.enums.ResponEnum;
+//import com.fdage.pojo.TbExhibition;
+//import com.fdage.pojo.TbExhibitionCollection;
+//import com.fdage.request.RequestCollection;
+//import com.fdage.request.RequestExhibition;
+//import com.fdage.respon.ResponExhibition;
+//import com.fdage.respon.ResponInformation;
+//import com.fdage.service.IExhibitionService;
+//import com.fdage.util.AjaxJson;
+//import com.fdage.util.DateUtil;
+//import com.fdage.util.FileUtil;
+//import com.github.pagehelper.PageInfo;
+//import io.swagger.annotations.Api;
+//import io.swagger.annotations.ApiImplicitParam;
+//import io.swagger.annotations.ApiImplicitParams;
+//import io.swagger.annotations.ApiOperation;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.BeanUtils;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.util.StringUtils;
+//import org.springframework.web.bind.annotation.*;
+//import org.springframework.web.multipart.MultipartFile;
+//
+//import java.util.Date;
+//import java.util.List;
+//
+///**
+// * Created by Hb_zzZ on 2019/9/12.
+// */
+//@Controller
+//@RequestMapping("/zhoushan/exhibition")
+//@Slf4j
+//@Api(tags = "展示管理模块")
+//public class ExhibitionController {
+//
+//    @Value("${upload.exhibition}")
+//    private String uploadPath;
+//
+//    @Autowired
+//    private IExhibitionService service;
+//
+//    @PostMapping("insertExhibitionCollection")
+//    @ResponseBody
+//    @ApiOperation("新增展览方案-推送给文通")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "exhibitionId", value = "展览id", dataType = "String"),
+//            @ApiImplicitParam(name = "collectionId", value = "文物id", dataType = "String")})
+//    public AjaxJson insertExhibitionCollection(@RequestBody RequestExhibition bo){
+//        if(bo == null || bo.getExhibitionId() == null || StringUtils.isEmpty(bo.getCollectionId())){
+//
+////        if(bo == null || bo.getExhibitionId() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//        String[] ids = bo.getCollectionId().split(",");
+//
+//        TbExhibitionCollection exhibitionCollection = new TbExhibitionCollection();
+//        for(int i = 0, len = ids.length; i < len; i++){
+//            exhibitionCollection.setExhibitionId(bo.getExhibitionId());
+//            // 2021-08-16 by owen
+////            if (ids.length > 1) {
+////                exhibitionCollection.setCollectionId(Long.valueOf(ids[i]));
+////            }
+//            exhibitionCollection.setCollectionId(Long.valueOf(ids[i]));
+//            service.insertExhibitionCollection(exhibitionCollection);
+//        }
+//
+//        //发送sse消息
+//        SseController.send("data:" + "0\r\n");
+//        return AjaxJson.success();
+//    }
+//
+//    @PostMapping("updateExhibitionCollection")
+//    @ResponseBody
+//    @ApiOperation("修改展览方案-推送给文通")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "exhibitionId", value = "展览id", dataType = "String"),
+//            @ApiImplicitParam(name = "collectionId", value = "文物id", dataType = "String")})
+//    public AjaxJson updateExhibitionCollection(@RequestBody RequestExhibition bo){
+//        if(bo == null || bo.getExhibitionId() == null || StringUtils.isEmpty(bo.getCollectionId())){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//
+//        service.deleteExhibitionCollection(bo.getExhibitionId());
+//
+//
+//        String[] ids = bo.getCollectionId().split(",");
+//        TbExhibitionCollection exhibitionCollection = new TbExhibitionCollection();
+//        for(int i = 0, len = ids.length; i < len; i++){
+//            exhibitionCollection.setExhibitionId(bo.getExhibitionId());
+//            exhibitionCollection.setCollectionId(Long.valueOf(ids[i]));
+//            service.insertExhibitionCollection(exhibitionCollection);
+//        }
+//
+//        //发送sse消息
+//        SseController.send("data:" + "0\r\n");
+//        return AjaxJson.success();
+//    }
+//
+//    @PostMapping("addExhibition")
+//    @ResponseBody
+//    @WebControllerLog(description = "展示管理-新增展览方案")
+//    @ApiOperation("新增展览方案")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "name", value = "展览方案名称", dataType = "String"),
+//            @ApiImplicitParam(name = "exhibitionId", value = "展览id", dataType = "String"),
+//            @ApiImplicitParam(name = "equipmentId", value = "关联设备id", dataType = "String"),
+//            @ApiImplicitParam(name = "webUrl", value = "展示封面", dataType = "String"),
+//            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
+//    public AjaxJson addExhibition(@RequestBody RequestExhibition bo){
+//        if(bo == null || StringUtils.isEmpty(bo.getName()) || bo.getTypeId() == null || bo.getState() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//
+//        TbExhibition exhibition = new TbExhibition();
+//        BeanUtils.copyProperties(bo, exhibition);
+//        service.insert(exhibition);
+//        return AjaxJson.success(exhibition);
+//    }
+//
+//    @PostMapping("updateExhibition")
+//    @ResponseBody
+//    @WebControllerLog(description = "展示管理-修改展览方案")
+//    @ApiOperation("修改展览方案")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "isSend", value = "是否推送给问题,1推送", dataType = "String"),
+//            @ApiImplicitParam(name = "id", value = "展览方案id", dataType = "String"),
+//            @ApiImplicitParam(name = "name", value = "展览方案名称", dataType = "String"),
+//            @ApiImplicitParam(name = "exhibitionId", value = "展览id", dataType = "String"),
+//            @ApiImplicitParam(name = "equipmentId", value = "关联设备id", dataType = "String"),
+//            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
+//    public AjaxJson updateExhibition(@RequestBody RequestExhibition bo){
+//        if(bo == null || StringUtils.isEmpty(bo.getName()) || bo.getTypeId() == null || bo.getState() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//
+//        TbExhibition exhibition = new TbExhibition();
+//        BeanUtils.copyProperties(bo, exhibition);
+//        exhibition.setCreateTime(new Date());
+//        service.update(exhibition);
+//        if(bo.getIsSend() != null && bo.getIsSend() == 1){
+//            //发送sse消息
+//            SseController.send("data:" + "0\r\n");
+//        }
+//        return AjaxJson.success(exhibition);
+//    }
+//
+//    @PostMapping("deleteExhibition")
+//    @ResponseBody
+//    @WebControllerLog(description = "展示管理-删除展览方案")
+//    @ApiOperation("删除展览方案")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "展览方案id", dataType = "String")})
+//    public AjaxJson deleteExhibition(@RequestBody RequestExhibition bo){
+//        if(bo == null || bo.getId() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//
+//        service.delete(bo.getId());
+//        return AjaxJson.success();
+//    }
+//
+//    @PostMapping("copyExhibition")
+//    @ResponseBody
+//    @WebControllerLog(description = "展示管理-复制展览方案")
+//    @ApiOperation("复制展览方案")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "展览方案id", dataType = "String")})
+//    public AjaxJson copyExhibition(@RequestBody RequestExhibition bo){
+//        if(bo == null || bo.getId() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//
+//        TbExhibition exhibition = service.findById(bo.getId());
+//        exhibition.setId(null);
+//        exhibition.setState(1);
+//        service.insert(exhibition);
+//
+//        List<ResponExhibition> list = service.findExhibitionCollection(bo.getId());
+//        TbExhibitionCollection exhibitionCollection = new TbExhibitionCollection();
+//        for(ResponExhibition responExhibition : list){
+//            exhibitionCollection.setExhibitionId(exhibition.getId());
+//            exhibitionCollection.setCollectionId(responExhibition.getCollectionId());
+//            service.insertExhibitionCollection(exhibitionCollection);
+//        }
+//        return AjaxJson.success();
+//    }
+//
+//    @PostMapping("findCollectionByExhibition")
+//    @ResponseBody
+//    @ApiOperation("通过展示方案找文物")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "exhibitionId", value = "展览方案id", dataType = "String")})
+//    public AjaxJson findCollectionByExhibition(@RequestBody RequestExhibition bo){
+//        if(bo == null || bo.getExhibitionId() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//
+//        return AjaxJson.success(service.findCollectionByExhibition(bo.getExhibitionId()));
+//    }
+//
+//    @PostMapping("list")
+//    @ResponseBody
+//    @WebControllerLog(description = "展示管理-获取展览方案列表")
+//    @ApiOperation("获取展览方案列表")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "name", value = "方案名称", dataType = "String"),
+//            @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "String"),
+//            @ApiImplicitParam(name = "pageSize", value = "每页数量", dataType = "String")})
+//    public AjaxJson list(@RequestBody RequestExhibition bo){
+//        List<ResponExhibition> list = service.findList(bo);
+//        for(ResponExhibition exhibition : list){
+//            exhibition.setCreateTime(String.valueOf(DateUtil.convert2CST(exhibition.getCreateTime())));
+//        }
+//        PageInfo<ResponExhibition> pageInfo = new PageInfo<>(list);
+//        return AjaxJson.success(pageInfo);
+//    }
+//
+//    @PostMapping("getExhibitionByEquipmentId")
+//    @ResponseBody
+//    @ApiOperation("通过设备id获取展示方案")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "equipmentId", value = "设备id", dataType = "String")})
+//    public AjaxJson getExhibitionByEquipmentId(@RequestBody RequestExhibition bo){
+//        if(bo == null || bo.getEquipmentId() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//
+//        ResponExhibition responExhibition = service.getExhibitionByEquipmentId(bo.getEquipmentId());
+//        return AjaxJson.success(responExhibition);
+//    }
+//
+//    @PostMapping("getExhibitionById")
+//    @ResponseBody
+//    @ApiOperation("通过id获取展示方案")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "id", dataType = "String")})
+//    public AjaxJson getExhibitionById(@RequestBody RequestExhibition bo){
+//        if(bo == null || bo.getId() == null){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//
+//        ResponExhibition responExhibition = service.getExhibitionById(bo.getId());
+//        return AjaxJson.success(responExhibition);
+//    }
+//
+//    @PostMapping("/upload")
+//    @ResponseBody
+//    @ApiOperation("上传展示方案图片")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "file", value = "文件流", dataType = "String")})
+//    public AjaxJson upload(@RequestParam(value = "filename", defaultValue = "") String name, @RequestParam("file") MultipartFile file){
+//        if(file == null){
+//            return AjaxJson.failure("参数不能为空");
+//        }
+//        String fileName = System.currentTimeMillis() + "_";
+//        if(org.apache.commons.lang3.StringUtils.isNotEmpty(name)){
+//            fileName = fileName + name;
+//        }else {
+//            fileName = fileName + file.getOriginalFilename();
+//        }
+//        log.info("图片地址:" + fileName);
+//        boolean flag = FileUtil.upload(file, uploadPath, fileName);
+//
+//        if(!flag){
+//            return AjaxJson.failure("上传图片失败");
+//        }
+//
+////        Map<String, String> map = new HashMap<>();
+////        map.put(path + "/" + fileName, "company/" + fileName);
+////        uploadToAlibabaService.upload(map);
+//
+//        return AjaxJson.success((Object) ("/exhibition/" + fileName));
+//    }
+//
+//    @PostMapping("typeList")
+//    @ResponseBody
+//    @ApiOperation("获取展示类别列表")
+//    public AjaxJson typeList(){
+//        return AjaxJson.success(service.typeList());
+//    }
+//}

+ 181 - 181
zhoushan-system-api/src/main/java/com/fdage/controller/InformationController.java

@@ -1,181 +1,181 @@
-package com.fdage.controller;
-
-import com.alibaba.fastjson.JSONObject;
-import com.fdage.aop.WebControllerLog;
-import com.fdage.constant.ConstantUrl;
-import com.fdage.enums.ResponEnum;
-import com.fdage.pojo.TbInformation;
-import com.fdage.request.RequestInformation;
-import com.fdage.respon.ResponInformation;
-import com.fdage.service.IInformationService;
-import com.fdage.util.AjaxJson;
-import com.fdage.util.DateUtil;
-import com.fdage.util.FileUtil;
-import com.github.pagehelper.PageInfo;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.List;
-
-/**
- * Created by Hb_zzZ on 2019/9/11.
- */
-@Controller
-@RequestMapping("/zhoushan/information")
-@Slf4j
-@Api(tags = "资讯管理模块")
-public class InformationController {
-
-    @Autowired
-    private IInformationService service;
-
-    @Value("${upload.information}")
-    private String uploadPath;
-
-    @PostMapping("addInformation")
-    @ResponseBody
-    @WebControllerLog(description = "资讯管理-新增资讯")
-    @ApiOperation("新增资讯")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = "资讯名称", dataType = "String"),
-            @ApiImplicitParam(name = "type", value = "资讯类型", dataType = "String"),
-            @ApiImplicitParam(name = "contentUrl", value = "轮播内容,视频为url,图片类型为json", dataType = "String"),
-            @ApiImplicitParam(name = "contentNum", value = "轮播板式", dataType = "String"),
-            @ApiImplicitParam(name = "description", value = "资讯说明", dataType = "String"),
-            @ApiImplicitParam(name = "orderNum", value = "展示顺序编码", dataType = "String"),
-            @ApiImplicitParam(name = "startTime", value = "轮播开始时间", dataType = "String"),
-            @ApiImplicitParam(name = "endTime", value = "轮播结束时间", dataType = "String"),
-            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
-    public AjaxJson addInformation(@RequestBody RequestInformation bo){
-        if(bo == null || StringUtils.isEmpty(bo.getName()) ||
-                bo.getType() == null  || StringUtils.isEmpty(bo.getContentUrl())){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-
-        TbInformation information = new TbInformation();
-        BeanUtils.copyProperties(bo, information);
-        service.insert(information);
-        //发送sse消息
-        SseController.send("data:" + "1\r\n");
-        return AjaxJson.success();
-    }
-
-    @PostMapping("updateInformation")
-    @ResponseBody
-    @WebControllerLog(description = "资讯管理-修改资讯")
-    @ApiOperation("修改资讯")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "id", dataType = "String"),
-            @ApiImplicitParam(name = "name", value = "资讯名称", dataType = "String"),
-            @ApiImplicitParam(name = "type", value = "资讯类型", dataType = "String"),
-            @ApiImplicitParam(name = "contentUrl", value = "轮播内容,视频为url,图片类型为json", dataType = "String"),
-            @ApiImplicitParam(name = "contentNum", value = "轮播板式", dataType = "String"),
-            @ApiImplicitParam(name = "description", value = "资讯说明", dataType = "String"),
-            @ApiImplicitParam(name = "orderNum", value = "展示顺序编码", dataType = "String"),
-            @ApiImplicitParam(name = "startTime", value = "轮播开始时间", dataType = "String"),
-            @ApiImplicitParam(name = "endTime", value = "轮播结束时间", dataType = "String"),
-            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
-    public AjaxJson updateInformation(@RequestBody RequestInformation bo){
-        if(bo == null || StringUtils.isEmpty(bo.getName()) ||
-                bo.getType() == null  || StringUtils.isEmpty(bo.getContentUrl())){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-
-        TbInformation information = new TbInformation();
-        BeanUtils.copyProperties(bo, information);
-        service.update(information);
-
-        //发送sse消息
-        SseController.send("data:" + "1\r\n");
-        return AjaxJson.success();
-    }
-
-    @PostMapping("deleteInformation")
-    @ResponseBody
-    @WebControllerLog(description = "资讯管理-删除资讯")
-    @ApiOperation("删除资讯")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "id", dataType = "String")})
-    public AjaxJson deleteInformation(@RequestBody RequestInformation bo){
-        if(bo == null || bo.getId() == null ){
-            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
-        }
-        service.delete(bo.getId());
-
-        //发送sse消息
-        SseController.send("data:" + "1\r\n");
-        return AjaxJson.success();
-    }
-
-    @PostMapping("list")
-    @ResponseBody
-    @WebControllerLog(description = "资讯管理-获取资讯列表")
-    @ApiOperation("获取资讯列表")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "type", value = "资讯类型,0表示海报,1表示视频", dataType = "String"),
-            @ApiImplicitParam(name = "name", value = "资讯名称", dataType = "String"),
-            @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "String"),
-            @ApiImplicitParam(name = "pageSize", value = "每页数量", dataType = "String")})
-    public AjaxJson list(@RequestBody RequestInformation bo){
-        List<ResponInformation> list = service.findList(bo);
-        for(ResponInformation information : list){
-            if(StringUtils.isNotEmpty(information.getStartTime())){
-                information.setStartTime(String.valueOf(DateUtil.convert2CST(information.getStartTime())));
-            }
-            if(StringUtils.isNotEmpty(information.getEndTime())){
-                information.setEndTime(String.valueOf(DateUtil.convert2CST(information.getEndTime())));
-            }
-            if(StringUtils.isNotEmpty(information.getCreateTime())){
-                information.setCreateTime(String.valueOf(DateUtil.convert2CST(information.getCreateTime())));
-            }
-        }
-        PageInfo<ResponInformation> pageInfo = new PageInfo<>(list);
-        return AjaxJson.success(pageInfo);
-    }
-
-    @PostMapping("listAll")
-    @ResponseBody
-    @ApiOperation("所有资讯")
-    public AjaxJson listAll(){
-        return AjaxJson.success(service.listAll());
-    }
-
-    @PostMapping("/upload")
-    @ResponseBody
-    @ApiOperation("上传资讯图片")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "file", value = "文件流", dataType = "String")})
-    public AjaxJson upload(@RequestParam(value = "filename", defaultValue = "") String name, @RequestParam("file") MultipartFile file){
-        if(file == null){
-            return AjaxJson.failure("参数不能为空");
-        }
-        String fileName = System.currentTimeMillis() + "_";
-        if(StringUtils.isNotEmpty(name)){
-            fileName = fileName + name;
-        }else {
-            fileName = fileName + file.getOriginalFilename();
-        }
-        log.info("图片地址:" + fileName);
-        boolean flag = FileUtil.upload(file, uploadPath, fileName);
-
-        if(!flag){
-            return AjaxJson.failure("上传图片失败");
-        }
-
-//        Map<String, String> map = new HashMap<>();
-//        map.put(path + "/" + fileName, "company/" + fileName);
-//        uploadToAlibabaService.upload(map);
-
-        return AjaxJson.success((Object) ("/information/" + fileName));
-    }
-}
+//package com.fdage.controller;
+//
+//import com.alibaba.fastjson.JSONObject;
+//import com.fdage.aop.WebControllerLog;
+//import com.fdage.constant.ConstantUrl;
+//import com.fdage.enums.ResponEnum;
+//import com.fdage.pojo.TbInformation;
+//import com.fdage.request.RequestInformation;
+//import com.fdage.respon.ResponInformation;
+//import com.fdage.service.IInformationService;
+//import com.fdage.util.AjaxJson;
+//import com.fdage.util.DateUtil;
+//import com.fdage.util.FileUtil;
+//import com.github.pagehelper.PageInfo;
+//import io.swagger.annotations.Api;
+//import io.swagger.annotations.ApiImplicitParam;
+//import io.swagger.annotations.ApiImplicitParams;
+//import io.swagger.annotations.ApiOperation;
+//import lombok.extern.slf4j.Slf4j;
+//import org.apache.commons.lang3.StringUtils;
+//import org.springframework.beans.BeanUtils;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.web.bind.annotation.*;
+//import org.springframework.web.multipart.MultipartFile;
+//
+//import java.util.List;
+//
+///**
+// * Created by Hb_zzZ on 2019/9/11.
+// */
+//@Controller
+//@RequestMapping("/zhoushan/information")
+//@Slf4j
+//@Api(tags = "轮播管理模块")
+//public class InformationController {
+//
+//    @Autowired
+//    private IInformationService service;
+//
+//    @Value("${upload.information}")
+//    private String uploadPath;
+//
+//    @PostMapping("addInformation")
+//    @ResponseBody
+//    @WebControllerLog(description = "轮播管理-新增")
+//    @ApiOperation("新增")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "name", value = "资讯名称", dataType = "String"),
+//            @ApiImplicitParam(name = "type", value = "资讯类型", dataType = "String"),
+//            @ApiImplicitParam(name = "contentUrl", value = "轮播内容,视频为url,图片类型为json", dataType = "String"),
+//            @ApiImplicitParam(name = "contentNum", value = "轮播板式", dataType = "String"),
+//            @ApiImplicitParam(name = "description", value = "资讯说明", dataType = "String"),
+//            @ApiImplicitParam(name = "orderNum", value = "展示顺序编码", dataType = "String"),
+//            @ApiImplicitParam(name = "startTime", value = "轮播开始时间", dataType = "String"),
+//            @ApiImplicitParam(name = "endTime", value = "轮播结束时间", dataType = "String"),
+//            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
+//    public AjaxJson addInformation(@RequestBody RequestInformation bo){
+//        if(bo == null || StringUtils.isEmpty(bo.getName()) ||
+//                bo.getType() == null  || StringUtils.isEmpty(bo.getContentUrl())){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//
+//        TbInformation information = new TbInformation();
+//        BeanUtils.copyProperties(bo, information);
+//        service.insert(information);
+//        //发送sse消息
+//        SseController.send("data:" + "1\r\n");
+//        return AjaxJson.success();
+//    }
+//
+//    @PostMapping("updateInformation")
+//    @ResponseBody
+//    @WebControllerLog(description = "轮播管理-修改")
+//    @ApiOperation("修改")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "id", dataType = "String"),
+//            @ApiImplicitParam(name = "name", value = "资讯名称", dataType = "String"),
+//            @ApiImplicitParam(name = "type", value = "资讯类型", dataType = "String"),
+//            @ApiImplicitParam(name = "contentUrl", value = "轮播内容,视频为url,图片类型为json", dataType = "String"),
+//            @ApiImplicitParam(name = "contentNum", value = "轮播板式", dataType = "String"),
+//            @ApiImplicitParam(name = "description", value = "资讯说明", dataType = "String"),
+//            @ApiImplicitParam(name = "orderNum", value = "展示顺序编码", dataType = "String"),
+//            @ApiImplicitParam(name = "startTime", value = "轮播开始时间", dataType = "String"),
+//            @ApiImplicitParam(name = "endTime", value = "轮播结束时间", dataType = "String"),
+//            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String")})
+//    public AjaxJson updateInformation(@RequestBody RequestInformation bo){
+//        if(bo == null || StringUtils.isEmpty(bo.getName()) ||
+//                bo.getType() == null  || StringUtils.isEmpty(bo.getContentUrl())){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//
+//        TbInformation information = new TbInformation();
+//        BeanUtils.copyProperties(bo, information);
+//        service.update(information);
+//
+//        //发送sse消息
+//        SseController.send("data:" + "1\r\n");
+//        return AjaxJson.success();
+//    }
+//
+//    @PostMapping("deleteInformation")
+//    @ResponseBody
+//    @WebControllerLog(description = "轮播管理-删除")
+//    @ApiOperation("删除")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "id", dataType = "String")})
+//    public AjaxJson deleteInformation(@RequestBody RequestInformation bo){
+//        if(bo == null || bo.getId() == null ){
+//            return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
+//        }
+//        service.delete(bo.getId());
+//
+//        //发送sse消息
+//        SseController.send("data:" + "1\r\n");
+//        return AjaxJson.success();
+//    }
+//
+//    @PostMapping("list")
+//    @ResponseBody
+//    @WebControllerLog(description = "轮播管理-列表")
+//    @ApiOperation("列表")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "type", value = "资讯类型,0表示海报,1表示视频", dataType = "String"),
+//            @ApiImplicitParam(name = "name", value = "资讯名称", dataType = "String"),
+//            @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "String"),
+//            @ApiImplicitParam(name = "pageSize", value = "每页数量", dataType = "String")})
+//    public AjaxJson list(@RequestBody RequestInformation bo){
+//        List<ResponInformation> list = service.findList(bo);
+//        for(ResponInformation information : list){
+//            if(StringUtils.isNotEmpty(information.getStartTime())){
+//                information.setStartTime(String.valueOf(DateUtil.convert2CST(information.getStartTime())));
+//            }
+//            if(StringUtils.isNotEmpty(information.getEndTime())){
+//                information.setEndTime(String.valueOf(DateUtil.convert2CST(information.getEndTime())));
+//            }
+//            if(StringUtils.isNotEmpty(information.getCreateTime())){
+//                information.setCreateTime(String.valueOf(DateUtil.convert2CST(information.getCreateTime())));
+//            }
+//        }
+//        PageInfo<ResponInformation> pageInfo = new PageInfo<>(list);
+//        return AjaxJson.success(pageInfo);
+//    }
+//
+//    @PostMapping("listAll")
+//    @ResponseBody
+//    @ApiOperation("所有资讯")
+//    public AjaxJson listAll(){
+//        return AjaxJson.success(service.listAll());
+//    }
+//
+//    @PostMapping("/upload")
+//    @ResponseBody
+//    @ApiOperation("上传资讯图片")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "file", value = "文件流", dataType = "String")})
+//    public AjaxJson upload(@RequestParam(value = "filename", defaultValue = "") String name, @RequestParam("file") MultipartFile file){
+//        if(file == null){
+//            return AjaxJson.failure("参数不能为空");
+//        }
+//        String fileName = System.currentTimeMillis() + "_";
+//        if(StringUtils.isNotEmpty(name)){
+//            fileName = fileName + name;
+//        }else {
+//            fileName = fileName + file.getOriginalFilename();
+//        }
+//        log.info("图片地址:" + fileName);
+//        boolean flag = FileUtil.upload(file, uploadPath, fileName);
+//
+//        if(!flag){
+//            return AjaxJson.failure("上传图片失败");
+//        }
+//
+////        Map<String, String> map = new HashMap<>();
+////        map.put(path + "/" + fileName, "company/" + fileName);
+////        uploadToAlibabaService.upload(map);
+//
+//        return AjaxJson.success((Object) ("/information/" + fileName));
+//    }
+//}

+ 4 - 5
zhoushan-system-api/src/main/java/com/fdage/controller/LogController.java

@@ -3,7 +3,6 @@ package com.fdage.controller;
 import com.fdage.aop.WebControllerLog;
 import com.fdage.pojo.TbLog;
 import com.fdage.request.RequestLog;
-import com.fdage.respon.ResponLog;
 import com.fdage.service.ILogService;
 import com.fdage.util.AjaxJson;
 import com.github.pagehelper.PageInfo;
@@ -27,7 +26,7 @@ import java.util.List;
 @Controller
 @RequestMapping("/zhoushan/log")
 @Slf4j
-@Api(tags = "工作日志模块")
+@Api(tags = "sys-工作日志模块")
 public class LogController {
 
     @Autowired
@@ -35,7 +34,7 @@ public class LogController {
 
     @PostMapping("list")
     @ResponseBody
-    @WebControllerLog(description = "日志管理-获取日志列表")
+    @WebControllerLog(description = "工作日志-获取日志列表")
     @ApiOperation("获取日志列表")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "type", value = "资讯类型,0表示海报,1表示视频", dataType = "String"),
@@ -43,8 +42,8 @@ public class LogController {
             @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "String"),
             @ApiImplicitParam(name = "pageSize", value = "每页数量", dataType = "String")})
     public AjaxJson list(@RequestBody RequestLog bo){
-        List<ResponLog> list = logService.findList(bo);
-        PageInfo<ResponLog> pageInfo = new PageInfo<>(list);
+        List<TbLog> list = logService.findList(bo);
+        PageInfo<TbLog> pageInfo = new PageInfo<>(list);
         return AjaxJson.success(pageInfo);
     }
 }

+ 3 - 2
zhoushan-system-api/src/main/java/com/fdage/controller/LoginController.java

@@ -39,7 +39,7 @@ import java.util.concurrent.TimeUnit;
  */
 @Slf4j
 @Controller
-@Api(tags = "登陆模块")
+@Api(tags = "sys-登陆模块")
 public class LoginController {
 
     @Autowired
@@ -56,11 +56,12 @@ public class LoginController {
 
     @PostMapping("login")
     @ResponseBody
-    @ApiOperation("登陆")
+    @ApiOperation("登陆1")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "userName", value = "用户名", dataType = "String"),
             @ApiImplicitParam(name = "password", value = "密码", dataType = "String")})
     public AjaxJson login(@RequestBody RequestUser bo){
+        log.info("RequestUser: {}", bo.toString());
         if(bo == null || StringUtils.isEmpty(bo.getUserName()) || StringUtils.isEmpty(bo.getPassword())){
             return AjaxJson.failure(ResponEnum.NOT_NULL.getCode(), ResponEnum.NOT_NULL.getMessage());
         }

+ 32 - 32
zhoushan-system-api/src/main/java/com/fdage/controller/PositionController.java

@@ -1,32 +1,32 @@
-package com.fdage.controller;
-
-import com.fdage.service.IPositionService;
-import com.fdage.util.AjaxJson;
-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.stereotype.Controller;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-/**
- * Created by Hb_zzZ on 2019/9/11.
- */
-@Controller
-@RequestMapping("/zhoushan/position")
-@Slf4j
-@Api(tags = "位置模块")
-public class PositionController {
-
-    @Autowired
-    private IPositionService service;
-
-    @PostMapping("list")
-    @ResponseBody
-    @ApiOperation("获取所有位置")
-    public AjaxJson list(){
-        return AjaxJson.success(service.list());
-    }
-}
+//package com.fdage.controller;
+//
+//import com.fdage.service.IPositionService;
+//import com.fdage.util.AjaxJson;
+//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.stereotype.Controller;
+//import org.springframework.web.bind.annotation.PostMapping;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.ResponseBody;
+//
+///**
+// * Created by Hb_zzZ on 2019/9/11.
+// */
+//@Controller
+//@RequestMapping("/zhoushan/position")
+//@Slf4j
+//@Api(tags = "位置模块")
+//public class PositionController {
+//
+//    @Autowired
+//    private IPositionService service;
+//
+//    @PostMapping("list")
+//    @ResponseBody
+//    @ApiOperation("获取所有位置")
+//    public AjaxJson list(){
+//        return AjaxJson.success(service.list());
+//    }
+//}

+ 1 - 1
zhoushan-system-api/src/main/java/com/fdage/controller/ResourceController.java

@@ -20,7 +20,7 @@ import java.util.List;
 @Controller
 @RequestMapping("/zhoushan/resource")
 @Slf4j
-@Api(tags = "权限资源模块")
+@Api(tags = "sys-权限资源模块")
 public class ResourceController {
 
     @Autowired

+ 27 - 1
zhoushan-system-api/src/main/java/com/fdage/controller/RoleController.java

@@ -2,11 +2,13 @@ package com.fdage.controller;
 
 import com.fdage.aop.WebControllerLog;
 import com.fdage.pojo.TbRole;
+import com.fdage.pojo.TbUser;
 import com.fdage.request.RequestBase;
 import com.fdage.request.RequestRole;
 import com.fdage.respon.ResponRole;
 import com.fdage.service.IResourceService;
 import com.fdage.service.IRoleService;
+import com.fdage.service.IUserService;
 import com.fdage.util.AjaxJson;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
@@ -31,7 +33,7 @@ import java.util.List;
 @Controller
 @RequestMapping("/zhoushan/role")
 @Slf4j
-@Api(tags = "角色管理模块")
+@Api(tags = "sys-角色管理模块")
 public class RoleController {
 
     @Autowired
@@ -40,6 +42,11 @@ public class RoleController {
     @Autowired
     private IResourceService resourceService;
 
+    @Autowired
+    private IUserService userService;
+
+
+
     @PostMapping("save")
     @ResponseBody
     @WebControllerLog(description = "角色管理-新增/修改角色")
@@ -78,6 +85,15 @@ public class RoleController {
 
             }
             BeanUtils.copyProperties(param, roleEntity);
+
+            // 2021-8-16 检查该角色是否被用户使用
+            if (roleEntity.getState() == 1){
+                if (checkUseRole(roleEntity.getId())) {
+                    return AjaxJson.failure("当前角色还有关联用户,请先处理用户角色");
+                }
+            }
+
+
             n = roleService.update(roleEntity);
 
             // 每次修改,删除角色资源表信息,重新添加
@@ -97,6 +113,16 @@ public class RoleController {
         return AjaxJson.failure("新增角色失败");
     }
 
+
+    private Boolean checkUseRole(Long id){
+        List<String> list = roleService.findUserNameByRoleId(id);
+        if(list != null && list.size() > 0){
+            return true;
+//            return AjaxJson.failure("当前角色还有关联用户,请先处理用户角色");
+        }
+        return false;
+    }
+
     @PostMapping("list")
     @ResponseBody
     @WebControllerLog(description = "角色管理-获取角色列表")

+ 120 - 117
zhoushan-system-api/src/main/java/com/fdage/controller/SseController.java

@@ -1,124 +1,127 @@
-package com.fdage.controller;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import javax.servlet.AsyncContext;
-import javax.servlet.AsyncEvent;
-import javax.servlet.AsyncListener;
-import javax.servlet.ServletException;
-import javax.servlet.annotation.WebServlet;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-/**
- * Created by Hb_zzZ on 2019/9/16.
- */
-@WebServlet(urlPatterns = { "/sendMessage" }, asyncSupported = true)
-@Controller
-public class SseController extends HttpServlet {
-
-    private static final long serialVersionUID = 1L;
-    private final static int DEFAULT_TIME_OUT = 10 * 60 * 1000;
-    public static List<AsyncContext> actxList =new ArrayList<AsyncContext>();
-
-    @Override
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-        // TODO Auto-generated method stub
-        resp.setContentType("text/event-stream");
-        resp.setCharacterEncoding("UTF-8");
-        req.setAttribute("org.apache.catalina.ASYNC_SUPPORTED", true);//注意这里
-
-        AsyncContext actx = req.startAsync(req, resp);
-        actx.setTimeout(DEFAULT_TIME_OUT);
-        actx.addListener(new AsyncListener() {
-            @Override
-            public void onComplete(AsyncEvent arg0) throws IOException {
-                // TODO Auto-generated method stub
-                System.out.println("[echo]event complete:" + arg0.getSuppliedRequest().getRemoteAddr());
-            }
-
-            @Override
-            public void onError(AsyncEvent arg0) throws IOException {
-                // TODO Auto-generated method stub
-                System.out.println("[echo]event has error");
-            }
-
-            @Override
-            public void onStartAsync(AsyncEvent arg0) throws IOException {
-                // TODO Auto-generated method stub
-                System.out.println("[echo]event start:" + arg0.getSuppliedRequest().getRemoteAddr());
-            }
-
-            @Override
-            public void onTimeout(AsyncEvent arg0) throws IOException {
-                // TODO Auto-generated method stub
-                System.out.println("[echo]event time lost");
-            }
-        });
-
-        actxList.add(actx);
-
-//        PrintWriter out = actx.getResponse().getWriter();
-//        out.println("data:" + new Date().getTime());  //js页面EventSource接收数据格式:data:数据 + "\r\n"
-//        out.flush();
-//        new Thread(new AsyncWebService(actx)).start();
-    }
-
-    @GetMapping("send")
-    @ResponseBody
-    public static String send(String msg){
-        //打印当前AsyncContext
-        System.out.println(actxList.size());
-        if(actxList.size()>0){
-            for(int i = 0;i<actxList.size();i++){
-                AsyncContext obj = actxList.get(i);
-                PrintWriter out;
-
-                try {
-                    if (obj.getTimeout()>0){
-                        out = obj.getResponse().getWriter();
-                        out.println(msg);  //js页面EventSource接收数据格式:data:数据 + "\r\n"
-                        out.flush();
-                    }
-                } catch (Exception e) {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
-                }
-            }
-        }
-        return "发送消息";
-    }
-
-//    class AsyncWebService implements Runnable {
-//        AsyncContext ctx;
+//package com.fdage.controller;
 //
-//        public AsyncWebService(AsyncContext ctx) {
-//            this.ctx = ctx;
-//        }
+//import io.swagger.annotations.ApiOperation;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.web.bind.annotation.GetMapping;
+//import org.springframework.web.bind.annotation.PostMapping;
+//import org.springframework.web.bind.annotation.ResponseBody;
+//import springfox.documentation.annotations.ApiIgnore;
+//
+//import javax.servlet.AsyncContext;
+//import javax.servlet.AsyncEvent;
+//import javax.servlet.AsyncListener;
+//import javax.servlet.ServletException;
+//import javax.servlet.annotation.WebServlet;
+//import javax.servlet.http.HttpServlet;
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//import java.io.IOException;
+//import java.io.PrintWriter;
+//import java.util.ArrayList;
+//import java.util.Date;
+//import java.util.List;
+//
+///**
+// * Created by Hb_zzZ on 2019/9/16.
+// */
+//@ApiIgnore
+//@WebServlet(urlPatterns = { "/sendMessage" }, asyncSupported = true)
+//@Controller
+//public class SseController extends HttpServlet {
 //
-//        public void run() {
-//            try {
-//                //等待十秒钟,以模拟业务方法的执行
-//                Thread.sleep(10000);
-//                PrintWriter out = ctx.getResponse().getWriter();
-//                out.println("data:中文" + new Date() + "\r\n");  //js页面EventSource接收数据格式:data:数据 + "\r\n"
+//    private static final long serialVersionUID = 1L;
+//    private final static int DEFAULT_TIME_OUT = 10 * 60 * 1000;
+//    public static List<AsyncContext> actxList =new ArrayList<AsyncContext>();
 //
-//                out.flush();
-//                ctx.complete();
-//            } catch (Exception e) {
-//                e.printStackTrace();
+//    @Override
+//    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+//        // TODO Auto-generated method stub
+//        resp.setContentType("text/event-stream");
+//        resp.setCharacterEncoding("UTF-8");
+//        req.setAttribute("org.apache.catalina.ASYNC_SUPPORTED", true);//注意这里
+//
+//        AsyncContext actx = req.startAsync(req, resp);
+//        actx.setTimeout(DEFAULT_TIME_OUT);
+//        actx.addListener(new AsyncListener() {
+//            @Override
+//            public void onComplete(AsyncEvent arg0) throws IOException {
+//                // TODO Auto-generated method stub
+//                System.out.println("[echo]event complete:" + arg0.getSuppliedRequest().getRemoteAddr());
 //            }
 //
-//        }
+//            @Override
+//            public void onError(AsyncEvent arg0) throws IOException {
+//                // TODO Auto-generated method stub
+//                System.out.println("[echo]event has error");
+//            }
+//
+//            @Override
+//            public void onStartAsync(AsyncEvent arg0) throws IOException {
+//                // TODO Auto-generated method stub
+//                System.out.println("[echo]event start:" + arg0.getSuppliedRequest().getRemoteAddr());
+//            }
 //
+//            @Override
+//            public void onTimeout(AsyncEvent arg0) throws IOException {
+//                // TODO Auto-generated method stub
+//                System.out.println("[echo]event time lost");
+//            }
+//        });
+//
+//        actxList.add(actx);
+//
+////        PrintWriter out = actx.getResponse().getWriter();
+////        out.println("data:" + new Date().getTime());  //js页面EventSource接收数据格式:data:数据 + "\r\n"
+////        out.flush();
+////        new Thread(new AsyncWebService(actx)).start();
+//    }
+//
+//    @GetMapping("send")
+//    @ResponseBody
+//    public static String send(String msg){
+//        //打印当前AsyncContext
+//        System.out.println(actxList.size());
+//        if(actxList.size()>0){
+//            for(int i = 0;i<actxList.size();i++){
+//                AsyncContext obj = actxList.get(i);
+//                PrintWriter out;
+//
+//                try {
+//                    if (obj.getTimeout()>0){
+//                        out = obj.getResponse().getWriter();
+//                        out.println(msg);  //js页面EventSource接收数据格式:data:数据 + "\r\n"
+//                        out.flush();
+//                    }
+//                } catch (Exception e) {
+//                    // TODO Auto-generated catch block
+//                    e.printStackTrace();
+//                }
+//            }
+//        }
+//        return "发送消息";
 //    }
-}
+//
+////    class AsyncWebService implements Runnable {
+////        AsyncContext ctx;
+////
+////        public AsyncWebService(AsyncContext ctx) {
+////            this.ctx = ctx;
+////        }
+////
+////        public void run() {
+////            try {
+////                //等待十秒钟,以模拟业务方法的执行
+////                Thread.sleep(10000);
+////                PrintWriter out = ctx.getResponse().getWriter();
+////                out.println("data:中文" + new Date() + "\r\n");  //js页面EventSource接收数据格式:data:数据 + "\r\n"
+////
+////                out.flush();
+////                ctx.complete();
+////            } catch (Exception e) {
+////                e.printStackTrace();
+////            }
+////
+////        }
+////
+////    }
+//}

+ 3 - 3
zhoushan-system-api/src/main/java/com/fdage/controller/UserController.java

@@ -34,7 +34,7 @@ import java.util.List;
 @Controller
 @RequestMapping("/zhoushan/user")
 @Slf4j
-@Api(tags = "用户管理模块")
+@Api(tags = "sys-用户管理模块")
 public class UserController {
 
     @Autowired
@@ -230,8 +230,8 @@ public class UserController {
     @WebControllerLog(description = "用户管理-获取用户列表")
     @ApiOperation("获取用户列表")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "state", value = "状态,0:启用,1:禁用", dataType = "String"),
-            @ApiImplicitParam(name = "searchKey", value = "用户名", dataType = "String"),
+            @ApiImplicitParam(name = "status", value = "状态,0:启用,1:禁用", dataType = "String"),
+            @ApiImplicitParam(name = "userName", value = "用户名", dataType = "String"),
             @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "String"),
             @ApiImplicitParam(name = "pageSize", value = "每页数量", dataType = "String")})
     public AjaxJson list(@RequestBody RequestUser bo){

+ 27 - 8
zhoushan-system-api/src/main/resources/application-dev.yml

@@ -12,9 +12,6 @@ spring:
       maxFileSize: 1000MB
       maxRequestSize: 1000MB
   datasource:
-#    url: jdbc:mysql://47.107.253.212:3306/zhoushan_system?useSSL=false&useUnicode=true&characterEncoding=utf-8&autoReconnect=true
-#    username: root
-#    password: 4dagecui2019
     # db 项目测试服务器
     url: jdbc:mysql://8.135.106.227:3306/${project.en}?useSSL=false&useUnicode=true&characterEncoding=utf-8&autoReconnect=true
     username: root
@@ -38,13 +35,17 @@ spring:
         max-active: 8
 # 等待可用连接的最大时间,单位毫秒,默认值为-1,表示永不超时。如果超过等待时间,则直接抛出JedisConnectionException
         max-wait: -1ms
-
+# 配置静态资源跟目录
+  mvc:
+    static-path-pattern: /**
+  resources:
+    static-locations: file:${my.file.path}
 
 upload:
-  head: G:\javaProject\zhoushan-system\zhoushan-system-api\src\main\resources\static\head
-  information: G:\javaProject\zhoushan-system\zhoushan-system-api\src\main\resources\static\information
-  collection: G:\javaProject\zhoushan-system\zhoushan-system-api\src\main\resources\static\collection
-  exhibition: G:\javaProject\zhoushan-system\zhoushan-system-api\src\main\resources\static\exhibition
+  head: ${my.file.path}\head
+  information: ${my.file.path}\information
+  collection: ${my.file.path}\collection
+  exhibition: ${my.file.path}\exhibition
 
 
 
@@ -55,4 +56,22 @@ swagger:
   version: 1.0
 
 
+# 服务器存放地址
+my:
+  file:
+    path: F:/test/ngin/${project.en}_data
+
+
+
+
+
+
+
+
+logging:
+  path: E:/javaProject/${project.en}_log
+  config: classpath:logback-spring.xml
+  level:
+    com:
+      fdage: debug
 

+ 1 - 6
zhoushan-system-api/src/main/resources/application.yml

@@ -3,17 +3,12 @@ spring:
     active: dev
 
 server:
-  port: 8100
+  port: 8002
 
 mybatis:
   mapperLocations: classpath*:mapper/*/*.xml
   typeAliasesPackage: com.fdage.pojo
 
-logging:
-  level:
-    com:
-      fdage:
-        dao: debug
 
 pagehelper:
   helperDialect: mysql

BIN
zhoushan-system-api/src/main/resources/static/collection/importData.xlsx


+ 8 - 0
zhoushan-system-common/pom.xml

@@ -146,6 +146,14 @@
             <version>3.8</version>
         </dependency>
 
+
+        <!-- 工具类 -->
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.3.3</version>
+        </dependency>
+
     </dependencies>
 
     <build>

+ 2 - 2
zhoushan-system-common/src/main/java/com/fdage/constant/ConfigConstant.java

@@ -12,8 +12,8 @@ import org.springframework.stereotype.Component;
 public class ConfigConstant {
 
     /** 服务器文件地址*/
-//    @Value("${server.file.path}")
-//    public  String serverBasePath;
+    @Value("${my.file.path}")
+    public  String serverBasePath;
 
 //    @Value("${server.file.allow}")
 //    public String serverFileFallow;

+ 7 - 16
zhoushan-system-common/src/main/java/com/fdage/request/RequestCollection.java

@@ -1,5 +1,7 @@
 package com.fdage.request;
 
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiOperation;
 import lombok.Data;
 
 import java.util.Date;
@@ -14,8 +16,6 @@ public class RequestCollection extends RequestBase{
 
     private String name;
 
-    private String verticalName;
-
     private Long typeId;
 
     private Long timeId;
@@ -42,19 +42,10 @@ public class RequestCollection extends RequestBase{
 
     private String unityUrl;
 
-    private String purpose;
-
-    private String texture;
-
-    private String size;
-
-    private String remarks;
-
-    private String type;
-
-    private String typeImages;
-
-    private String typeTime;
+    // 图片 2021-08-02
+    @ApiModelProperty(value = "图片")
+    private String icon;
 
-    private String qrCode;
+    @ApiModelProperty(value = "目录code", notes = "上传文件使用")
+    private String dirCode;
 }

+ 0 - 4
zhoushan-system-common/src/main/java/com/fdage/request/RequestExhibition.java

@@ -20,8 +20,6 @@ public class RequestExhibition extends RequestBase{
 
     private Integer state;
 
-    private Integer orderNum;
-
     private String description;
 
     private Long exhibitionId;
@@ -31,6 +29,4 @@ public class RequestExhibition extends RequestBase{
     private Integer isSend;
 
     private String webUrl;
-
-    private String webUrl2;
 }

+ 6 - 18
zhoushan-system-common/src/main/java/com/fdage/respon/ResponCollection.java

@@ -1,5 +1,6 @@
 package com.fdage.respon;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.Date;
@@ -14,8 +15,6 @@ public class ResponCollection {
 
     private String name;
 
-    private String verticalName;
-
     private Long typeId;
 
     private Long timeId;
@@ -54,21 +53,10 @@ public class ResponCollection {
 
     private String unityUrl;
 
-    private String purpose;
-
-    private String texture;
-
-    private String size;
-
-    private String remarks;
-
-    private String type;
-
-    private String typeImages;
-
-    private String[] typeImagesArray;
-
-    private String typeTime;
+    // 图片 2021-08-02
+    @ApiModelProperty(value = "图片")
+    private String icon;
 
-    private String qrCode;
+    @ApiModelProperty(value = "目录code", notes = "上传文件使用")
+    private String dirCode;
 }

+ 0 - 4
zhoushan-system-common/src/main/java/com/fdage/respon/ResponExhibition.java

@@ -21,8 +21,6 @@ public class ResponExhibition {
 
     private Integer state;
 
-    private Integer orderNum;
-
     private String description;
 
     private Long exhibitionId;
@@ -43,8 +41,6 @@ public class ResponExhibition {
 
     private String webUrl;
 
-    private String webUrl2;
-
     private Long openNum;
 
 }

+ 0 - 35
zhoushan-system-common/src/main/java/com/fdage/respon/ResponLog.java

@@ -1,35 +0,0 @@
-package com.fdage.respon;
-
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * Created by Hb_zzZ on 2020/9/18.
- */
-@Data
-public class ResponLog {
-
-    private Long id;
-
-    private Date createTime;
-
-    private Date updateTime;
-
-    /**
-     * 操作者用户id
-     */
-    private Long userId;
-
-    private String userName;
-
-    /**
-     * 操作类型
-     */
-    private String type;
-
-    /**
-     * 操作记录
-     */
-    private String description;
-}

+ 1 - 1
zhoushan-system-common/src/main/java/com/fdage/respon/ResponStatistics.java

@@ -27,5 +27,5 @@ public class ResponStatistics {
 
     List<ResponCollection> collectionOpenList;
 
-    Map<String, Object> collectionTypeTotal;
+    List<Map<String, Object>> collectionTypeTotal;
 }

+ 12 - 11
zhoushan-system-common/src/main/java/com/fdage/util/ExcelUtil.java

@@ -5,7 +5,6 @@ import lombok.extern.log4j.Log4j2;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
@@ -22,13 +21,15 @@ public class ExcelUtil {
     private static final String EXCEL_XLSX = "xlsx";
 
     public static void main(String[] args) {
-        Map<String, String> dataMap = new HashMap<String, String>();
-        dataMap.put("BankName", "BankName");
-        dataMap.put("Addr", "Addr");
-        dataMap.put("Phone", "Phone");
-        List<Map> list = new ArrayList<Map>();
-        list.add(dataMap);
-        new ExcelUtil().writeExcel(list, "D:/writeExcel.xls");
+//        Map<String, String> dataMap = new HashMap<String, String>();
+//        dataMap.put("BankName", "BankName");
+//        dataMap.put("Addr", "Addr");
+//        dataMap.put("Phone", "Phone");
+//        List<Map> list = new ArrayList<Map>();
+//        list.add(dataMap);
+//        new ExcelUtil().writeExcel(list, "D:/writeExcel.xls");
+        Object o = new Integer(1);
+        System.out.println(o.toString());
     }
 
     public static Workbook writeExcel(List<Map> dataList, String xlsxPath) {
@@ -57,12 +58,12 @@ public class ExcelUtil {
                 // 创建一行:从第二行开始,跳过属性列
                 Row row = sheet.createRow(j + 1);
                 // 得到要插入的每一条记录
-                Map<String, String> dataMap = dataList.get(j);
+                Map<String, Object> dataMap = dataList.get(j);
 
                 for (int i = 0; i < ConstantExcel.COLLECTION_NAME.length; ++i) {
-                    String value = dataMap.get(ConstantExcel.COLLECTION_NAME[i]);
+                    Object value = dataMap.get(ConstantExcel.COLLECTION_NAME[i]);
                     Cell cell = row.createCell(i);
-                    cell.setCellValue(value);
+                    cell.setCellValue(value.toString());
                 }
             }
             // 创建文件输出流,准备输出电子表格:这个必须有,否则你在sheet上做的任何操作都不会有效

+ 4 - 0
zhoushan-system-dao/src/main/java/com/fdage/dao/base/TbCollectionMapper.java

@@ -16,4 +16,8 @@ public interface TbCollectionMapper {
     int updateByPrimaryKeyWithBLOBs(TbCollection record);
 
     int updateByPrimaryKey(TbCollection record);
+
+    void addVisit(Long id);
+
+    Long countVisit();
 }

+ 1 - 3
zhoushan-system-dao/src/main/java/com/fdage/dao/cust/TbCollectionMapperCust.java

@@ -18,8 +18,6 @@ public interface TbCollectionMapperCust {
 
     List<ResponCollection> findList(RequestCollection bo);
 
-    List<ResponCollection> findAllList(RequestCollection bo);
-
     List<ResponCollection> findListByExhibitionId(Long id);
 
     List<ResponCollection> searchListByName(RequestCollection collection);
@@ -38,6 +36,6 @@ public interface TbCollectionMapperCust {
 
     List<ResponCollection> findListOrderBy(Map<String, String> map);
 
-    Map<String, Object> typeTotal();
+    List<Map<String, Object>> typeTotal();
 
 }

+ 1 - 0
zhoushan-system-dao/src/main/java/com/fdage/dao/cust/TbExhibitionCollectionMapperCust.java

@@ -12,4 +12,5 @@ public interface TbExhibitionCollectionMapperCust {
     List<ResponExhibition> findExhibitionCollection(Long exhibitionId);
 
     int deleteByCollectionId(Long collectionId);
+
 }

+ 0 - 2
zhoushan-system-dao/src/main/java/com/fdage/dao/cust/TbExhibitionMapperCust.java

@@ -13,8 +13,6 @@ public interface TbExhibitionMapperCust {
 
     List<ResponExhibition> findList(RequestExhibition bo);
 
-    List<ResponExhibition> findAllList();
-
     ResponExhibition getExhibitionByEquipmentId(Long id);
 
     int updateStateByEquipmentId(Long id);

+ 1 - 2
zhoushan-system-dao/src/main/java/com/fdage/dao/cust/TbLogMapperCust.java

@@ -3,12 +3,11 @@ package com.fdage.dao.cust;
 
 import com.fdage.pojo.TbLog;
 import com.fdage.request.RequestLog;
-import com.fdage.respon.ResponLog;
 
 import java.util.List;
 
 public interface TbLogMapperCust {
 
-    List<ResponLog> findList(RequestLog bo);
+    List<TbLog> findList(RequestLog bo);
 
 }

+ 24 - 77
zhoushan-system-dao/src/main/java/com/fdage/pojo/TbCollection.java

@@ -1,5 +1,7 @@
 package com.fdage.pojo;
 
+import io.swagger.annotations.ApiModelProperty;
+
 import java.util.Date;
 
 public class TbCollection {
@@ -7,8 +9,6 @@ public class TbCollection {
 
     private String name;
 
-    private String verticalName;
-
     private Long typeId;
 
     private Long timeId;
@@ -35,14 +35,6 @@ public class TbCollection {
 
     private String description;
 
-    private String purpose;
-
-    private String texture;
-
-    private String size;
-
-    private String remarks;
-
     private String num;
 
     private Integer likeNum;
@@ -53,92 +45,47 @@ public class TbCollection {
 
     private Integer downloadNum;
 
-    private String type;
-
-    private String typeImages;
 
-    private String typeTime;
+    @ApiModelProperty(value = "图片")
+    private String icon;
 
-    private String qrCode;
+    @ApiModelProperty(value = "目录code", notes = "上传文件使用")
+    private String dirCode;
 
-    public String getVerticalName() {
-        return verticalName;
-    }
-
-    public void setVerticalName(String verticalName) {
-        this.verticalName = verticalName;
-    }
+    @ApiModelProperty(value = "访问量")
+    private String visit;
 
-    public Integer getDownloadNum() {
-        return downloadNum;
-    }
-
-    public void setDownloadNum(Integer downloadNum) {
-        this.downloadNum = downloadNum;
-    }
-
-    public String getTypeTime() {
-        return typeTime;
-    }
 
-    public void setTypeTime(String typeTime) {
-        this.typeTime = typeTime;
+    public String getVisit() {
+        return visit;
     }
 
-    public String getQrCode() {
-        return qrCode;
+    public void setVisit(String visit) {
+        this.visit = visit;
     }
 
-    public void setQrCode(String qrCode) {
-        this.qrCode = qrCode;
+    public String getIcon() {
+        return icon;
     }
 
-    public String getType() {
-        return type;
+    public void setIcon(String icon) {
+        this.icon = icon;
     }
 
-    public void setType(String type) {
-        this.type = type;
+    public String getDirCode() {
+        return dirCode;
     }
 
-    public String getTypeImages() {
-        return typeImages;
+    public void setDirCode(String dirCode) {
+        this.dirCode = dirCode;
     }
 
-    public void setTypeImages(String typeImages) {
-        this.typeImages = typeImages;
-    }
-
-    public String getPurpose() {
-        return purpose;
-    }
-
-    public void setPurpose(String purpose) {
-        this.purpose = purpose;
-    }
-
-    public String getTexture() {
-        return texture;
-    }
-
-    public void setTexture(String texture) {
-        this.texture = texture;
-    }
-
-    public String getSize() {
-        return size;
-    }
-
-    public void setSize(String size) {
-        this.size = size;
-    }
-
-    public String getRemarks() {
-        return remarks;
+    public Integer getDownloadNum() {
+        return downloadNum;
     }
 
-    public void setRemarks(String remarks) {
-        this.remarks = remarks;
+    public void setDownloadNum(Integer downloadNum) {
+        this.downloadNum = downloadNum;
     }
 
     public Integer getLikeNum() {

+ 0 - 30
zhoushan-system-dao/src/main/java/com/fdage/pojo/TbExhibition.java

@@ -13,42 +13,12 @@ public class TbExhibition {
 
     private Integer state;
 
-    private Integer orderNum;
-
     private Date createTime;
 
     private String description;
 
     private String webUrl;
 
-    private String webUrl2;
-
-    private Long openNum;
-
-    public Integer getOrderNum() {
-        return orderNum;
-    }
-
-    public void setOrderNum(Integer orderNum) {
-        this.orderNum = orderNum;
-    }
-
-    public String getWebUrl2() {
-        return webUrl2;
-    }
-
-    public void setWebUrl2(String webUrl2) {
-        this.webUrl2 = webUrl2;
-    }
-
-    public Long getOpenNum() {
-        return openNum;
-    }
-
-    public void setOpenNum(Long openNum) {
-        this.openNum = openNum;
-    }
-
     public String getWebUrl() {
         return webUrl;
     }

+ 0 - 10
zhoushan-system-dao/src/main/java/com/fdage/pojo/TbExhibitionCollection.java

@@ -9,20 +9,10 @@ public class TbExhibitionCollection {
 
     private Long collectionId;
 
-    private Integer orderNum;
-
     private Integer state;
 
     private Date createTime;
 
-    public Integer getOrderNum() {
-        return orderNum;
-    }
-
-    public void setOrderNum(Integer orderNum) {
-        this.orderNum = orderNum;
-    }
-
     public Long getId() {
         return id;
     }

+ 13 - 0
zhoushan-system-dao/src/main/java/com/fdage/pojo/TbLog.java

@@ -19,6 +19,11 @@ public class TbLog {
     private Long userId;
 
     /**
+     * 操作者用户id
+     */
+    private String userName;
+
+    /**
      * 操作类型
      */
     private String type;
@@ -28,6 +33,14 @@ public class TbLog {
      */
     private String description;
 
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
     public Long getId() {
         return id;
     }

+ 41 - 121
zhoushan-system-dao/src/main/resources/mapper/base/TbCollectionMapper.xml

@@ -7,7 +7,6 @@
     <result column="type_id" jdbcType="BIGINT" property="typeId" />
     <result column="time_id" jdbcType="BIGINT" property="timeId" />
     <result column="num" jdbcType="VARCHAR" property="num" />
-    <result column="vertical_name" jdbcType="VARCHAR" property="verticalName" />
     <result column="discovery_time" jdbcType="TIMESTAMP" property="discoveryTime" />
     <result column="repair_time" jdbcType="TIMESTAMP" property="repairTime" />
     <result column="venue" jdbcType="VARCHAR" property="venue" />
@@ -16,32 +15,27 @@
     <result column="pic" jdbcType="VARCHAR" property="pic" />
     <result column="model_url" jdbcType="VARCHAR" property="modelUrl" />
     <result column="content_url" jdbcType="VARCHAR" property="contentUrl" />
-    <result column="purpose" jdbcType="VARCHAR" property="purpose" />
-    <result column="texture" jdbcType="VARCHAR" property="texture" />
-    <result column="size" jdbcType="VARCHAR" property="size" />
-    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
-    <result column="type" jdbcType="VARCHAR" property="type" />
-    <result column="type_images" jdbcType="VARCHAR" property="typeImages" />
     <result column="state" jdbcType="INTEGER" property="state" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="like_num" jdbcType="BIGINT" property="likeNum" />
     <result column="open_num" jdbcType="BIGINT" property="openNum" />
     <result column="search_num" jdbcType="BIGINT" property="searchNum" />
     <result column="download_num" jdbcType="BIGINT" property="downloadNum" />
-    <result column="type_time" jdbcType="VARCHAR" property="typeTime" />
-    <result column="qr_code" jdbcType="VARCHAR" property="qrCode" />
+    <result column="icon" jdbcType="VARCHAR" property="icon" />
+    <result column="dir_code" jdbcType="VARCHAR" property="dirCode" />
+    <result column="visit" jdbcType="BIGINT" property="visit" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.fdage.pojo.TbCollection">
     <result column="description" jdbcType="LONGVARCHAR" property="description" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, name, type_id, time_id, num, discovery_time, repair_time, venue, pic, unity_pic, unity_url, model_url, content_url,
-    state, create_time, like_num, open_num, search_num, purpose, texture, size, remarks, type, type_images, download_num,
-    type_time, qr_code, vertical_name
+    id, name, type_id, time_id, num, dir_code, icon, discovery_time, repair_time, venue, pic, unity_pic, unity_url, model_url, content_url,
+    state, create_time, like_num, open_num, search_num, download_num
   </sql>
   <sql id="Blob_Column_List">
     description
   </sql>
+
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
     select 
     <include refid="Base_Column_List" />
@@ -50,24 +44,33 @@
     from tb_collection
     where id = #{id,jdbcType=BIGINT}
   </select>
+
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from tb_collection
     where id = #{id,jdbcType=BIGINT}
   </delete>
+
+  <select id="countVisit" resultType="java.lang.Long">
+    SELECT SUM(visit) from tb_collection;
+  </select>
+
+
+  <update id="addVisit" parameterType="java.lang.Long">
+    update tb_collection set visit = visit + 1  where id = #{id,jdbcType=BIGINT}
+  </update>
+
+
   <insert id="insert" parameterType="com.fdage.pojo.TbCollection">
     insert into tb_collection (id, name, type_id, 
       time_id, num, discovery_time, repair_time,
-      venue, pic, model_url, unity_pic, unity_url, vertical_name,
-      content_url, state, create_time, purpose, texture, size, remarks,
-      type, type_images, type_time, qr_code, description)
+      venue, pic, model_url, unity_pic, unity_url,
+      content_url, state, create_time, icon, dir_code,
+      description)
     values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{typeId,jdbcType=BIGINT},
       #{timeId,jdbcType=BIGINT}, #{num,jdbcType=VARCHAR}, #{discoveryTime,jdbcType=TIMESTAMP}, #{repairTime,jdbcType=TIMESTAMP},
       #{venue,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{modelUrl,jdbcType=VARCHAR},
-      #{unityPic,jdbcType=VARCHAR}, #{unityUrl,jdbcType=VARCHAR}, #{verticalName,jdbcType=VARCHAR},
-      #{contentUrl,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
-      #{purpose,jdbcType=VARCHAR}, #{texture,jdbcType=VARCHAR}, #{size,jdbcType=VARCHAR},
-      #{remarks,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{typeImages,jdbcType=VARCHAR},
-      #{typeTime,jdbcType=VARCHAR}, #{qrCode,jdbcType=VARCHAR},
+      #{unityPic,jdbcType=VARCHAR}, #{unityUrl,jdbcType=VARCHAR},
+      #{contentUrl,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{icon,jdbcType=VARCHAR}, #{dirCode,jdbcType=VARCHAR},
       #{description,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.fdage.pojo.TbCollection">
@@ -79,9 +82,6 @@
       <if test="name != null">
         name,
       </if>
-      <if test="verticalName != null">
-        vertical_name,
-      </if>
       <if test="typeId != null">
         type_id,
       </if>
@@ -124,31 +124,11 @@
       <if test="description != null">
         description,
       </if>
-
-      <if test="purpose != null">
-        purpose,
-      </if>
-      <if test="texture != null">
-        texture,
-      </if>
-      <if test="size != null">
-        size,
-      </if>
-      <if test="remarks != null">
-        remarks,
-      </if>
-      <if test="type != null">
-        type,
+      <if test="icon != null">
+        icon,
       </if>
-      <if test="typeImages != null">
-        type_images,
-      </if>
-
-      <if test="typeTime != null">
-        type_time,
-      </if>
-      <if test="qrCode != null">
-        qr_code,
+      <if test="dirCode != null">
+        dir_code,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -158,9 +138,6 @@
       <if test="name != null">
         #{name,jdbcType=VARCHAR},
       </if>
-      <if test="verticalName != null">
-        #{verticalName},
-      </if>
       <if test="typeId != null">
         #{typeId,jdbcType=BIGINT},
       </if>
@@ -203,31 +180,11 @@
       <if test="description != null">
         #{description,jdbcType=LONGVARCHAR},
       </if>
-
-      <if test="purpose != null">
-        #{purpose,jdbcType=VARCHAR},
-      </if>
-      <if test="texture != null">
-        #{texture,jdbcType=VARCHAR},
-      </if>
-      <if test="size != null">
-        #{size,jdbcType=VARCHAR},
-      </if>
-      <if test="remarks != null">
-        #{remarks,jdbcType=VARCHAR},
-      </if>
-      <if test="type != null">
-        #{type,jdbcType=VARCHAR},
+      <if test="icon != null">
+        #{icon,jdbcType=VARCHAR},
       </if>
-      <if test="typeImages != null">
-        #{typeImages,jdbcType=VARCHAR},
-      </if>
-
-      <if test="typeTime != null">
-        #{typeTime},
-      </if>
-      <if test="qrCode != null">
-        #{qrCode},
+      <if test="dirCode != null">
+        #{dirCode,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
@@ -237,9 +194,6 @@
       <if test="name != null">
         name = #{name,jdbcType=VARCHAR},
       </if>
-      <if test="verticalName != null">
-        vertical_name = #{verticalName},
-      </if>
       <if test="typeId != null">
         type_id = #{typeId,jdbcType=BIGINT},
       </if>
@@ -282,31 +236,11 @@
       <if test="description != null">
         description = #{description,jdbcType=LONGVARCHAR},
       </if>
-
-      <if test="purpose != null">
-        purpose = #{purpose,jdbcType=VARCHAR},
-      </if>
-      <if test="texture != null">
-        texture = #{texture,jdbcType=VARCHAR},
-      </if>
-      <if test="size != null">
-        size = #{size,jdbcType=VARCHAR},
-      </if>
-      <if test="remarks != null">
-        remarks = #{remarks,jdbcType=VARCHAR},
-      </if>
-      <if test="type != null">
-        type = #{type,jdbcType=VARCHAR},
+      <if test="icon != null">
+        icon = #{icon,jdbcType=VARCHAR},
       </if>
-      <if test="typeImages != null">
-        type_images = #{typeImages,jdbcType=VARCHAR},
-      </if>
-
-      <if test="typeTime != null">
-        type_time = #{typeTime},
-      </if>
-      <if test="qrCode != null">
-        qr_code =#{qrCode},
+      <if test="dirCode != null">
+        dir_code = #{dirCode,jdbcType=VARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
@@ -317,7 +251,6 @@
       type_id = #{typeId,jdbcType=BIGINT},
       time_id = #{timeId,jdbcType=BIGINT},
       num = #{num,jdbcType=VARCHAR},
-      vertical_name = #{verticalName},
       discovery_time = #{discoveryTime,jdbcType=TIMESTAMP},
       repair_time = #{repairTime,jdbcType=TIMESTAMP},
       venue = #{venue,jdbcType=VARCHAR},
@@ -328,21 +261,14 @@
       content_url = #{contentUrl,jdbcType=VARCHAR},
       state = #{state,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
-      description = #{description,jdbcType=LONGVARCHAR},
-      purpose = #{purpose,jdbcType=VARCHAR},
-      texture = #{texture,jdbcType=VARCHAR},
-      size = #{size,jdbcType=VARCHAR},
-      remarks = #{remarks,jdbcType=VARCHAR},
-      type = #{type,jdbcType=VARCHAR},
-      type_images = #{typeImages,jdbcType=VARCHAR},
-      type_time = #{typeTime,jdbcType=VARCHAR},
-      qr_code = #{qrCode,jdbcType=VARCHAR}
+      icon = #{icon,jdbcType=VARCHAR},
+      dir_code = #{dirCode,jdbcType=VARCHAR},
+      description = #{description,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.fdage.pojo.TbCollection">
     update tb_collection
     set name = #{name,jdbcType=VARCHAR},
-      vertical_name = #{verticalName},
       type_id = #{typeId,jdbcType=BIGINT},
       time_id = #{timeId,jdbcType=BIGINT},
       num = #{num,jdbcType=VARCHAR},
@@ -355,15 +281,9 @@
       model_url = #{modelUrl,jdbcType=VARCHAR},
       content_url = #{contentUrl,jdbcType=VARCHAR},
       state = #{state,jdbcType=INTEGER},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      purpose = #{purpose,jdbcType=VARCHAR},
-      texture = #{texture,jdbcType=VARCHAR},
-      size = #{size,jdbcType=VARCHAR},
-      remarks = #{remarks,jdbcType=VARCHAR},
-      type = #{type,jdbcType=VARCHAR},
-      type_images = #{typeImages,jdbcType=VARCHAR},
-      type_time = #{typeTime,jdbcType=VARCHAR},
-      qr_code = #{qrCode,jdbcType=VARCHAR}
+       icon = #{icon,jdbcType=VARCHAR},
+      dir_code = #{dirCode,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>

+ 4 - 15
zhoushan-system-dao/src/main/resources/mapper/base/TbExhibitionCollectionMapper.xml

@@ -5,12 +5,11 @@
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="exhibition_id" jdbcType="BIGINT" property="exhibitionId" />
     <result column="collection_id" jdbcType="BIGINT" property="collectionId" />
-    <result column="order_num" jdbcType="INTEGER" property="orderNum" />
     <result column="state" jdbcType="INTEGER" property="state" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, exhibition_id, collection_id, state, create_time, order_num
+    id, exhibition_id, collection_id, state, create_time
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select 
@@ -24,9 +23,9 @@
   </delete>
   <insert id="insert" parameterType="com.fdage.pojo.TbExhibitionCollection">
     insert into tb_exhibition_collection (id, exhibition_id, collection_id, 
-      state, create_time, order_num)
+      state, create_time)
     values (#{id,jdbcType=BIGINT}, #{exhibitionId,jdbcType=BIGINT}, #{collectionId,jdbcType=BIGINT}, 
-      #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{orderNum})
+      #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.fdage.pojo.TbExhibitionCollection">
     insert into tb_exhibition_collection
@@ -46,9 +45,6 @@
       <if test="createTime != null">
         create_time,
       </if>
-      <if test="orderNum != null">
-        order_num,
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -66,9 +62,6 @@
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="orderNum != null">
-        #{orderNum},
-      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.fdage.pojo.TbExhibitionCollection">
@@ -86,9 +79,6 @@
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="orderNum != null">
-        order_num = #{orderNum},
-      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -97,8 +87,7 @@
     set exhibition_id = #{exhibitionId,jdbcType=BIGINT},
       collection_id = #{collectionId,jdbcType=BIGINT},
       state = #{state,jdbcType=INTEGER},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      order_num = #{orderNum}
+      create_time = #{createTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>

+ 8 - 34
zhoushan-system-dao/src/main/resources/mapper/base/TbExhibitionMapper.xml

@@ -5,19 +5,16 @@
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="web_url" jdbcType="VARCHAR" property="webUrl" />
-    <result column="web_url2" jdbcType="VARCHAR" property="webUrl2" />
     <result column="type_id" jdbcType="BIGINT" property="typeId" />
     <result column="equipment_id" jdbcType="BIGINT" property="equipmentId" />
     <result column="state" jdbcType="INTEGER" property="state" />
-    <result column="open_num" jdbcType="BIGINT" property="openNum" />
-    <result column="order_num" jdbcType="INTEGER" property="orderNum" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.fdage.pojo.TbExhibition">
     <result column="description" jdbcType="LONGVARCHAR" property="description" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, name,web_url, web_url2, type_id, equipment_id, state, create_time, open_num, order_num
+    id, name,web_url, type_id, equipment_id, state, create_time
   </sql>
   <sql id="Blob_Column_List">
     description
@@ -35,13 +32,12 @@
     where id = #{id,jdbcType=BIGINT}
   </delete>
   <insert id="insert" parameterType="com.fdage.pojo.TbExhibition" useGeneratedKeys="true" keyProperty="id">
-    insert into tb_exhibition (id, name, type_id, web_url,web_url2,
-      equipment_id, state, create_time, order_num,
+    insert into tb_exhibition (id, name, type_id, web_url,
+      equipment_id, state, create_time, 
       description)
-    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{typeId,jdbcType=BIGINT},
-      #{webUrl,jdbcType=VARCHAR},#{webUrl2,jdbcType=VARCHAR},
-      #{equipmentId,jdbcType=BIGINT}, #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
-      #{orderNum,jdbcType=INTEGER}, #{description,jdbcType=LONGVARCHAR})
+    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{typeId,jdbcType=BIGINT}, #{webUrl,jdbcType=VARCHAR},
+      #{equipmentId,jdbcType=BIGINT}, #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{description,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.fdage.pojo.TbExhibition" useGeneratedKeys="true" keyProperty="id">
     insert into tb_exhibition
@@ -58,9 +54,6 @@
       <if test="webUrl != null">
         web_url,
       </if>
-      <if test="webUrl2 != null">
-        web_url2,
-      </if>
       <if test="equipmentId != null">
         equipment_id,
       </if>
@@ -73,9 +66,6 @@
       <if test="description != null">
         description,
       </if>
-      <if test="orderNum != null">
-        order_num,
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -90,9 +80,6 @@
       <if test="webUrl != null">
         #{webUrl,jdbcType=VARCHAR},
       </if>
-      <if test="webUrl2 != null">
-        #{webUrl2,jdbcType=VARCHAR},
-      </if>
       <if test="equipmentId != null">
         #{equipmentId,jdbcType=BIGINT},
       </if>
@@ -105,9 +92,6 @@
       <if test="description != null">
         #{description,jdbcType=LONGVARCHAR},
       </if>
-      <if test="orderNum != null">
-        #{orderNum},
-      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.fdage.pojo.TbExhibition">
@@ -122,9 +106,6 @@
       <if test="webUrl != null">
         web_url = #{webUrl,jdbcType=BIGINT},
       </if>
-      <if test="webUrl2 != null">
-        web_url2 = #{webUrl2,jdbcType=BIGINT},
-      </if>
       <if test="equipmentId != null">
         equipment_id = #{equipmentId,jdbcType=BIGINT},
       </if>
@@ -137,9 +118,6 @@
       <if test="description != null">
         description = #{description,jdbcType=LONGVARCHAR},
       </if>
-      <if test="orderNum != null">
-        order_num = #{orderNum},
-      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -148,12 +126,10 @@
     set name = #{name,jdbcType=VARCHAR},
       type_id = #{typeId,jdbcType=BIGINT},
       web_url = #{webUrl,jdbcType=VARCHAR},
-      web_url2 = #{webUrl2,jdbcType=VARCHAR},
       equipment_id = #{equipmentId,jdbcType=BIGINT},
       state = #{state,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
-      description = #{description,jdbcType=LONGVARCHAR},
-      order_num = #{orderNum}
+      description = #{description,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.fdage.pojo.TbExhibition">
@@ -161,11 +137,9 @@
     set name = #{name,jdbcType=VARCHAR},
       type_id = #{typeId,jdbcType=BIGINT},
       web_url = #{webUrl,jdbcType=VARCHAR},
-      web_url2 = #{webUrl2,jdbcType=VARCHAR},
       equipment_id = #{equipmentId,jdbcType=BIGINT},
       state = #{state,jdbcType=INTEGER},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      order_num = #{orderNum}
+      create_time = #{createTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>

+ 21 - 43
zhoushan-system-dao/src/main/resources/mapper/cust/TbCollectionMapperCust.xml

@@ -18,11 +18,10 @@
 
   <select id="findList" parameterType="com.fdage.request.RequestCollection" resultType="com.fdage.respon.ResponCollection">
     select a.id, a.name, a.type_id as typeId, a.time_id as timeId, a.discovery_time as discoveryTime,
-      a.repair_time as repairTime, a.venue, a.model_url as modelUrl, a.content_url as contentUrl, a.state,
-      a.create_time as createTime, a.description, b.name as timeName, c.name as typeName, a.pic, a.num,
-      a.like_num as likeNum, a.open_num as openNum, a.search_num as searchNum, download_num as downloadNum,
-      a.unity_pic as unityPic, a.unity_url as unityUrl, a.purpose, a.texture, a.size, a.vertical_name as verticalName,
-      a.remarks, a.type, a.type_images as typeImages, a.type_time as typeTime, a.qr_code as qrCode
+    a.repair_time as repairTime, a.venue, a.model_url as modelUrl, a.content_url as contentUrl, a.state,
+    a.create_time as createTime, a.description, b.name as timeName, c.name as typeName, a.pic, a.num,
+    a.like_num as likeNum, a.open_num as openNum, a.search_num as searchNum, download_num as downloadNum,
+    a.unity_pic as unityPic, a.unity_url as unityUrl, a.icon, a.dir_code as dirCode
     from tb_collection a LEFT JOIN tb_collection_time b on a.time_id = b.id
     LEFT JOIN tb_collection_type c ON a.type_id = c.id
     WHERE 1 = 1
@@ -35,20 +34,9 @@
     <if test="name != null and name != ''">
       and a.name LIKE CONCAT('%', #{name}, '%')
     </if>
-    ORDER by id DESC
-  </select>
-
-  <select id="findAllList" parameterType="com.fdage.request.RequestCollection" resultType="com.fdage.respon.ResponCollection">
-    select a.id, a.name, a.type_id as typeId, a.time_id as timeId, a.discovery_time as discoveryTime,
-    a.repair_time as repairTime, a.venue, a.model_url as modelUrl, a.content_url as contentUrl, a.state,
-    a.create_time as createTime, a.description, b.name as timeName, c.name as typeName, a.pic, a.num,
-    a.like_num as likeNum, a.open_num as openNum, a.search_num as searchNum, download_num as downloadNum,
-    a.unity_pic as unityPic, a.unity_url as unityUrl, a.purpose, a.texture, a.size, a.vertical_name as verticalName,
-    a.remarks, a.type, a.type_images as typeImages, a.type_time as typeTime, a.qr_code as qrCode
-    from tb_collection a LEFT JOIN tb_collection_time b on a.time_id = b.id
-    LEFT JOIN tb_collection_type c ON a.type_id = c.id
-    WHERE 1 = 1 and a.state = 0
-    ORDER by a.num + 0, a.id
+    <if test="state != null">
+      and a.state = #{state}
+    </if>
   </select>
 
   <select id="findListByExhibitionId" parameterType="java.lang.Long" resultType="com.fdage.respon.ResponCollection">
@@ -56,13 +44,11 @@
     a.repair_time as repairTime, a.venue, a.model_url as modelUrl, a.content_url as contentUrl, a.state,
     a.create_time as createTime, a.description, b.name as timeName, c.name as typeName, a.pic, a.num,
     a.like_num as likeNum, a.open_num as openNum, a.search_num as searchNum, download_num as downloadNum,
-     a.unity_pic as unityPic, a.unity_url as unityUrl, a.purpose, a.texture, a.size, a.vertical_name as verticalName,
-     a.remarks, a.type, a.type_images as typeImages, a.type_time as typeTime, a.qr_code as qrCode
+     a.unity_pic as unityPic, a.unity_url as unityUrl
     from tb_collection a LEFT JOIN tb_collection_time b on a.time_id = b.id
     LEFT JOIN tb_collection_type c ON a.type_id = c.id
     LEFT JOIN tb_exhibition_collection d ON a.id = d.collection_id
     WHERE d.exhibition_id = #{id}
-    order by d.order_num
   </select>
 
   <select id="searchListByName" parameterType="com.fdage.request.RequestCollection" resultType="com.fdage.respon.ResponCollection">
@@ -70,20 +56,13 @@
     a.repair_time as repairTime, a.venue, a.model_url as modelUrl, a.content_url as contentUrl, a.state,
     a.create_time as createTime, a.description, b.name as timeName, c.name as typeName, a.pic, a.num,
     a.like_num as likeNum, a.open_num as openNum, a.search_num as searchNum, download_num as downloadNum,
-    a.unity_pic as unityPic, a.unity_url as unityUrl, a.purpose, a.texture, a.size, a.vertical_name as verticalName,
-    a.remarks, a.type, a.type_images as typeImages, a.type_time as typeTime, a.qr_code as qrCode
+    a.unity_pic as unityPic, a.unity_url as unityUrl
     from tb_collection a LEFT JOIN tb_collection_time b on a.time_id = b.id
     LEFT JOIN tb_collection_type c ON a.type_id = c.id
-    <if test="id != null ">
-      LEFT JOIN tb_exhibition_collection d on a.id = d.collection_id
-    </if>
-    WHERE 1 = 1 and a.state = 0
+    WHERE 1 = 1
     <if test="name != null and name != ''">
       and a.name LIKE CONCAT('%', #{name}, '%')
     </if>
-    <if test="id != null ">
-      and d.exhibition_id = #{id}
-    </if>
   </select>
 
   <update id="addLikeNumById" parameterType="java.lang.Long">
@@ -120,21 +99,20 @@
     select a.id, a.name, a.type_id as typeId, a.time_id as timeId, a.discovery_time as discoveryTime,
     a.repair_time as repairTime, a.venue, a.model_url as modelUrl, a.content_url as contentUrl, a.state,
     a.create_time as createTime, a.description, b.name as timeName, c.name as typeName, a.pic, a.num,
-    a.like_num as likeNum, a.open_num as openNum, a.search_num as searchNum,
-    a.unity_pic as unityPic, a.unity_url as unityUrl, a.purpose, a.texture, a.size, a.vertical_name as verticalName,
-    a.remarks, a.type, a.type_images as typeImages, a.type_time as typeTime, a.qr_code as qrCode
+    a.like_num as likeNum, a.open_num as openNum, a.search_num as searchNum, download_num as downloadNum,
+    a.unity_pic as unityPic, a.unity_url as unityUrl
     from tb_collection a LEFT JOIN tb_collection_time b on a.time_id = b.id
     LEFT JOIN tb_collection_type c ON a.type_id = c.id
     WHERE 1 = 1
-    <if test="orderBy != null and orderBy == 'search_num'">
-      ORDER BY a.search_num desc
-    </if>
-    <if test="orderBy != null and orderBy == 'open_num'">
-      ORDER BY a.open_num desc
-    </if>
-    <if test="orderBy != null and orderBy == 'like_num'">
-      ORDER BY a.like_num desc
-    </if>
+    <choose>
+      <when test="sidx != null and sidx.trim() != ''">
+        order by ${sidx} ${order}
+      </when>
+      <otherwise>
+        order by a.id desc
+      </otherwise>
+    </choose>
+
   </select>
 
   <select id="typeTotal" resultType="Map">

+ 2 - 2
zhoushan-system-dao/src/main/resources/mapper/cust/TbExhibitionCollectionMapperCust.xml

@@ -3,13 +3,13 @@
 <mapper namespace="com.fdage.dao.cust.TbExhibitionCollectionMapperCust">
   <delete id="deleteByExhibitionId" parameterType="java.lang.Long">
     delete from tb_exhibition_collection
-    where exhibition_id = #{id,jdbcType=BIGINT}
+    where exhibition_id = #{exhibitionId,jdbcType=BIGINT}
   </delete>
 
   <select id="findExhibitionCollection" parameterType="java.lang.Long" resultType="com.fdage.respon.ResponExhibition">
     select exhibition_id as exhibitionId, collection_id as collectionId
     FROM tb_exhibition_collection
-    where exhibition_id = #{exhibitionId} order by order_num
+    where exhibition_id = #{exhibitionId}
   </select>
 
   <delete id="deleteByCollectionId" parameterType="java.lang.Long">

+ 8 - 17
zhoushan-system-dao/src/main/resources/mapper/cust/TbExhibitionMapperCust.xml

@@ -11,28 +11,20 @@
 
     <select id="findList" parameterType="com.fdage.request.RequestExhibition" resultType="com.fdage.respon.ResponExhibition">
         select a.id, a.name , b.name as equipmentName, c.name as typeName, a.create_time as createTime, a.state,
-          b.id as equipmentId, c.id as typeId, a.description, a.web_url as webUrl,a.web_url2 as webUrl2,
-          a.open_num as openNum, a.order_num as orderNum
+          b.id as equipmentId, c.id as typeId, a.description, a.web_url as webUrl
         FROM tb_exhibition a LEFT JOIN tb_equipment b ON a.equipment_id = b.id
         LEFT JOIN tb_exhibition_type c on a.type_id = c.id
         where 1 = 1
         <if test="name != null and name != ''">
             and a.name LIKE CONCAT('%', #{name}, '%')
         </if>
-    </select>
-
-    <select id="findAllList" resultType="com.fdage.respon.ResponExhibition">
-        select a.id, a.name , b.name as equipmentName, c.name as typeName, a.create_time as createTime, a.state,
-        b.id as equipmentId, c.id as typeId, a.description, a.web_url as webUrl,a.web_url2 as webUrl2,
-        a.open_num as openNum, a.order_num as orderNum
-        FROM tb_exhibition a LEFT JOIN tb_equipment b ON a.equipment_id = b.id
-        LEFT JOIN tb_exhibition_type c on a.type_id = c.id
-        where 1 = 1 order by a.order_num
+        <if test="state != null">
+            and a.state = #{state}
+        </if>
     </select>
 
     <select id="getExhibitionByEquipmentId" parameterType="java.lang.Long" resultType="com.fdage.respon.ResponExhibition">
-        select a.id, a.name , b.name as equipmentName, c.name as typeName, a.create_time as createTime,
-         a.state, a.web_url as webUrl, a.web_url2 as webUrl2, a.open_num as openNum, a.order_num as orderNum
+        select a.id, a.name , b.name as equipmentName, c.name as typeName, a.create_time as createTime, a.state, a.web_url as webUrl
         FROM tb_exhibition a LEFT JOIN tb_equipment b ON a.equipment_id = b.id
         LEFT JOIN tb_exhibition_type c on a.type_id = c.id
         where a.state = 0 and a.equipment_id = #{id}
@@ -56,14 +48,13 @@
     </update>
 
     <select id="exhibitionTotal" resultType="java.lang.Long">
-        select count(*)
-        from tb_exhibition
+        SELECT COUNT(DISTINCT(collection_id))
+        FROM `tb_exhibition_collection`
     </select>
 
     <select id="findListOrderBy" resultType="com.fdage.respon.ResponExhibition">
         select a.id, a.name , b.name as equipmentName, c.name as typeName, a.create_time as createTime, a.state,
-        b.id as equipmentId, c.id as typeId, a.description, a.web_url as webUrl, a.web_url2 as webUrl2,
-         a.open_num as openNum, a.order_num as orderNum
+        b.id as equipmentId, c.id as typeId, a.description, a.web_url as webUrl, a.open_num as openNum
         FROM tb_exhibition a LEFT JOIN tb_equipment b ON a.equipment_id = b.id
         LEFT JOIN tb_exhibition_type c on a.type_id = c.id
         ORDER BY a.open_num desc

+ 3 - 0
zhoushan-system-dao/src/main/resources/mapper/cust/TbInformationMapperCust.xml

@@ -13,6 +13,9 @@
     <if test="name != null and name != ''">
       and name like CONCAT('%', #{name}, '%')
     </if>
+    <if test="state != null">
+      and state = #{state}
+    </if>
     ORDER BY order_num, create_time DESC
   </select>
 </mapper>

+ 4 - 4
zhoushan-system-dao/src/main/resources/mapper/cust/TbLogMapperCust.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fdage.dao.cust.TbLogMapperCust">
-  <select id="findList" parameterType="com.fdage.pojo.TbLog" resultType="com.fdage.respon.ResponLog">
+  <select id="findList" parameterType="com.fdage.request.RequestLog" resultType="com.fdage.pojo.TbLog">
     select
-      a.id, a.user_id as userId, a.type, a.description, a.update_time AS update_time,
-      a.create_time as createTime, b.user_name as userName
+    a.id, a.user_id as userId, a.type, a.description, a.update_time AS updateTime,
+    a.create_time as createTime, b.user_name as userName
     from tb_log a left join tb_user b on a.user_id = b.id
     where 1 = 1
     <if test="type != null">
@@ -13,6 +13,6 @@
     <if test="description != null">
       and description like CONCAT('%', #{description}, '%')
     </if>
-    ORDER BY id
+    ORDER BY id desc
   </select>
 </mapper>

+ 3 - 4
zhoushan-system-dao/src/main/resources/mapper/cust/TbUserMapperCust.xml

@@ -18,12 +18,11 @@
     <if test="state != null">
       and a.state = #{state}
     </if>
-    <if test="phone != null">
-      and (a.phone like CONCAT('%', #{phone}, '%')
-    </if>
     <if test="userName != null">
-      or a.user_name like CONCAT('%', #{userName}, '%') )
+      and a.user_name like CONCAT('%', #{userName}, '%')
     </if>
+
+    ORDER by a.create_time DESC
   </select>
 
   <select id="roleList" resultType="com.fdage.pojo.TbRole">

+ 9 - 1
zhoushan-system-service/src/main/java/com/fdage/service/ICollectionService.java

@@ -7,6 +7,7 @@ import com.fdage.request.RequestCollection;
 import com.fdage.respon.ResponCollection;
 import com.fdage.respon.ResponStatistics;
 import com.fdage.util.AjaxJson;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
 import java.util.Map;
@@ -42,7 +43,14 @@ public interface ICollectionService {
 
     List<ResponCollection> findListOrderBy(Map<String, String> map);
 
-    Map<String, Object> typeTotal();
+    List<Map<String, Object>> typeTotal();
 
     int deleteById(Long id);
+
+    AjaxJson uploadCode(MultipartFile file, String code);
+
+    AjaxJson addVisit(Long id);
+
+
+    Long countVisit();
 }

+ 1 - 2
zhoushan-system-service/src/main/java/com/fdage/service/ILogService.java

@@ -2,7 +2,6 @@ package com.fdage.service;
 
 import com.fdage.pojo.TbLog;
 import com.fdage.request.RequestLog;
-import com.fdage.respon.ResponLog;
 
 import java.util.List;
 
@@ -13,7 +12,7 @@ public interface ILogService {
 
     int save(TbLog log);
 
-    List<ResponLog> findList(RequestLog bo);
+    List<TbLog> findList(RequestLog bo);
 
 
 }

+ 62 - 23
zhoushan-system-service/src/main/java/com/fdage/service/impl/CollectionServiceImpl.java

@@ -1,5 +1,7 @@
 package com.fdage.service.impl;
 
+import cn.hutool.core.io.FileUtil;
+import com.fdage.constant.ConfigConstant;
 import com.fdage.dao.base.TbCollectionMapper;
 import com.fdage.dao.base.TbCollectionTimeMapper;
 import com.fdage.dao.base.TbCollectionTypeMapper;
@@ -19,21 +21,22 @@ import com.fdage.util.DateUtil;
 import com.fdage.util.ImportExeclUtil;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.util.StringUtil;
+import lombok.extern.slf4j.Slf4j;
+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.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.io.File;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.io.IOException;
+import java.util.*;
 
 /**
  * Created by Hb_zzZ on 2019/9/11.
  */
+@Slf4j
 @Service
-@Transactional
 public class CollectionServiceImpl implements ICollectionService {
 
     @Autowired
@@ -57,6 +60,9 @@ public class CollectionServiceImpl implements ICollectionService {
     @Autowired
     private TbExhibitionCollectionMapperCust exhibitionCollectionMapperCust;
 
+    @Autowired
+    ConfigConstant configConstant;
+
     @Override
     public List<TbCollectionType> typeList(RequestCollection bo) {
         return mapperCust.typeList(bo);
@@ -110,7 +116,9 @@ public class CollectionServiceImpl implements ICollectionService {
     @Override
     public List<ResponCollection> findList(RequestCollection bo) {
         if(bo == null){
-            return mapperCust.findAllList(bo);
+            bo = new RequestCollection();
+            bo.setState(0);
+            return mapperCust.findList(bo);
         }
         int pageNum = bo.getPageNum() == 0? 1: bo.getPageNum();
         int pageSize = bo.getPageSize() == 0? 10: bo.getPageSize();
@@ -140,14 +148,16 @@ public class CollectionServiceImpl implements ICollectionService {
                 if(i == 0){
                     continue;
                 }
-                if(cellList.size() < 7){
+//                if(cellList.size() < 7){
+                if(cellList.size() < 6){
                     return AjaxJson.failure("导入数据根式不正常");
                 }
                 if(StringUtil.isEmpty(cellList.get(0).toString().trim()) ||
                         StringUtil.isEmpty(cellList.get(1).toString().trim()) ||
                         StringUtil.isEmpty(cellList.get(2).toString().trim()) ||
-                        StringUtil.isEmpty(cellList.get(3).toString().trim()) ){
-                    errorNum.append(i + 1).append(";");
+                        StringUtil.isEmpty(cellList.get(3).toString().trim()) ||
+                        StringUtil.isEmpty(cellList.get(4).toString().trim())){
+                    errorNum.append(cellList.get(0).toString().trim()).append(";");
                     continue;
                 }
 
@@ -155,35 +165,25 @@ public class CollectionServiceImpl implements ICollectionService {
                 collectionType = typeMapperCust.findByName(cellList.get(2).toString().trim());
                 collectionTime = timeMapperCust.findByName(cellList.get(3).toString().trim());
                 if(collectionType == null || collectionTime == null){
-                    errorNum.append(i + 1).append(";");
+                    errorNum.append(cellList.get(0).toString().trim()).append(";");
                     continue;
                 }
                 if(collection == null){
                     collection = new TbCollection();
                     collection.setName(cellList.get(1).toString().trim());
                     collection.setTypeId(collectionType.getId());
-                    collection.setTypeTime(cellList.get(4).toString().trim());
                     collection.setTimeId(collectionTime.getId());
+                    collection.setNum(cellList.get(4).toString().trim());
                     collection.setDescription(cellList.get(5).toString().trim());
-                    collection.setVenue(cellList.get(6).toString().trim());
-                    collection.setPurpose(cellList.get(7).toString().trim());
-                    collection.setTexture(cellList.get(8).toString().trim());
-                    collection.setSize(cellList.get(9).toString().trim());
-                    collection.setRemarks(cellList.get(10).toString().trim());
                     collection.setCreateTime(new Date());
                     mapper.insertSelective(collection);
                     continue;
                 }
                 collection.setName(cellList.get(1).toString().trim());
                 collection.setTypeId(collectionType.getId());
-                collection.setTypeTime(cellList.get(4).toString().trim());
                 collection.setTimeId(collectionTime.getId());
+                collection.setNum(cellList.get(4).toString().trim());
                 collection.setDescription(cellList.get(5).toString().trim());
-                collection.setVenue(cellList.get(6).toString().trim());
-                collection.setPurpose(cellList.get(7).toString().trim());
-                collection.setTexture(cellList.get(8).toString().trim());
-                collection.setSize(cellList.get(9).toString().trim());
-                collection.setRemarks(cellList.get(10).toString().trim());
                 mapper.updateByPrimaryKeySelective(collection);
             }
 
@@ -221,7 +221,7 @@ public class CollectionServiceImpl implements ICollectionService {
     }
 
     @Override
-    public Map<String, Object> typeTotal() {
+    public List<Map<String, Object>> typeTotal() {
         return mapperCust.typeTotal();
     }
 
@@ -231,6 +231,45 @@ public class CollectionServiceImpl implements ICollectionService {
         return mapper.deleteByPrimaryKey(id);
     }
 
+    @Override
+    public AjaxJson uploadCode(MultipartFile file, String code) {
+
+        if(file == null){
+            return AjaxJson.failure("参数不能为空");
+        }
+
+        // 拦截非法文件
+        List<String> legalSuffix = Arrays.asList("obj","png","ab");
+        String originalFilename = file.getOriginalFilename();
+        String suffix = StringUtils.substringAfterLast(originalFilename, ".");
+        suffix = StringUtils.lowerCase(suffix);
+
+        if (!legalSuffix.contains(suffix)){
+            return AjaxJson.failure(3001, "非法文件");
+        }
+
+        String filePath = "/collection/unity/" + code +"/" +  originalFilename;
+        String savePath = configConstant.serverBasePath + filePath;
+        try {
+            FileUtil.writeFromStream(file.getInputStream(), savePath);
+            log.info("图片地址:" + savePath);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return AjaxJson.success((Object)filePath);
+    }
+
+    @Override
+    public AjaxJson addVisit(Long id) {
+        mapper.addVisit(id);
+        return AjaxJson.success();
+    }
+
+    @Override
+    public Long countVisit() {
+        return mapper.countVisit();
+    }
+
     public static void main(String[] args) {
         CollectionServiceImpl service = new CollectionServiceImpl();
 

+ 0 - 2
zhoushan-system-service/src/main/java/com/fdage/service/impl/EquipmentServiceImpl.java

@@ -10,7 +10,6 @@ import com.github.pagehelper.PageHelper;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -19,7 +18,6 @@ import java.util.List;
  * Created by Hb_zzZ on 2019/9/11.
  */
 @Service
-@Transactional
 public class EquipmentServiceImpl implements IEquipmentService{
 
     @Autowired

+ 3 - 2
zhoushan-system-service/src/main/java/com/fdage/service/impl/ExhibitionServiceImpl.java

@@ -27,7 +27,6 @@ import java.util.List;
  * Created by Hb_zzZ on 2019/9/12.
  */
 @Service
-@Transactional
 public class ExhibitionServiceImpl implements IExhibitionService {
 
     @Autowired
@@ -97,7 +96,9 @@ public class ExhibitionServiceImpl implements IExhibitionService {
     @Override
     public List<ResponExhibition> findList(RequestExhibition bo) {
         if(bo == null){
-            return mapperCust.findAllList();
+            bo = new RequestExhibition();
+            bo.setState(0);
+            return mapperCust.findList(bo);
         }
         int pageNum = bo.getPageNum() == 0? 1: bo.getPageNum();
         int pageSize = bo.getPageSize() == 0? 10: bo.getPageSize();

+ 2 - 2
zhoushan-system-service/src/main/java/com/fdage/service/impl/InformationServiceImpl.java

@@ -11,7 +11,6 @@ import com.github.pagehelper.PageHelper;
 import org.apache.commons.lang3.StringEscapeUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 
@@ -19,7 +18,6 @@ import java.util.List;
  * Created by Hb_zzZ on 2019/9/11.
  */
 @Service
-@Transactional
 public class InformationServiceImpl implements IInformationService {
 
     @Autowired
@@ -46,6 +44,8 @@ public class InformationServiceImpl implements IInformationService {
     @Override
     public List<ResponInformation> findList(RequestInformation bo) {
         if(bo == null){
+            bo = new RequestInformation();
+            bo.setState(0);
             return mapperCust.findList(bo);
         }
         int pageNum = bo.getPageNum() == 0? 1: bo.getPageNum();

+ 1 - 4
zhoushan-system-service/src/main/java/com/fdage/service/impl/LogServiceImpl.java

@@ -5,13 +5,11 @@ import com.fdage.dao.base.TbLogMapper;
 import com.fdage.dao.cust.TbLogMapperCust;
 import com.fdage.pojo.TbLog;
 import com.fdage.request.RequestLog;
-import com.fdage.respon.ResponLog;
 import com.fdage.service.ILogService;
 import com.github.pagehelper.PageHelper;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.io.File;
 import java.util.List;
@@ -21,7 +19,6 @@ import java.util.List;
  */
 @Slf4j
 @Service
-@Transactional
 public class LogServiceImpl implements ILogService {
 
     @Autowired
@@ -36,7 +33,7 @@ public class LogServiceImpl implements ILogService {
     }
 
     @Override
-    public List<ResponLog> findList(RequestLog bo) {
+    public List<TbLog> findList(RequestLog bo) {
         int pageNum = bo.getPageNum() == 0? 1: bo.getPageNum();
         int pageSize = bo.getPageSize() == 0? 10: bo.getPageSize();
         PageHelper.startPage(pageNum, pageSize);

+ 0 - 2
zhoushan-system-service/src/main/java/com/fdage/service/impl/ResourceServiceImpl.java

@@ -10,7 +10,6 @@ import com.fdage.service.IResourceService;
 import com.fdage.util.ResourceTreeUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigInteger;
 import java.util.*;
@@ -19,7 +18,6 @@ import java.util.*;
  * Created by Hb_zzZ on 2020/7/27.
  */
 @Service
-@Transactional
 public class ResourceServiceImpl implements IResourceService {
 
     @Autowired

+ 0 - 2
zhoushan-system-service/src/main/java/com/fdage/service/impl/RoleServiceImpl.java

@@ -11,7 +11,6 @@ import com.github.pagehelper.PageHelper;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.util.HashMap;
 import java.util.List;
@@ -21,7 +20,6 @@ import java.util.Map;
  * Created by Hb_zzZ on 2020/7/27.
  */
 @Service
-@Transactional
 public class RoleServiceImpl implements IRoleService {
 
     @Autowired

+ 0 - 3
zhoushan-system-service/src/main/java/com/fdage/service/impl/UserServiceImpl.java

@@ -11,7 +11,6 @@ import com.github.pagehelper.PageHelper;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 import java.util.Set;
@@ -20,7 +19,6 @@ import java.util.Set;
  * Created by Hb_zzZ on 2019/9/11.
  */
 @Service
-@Transactional
 public class UserServiceImpl implements IUserService {
 
     @Autowired
@@ -63,7 +61,6 @@ public class UserServiceImpl implements IUserService {
         TbUser user = new TbUser();
         user.setState(bo.getState());
         if(StringUtils.isNotEmpty(bo.getSearchKey())){
-            user.setPhone(bo.getSearchKey());
             user.setUserName(bo.getSearchKey());
         }
         return mapperCust.findUserList(user);