lyhzzz 5 months ago
parent
commit
7e6dd33808
25 changed files with 545 additions and 23 deletions
  1. 11 0
      doc/update1.10.9.sql
  2. 1 0
      src/main/java/com/fdkankan/ucenter/controller/SceneCooperationController.java
  3. 6 4
      src/main/java/com/fdkankan/ucenter/controller/app/SceneApiController.java
  4. 67 0
      src/main/java/com/fdkankan/ucenter/entity/Product.java
  5. 48 0
      src/main/java/com/fdkankan/ucenter/entity/ProductCooperation.java
  6. 106 0
      src/main/java/com/fdkankan/ucenter/entity/ProductOrder.java
  7. 1 1
      src/main/java/com/fdkankan/ucenter/generate/AutoGenerate.java
  8. 1 1
      src/main/java/com/fdkankan/ucenter/httpClient/param/PayGoods.java
  9. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/IProductCooperationMapper.java
  10. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/IProductMapper.java
  11. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/IProductOrderMapper.java
  12. 16 0
      src/main/java/com/fdkankan/ucenter/service/IProductCooperationService.java
  13. 18 0
      src/main/java/com/fdkankan/ucenter/service/IProductOrderService.java
  14. 17 0
      src/main/java/com/fdkankan/ucenter/service/IProductService.java
  15. 1 1
      src/main/java/com/fdkankan/ucenter/service/ISceneCooperationService.java
  16. 20 0
      src/main/java/com/fdkankan/ucenter/service/impl/ProductCooperationServiceImpl.java
  17. 62 0
      src/main/java/com/fdkankan/ucenter/service/impl/ProductOrderServiceImpl.java
  18. 33 0
      src/main/java/com/fdkankan/ucenter/service/impl/ProductServiceImpl.java
  19. 51 9
      src/main/java/com/fdkankan/ucenter/service/impl/SceneCooperationServiceImpl.java
  20. 11 7
      src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java
  21. 2 0
      src/main/java/com/fdkankan/ucenter/vo/request/SceneCooperationParam.java
  22. 4 0
      src/main/java/com/fdkankan/ucenter/vo/response/SceneVo.java
  23. 5 0
      src/main/resources/mapper/ucenter/ProductCooperationMapper.xml
  24. 5 0
      src/main/resources/mapper/ucenter/ProductMapper.xml
  25. 5 0
      src/main/resources/mapper/ucenter/ProductOrderMapper.xml

+ 11 - 0
doc/update1.10.9.sql

@@ -0,0 +1,11 @@
+CREATE TABLE `4dkankan_v4`.`t_product`  (
+  `id` int NOT NULL AUTO_INCREMENT,
+  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
+  `price` decimal(10, 2) NULL DEFAULT NULL COMMENT '单价',
+  `scene_limit_count` int NULL DEFAULT NULL COMMENT '每个场景限购数量',
+  `scene_free_count` int NULL DEFAULT NULL COMMENT '每个场景免费数量',
+  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A',
+  `create_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
+  `update_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
+  PRIMARY KEY (`id`)
+);

+ 1 - 0
src/main/java/com/fdkankan/ucenter/controller/SceneCooperationController.java

@@ -67,6 +67,7 @@ public class SceneCooperationController extends BaseController {
         if(StringUtils.isNotBlank(getLang())){
             param.setLang(getLang());
         }
+        param.setTimeZone(getTimeZone());
         sceneCooperationService.saveBatchCooperation(param,username);
         return Result.success();
     }

+ 6 - 4
src/main/java/com/fdkankan/ucenter/controller/app/SceneApiController.java

