瀏覽代碼

Merge remote-tracking branch 'origin/master' into prod

lwhhszx 1 年之前
父節點
當前提交
6842f57d34
共有 34 個文件被更改,包括 478 次插入60 次删除
  1. 77 0
      src/main/java/com/example/xiaoshiweixinback/business/common/base/KeepTokenAop.java
  2. 1 2
      src/main/java/com/example/xiaoshiweixinback/business/utils/CacheUtil.java
  3. 2 2
      src/main/java/com/example/xiaoshiweixinback/controller/LoginController.java
  4. 23 0
      src/main/java/com/example/xiaoshiweixinback/controller/PatentController.java
  5. 3 3
      src/main/java/com/example/xiaoshiweixinback/controller/PayController.java
  6. 1 1
      src/main/java/com/example/xiaoshiweixinback/controller/ProductController.java
  7. 1 0
      src/main/java/com/example/xiaoshiweixinback/domain/MonitorRecord.java
  8. 1 1
      src/main/java/com/example/xiaoshiweixinback/domain/Product.java
  9. 2 0
      src/main/java/com/example/xiaoshiweixinback/domain/TicketFillIn.java
  10. 8 3
      src/main/java/com/example/xiaoshiweixinback/domain/TicketRightsProtection.java
  11. 18 0
      src/main/java/com/example/xiaoshiweixinback/entity/dataRecord/DataRangeRecord.java
  12. 15 0
      src/main/java/com/example/xiaoshiweixinback/entity/dto/GetPatentByRecordDTO.java
  13. 4 0
      src/main/java/com/example/xiaoshiweixinback/entity/dto/ticket/TicketFillInAddDTO.java
  14. 10 3
      src/main/java/com/example/xiaoshiweixinback/entity/dto/ticket/TicketRightsProtectionAddDTO.java
  15. 2 1
      src/main/java/com/example/xiaoshiweixinback/entity/product/HotProductAddDTO.java
  16. 1 1
      src/main/java/com/example/xiaoshiweixinback/entity/product/ProductAddDTO.java
  17. 1 0
      src/main/java/com/example/xiaoshiweixinback/entity/product/ProductDTO.java
  18. 2 0
      src/main/java/com/example/xiaoshiweixinback/entity/product/UploadProductParamsVO.java
  19. 1 0
      src/main/java/com/example/xiaoshiweixinback/entity/vo/ProductVO.java
  20. 4 0
      src/main/java/com/example/xiaoshiweixinback/entity/vo/TicketFillInVO.java
  21. 19 2
      src/main/java/com/example/xiaoshiweixinback/entity/vo/TicketRightsProtectionVO.java
  22. 18 5
      src/main/java/com/example/xiaoshiweixinback/service/AssoPersonProductService.java
  23. 44 14
      src/main/java/com/example/xiaoshiweixinback/service/MonitorRecordService.java
  24. 15 10
      src/main/java/com/example/xiaoshiweixinback/service/MonitorService.java
  25. 11 1
      src/main/java/com/example/xiaoshiweixinback/service/PatentService.java
  26. 6 2
      src/main/java/com/example/xiaoshiweixinback/service/ProductService.java
  27. 16 0
      src/main/java/com/example/xiaoshiweixinback/service/TicketFillInService.java
  28. 34 1
      src/main/java/com/example/xiaoshiweixinback/service/TicketRightsProtectionService.java
  29. 33 0
      src/main/java/com/example/xiaoshiweixinback/service/TicketService.java
  30. 16 5
      src/main/java/com/example/xiaoshiweixinback/service/importPatent/EsDenseVectorService.java
  31. 65 0
      src/main/java/com/example/xiaoshiweixinback/service/importPatent/EsPatentService.java
  32. 14 0
      src/main/resources/jsons/dateRangeRecord.json
  33. 7 0
      src/main/resources/jsons/uploadProduct.json
  34. 3 3
      src/main/resources/mapper/ProductMapper.xml

+ 77 - 0
src/main/java/com/example/xiaoshiweixinback/business/common/base/KeepTokenAop.java

@@ -0,0 +1,77 @@
+package com.example.xiaoshiweixinback.business.common.base;
+
+
+import cn.dev33.satoken.exception.NotLoginException;
+import com.example.xiaoshiweixinback.business.common.Response;
+import com.example.xiaoshiweixinback.business.utils.CacheUtil;
+import com.example.xiaoshiweixinback.business.utils.JsonUtils;
+import com.example.xiaoshiweixinback.business.utils.LoginUtils;
+import com.example.xiaoshiweixinback.business.utils.RedisUtil;
+import com.example.xiaoshiweixinback.entity.vo.PersonnelVO;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+@Order(2)
+@Aspect
+@Component
+public class KeepTokenAop {
+    @Autowired
+    private CacheUtil cacheUtil;
+    @Autowired
+    private RedisUtil redisUtil;
+
+    /**
+     * 定义切点
+     */
+    @Pointcut(value = "execution( * com.example.xiaoshiweixinback.controller..*.*(..))")
+    public void annotationPointcut() {
+
+    }
+
+    @Before("annotationPointcut()")
+    public void beforePointcut(JoinPoint joinPoint) {
+        //此处进入到方法前  可以实现一些业务逻辑
+        //获取目标对象方法参数
+
+    }
+
+    /**
+     * @param joinPoint 当前执行的方法
+     */
+    @Around("annotationPointcut()")
+    public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
+        // 是否通过切面过滤标记
+        String token =LoginUtils.getToken();
+       if(token!=null){
+           try {
+               PersonnelVO personnelVO = cacheUtil.getLoginUser(token);
+               if(personnelVO!=null){
+                   redisUtil.expire(LoginUtils.getToken(),3,TimeUnit.DAYS);
+               }
+           }
+         catch (Exception e){
+
+         }
+       }
+        return joinPoint.proceed();
+    }
+
+    /**
+     * 在切入点return内容之后切入内容(可以用来对处理返回值做一些加工处理)
+     *
+     * @param joinPoint 切点
+     */
+    @AfterReturning("annotationPointcut()")
+    public void doAfterReturning(JoinPoint joinPoint) {
+    }
+
+    private void checkToken(String token) {
+    }
+}
+

+ 1 - 2
src/main/java/com/example/xiaoshiweixinback/business/utils/CacheUtil.java