@@ -34,6 +34,7 @@ import java.io.File;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.*;
+import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import lombok.extern.slf4j.Slf4j;
@@ -163,12 +164,13 @@ public class SceneApiController extends BaseController {
         BeanUtils.copyProperties(user,ssoUser);
 
         if(!ssoUser.getId().equals(userId)) {
-            HashMap<String, User> cooMap = cooperationService.getByNumList(Arrays.asList(sceneNum));
-            User cooUser = cooMap.get(sceneNum);
-            if(cooUser == null ){
+            HashMap<String, List<User>> cooMap = cooperationService.getByNumList(Arrays.asList(sceneNum));
+            List<User> cooUsers = cooMap.get(sceneNum);
+            if(cooUsers == null || cooUsers.isEmpty()){
                 throw new BusinessException(SceneConstant.FAILURE_CODE_5014, SceneConstant.FAILURE_MSG_5014);
             }
-            if(cooUser.getId().longValue() != ssoUser.getId().longValue()){
+            List<Long> collect = cooUsers.stream().map(User::getId).collect(Collectors.toList());
+            if(!collect.contains(ssoUser.getId())){
                 throw new BusinessException(SceneConstant.FAILURE_CODE_5014, SceneConstant.FAILURE_MSG_5014);
             }
 

+ 67 - 0
src/main/java/com/fdkankan/ucenter/entity/Product.java

@@ -0,0 +1,67 @@
+package com.fdkankan.ucenter.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+@Getter
+@Setter
+@TableName("t_product")
+public class Product implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("type_key")
+    private String typeKey;
+
+    @TableField("name")
+    private String name;
+
+    /**
+     * 单价
+     */
+    @TableField("price")
+    private BigDecimal price;
+
+    /**
+     * 限购数量
+     */
+    @TableField("limit_count")
+    private Integer limitCount;
+
+    /**
+     * 免费数量
+     */
+    @TableField("free_count")
+    private Integer freeCount;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 48 - 0
src/main/java/com/fdkankan/ucenter/entity/ProductCooperation.java

@@ -0,0 +1,48 @@
+package com.fdkankan.ucenter.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+@Getter
+@Setter
+@TableName("t_product_cooperation")
+public class ProductCooperation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("order_id")
+    private Integer orderId;
+
+    @TableField("cooperation_user_id")
+    private Integer cooperationUserId;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 106 - 0
src/main/java/com/fdkankan/ucenter/entity/ProductOrder.java

@@ -0,0 +1,106 @@
+package com.fdkankan.ucenter.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+@Getter
+@Setter
+@TableName("t_product_order")
+public class ProductOrder implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("product_id")
+    private Integer productId;
+
+    /**
+     * 订单号
+     */
+    @TableField("order_sn")
+    private String orderSn;
+
+    @TableField("amount")
+    private BigDecimal amount;
+
+    /**
+     * 支付宝的交易号或者微信支付订单号
+     */
+    @TableField("number")
+    private String number;
+
+    /**
+     * 付款方式,0表示微信,1表示支付宝,2表示paypal,3表示其他
+     */
+    @TableField("pay_type")
+    private Integer payType;
+
+    /**
+     * 状态,0或-1表示未付款,-2表示已退款,1表示已付款
+     */
+    @TableField("pay_status")
+    private Integer payStatus;
+
+    /**
+     * 交易时间
+     */
+    @TableField("trade_time")
+    private Date tradeTime;
+
+    /**
+     * 用户表t_user的id
+     */
+    @TableField("user_id")
+    private Long userId;
+
+    /**
+     * 购买数量
+     */
+    @TableField("count")
+    private Integer count;
+
+    /**
+     * 创建时间
+     */
+    @TableField("create_time")
+    private Date createTime;
+
+    /**
+     * 记录的状态,A: 生效,I: 禁用
+     */
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    /**
+     * 更新时间
+     */
+    @TableField("update_time")
+    private Date updateTime;
+
+    /**
+     * 时区差,单位分钟
+     */
+    @TableField("time_zone_off")
+    private Integer timeZoneOff;
+
+
+}

+ 1 - 1
src/main/java/com/fdkankan/ucenter/generate/AutoGenerate.java

@@ -18,7 +18,7 @@ public class AutoGenerate {
         String path =System.getProperty("user.dir") ;
 
         generate(path,"ucenter", getTables(new String[]{
-                "t_scene_not_display",
+                "t_product","t_product_order","t_product_cooperation"
         }));
 
 //        generate(path,"goods", getTables(new String[]{

+ 1 - 1
src/main/java/com/fdkankan/ucenter/httpClient/param/PayGoods.java

@@ -7,7 +7,7 @@ public class PayGoods {
     private String name;
     private Integer count;
     private String sceneNum;
-    private Integer type;   //0专业会员,1高级会员,2下载,3配件
+    private Integer type;   //0专业会员,1高级会员,2下载,3配件,4协作订单
     private Integer goodsId;
     private Integer monthQy = 1;
     private String nameEn;

+ 18 - 0
src/main/java/com/fdkankan/ucenter/mapper/IProductCooperationMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.mapper;
+
+import com.fdkankan.ucenter.entity.ProductCooperation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+@Mapper
+public interface IProductCooperationMapper extends BaseMapper<ProductCooperation> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/ucenter/mapper/IProductMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.mapper;
+
+import com.fdkankan.ucenter.entity.Product;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+@Mapper
+public interface IProductMapper extends BaseMapper<Product> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/ucenter/mapper/IProductOrderMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.mapper;
+
+import com.fdkankan.ucenter.entity.ProductOrder;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+@Mapper
+public interface IProductOrderMapper extends BaseMapper<ProductOrder> {
+
+}

+ 16 - 0
src/main/java/com/fdkankan/ucenter/service/IProductCooperationService.java

@@ -0,0 +1,16 @@
+package com.fdkankan.ucenter.service;
+
+import com.fdkankan.ucenter.entity.ProductCooperation;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+public interface IProductCooperationService extends IService<ProductCooperation> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/ucenter/service/IProductOrderService.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.service;
+
+import com.fdkankan.ucenter.entity.ProductOrder;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fdkankan.ucenter.entity.User;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+public interface IProductOrderService extends IService<ProductOrder> {
+
+    ProductOrder createOrder(Integer totalCount, String key, User user,Integer payType,Integer timeZone);
+}

+ 17 - 0
src/main/java/com/fdkankan/ucenter/service/IProductService.java

@@ -0,0 +1,17 @@
+package com.fdkankan.ucenter.service;
+
+import com.fdkankan.ucenter.entity.Product;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+public interface IProductService extends IService<Product> {
+
+    Product getByKey(String key);
+}

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/ISceneCooperationService.java

@@ -37,7 +37,7 @@ public interface ISceneCooperationService extends IService<SceneCooperation> {
 
     List<String> getNumByUserIds(List<Long> userIds);
 
-    HashMap<String, User> getByNumList(List<String> numList);
+    HashMap<String, List<User>> getByNumList(List<String> numList);
 
     SceneCooperation getByNum(String num);
 

+ 20 - 0
src/main/java/com/fdkankan/ucenter/service/impl/ProductCooperationServiceImpl.java

@@ -0,0 +1,20 @@
+package com.fdkankan.ucenter.service.impl;
+
+import com.fdkankan.ucenter.entity.ProductCooperation;
+import com.fdkankan.ucenter.mapper.IProductCooperationMapper;
+import com.fdkankan.ucenter.service.IProductCooperationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+@Service
+public class ProductCooperationServiceImpl extends ServiceImpl<IProductCooperationMapper, ProductCooperation> implements IProductCooperationService {
+
+}

+ 62 - 0
src/main/java/com/fdkankan/ucenter/service/impl/ProductOrderServiceImpl.java

@@ -0,0 +1,62 @@
+package com.fdkankan.ucenter.service.impl;
+
+import com.fdkankan.common.exception.BusinessException;
+import com.fdkankan.ucenter.constant.OrderConstant;
+import com.fdkankan.ucenter.entity.Product;
+import com.fdkankan.ucenter.entity.ProductOrder;
+import com.fdkankan.ucenter.entity.User;
+import com.fdkankan.ucenter.httpClient.param.PayGoods;
+import com.fdkankan.ucenter.httpClient.service.PayService;
+import com.fdkankan.ucenter.httpClient.vo.PayOrderVo;
+import com.fdkankan.ucenter.mapper.IProductOrderMapper;
+import com.fdkankan.ucenter.service.IProductOrderService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.ucenter.service.IProductService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+@Service
+public class ProductOrderServiceImpl extends ServiceImpl<IProductOrderMapper, ProductOrder> implements IProductOrderService {
+
+    @Autowired
+    IProductService productService;
+    @Autowired
+    PayService payService;
+
+    @Override
+    public ProductOrder createOrder(Integer totalCount, String key, User user,Integer payType,Integer timeZone) {
+        ProductOrder productOrder = new ProductOrder();
+
+        Product product = productService.getByKey(key);
+        BigDecimal price = BigDecimal.ZERO;
+        if(product != null){
+            price = product.getPrice();
+            productOrder.setProductId(product.getId());
+        }
+        productOrder.setAmount(price);
+        productOrder.setPayType(payType);
+        productOrder.setUserId(user.getId());
+        productOrder.setCount(totalCount);
+        productOrder.setTimeZoneOff(timeZone);
+
+        PayGoods payGoods = new PayGoods(product.getName(),totalCount,4,1);
+        PayOrderVo payOrderVo = payService.downOrder(price.multiply(new BigDecimal(totalCount)), "cooperationOrder",user.getUserName(),user.getNickName(), Arrays.asList(payGoods),null);
+        if(payOrderVo == null){
+            throw new BusinessException(OrderConstant.FAILURE_CODE_8005,OrderConstant.FAILURE_MSG_8005);
+        }
+        productOrder.setOrderSn(payOrderVo.getOrderSn());
+        this.save(productOrder);
+        return productOrder;
+    }
+}

+ 33 - 0
src/main/java/com/fdkankan/ucenter/service/impl/ProductServiceImpl.java

@@ -0,0 +1,33 @@
+package com.fdkankan.ucenter.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fdkankan.ucenter.entity.Product;
+import com.fdkankan.ucenter.mapper.IProductMapper;
+import com.fdkankan.ucenter.service.IProductService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2025-03-13
+ */
+@Service
+public class ProductServiceImpl extends ServiceImpl<IProductMapper, Product> implements IProductService {
+
+    @Override
+    public Product getByKey(String key) {
+        LambdaQueryWrapper<Product> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(Product::getTypeKey,key);
+        List<Product> list = this.list(wrapper);
+        if(list.isEmpty()){
+            return null;
+        }
+        return list.get(0);
+    }
+}

+ 51 - 9
src/main/java/com/fdkankan/ucenter/service/impl/SceneCooperationServiceImpl.java

@@ -20,6 +20,7 @@ import com.fdkankan.ucenter.vo.request.SceneCooperationParam;
 import com.fdkankan.ucenter.vo.request.SceneParam;
 import com.google.common.collect.Lists;
 import org.apache.commons.lang3.StringUtils;
+import org.opencv.face.Face;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
@@ -225,13 +226,15 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
     }
 
     @Override
-    public void saveBatchCooperation(SceneCooperationParam param, String username) {
+    public void saveBatchCooperation(SceneCooperationParam param, String loginUserName) {
         if(param.getUserNameList() == null || param.getUserNameList().isEmpty() || StringUtils.isEmpty(param.getSceneNum())){
             throw new BusinessException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
         }
-        if(param.getUserName().contains( username)){
+        if(param.getUserName().contains( loginUserName)){
             throw new BusinessException(LoginConstant.FAILURE_CODE_3024, LoginConstant.FAILURE_MSG_3024);
         }
+        User loginUser = userService.getByUserName(loginUserName);
+
         List<User> users = new ArrayList<>();
         for (String userName : param.getUserNameList()) {
             User user = userService.getByUserName(userName);
@@ -242,13 +245,48 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
         }
         String[] nums = param.getSceneNum().split(",");
         List<String> numList =  Arrays.asList(nums);
-        List<ScenePro> proList = sceneProService.getListByNums(numList);
-        List<ScenePlus> plusList = scenePlusService.getListByNums(numList);
-        this.deleteCooperationList(proList,plusList);
 
-        saveCooperationCommon(param,users,proList,plusList);
+        ProductOrder productOrder = checkNeedPay(numList, users, loginUser, param.getPayType(), param.getTimeZone());
+
+        if(productOrder == null){
+            List<ScenePro> proList = sceneProService.getListByNums(numList);
+            List<ScenePlus> plusList = scenePlusService.getListByNums(numList);
+            this.deleteCooperationList(proList,plusList);
+            saveCooperationCommon(param,users,proList,plusList);
+        }
+
+
+
 
     }
+
+    @Autowired
+    IProductOrderService productOrderService;
+
+    private ProductOrder checkNeedPay(List<String> numList, List<User> users,User loginUser,Integer payType,Integer timeZone) {
+        Integer totalCount = 0;
+        HashMap<String, List<User>> map = this.getByNumList(numList);
+        for (String num : map.keySet()) {
+            List<User> users1 = map.get(num);
+            if (users1.isEmpty()){
+                totalCount += users.size() -1 ;
+                continue;
+            }
+            List<Long> collect1 = users1.stream().map(User::getId).collect(Collectors.toList());
+            List<Long> collect2 = users.stream().map(User::getId).collect(Collectors.toList());
+            List<Long> collect = collect2.stream().filter(e -> !collect1.contains(e)).collect(Collectors.toList());
+
+            totalCount += collect.size();
+
+        }
+        if(totalCount <=0){
+            return null;
+        }
+
+        return productOrderService.createOrder(totalCount,"cooperation",loginUser,payType,timeZone);
+
+    }
+
     @Autowired
     LaserService laserService;
 
@@ -311,16 +349,20 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
     }
 
     @Override
-    public HashMap<String, User> getByNumList(List<String> numList) {
+    public HashMap<String, List<User>> getByNumList(List<String> numList) {
         LambdaQueryWrapper<SceneCooperation> wrapper = new LambdaQueryWrapper<>();
         wrapper.in(SceneCooperation::getSceneNum,numList);
         List<SceneCooperation> list = this.list(wrapper);
-        HashMap<String,User> cooMap = new HashMap<>();
+        HashMap<String,List<User>> cooMap = new HashMap<>();
         if(list.size() >0){
             List<Long> userIds = list.parallelStream().map(SceneCooperation::getUserId).collect(Collectors.toList());
             if(userIds.size() >0){
                 HashMap<Long, User> userMap = userService.getByIds(userIds);
-                list.forEach(entity -> cooMap.put(entity.getSceneNum(),userMap.get(entity.getUserId())));
+                for (SceneCooperation entity : list) {
+                    User user = userMap.get(entity.getUserId());
+                    cooMap.computeIfAbsent(entity.getSceneNum(), k -> new ArrayList<>());
+                    cooMap.get(entity.getSceneNum()).add(user);
+                }
             }
         }
         return cooMap;

+ 11 - 7
src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java

@@ -294,6 +294,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         Long space = 0L;
         if (list != null && list.size() > 0){
             for (SimpleSceneVo scenePro : list){
+                if(scenePro.getCompanyId()!=null && scenePro.getCompanyId() == 26L && scenePro.getLocation() != null && scenePro.getLocation() ==7){
+                    continue;
+                }
                 Long sceneSpace  = scenePro.getSpace()== null ? 0 : scenePro.getSpace();
                 if("SP".equals(unit)){
                     sceneSpace = 1L;
@@ -526,13 +529,15 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         //设置协作者信息
         if(sceneVoPage.getRecords().size() >0){
             List<String> numList = sceneVoPage.getRecords().parallelStream().map(SceneVo::getNum).collect(Collectors.toList());
-            HashMap<String,User> cooMap = sceneCooperationService.getByNumList(numList);
+            HashMap<String,List<User>> cooMap = sceneCooperationService.getByNumList(numList);
             for (SceneVo vo : sceneVoPage.getRecords()) {
                 if (StringUtils.isNotBlank(vo.getNum())) {
-                    User userVo = cooMap.get(vo.getNum());
-                    if (userVo != null) {
-                        vo.setCooperationUserId(userVo.getId().toString());
-                        vo.setCooperationUserName(userVo.getUserName());
+                    List<User> userVos = cooMap.get(vo.getNum());
+                    if (userVos != null) {
+                        List<Long> ids = userVos.stream().map(User::getId).collect(Collectors.toList());
+                        List<String> userNameList = userVos.stream().map(User::getUserName).collect(Collectors.toList());
+                        vo.setCooperationUserIdList(ids);
+                        vo.setCooperationUserNameList(userNameList);
                     }
                 }
             }
@@ -1088,8 +1093,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         HashMap<Long, ScenePlusExt> plusMap = scenePlusExtService.getByPlusIds(plusIds);
         for (ScenePlus scenePlus : plusList) {
             ScenePlusExt ext = plusMap.get(scenePlus.getId());
-            if(ext == null || scenePlus.getSceneStatus() !=-2 ||
-                    (cameraDetail.getCompanyId()!=null && cameraDetail.getCompanyId() == 26L && ext.getLocation() != null && ext.getLocation() ==7)){
+            if(ext == null || scenePlus.getSceneStatus() !=-2 ){
                 continue;
             }
             SimpleSceneVo sceneVo = new SimpleSceneVo();

+ 2 - 0
src/main/java/com/fdkankan/ucenter/vo/request/SceneCooperationParam.java

@@ -17,6 +17,8 @@ public class SceneCooperationParam {
     private String resourceIds;
 
     private String lang = "en";
+    private Integer payType;
+    private Integer timeZone;
 
     private List<String> userNameList = new ArrayList<>();
 

+ 4 - 0
src/main/java/com/fdkankan/ucenter/vo/response/SceneVo.java

@@ -6,6 +6,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.util.List;
+
 @Data
 @Builder
 @NoArgsConstructor
@@ -17,6 +19,8 @@ public class SceneVo {
     private String childName;
     private String cooperationUserId;
     private String cooperationUserName;         //协作者
+    private List<Long> cooperationUserIdList;
+    private List<String> cooperationUserNameList;         //协作者
     private Integer isFolder;                   //0 场景,1文件夹
     private String num;
     private String sceneName;

+ 5 - 0
src/main/resources/mapper/ucenter/ProductCooperationMapper.xml

@@ -0,0 +1,5 @@
+<?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.fdkankan.ucenter.mapper.IProductCooperationMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/ucenter/ProductMapper.xml

@@ -0,0 +1,5 @@
+<?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.fdkankan.ucenter.mapper.IProductMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/ucenter/ProductOrderMapper.xml

@@ -0,0 +1,5 @@
+<?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.fdkankan.ucenter.mapper.IProductOrderMapper">
+
+</mapper>