@@ -13,9 +13,8 @@ public class CacheUtil {
     @Resource
     private RedisUtil redisUtil;
 
-
     public void setLoginUser(PersonnelVO personnelVO,String token) {
-        redisUtil.setEx(token,JsonUtils.objectToJson(personnelVO),3L,TimeUnit.HOURS);
+        redisUtil.setEx(token,JsonUtils.objectToJson(personnelVO),3L,TimeUnit.DAYS);
     }
     public PersonnelVO getLoginUser(String token) {
         String json = redisUtil.get(token);

+ 2 - 2
src/main/java/com/example/xiaoshiweixinback/controller/LoginController.java

@@ -37,7 +37,7 @@ public class LoginController {
         try {
             loginVO = loginService.loginByPhone(vo);
         } catch (Exception e) {
-            return Response.error(e.getMessage());
+            return Response.error("登录连接超时");
         }
         return Response.success(loginVO);
     }
@@ -49,7 +49,7 @@ public class LoginController {
         try {
             loginByWxVO = loginService.loginByWeChat(wxDTO);
         } catch (Exception e) {
-            return Response.error(e.getMessage());
+            return Response.error("登录连接超时");
         }
         return Response.success(loginByWxVO);
     }

+ 23 - 0
src/main/java/com/example/xiaoshiweixinback/controller/PatentController.java

@@ -7,11 +7,15 @@ import com.example.xiaoshiweixinback.business.common.base.Records;
 import com.example.xiaoshiweixinback.business.exception.BusinessException;
 import com.example.xiaoshiweixinback.business.utils.FileUtils;
 import com.example.xiaoshiweixinback.checkLogin.checkLogin;
+import com.example.xiaoshiweixinback.entity.dataRecord.DataRangeRecord;
+import com.example.xiaoshiweixinback.entity.dto.GetPatentByRecordDTO;
 import com.example.xiaoshiweixinback.entity.dto.PatentNoDTO;
 import com.example.xiaoshiweixinback.entity.dto.esPicture.EsPictureNoDTO;
 import com.example.xiaoshiweixinback.entity.dto.esPicture.EsPatentVectorDTO;
 import com.example.xiaoshiweixinback.entity.dto.patent.*;
 import com.example.xiaoshiweixinback.entity.vo.esPicture.EsPictureNoVo;
+import com.example.xiaoshiweixinback.service.MonitorRecordService;
+import com.example.xiaoshiweixinback.service.PatentService;
 import com.example.xiaoshiweixinback.service.exportPatent.PatentExportService;
 import com.example.xiaoshiweixinback.service.importPatent.EsDenseVectorService;
 import com.example.xiaoshiweixinback.service.importPatent.EsPatentService;
@@ -53,7 +57,11 @@ public class PatentController {
 
     @Autowired
     private PatentExportService patentExportService;
+    @Autowired
+    private PatentService patentService;
 
+    @Autowired
+    private MonitorRecordService monitorRecordService;
     //--------------------------- 导入  --------------------------
     @Operation(summary = "导入专利")
     @PostMapping(value = "/importPatent")
@@ -80,6 +88,7 @@ public class PatentController {
     //--------------------------- 关于图片的专利检索  --------------------------
     @Operation(summary = "根据关键词获取列表(图片用于排序)--zero")
     @PostMapping(value = "/getPatentVectors")
+    @checkLogin
     public Response getPatentVectors(@RequestParam(value = "vectorDTO", required = false) String vectorDTO, @RequestParam(value = "multipartFile", required = false) MultipartFile multipartFile) throws Exception {
         File file = FileUtils.multipartFileToFile(multipartFile);
         EsPatentVectorDTO esPatentVectorDTO = new EsPatentVectorDTO();
@@ -165,5 +174,19 @@ public class PatentController {
         records.setData(fileGuid);
         return Response.success(records);
     }
+    @GetMapping(value = "/getDataRangeRecord")
+    @Operation(summary = "获取专利数据库数据信息")
+    public Response getDataRangeRecord() throws IOException {
+        List<DataRangeRecord> dataRangeRecords = patentService.getDataRangeRecord();
+        Records records = new Records();
+        records.setData(dataRangeRecords);
+        return Response.success(records);
+    }
 
+    @PostMapping(value = "/getPatentByRecord")
+    @Operation(summary = "查询监控记录的专利信息")
+    public Response getPatentByRecord(@RequestBody GetPatentByRecordDTO getPatentByRecordDTO) throws IOException {
+        Records records = monitorRecordService.getPatentByRecord(getPatentByRecordDTO);
+        return Response.success(records);
+    }
 }

+ 3 - 3
src/main/java/com/example/xiaoshiweixinback/controller/PayController.java

@@ -33,7 +33,7 @@ public class PayController {
 
     @Operation(summary = "回调成功")
     @PostMapping("/success")
-    private String success(@RequestBody WeiXinSuccessDTO weiXinSuccessDTO) throws IOException {
+    public String success(@RequestBody WeiXinSuccessDTO weiXinSuccessDTO) throws IOException {
         try {
             WeiXinSuccessDTO.Resource resource = weiXinSuccessDTO.getResource();
             WeixinSuccessVO weixinSuccessVO = authorizationService.decryptMessage(resource.getAssociated_data(), resource.getNonce(), resource.getCiphertext());
@@ -51,7 +51,7 @@ public class PayController {
 
     @Operation(summary = "下单并获取订单信息")
     @PostMapping("/getPayTickets")
-    private Response getPayTickets(@RequestBody WeiXinPayDTO weiXinPayDTO) {
+    public Response getPayTickets(@RequestBody WeiXinPayDTO weiXinPayDTO) {
         Records records = new Records();
         try {
             GetPayTicketVO getPayTicketVO = weixinPayService.getPayTickets(weiXinPayDTO);
@@ -65,7 +65,7 @@ public class PayController {
 
     @Operation(summary = "回调成功")
     @PostMapping("/testAuthorization")
-    private String testAuthorization() {
+    public String testAuthorization() {
         try {
             String associatedData = "transaction";
             String nonce = "yxul9eBG7PQp";

+ 1 - 1
src/main/java/com/example/xiaoshiweixinback/controller/ProductController.java

@@ -116,7 +116,7 @@ public class ProductController {
 
     @checkLogin
     @Operation(summary = "查看单个产品详情")
-    @PostMapping("/queryHotProductDetail")
+    @GetMapping("/queryHotProductDetail")
     public Response queryHotProductDetail(Integer id) {
         ProductVO productVO = productService.queryHotProductDetail(id);
         Records records = new Records();

+ 1 - 0
src/main/java/com/example/xiaoshiweixinback/domain/MonitorRecord.java

@@ -15,6 +15,7 @@ import lombok.Data;
 @TableName(value ="monitor_record")
 @Data
 public class MonitorRecord extends BaseEntity<MonitorRecord> {
+    private Integer id;
 
     /**
      * 

+ 1 - 1
src/main/java/com/example/xiaoshiweixinback/domain/Product.java

@@ -75,6 +75,6 @@ public class Product extends BaseEntity<Product> {
      */
     private Date createTime;
     private String locNum;
-
+    private String amazonLink;
 
 }

+ 2 - 0
src/main/java/com/example/xiaoshiweixinback/domain/TicketFillIn.java

@@ -32,4 +32,6 @@ public class TicketFillIn extends BaseEntity<TicketFillIn> {
     private Boolean patentExport;
 
     private String description;
+
+    private String patentNo;
 }

+ 8 - 3
src/main/java/com/example/xiaoshiweixinback/domain/TicketRightsProtection.java

@@ -43,12 +43,17 @@ public class TicketRightsProtection extends BaseEntity<TicketRightsProtection> {
     private String tortClassify;
 
     /**
-     * 是否拥有专利
+     * 是否拥有权利证明
      */
-    private Boolean ifHavePatent;
+    private Boolean ifHaveRightProof;
 
     /**
-     * 专利号
+     * 权利证明文件
+     */
+    private String rightProof;
+
+    /**
+     * 权利证明号码
      */
     private String patentNo;
 

+ 18 - 0
src/main/java/com/example/xiaoshiweixinback/entity/dataRecord/DataRangeRecord.java

@@ -0,0 +1,18 @@
+package com.example.xiaoshiweixinback.entity.dataRecord;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+public class DataRangeRecord {
+    private String name;
+    private String country;
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    private Date startTime;
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    private Date endTime;
+}

+ 15 - 0
src/main/java/com/example/xiaoshiweixinback/entity/dto/GetPatentByRecordDTO.java

@@ -0,0 +1,15 @@
+package com.example.xiaoshiweixinback.entity.dto;
+
+import lombok.Data;
+
+@Data
+public class GetPatentByRecordDTO {
+
+    private Integer recordId;
+
+
+    private Long pageNum;
+
+    private Long pageSize;
+
+}

+ 4 - 0
src/main/java/com/example/xiaoshiweixinback/entity/dto/ticket/TicketFillInAddDTO.java

@@ -2,6 +2,8 @@ package com.example.xiaoshiweixinback.entity.dto.ticket;
 
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * 填写工单DTO
  * @Author xiexiang
@@ -25,4 +27,6 @@ public class TicketFillInAddDTO {
     private Boolean patentExport;
 
     private String description;
+
+    private List<String> patentNos;
 }

+ 10 - 3
src/main/java/com/example/xiaoshiweixinback/entity/dto/ticket/TicketRightsProtectionAddDTO.java

@@ -2,6 +2,8 @@ package com.example.xiaoshiweixinback.entity.dto.ticket;
 
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * 知识产权维权DTO
  * @Author xiexiang
@@ -35,16 +37,21 @@ public class TicketRightsProtectionAddDTO {
     private String tortClassify;
 
     /**
-     * 是否拥有专利
+     * 是否拥有权利证明
      */
-    private Boolean ifHavePatent;
+    private Boolean ifHaveRightProof;
 
     /**
-     * 专利号
+     * 权利证明号码
      */
     private String patentNo;
 
     /**
+     * 权利证明文件
+     */
+    private List<String> proofGuids;
+
+    /**
      * 描述问题
      */
     private String problemDescription;

+ 2 - 1
src/main/java/com/example/xiaoshiweixinback/entity/product/HotProductAddDTO.java

@@ -44,7 +44,7 @@ public class HotProductAddDTO {
     /**
      * 价格
      */
-    private  Double price;
+    private Double price;
     /**
      * 品牌
      */
@@ -54,5 +54,6 @@ public class HotProductAddDTO {
     private Integer productCategoryId;
     private Boolean ifHot;
 
+    private String amazonLink;
 
 }

+ 1 - 1
src/main/java/com/example/xiaoshiweixinback/entity/product/ProductAddDTO.java

@@ -42,5 +42,5 @@ public class ProductAddDTO {
     private String competitorLink;
     private List<String> fileGuids;
     private Integer concernType;
-
+    private String amazonLink;
 }

+ 1 - 0
src/main/java/com/example/xiaoshiweixinback/entity/product/ProductDTO.java

@@ -14,4 +14,5 @@ public class ProductDTO {
    List<Integer> productCategoryIds;
     private String sourceFrom;
     private  String bestSellingBrand;
+    private String amazonLink;
 }

+ 2 - 0
src/main/java/com/example/xiaoshiweixinback/entity/product/UploadProductParamsVO.java

@@ -59,4 +59,6 @@ public class UploadProductParamsVO {
     private String locNum;
     private String priceStr;
     private List<String> categoryList;
+
+    private String amazonLink;
 }

+ 1 - 0
src/main/java/com/example/xiaoshiweixinback/entity/vo/ProductVO.java

@@ -61,4 +61,5 @@ public class ProductVO {
     private Boolean ifShow;
     private String monitorPeriod;
     private Boolean ifMonitor;
+    private String amazonLink;
 }

+ 4 - 0
src/main/java/com/example/xiaoshiweixinback/entity/vo/TicketFillInVO.java

@@ -2,6 +2,8 @@ package com.example.xiaoshiweixinback.entity.vo;
 
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * 填写表单VO
  * @Author xiexiang
@@ -30,4 +32,6 @@ public class TicketFillInVO {
     private Boolean patentExport;
 
     private String description;
+
+    private List<String> patentNos;
 }

+ 19 - 2
src/main/java/com/example/xiaoshiweixinback/entity/vo/TicketRightsProtectionVO.java

@@ -1,9 +1,13 @@
 package com.example.xiaoshiweixinback.entity.vo;
 
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.example.xiaoshiweixinback.business.common.base.SystemFile;
 import com.example.xiaoshiweixinback.domain.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * 知识产权维权工单
  * @Author xiexiang
@@ -42,9 +46,14 @@ public class TicketRightsProtectionVO {
     private String tortClassify;
 
     /**
-     * 是否拥有专利
+     * 是否拥有权利证明
+     */
+    private Boolean ifHaveRightProof;
+
+    /**
+     * 权利证明
      */
-    private Boolean ifHavePatent;
+    private String rightProof;
 
     /**
      * 专利号
@@ -52,6 +61,14 @@ public class TicketRightsProtectionVO {
     private String patentNo;
 
     /**
+     * 图片集合
+     */
+    private List<String> proofGuids;
+
+    @Schema(description = "文件信息")
+    private List<SystemFile> proofFileList;
+
+    /**
      * 描述问题
      */
     private String problemDescription;

+ 18 - 5
src/main/java/com/example/xiaoshiweixinback/service/AssoPersonProductService.java

@@ -17,8 +17,11 @@ import com.example.xiaoshiweixinback.entity.vo.PersonnelVO;
 import com.example.xiaoshiweixinback.mapper.AssoPersonProductMapper;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -27,15 +30,19 @@ import java.util.List;
  * @createDate 2024-04-10 15:45:40
  */
 @Service
-@RequiredArgsConstructor
-public class AssoPersonProductService extends ServiceImpl<AssoPersonProductMapper, AssoPersonProduct> {
-    private final CacheUtil cacheUtil;
-    private final VipService vipService;
 
+public class AssoPersonProductService extends ServiceImpl<AssoPersonProductMapper, AssoPersonProduct> {
+    @Autowired
+    private  CacheUtil cacheUtil;
+    @Autowired
+    private  VipService vipService;
+    @Lazy
+    @Autowired
+    private  MonitorService monitorService;
     public Integer add(AssoPersonProductDTO assoPersonProductDTO) {
         Integer productId =assoPersonProductDTO.getProductId();
         PersonnelVO personnelVO = cacheUtil.getLoginUser(LoginUtils.getToken());
-      AssoPersonProduct assoPersonProduct =  checkAdmin(productId);
+        AssoPersonProduct assoPersonProduct =  checkAdmin(productId);
 
         if (ToolUtil.isNotEmpty(personnelVO)) {
             if(assoPersonProduct==null) {
@@ -44,6 +51,10 @@ public class AssoPersonProductService extends ServiceImpl<AssoPersonProductMappe
                 assoPersonProduct.setPersonUuid(personnelVO.getUuid());
                 assoPersonProduct.insert();
             }
+            else {
+                assoPersonProduct.setConcernType(assoPersonProductDTO.getConcernType());
+                assoPersonProduct.updateById();
+            }
 
             return assoPersonProduct.getProductId();
         }
@@ -63,8 +74,10 @@ public class AssoPersonProductService extends ServiceImpl<AssoPersonProductMappe
                 return 0;
             }
             this.removeById(assoPersonProduct.getId());
+            monitorService.cancelMonitorByProductIds(Arrays.asList(productId));
             return productId;
         }
+        //取消监控
         return -1;
     }
 

+ 44 - 14
src/main/java/com/example/xiaoshiweixinback/service/MonitorRecordService.java

@@ -4,17 +4,21 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.example.xiaoshiweixinback.business.common.base.Records;
+import com.example.xiaoshiweixinback.business.exception.XiaoShiException;
 import com.example.xiaoshiweixinback.business.utils.FormatUtil;
 import com.example.xiaoshiweixinback.domain.Monitor;
 import com.example.xiaoshiweixinback.domain.MonitorRecord;
 import com.example.xiaoshiweixinback.domain.PatentUpdateRecord;
 import com.example.xiaoshiweixinback.domain.Product;
 import com.example.xiaoshiweixinback.domain.es.Patent;
+import com.example.xiaoshiweixinback.entity.dto.GetPatentByRecordDTO;
+import com.example.xiaoshiweixinback.entity.dto.esPicture.EsPatentVectorDTO;
 import com.example.xiaoshiweixinback.entity.dto.patent.PatentColumnDTO;
 import com.example.xiaoshiweixinback.entity.dto.patent.PatentDTO;
 import com.example.xiaoshiweixinback.entity.patent.QueryRequest;
 import com.example.xiaoshiweixinback.entity.patent.StringRequest;
 import com.example.xiaoshiweixinback.mapper.MonitorRecordMapper;
+import com.example.xiaoshiweixinback.service.importPatent.EsDenseVectorService;
 import com.example.xiaoshiweixinback.service.importPatent.EsPatentService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
@@ -37,6 +41,8 @@ public class MonitorRecordService extends ServiceImpl<MonitorRecordMapper, Monit
     private MonitorService monitorService;
     @Autowired
     private EsPatentService esPatentService;
+    @Autowired
+    private EsDenseVectorService esDenseVectorService;
 
     public Records getMonitorRecords(Integer monitorId) {
         Monitor monitor = monitorService.getById(monitorId);
@@ -69,19 +75,18 @@ public class MonitorRecordService extends ServiceImpl<MonitorRecordMapper, Monit
             Integer productId = product.getId();
             MonitorRecord monitorRecord = this.getLastMonitorRecord(product.getId());
             Date startTime = new Date();
-            Date endTime = new Date();
+            Date endTime = null;
 
             if (monitorRecord != null) {
                 startTime = monitorRecord.getEndDate();
-            }
-            else {
-                LambdaQueryWrapper<Monitor> queryWrapper =new LambdaQueryWrapper<>();
-                queryWrapper.eq(Monitor::getProductId,product.getId());
-                Monitor monitor= monitorService.getOne(queryWrapper,false);
-                if(monitor==null){
+            } else {
+                LambdaQueryWrapper<Monitor> queryWrapper = new LambdaQueryWrapper<>();
+                queryWrapper.eq(Monitor::getProductId, product.getId());
+                Monitor monitor = monitorService.getOne(queryWrapper, false);
+                if (monitor == null) {
                     continue;
                 }
-                startTime =monitor.getCreateTime();
+                startTime = monitor.getCreateTime();
             }
 
             String condition = product.getSearchCondition();
@@ -96,9 +101,8 @@ public class MonitorRecordService extends ServiceImpl<MonitorRecordMapper, Monit
                     if (patent.getPublicDate() != null) {
                         endTime = patent.getPublicDate();
                     } else if (patent.getGrantDate() != null) {
-                         endTime=patent.getGrantDate();
-                    }
-                    else {
+                        endTime = patent.getGrantDate();
+                    } else {
                         continue;
                     }
                 }
@@ -109,8 +113,9 @@ public class MonitorRecordService extends ServiceImpl<MonitorRecordMapper, Monit
             StringRequest stringRequest = new StringRequest();
             stringRequest.setSearchQuery(newCondition);
             try {
-                if(endTime==null||startTime.compareTo(endTime)>=0)
-                {continue;}
+                if (endTime == null || startTime.compareTo(endTime) >= 0) {
+                    continue;
+                }
                 PatentDTO patentDTO = esPatentService.esSearch(stringRequest);
                 Long total = patentDTO.getTotal();
                 if (total != null && total > 0) {
@@ -130,7 +135,32 @@ public class MonitorRecordService extends ServiceImpl<MonitorRecordMapper, Monit
 
     }
 
-
+    public Records getPatentByRecord(GetPatentByRecordDTO getPatentByRecordDTO) {
+        Integer recordId =getPatentByRecordDTO.getRecordId();
+        Long  num =getPatentByRecordDTO.getPageNum();
+        Long size =getPatentByRecordDTO.getPageSize();
+        MonitorRecord monitorRecord = this.getById(recordId);
+        Date startTime = monitorRecord.getStartDate();
+        Date endTime = monitorRecord.getEndDate();
+        String searchCondition = monitorRecord.getSearchCondition();
+        searchCondition = searchCondition + " AND (PD=" +
+                FormatUtil.getTimeStringYYMMdd(startTime) + "~"
+                + FormatUtil.getTimeStringYYMMdd(endTime) + " OR " + "GD="
+                + FormatUtil.getTimeStringYYMMdd(startTime) + "~"
+                + FormatUtil.getTimeStringYYMMdd(endTime) + ")";
+        StringRequest stringRequest = new StringRequest();
+        stringRequest.setSearchQuery(searchCondition);
+        stringRequest.setSize(size);
+        stringRequest.setCurrent(num);
+        Records records =new Records();
+        try {
+            records = esPatentService.selectPatent(stringRequest);
+
+        } catch (Exception e) {
+            throw  new XiaoShiException("");
+        }
+        return records;
+    }
 }
 
 

+ 15 - 10
src/main/java/com/example/xiaoshiweixinback/service/MonitorService.java

@@ -37,15 +37,18 @@ import java.util.stream.Collectors;
  * @createDate 2024-04-28 16:29:49
  */
 @Service
-@RequiredArgsConstructor
-public class MonitorService extends ServiceImpl<MonitorMapper, Monitor> {
 
-    private final AssoPersonProductService assoPersonProductService;
+public class MonitorService extends ServiceImpl<MonitorMapper, Monitor> {
+    @Lazy
+    @Autowired
+    private  AssoPersonProductService assoPersonProductService;
     @Lazy
     @Autowired
     private ProductService productService;
-    private final CacheUtil cacheUtil;
-    private final ProductMapper productMapper;
+    @Autowired
+    private  CacheUtil cacheUtil;
+    @Autowired
+    private  ProductMapper productMapper;
 
     /**
      * 添加监控
@@ -112,16 +115,18 @@ public class MonitorService extends ServiceImpl<MonitorMapper, Monitor> {
         return productIds;
     }
 
-    private List<Integer> cancelMonitorByProductIds(List<Integer> productIds) {
+    public List<Integer> cancelMonitorByProductIds(List<Integer> productIds) {
         PersonnelVO personnelVO = cacheUtil.getLoginUser(LoginUtils.getToken());
         LambdaQueryWrapper<Monitor> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.in(Monitor::getProductId, productIds)
                 .eq(Monitor::getCreateId, personnelVO.getUuid());
         List<Monitor> monitors = this.list(queryWrapper);
-        monitors.forEach(item -> {
-            item.setIfDelete(true);
-            item.updateById();
-        });
+        if (monitors != null && monitors.size() > 0) {
+            monitors.forEach(item -> {
+                item.setIfDelete(true);
+                item.updateById();
+            });
+        }
         return productIds;
 
     }

+ 11 - 1
src/main/java/com/example/xiaoshiweixinback/service/PatentService.java

@@ -1,17 +1,27 @@
 package com.example.xiaoshiweixinback.service;
 
 
+import com.alibaba.fastjson.JSON;
 import com.example.xiaoshiweixinback.business.common.base.Records;
+import com.example.xiaoshiweixinback.entity.dataRecord.DataRangeRecord;
 import com.example.xiaoshiweixinback.entity.dto.patent.PatentDTO;
 import com.example.xiaoshiweixinback.entity.patent.QueryRequest;
+import com.example.xiaoshiweixinback.entity.vo.PatentConfigVO;
+import com.example.xiaoshiweixinback.service.importPatent.CommonService;
 import com.example.xiaoshiweixinback.service.importPatent.EsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class PatentService {
     @Autowired
     private EsService esService;
 
-
+  public List<DataRangeRecord>  getDataRangeRecord(){
+    String json=  CommonService.readJsonFile("dateRangeRecord.json");
+      List<DataRangeRecord> dataRangeRecords = JSON.parseArray(json, DataRangeRecord.class);
+      return dataRangeRecords;
+  }
 }

+ 6 - 2
src/main/java/com/example/xiaoshiweixinback/service/ProductService.java

@@ -133,7 +133,7 @@ public class ProductService extends ServiceImpl<ProductMapper, Product> {
                 LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
                 monitorLambdaQueryWrapper.in(Monitor::getProductId, ids)
                         .eq(Monitor::getCreateId, personnelVO.getUuid())
-                        .eq(Monitor::getIfDelete,false);
+                        .eq(Monitor::getIfDelete, false);
                 monitors = monitorService.list(monitorLambdaQueryWrapper);
             }
         }
@@ -173,7 +173,11 @@ public class ProductService extends ServiceImpl<ProductMapper, Product> {
             if (assoPersonProducts.size() != 0) {
                 AssoPersonProduct assoPersonProduct = assoPersonProducts.stream().filter(item -> item.getProductId().equals(productVO.getId())).findFirst().orElse(null);
                 if (assoPersonProduct != null) {
-                    productVO.setConcernType(assoPersonProduct.getConcernType());
+                    if (assoPersonProduct.getConcernType() == null) {
+                        productVO.setConcernType(-1);
+                    } else {
+                        productVO.setConcernType(assoPersonProduct.getConcernType());
+                    }
                 }
             }
 

+ 16 - 0
src/main/java/com/example/xiaoshiweixinback/service/TicketFillInService.java

@@ -2,6 +2,7 @@ package com.example.xiaoshiweixinback.service;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.example.xiaoshiweixinback.business.utils.StringUtils;
 import com.example.xiaoshiweixinback.domain.TicketFillIn;
 import com.example.xiaoshiweixinback.entity.dto.ticket.TicketFillInAddDTO;
 import com.example.xiaoshiweixinback.entity.vo.TicketFillInVO;
@@ -10,6 +11,10 @@ import lombok.RequiredArgsConstructor;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
 /**
  * 填写工单Service
  * @Author xiexiang
@@ -27,6 +32,11 @@ public class TicketFillInService extends ServiceImpl<TicketFillInMapper, TicketF
     public Integer add(TicketFillInAddDTO ticketFillInAddDTO){
         TicketFillIn ticketFillIn = new TicketFillIn();
         BeanUtils.copyProperties(ticketFillInAddDTO, ticketFillIn);
+        List<String> patentNos = ticketFillInAddDTO.getPatentNos();
+        if (patentNos != null && !patentNos.isEmpty()) {
+            String patentNo = String.join(",", patentNos);
+            ticketFillIn.setPatentNo(patentNo);
+        }
         ticketFillIn.insert();
         return ticketFillIn.getTicketId();
     }
@@ -38,6 +48,12 @@ public class TicketFillInService extends ServiceImpl<TicketFillInMapper, TicketF
         TicketFillIn ticketFillIn = this.getOne(fillInWrapper, false);
         if (ticketFillIn != null) {
             BeanUtils.copyProperties(ticketFillIn, ticketFillInVO);
+            String patentNoArray = ticketFillIn.getPatentNo();
+            if (patentNoArray != null && StringUtils.isNotEmpty(patentNoArray)) {
+                String[] stringArray = patentNoArray.split(",");
+                List<String> patentNos = new ArrayList<>(Arrays.asList(stringArray));
+                ticketFillInVO.setPatentNos(patentNos);
+            }
         }
         return  ticketFillInVO;
     }

+ 34 - 1
src/main/java/com/example/xiaoshiweixinback/service/TicketRightsProtectionService.java

@@ -1,15 +1,23 @@
 package com.example.xiaoshiweixinback.service;
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.example.xiaoshiweixinback.business.common.base.SystemFile;
 import com.example.xiaoshiweixinback.domain.TicketRightsProtection;
 import com.example.xiaoshiweixinback.entity.dto.ticket.TicketRightsProtectionAddDTO;
 import com.example.xiaoshiweixinback.entity.vo.TicketRightsProtectionVO;
 import com.example.xiaoshiweixinback.mapper.TicketRightsProtectionMapper;
+import com.example.xiaoshiweixinback.service.common.FileManagerService;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
 /**
  * 知识产权维权工单Service
  *
@@ -19,7 +27,8 @@ import org.springframework.stereotype.Service;
 @Service
 @RequiredArgsConstructor
 public class TicketRightsProtectionService extends ServiceImpl<TicketRightsProtectionMapper, TicketRightsProtection> {
-
+    @Autowired
+    private FileManagerService fileManagerService;
     /**
      * 知识产权维权工单
      *
@@ -29,6 +38,11 @@ public class TicketRightsProtectionService extends ServiceImpl<TicketRightsProte
     public Integer add(TicketRightsProtectionAddDTO ticketRightsProtectionAddDTO) {
         TicketRightsProtection ticketRightsProtection = new TicketRightsProtection();
         BeanUtils.copyProperties(ticketRightsProtectionAddDTO, ticketRightsProtection);
+        List<String> proofGuids = ticketRightsProtectionAddDTO.getProofGuids();
+        if (!proofGuids.isEmpty()) {
+            String rightProof = String.join(",", proofGuids);
+            ticketRightsProtection.setRightProof(rightProof);
+        }
         ticketRightsProtection.insert();
         return ticketRightsProtection.getTicketId();
     }
@@ -39,6 +53,25 @@ public class TicketRightsProtectionService extends ServiceImpl<TicketRightsProte
         rightsProtectionWrapper.eq(TicketRightsProtection::getTicketId, ticketId);
         TicketRightsProtection ticketRightsProtection = this.getOne(rightsProtectionWrapper, false);
         if (ticketRightsProtection != null) {
+            String rightProof = ticketRightsProtection.getRightProof();
+            if (rightProof != null){
+                String[] stringArray = rightProof.split(",");
+            List<String> proofGuids = new ArrayList<>(Arrays.asList(stringArray));
+            List<SystemFile> systemFiles = new ArrayList<>();
+            if (proofGuids.size() != 0) {
+                try {
+                    String res = fileManagerService.getSystemFileFromFMS(proofGuids);
+                    systemFiles = JSONObject.parseArray(res, SystemFile.class);
+                    if (systemFiles == null) {
+                        systemFiles = new ArrayList<>();
+                    }
+                } catch (Exception e) {
+                }
+            }
+                rightsProtectionVO.setProofGuids(proofGuids);
+                rightsProtectionVO.setProofFileList(systemFiles);
+        }
+
             BeanUtils.copyProperties(ticketRightsProtection, rightsProtectionVO);
         }
         return  rightsProtectionVO;

+ 33 - 0
src/main/java/com/example/xiaoshiweixinback/service/TicketService.java

@@ -1,5 +1,6 @@
 package com.example.xiaoshiweixinback.service;
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -11,6 +12,7 @@ import com.example.xiaoshiweixinback.business.exception.BusinessException;
 import com.example.xiaoshiweixinback.business.utils.BatchNoUtil;
 import com.example.xiaoshiweixinback.business.utils.CacheUtil;
 import com.example.xiaoshiweixinback.business.utils.LoginUtils;
+import com.example.xiaoshiweixinback.business.utils.StringUtils;
 import com.example.xiaoshiweixinback.domain.*;
 import com.example.xiaoshiweixinback.entity.dto.ticket.*;
 import com.example.xiaoshiweixinback.entity.vo.*;
@@ -26,6 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -208,6 +211,12 @@ public class TicketService extends ServiceImpl<TicketMapper, Ticket> {
                         TicketFillIn ticketFillIn = ticketFillInService.getOne(fillInWrapper, false);
                         if (ticketFillIn != null) {
                             BeanUtils.copyProperties(ticketFillIn, ticketFillInVO);
+                            String patentNoArray = ticketFillIn.getPatentNo();
+                            if (patentNoArray != null && StringUtils.isNotEmpty(patentNoArray)) {
+                                String[] stringArray = patentNoArray.split(",");
+                                List<String> patentNos = new ArrayList<>(Arrays.asList(stringArray));
+                                ticketFillInVO.setPatentNos(patentNos);
+                            }
                         }
                         ticketVO.setTicketFillInVO(ticketFillInVO);
                         break;
@@ -217,6 +226,25 @@ public class TicketService extends ServiceImpl<TicketMapper, Ticket> {
                         rightsProtectionWrapper.eq(TicketRightsProtection::getTicketId, ticketId);
                         TicketRightsProtection ticketRightsProtection = ticketRightsProtectionService.getOne(rightsProtectionWrapper, false);
                         if (ticketRightsProtection != null) {
+                            String rightProof = ticketRightsProtection.getRightProof();
+                            if(rightProof!=null){
+                            String[] stringArray = rightProof.split(",");
+                            List<String> proofGuids = new ArrayList<>(Arrays.asList(stringArray));
+                            List<SystemFile> systemFiles = new ArrayList<>();
+                            if (proofGuids.size() != 0) {
+                                try {
+                                    String res = fileManagerService.getSystemFileFromFMS(proofGuids);
+                                    systemFiles = JSONObject.parseArray(res, SystemFile.class);
+                                    if (systemFiles == null) {
+                                        systemFiles = new ArrayList<>();
+                                    }
+                                } catch (Exception e) {
+                                }
+                                rightsProtectionVO.setProofGuids(proofGuids);
+                                rightsProtectionVO.setProofFileList(systemFiles);
+                            }
+                            }
+
                             BeanUtils.copyProperties(ticketRightsProtection, rightsProtectionVO);
                         }
                         ticketVO.setTicketRightsProtectionVO(rightsProtectionVO);
@@ -270,6 +298,11 @@ public class TicketService extends ServiceImpl<TicketMapper, Ticket> {
         if (process.equals(4)) {
             ticketFlowService.addTicketFlow(ticket, "工单已确认", false, null, 4,ticket.getCreateId());
         }
+        if(process.equals(5))
+        {
+            ticketFlowService.addTicketFlow(ticket, "工单已取消", false, null, 5,ticket.getCreateId());
+
+        }
         return ticket.getId();
     }
 

+ 16 - 5
src/main/java/com/example/xiaoshiweixinback/service/importPatent/EsDenseVectorService.java

@@ -14,6 +14,7 @@ import co.elastic.clients.elasticsearch.core.SearchResponse;
 import co.elastic.clients.elasticsearch.core.search.FieldCollapse;
 import co.elastic.clients.elasticsearch.core.search.Hit;
 import co.elastic.clients.json.JsonData;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.example.xiaoshiweixinback.business.common.base.Records;
 import com.example.xiaoshiweixinback.business.common.base.SystemFile;
@@ -26,6 +27,7 @@ import com.example.xiaoshiweixinback.business.utils.RegexUtil;
 import com.example.xiaoshiweixinback.business.utils.parseQueryToTree.expressManager;
 import com.example.xiaoshiweixinback.business.utils.parseQueryToTree.operateNode;
 import com.example.xiaoshiweixinback.business.utils.parseQueryToTree.treeNode;
+import com.example.xiaoshiweixinback.domain.AssoPersonFunction;
 import com.example.xiaoshiweixinback.domain.AssoProductFile;
 import com.example.xiaoshiweixinback.domain.Product;
 import com.example.xiaoshiweixinback.domain.es.PatentVector;
@@ -34,6 +36,7 @@ import com.example.xiaoshiweixinback.entity.dto.esPicture.EsPatentVectorDTO;
 import com.example.xiaoshiweixinback.entity.dto.patent.PatentColumnDTO;
 import com.example.xiaoshiweixinback.entity.dto.searchRecord.AddSearchRecordDTO;
 import com.example.xiaoshiweixinback.entity.dto.searchRecord.SearchRecordConditionDTO;
+import com.example.xiaoshiweixinback.entity.sysFuctionRights.FunctionConfig;
 import com.example.xiaoshiweixinback.entity.vo.esPicture.EsPictureNoVo;
 import com.example.xiaoshiweixinback.entity.vo.esPicture.EsPatentVectorVo;
 import com.example.xiaoshiweixinback.entity.vo.esPicture.GetImageVO;
@@ -97,7 +100,8 @@ public class EsDenseVectorService {
     @Value("${ES.patent}")
     private String patentMapName;
 
-    /**R
+    /**
+     * R
      * 根据图片排序获取列表
      *
      * @param dto
@@ -109,10 +113,17 @@ public class EsDenseVectorService {
         Long pageNum = dto.getPageNum();
         Long pageSize = dto.getPageSize();
         Boolean ifAddSearchRecord = dto.getIfAddSearchRecord();
+        Long allNum = pageNum * pageSize;
+        Long canGetNum = 100L;
+        AssoPersonFunction assoPersonFunction = vipService.getAssoPersonFunction("3");
+        if (assoPersonFunction != null) {
+            FunctionConfig functionConfig = JSON.parseObject(assoPersonFunction.getFunctionParameter(), FunctionConfig.class);
+            canGetNum = Long.parseLong(functionConfig.getSize().toString());
+        }
 
-//        AssoPersonFunction assoPersonFunction = vipService.getAssoPersonFunction("3");
-//        if (assoPersonFunction == null) {
-//        }
+        if (canGetNum!=-1L&&allNum > canGetNum) {
+            throw new BusinessException("607", "超过可查看专利数量");
+        }
         SearchRequest.Builder builder = new SearchRequest.Builder();
         //设置查询索引
         builder.index(patentVectorName);
@@ -382,7 +393,7 @@ public class EsDenseVectorService {
         //设置查询索引
         builder.index(patentVectorName);
         Query q = null;
-        String condition = this.appendCondition(dto.getProductId(), dto.getKey(), dto.getAppCountry(), dto.getCompanyName());
+        String condition = dto.getKey();
 
         if (StringUtils.isNotEmpty(condition)) {
             //1. 解析检索条件

+ 65 - 0
src/main/java/com/example/xiaoshiweixinback/service/importPatent/EsPatentService.java

@@ -568,4 +568,69 @@ public class EsPatentService {
         return dto;
     }
 
+
+    public Records selectPatent(QueryRequest queryRequest) throws Exception {
+        PatentDTO dto = new PatentDTO();
+        String searchCondition = "";
+        Integer projectId = queryRequest.getProjectId();
+        Long current = queryRequest.getCurrent();
+        Long size = queryRequest.getSize();
+
+        //判断表达式
+        if (queryRequest instanceof StringRequest) {
+            searchCondition = ((StringRequest) queryRequest).getSearchQuery();
+        } else if (queryRequest instanceof MapRequest) {
+            Map<String, Object> map = ((MapRequest) queryRequest).getSearchQuery();
+            StringBuilder stringBuilder = new StringBuilder();
+            for (String key : map.keySet()) {
+                Object value = map.get(key);
+                if (!"".contentEquals(stringBuilder)) {
+                    stringBuilder = stringBuilder.append(" AND ").append(key).append("=").append(value);
+                } else {
+                    stringBuilder = stringBuilder.append(key).append("=").append(value);
+                }
+            }
+            searchCondition = stringBuilder.toString();
+        }
+
+        String condition = searchCondition;
+
+        SearchRequest.Builder builder = new SearchRequest.Builder();
+        //设置查询索引
+        builder.index("wxpatent");
+        //1. 解析检索条件
+        treeNode tree = expressManager.getInstance().Parse(condition, false);
+        //3. 从es中检索数据
+        Query q = formatQueryService.EsQueryToQuery((operateNode) tree, "patent", projectId);
+        builder.query(q);
+
+        //排序
+        List<SortOptions> optionsList = new ArrayList<>();
+
+        SortOptions sortOptions = SortOptions.of(i -> i.field(j -> j.field("public_date").order(SortOrder.Desc).missing(-1)));
+        optionsList.add(sortOptions);
+
+        builder.sort(optionsList);
+
+
+        //解除最大条数限制
+        builder.trackTotalHits(i -> i.enabled(true));
+        SearchResponse<Patent> response = client.search(builder.build(), Patent.class);
+        List<PatentColumnDTO> list = new ArrayList<>();
+        long total = 0L;
+        List<Hit<Patent>> hits = response.hits().hits();
+        total = response.hits().total().value();
+        for (Hit<Patent> hit : hits) {
+            Patent patent = hit.source();
+            PatentColumnDTO columnDTO = this.getPatentColumnDTO(patent, null, null);
+            list.add(columnDTO);
+        }
+
+        Records records = new Records();
+        records.setCurrent(current);
+        records.setSize(size);
+        records.setData(list);
+        records.setTotal(total);
+        return records;
+    }
 }

+ 14 - 0
src/main/resources/jsons/dateRangeRecord.json

@@ -0,0 +1,14 @@
+[
+  {
+    "name": "美国",
+    "country":"US",
+    "startTime":"2023-01-01",
+    "endTime": "2024-04-30"
+  },
+  {
+    "name": "中国",
+    "country":"CN",
+    "startTime":"2023-01-01",
+    "endTime": "2024-04-30"
+  }
+]

+ 7 - 0
src/main/resources/jsons/uploadProduct.json

@@ -73,6 +73,13 @@
         "splitSymbol": ">",
         "handler": "cn.cslg.pas.common.utils.handler.StringHandler",
         "jarOrClassPath": "./Wispro-CodeWarehouse-BackEnd.jar"
+      },
+      {
+        "setName": "亚马逊链接",
+        "column": "amazonLink",
+        "splitSymbol": "",
+        "handler": "cn.cslg.pas.common.utils.handler.StringHandler",
+        "jarOrClassPath": "./Wispro-CodeWarehouse-BackEnd.jar"
       }
     ]
   }

+ 3 - 3
src/main/resources/mapper/ProductMapper.xml

@@ -5,7 +5,7 @@
     <select id="getProductByCategory" resultType="com.example.xiaoshiweixinback.entity.vo.ProductVO">
         select distinct p.id as id,p.name as name,p.description as description,p.sell_platform as sellPlatform,pe.name
         as createName ,p.create_time as createTime,p.best_selling_brand as bestSellingBrand,p.price as
-        price,p.platform_link as platformLink,apc.product_category_id as productCategoryId,p.if_show as ifShow
+        price,p.platform_link as platformLink,apc.product_category_id as productCategoryId,p.if_show as ifShow,p.amazon_link as amazonLink
         from product as p
         left join asso_product_category as apc on p.id =product_id
         left join person as pe on p.create_id =pe.uuid
@@ -87,7 +87,7 @@
     <select id="getConcernProduct" resultType="com.example.xiaoshiweixinback.entity.vo.ProductVO">
         select distinct p.id as id,p.name as name,p.description as description,p.sell_platform as sellPlatform,pe.name
         as createName ,p.create_time as createTime,p.best_selling_brand as bestSellingBrand,p.price as
-        price,p.platform_link as platformLink,p.if_hot as ifHot,app.id as assoId
+        price,p.platform_link as platformLink,p.if_hot as ifHot,app.id as assoId,p.amazon_link as amazonLink
         from
         asso_person_product as app
         left join product as p on app.product_id =p.id
@@ -139,7 +139,7 @@
     <select id="getMonitoringProduct" resultType="com.example.xiaoshiweixinback.entity.vo.ProductVO">
         select distinct p.id as id,p.name as name,p.description as description,p.sell_platform as sellPlatform,pe.name
         as createName ,p.create_time as createTime,p.best_selling_brand as bestSellingBrand,p.price as
-        price,p.platform_link as platformLink,p.if_hot as ifHot,app.id as assoId,app.monitor_period as monitorPeriod
+        price,p.platform_link as platformLink,p.if_hot as ifHot,app.id as assoId,app.monitor_period as monitorPeriod,p.amazon_link as amazonLink
         from
         monitor as app
         left join product as p on app.product_id =p.id