Explorar el Código

Merge branch 'test'

# Conflicts:
#	src/main/java/com/fdkankan/ucenter/service/impl/AppSceneService.java
lyhzzz hace 3 semanas
padre
commit
b24400369c
Se han modificado 23 ficheros con 349 adiciones y 53 borrados
  1. 6 0
      src/main/java/com/fdkankan/ucenter/config/UcenterConfig.java
  2. 35 8
      src/main/java/com/fdkankan/ucenter/controller/ArticleController.java
  3. 21 0
      src/main/java/com/fdkankan/ucenter/controller/FeedbackOptionController.java
  4. 9 6
      src/main/java/com/fdkankan/ucenter/controller/SceneController.java
  5. 13 0
      src/main/java/com/fdkankan/ucenter/entity/Case.java
  6. 69 0
      src/main/java/com/fdkankan/ucenter/entity/FeedbackOption.java
  7. 1 1
      src/main/java/com/fdkankan/ucenter/generate/AutoGenerate.java
  8. 1 0
      src/main/java/com/fdkankan/ucenter/httpClient/param/SSDownSceneParam.java
  9. 4 2
      src/main/java/com/fdkankan/ucenter/httpClient/service/LaserService.java
  10. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/IFeedbackOptionMapper.java
  11. 3 0
      src/main/java/com/fdkankan/ucenter/service/ICaseService.java
  12. 3 3
      src/main/java/com/fdkankan/ucenter/service/IDownService.java
  13. 20 0
      src/main/java/com/fdkankan/ucenter/service/IFeedbackOptionService.java
  14. 1 0
      src/main/java/com/fdkankan/ucenter/service/ISceneCooperationService.java
  15. 1 1
      src/main/java/com/fdkankan/ucenter/service/IUserService.java
  16. 56 0
      src/main/java/com/fdkankan/ucenter/service/impl/CaseServiceImpl.java
  17. 6 23
      src/main/java/com/fdkankan/ucenter/service/impl/DownService.java
  18. 34 0
      src/main/java/com/fdkankan/ucenter/service/impl/FeedbackOptionServiceImpl.java
  19. 9 2
      src/main/java/com/fdkankan/ucenter/service/impl/LoginService.java
  20. 25 0
      src/main/java/com/fdkankan/ucenter/service/impl/SceneCooperationServiceImpl.java
  21. 7 6
      src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java
  22. 2 1
      src/main/java/com/fdkankan/ucenter/service/impl/UserServiceImpl.java
  23. 5 0
      src/main/resources/mapper/ucenter/FeedbackOptionMapper.xml

+ 6 - 0
src/main/java/com/fdkankan/ucenter/config/UcenterConfig.java

@@ -24,4 +24,10 @@ public class UcenterConfig {
 
     @Value("${ucenter.contactUs.emailExTime}")
     private Long emailExTime;
+
+    @Value("${ucenter.register.cooperation-mesh-num: }")
+    private String registerCooperationMeshNum;
+
+    @Value("${ucenter.register.cooperation-laser-num: }")
+    private String registerCooperationLaserNum;
 }

+ 35 - 8
src/main/java/com/fdkankan/ucenter/controller/ArticleController.java

@@ -1,18 +1,24 @@
 package com.fdkankan.ucenter.controller;
 
 
+import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
+import com.fdkankan.ucenter.common.ResultData;
 import com.fdkankan.ucenter.entity.Article;
 import com.fdkankan.ucenter.entity.Case;
 import com.fdkankan.ucenter.service.IArticleService;
 import com.fdkankan.ucenter.service.ICaseService;
+import com.fdkankan.ucenter.service.IFeedbackOptionService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.ObjectUtils;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * <p>
  *  前端控制器
@@ -27,6 +33,8 @@ public class ArticleController extends BaseController {
 
     @Autowired
     ICaseService caseService;
+    @Autowired
+    IFeedbackOptionService feedbackOptionService;
     /**
      * 行业解决方案-案例展示
      */
@@ -44,15 +52,34 @@ public class ArticleController extends BaseController {
         if("zh".equals(lang)){
             lang = "cn";
         }
-        LambdaQueryWrapper<Case> wrapper = new LambdaQueryWrapper<>();
-        if(StringUtils.isNotBlank(caseEntity.getTypeId())){
-            wrapper.eq(Case::getTypeId,caseEntity.getTypeId());
+        caseEntity.setLanguage(lang);
+
+        return Result.success(caseService.allList(caseEntity));
+    }
+
+    @GetMapping("/feedbackOptionList")
+    public Result feedbackOptionList(){
+        Case caseEntity = new Case();
+        String lang = getLang();
+        if("zh".equals(lang)){
+            lang = "cn";
+        }
+        caseEntity.setLanguage(lang);
+        List<Case> cases = caseService.allList(caseEntity);
+        List<Integer> ids = new ArrayList<>();
+        for (Case aCase : cases) {
+            if(StringUtils.isNotBlank(aCase.getFeedbackOptionIds())){
+                JSONArray jsonArray = JSONArray.parseArray(aCase.getFeedbackOptionIds());
+                for (Object object : jsonArray) {
+                    ids.add((Integer) object);
+                }
+            }
         }
-        wrapper.eq(Case::getLanguage,lang);
-        wrapper.eq(Case::getIsPublic,1);
-        wrapper.orderByAsc(Case::getSort);
-        wrapper.orderByAsc(Case::getId);
-        return Result.success(caseService.list(wrapper));
+        if(ids.isEmpty()){
+            return Result.success();
+        }
+
+        return Result.success(feedbackOptionService.listByIds(ids));
     }
 }
 

+ 21 - 0
src/main/java/com/fdkankan/ucenter/controller/FeedbackOptionController.java

@@ -0,0 +1,21 @@
+package com.fdkankan.ucenter.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2025-11-14
+ */
+@RestController
+@RequestMapping("/ucenter/feedbackOption")
+public class FeedbackOptionController {
+
+}
+

+ 9 - 6
src/main/java/com/fdkankan/ucenter/controller/SceneController.java

@@ -169,8 +169,9 @@ public class SceneController extends BaseController {
      * num      场景码
      */
     @GetMapping("/checkDownLoadE57")
-    public Result checkDownLoadE57(@RequestParam(required = false) String num) {
-        return Result.success(downService.checkDownLoadE57(num, getUserName()));
+    public Result checkDownLoadE57(@RequestParam(required = false) String num,
+                                   @RequestParam(required = false) String splitType) {
+        return Result.success(downService.checkDownLoadE57(num,splitType, getUserName()));
     }
 
     /**
@@ -178,8 +179,9 @@ public class SceneController extends BaseController {
      * num      场景码
      */
     @GetMapping("/downSceneE57")
-    public Result downSceneE57(@RequestParam(required = false) String num) {
-        return Result.success(downService.downE57(num, getUserName()));
+    public Result downSceneE57(@RequestParam(required = false) String num,
+                               @RequestParam(required = false) String splitType) {
+        return Result.success(downService.downE57(num,splitType, getUserName()));
     }
 
     /**
@@ -187,8 +189,9 @@ public class SceneController extends BaseController {
      * num      场景码
      */
     @GetMapping("/downloadProcessE57")
-    public Result downloadProcessE57(@RequestParam(required = false) String num) {
-        return Result.success(downService.downloadProcessE57(num, getUserName()));
+    public Result downloadProcessE57(@RequestParam(required = false) String num,
+                                     @RequestParam(required = false) String splitType) {
+        return Result.success(downService.downloadProcessE57(num, splitType,getUserName()));
     }
 
 

+ 13 - 0
src/main/java/com/fdkankan/ucenter/entity/Case.java

@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
+
 import lombok.Getter;
 import lombok.Setter;
 
@@ -46,6 +48,9 @@ public class Case implements Serializable {
     @TableField("icon_ids")
     private String iconIds;
 
+    @TableField("feedback_option_ids")
+    private String feedbackOptionIds;
+
     /**
      * 排序字段
      */
@@ -118,4 +123,12 @@ public class Case implements Serializable {
 
 
 
+    @TableField(exist = false)
+    private Integer iconId;
+
+    @TableField(exist = false)
+    private Integer feedbackOptionId;
+
+    @TableField(exist = false)
+    private List<FeedbackOption> feedbackOptionList;
 }

+ 69 - 0
src/main/java/com/fdkankan/ucenter/entity/FeedbackOption.java

@@ -0,0 +1,69 @@
+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-11-14
+ */
+@Getter
+@Setter
+@TableName("t_feedback_option")
+public class FeedbackOption implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("name_cn")
+    private String nameCn;
+
+    @TableField("name_en")
+    private String nameEn;
+
+    @TableField("type_id")
+    private Integer typeId;
+
+    @TableField("remark")
+    private String remark;
+
+    /**
+     * 1系统预设,0自定义添加
+     */
+    @TableField("is_system")
+    private Integer isSystem;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("sys_user_id")
+    private Integer sysUserId;
+
+    @TableField("ai_option")
+    private String aiOption;
+
+    @TableField("model_api")
+    private String modelApi;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 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_contact_us_scene"
+                "t_feedback_option"
         }));
 
 //        generate(path,"goods", getTables(new String[]{

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

@@ -5,4 +5,5 @@ import lombok.Data;
 @Data
 public class SSDownSceneParam {
     private String sceneCode;
+    private String splitType;
 }

+ 4 - 2
src/main/java/com/fdkankan/ucenter/httpClient/service/LaserService.java

@@ -353,11 +353,12 @@ public class LaserService {
     }
 
 
-    public SSDownSceneVo downE57Status(String num) {
+    public SSDownSceneVo downE57Status(String num,String splitType) {
         try {
             SSDownSceneVo vo ;
             SSDownSceneParam param = new SSDownSceneParam();
             param.setSceneCode(num);
+            param.setSplitType(splitType);
             Result responseEntity = laserClient.downE57Status(param);
             if( responseEntity.getCode() != HttpStatus.OK.value()){
                 log.error("downE57Status-根据场景码获取激光转台下载状态失败:{}",responseEntity);
@@ -377,11 +378,12 @@ public class LaserService {
         return null ;
     }
 
-    public SSDownSceneVo downE57(String num) {
+    public SSDownSceneVo downE57(String num,String splitType) {
         try {
             SSDownSceneVo vo ;
             SSDownSceneParam param = new SSDownSceneParam();
             param.setSceneCode(num);
+            param.setSplitType(splitType);
             Result responseEntity = laserClient.downE57(param);
             if( responseEntity.getCode() != HttpStatus.OK.value()){
                 log.error("downE57-根据场景码获取激光转台下载失败:{}",responseEntity);

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

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

+ 3 - 0
src/main/java/com/fdkankan/ucenter/service/ICaseService.java

@@ -3,6 +3,8 @@ package com.fdkankan.ucenter.service;
 import com.fdkankan.ucenter.entity.Case;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  *  服务类
@@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface ICaseService extends IService<Case> {
 
+    List<Case> allList(Case caseEntity);
 }

+ 3 - 3
src/main/java/com/fdkankan/ucenter/service/IDownService.java

@@ -13,9 +13,9 @@ public interface IDownService {
     DownloadProcessVo downloadProcess(Long userId,String num,Integer isObj);
 
 
-    DownVo checkDownLoadE57(String num,String userName);
+    DownVo checkDownLoadE57(String num,String splitType,String userName);
 
-    DownVo downE57(String num,String userName);
+    DownVo downE57(String num,String splitType,String userName);
 
-    DownloadProcessVo downloadProcessE57(String num,String userName);
+    DownloadProcessVo downloadProcessE57(String num,String splitType,String userName);
 }

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

@@ -0,0 +1,20 @@
+package com.fdkankan.ucenter.service;
+
+import com.fdkankan.ucenter.entity.FeedbackOption;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.HashMap;
+import java.util.HashSet;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2025-11-14
+ */
+public interface IFeedbackOptionService extends IService<FeedbackOption> {
+
+    HashMap<Integer, FeedbackOption> getMapByIds(HashSet<Integer> optionIds);
+}

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

@@ -53,4 +53,5 @@ public interface ISceneCooperationService extends IService<SceneCooperation> {
 
      ProductOrder saveCamera(SceneCooperationParam param, String username);
 
+    void saveByRegister(User register, String registerCooperationMeshNum, String mesh);
 }

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

@@ -24,7 +24,7 @@ public interface IUserService extends IService<User> {
 
     User getByUserName(String phoneNum);
 
-    void register(RegisterParam param);
+    User register(RegisterParam param);
 
     void updatePassword(String phoneNum, String password);
 

+ 56 - 0
src/main/java/com/fdkankan/ucenter/service/impl/CaseServiceImpl.java

@@ -1,11 +1,22 @@
 package com.fdkankan.ucenter.service.impl;
 
+import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fdkankan.ucenter.entity.Case;
+import com.fdkankan.ucenter.entity.FeedbackOption;
 import com.fdkankan.ucenter.mapper.ICaseMapper;
 import com.fdkankan.ucenter.service.ICaseService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.ucenter.service.IFeedbackOptionService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+
 /**
  * <p>
  *  服务实现类
@@ -17,4 +28,49 @@ import org.springframework.stereotype.Service;
 @Service
 public class CaseServiceImpl extends ServiceImpl<ICaseMapper, Case> implements ICaseService {
 
+    @Autowired
+    IFeedbackOptionService feedbackOptionService;
+    @Override
+    public List<Case> allList(Case caseEntity) {
+        LambdaQueryWrapper<Case> wrapper = new LambdaQueryWrapper<>();
+        if(StringUtils.isNotBlank(caseEntity.getTypeId())){
+            wrapper.eq(Case::getTypeId,caseEntity.getTypeId());
+        }
+        if(caseEntity.getIconId() !=null){
+            wrapper.apply("JSON_CONTAINS(icon_ids, '"+caseEntity.getIconId()+"')");
+        }
+        if(caseEntity.getFeedbackOptionId()!=null){
+            wrapper.apply("JSON_CONTAINS(feedback_option_ids, '"+caseEntity.getFeedbackOptionId()+"')");
+        }
+        wrapper.eq(Case::getLanguage,caseEntity.getLanguage());
+        wrapper.eq(Case::getIsPublic,1);
+        wrapper.orderByAsc(Case::getSort);
+        wrapper.orderByAsc(Case::getId);
+        List<Case> list = this.list(wrapper);
+        HashSet<Integer> feedIds = new HashSet<>();
+        for (Case aCase : list) {
+            if(StringUtils.isNotBlank(aCase.getFeedbackOptionIds())){
+                JSONArray jsonArray = JSONArray.parseArray(aCase.getFeedbackOptionIds());
+                for (Object object : jsonArray) {
+                    feedIds.add((Integer) object);
+                }
+            }
+        }
+        HashMap<Integer, FeedbackOption> mapByIds = feedbackOptionService.getMapByIds(feedIds);
+        for (Case aCase : list) {
+            if(StringUtils.isNotBlank(aCase.getFeedbackOptionIds())){
+                JSONArray jsonArray = JSONArray.parseArray(aCase.getFeedbackOptionIds());
+                List<FeedbackOption> options = new ArrayList<>();
+                for (Object object : jsonArray) {
+                    FeedbackOption feedbackOption = mapByIds.get((Integer) object);
+                    if(feedbackOption!=null){
+                        options.add(feedbackOption);
+                    }
+                }
+                aCase.setFeedbackOptionList(options);
+            }
+        }
+
+        return list;
+    }
 }

+ 6 - 23
src/main/java/com/fdkankan/ucenter/service/impl/DownService.java

@@ -340,11 +340,11 @@ public class DownService implements IDownService {
     ISceneColdStorageService sceneColdStorageService;
 
     @Override
-    public DownVo checkDownLoadE57(String num,String userName) {
+    public DownVo checkDownLoadE57(String num,String splitType,String userName) {
         checkPerm(num,userName);
 
         DownVo downVo = new DownVo();
-        SSDownSceneVo vo = laserService.downE57Status(num);
+        SSDownSceneVo vo = laserService.downE57Status(num,splitType);
         if(vo == null){
             throw new BusinessException(ResultCodeMsg.FAILURE_CODE_400003, ResultCodeMsg.FAILURE_MSG_400003);
         }
@@ -411,7 +411,7 @@ public class DownService implements IDownService {
     }
 
     @Override
-    public synchronized DownVo downE57(String num,String userName) {
+    public synchronized DownVo downE57(String num,String splitType,String userName) {
         DownVo downVo = new DownVo();
         downVo.setDownloadStatus(1);
         if(redisUtil.hasKey(String.format(RedisKeyUtil.downE57Key,num))){
@@ -419,7 +419,7 @@ public class DownService implements IDownService {
         }
         checkPerm(num,userName);
         //status :0:正在生成 1,初次生成  2,已经生成直接下载 3,重新生成
-        SSDownSceneVo vo = laserService.downE57(num);
+        SSDownSceneVo vo = laserService.downE57(num,splitType);
         if(vo == null){
             throw new BusinessException(ResultCodeMsg.FAILURE_CODE_400003, ResultCodeMsg.FAILURE_MSG_400003);
         }
@@ -431,10 +431,10 @@ public class DownService implements IDownService {
 
 
     @Override
-    public DownloadProcessVo downloadProcessE57(String num,String userName) {
+    public DownloadProcessVo downloadProcessE57(String num,String splitType,String userName) {
         //checkPerm(num,userName);
         DownloadProcessVo downVo = new DownloadProcessVo();
-        SSDownSceneVo vo = laserService.downE57Status(num);
+        SSDownSceneVo vo = laserService.downE57Status(num,splitType);
         if(vo == null){
             throw new BusinessException(ResultCodeMsg.FAILURE_CODE_400003, ResultCodeMsg.FAILURE_MSG_400003);
         }
@@ -461,21 +461,4 @@ public class DownService implements IDownService {
         return downVo;
     }
 
-    public static void main(String[] args) {
-        /**
-         4dkankan@3dsixty.ch                          c1QRwa..11
-         4dkankan@widdim.com                          NbXL5dxQ@j~T
-         frederic.alcaraz@af3d.fr                     673KKrZN2uGWu
-         julien.cousin@nextiim.com                    a23B45C67
-         mzdjaffardjee@hotmail.fr                     Moufadal2004@
-
-         */
-        System.out.println(SecurityUtil.MD5("\u0017E%&\u0003\u0015ZZEE"));
-        System.out.println(SecurityUtil.MD5(":\u0016,8A\u0010\f%4\u001E\n" +
-                " "));
-        System.out.println(SecurityUtil.MD5("BCG??\u0006.:F\u00013#\u0001"));
-        System.out.println(SecurityUtil.MD5("\u0015FG6@A7BC"));
-        System.out.println(SecurityUtil.MD5("9\u001B\u0001\u0012\u0015\u0010\u0015\u0018FDD@4"));
-        System.out.println(SecurityUtil.MD5("@0?\u0015\u001A?\u0015\u001AEFG"));
-    }
 }

+ 34 - 0
src/main/java/com/fdkankan/ucenter/service/impl/FeedbackOptionServiceImpl.java

@@ -0,0 +1,34 @@
+package com.fdkankan.ucenter.service.impl;
+
+import com.fdkankan.ucenter.entity.FeedbackOption;
+import com.fdkankan.ucenter.mapper.IFeedbackOptionMapper;
+import com.fdkankan.ucenter.service.IFeedbackOptionService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.apache.commons.lang3.ObjectUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2025-11-14
+ */
+@Service
+public class FeedbackOptionServiceImpl extends ServiceImpl<IFeedbackOptionMapper, FeedbackOption> implements IFeedbackOptionService {
+
+    @Override
+    public HashMap<Integer, FeedbackOption> getMapByIds(HashSet<Integer> optionIds) {
+        HashMap<Integer, FeedbackOption> map = new HashMap<>();
+        if(ObjectUtils.isNotEmpty(optionIds)){
+            List<FeedbackOption> feedbackOptions = this.listByIds(optionIds);
+            feedbackOptions.forEach(e -> map.put(e.getId(),e));
+        }
+        return map;
+    }
+}

+ 9 - 2
src/main/java/com/fdkankan/ucenter/service/impl/LoginService.java

@@ -14,6 +14,7 @@ import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.util.RedisUtil;
 import com.fdkankan.ucenter.common.RedisKeyUtil;
 import com.fdkankan.ucenter.common.constants.NacosProperty;
+import com.fdkankan.ucenter.config.UcenterConfig;
 import com.fdkankan.ucenter.constant.LoginConstant;
 import com.fdkankan.ucenter.constant.QrCodeFilePath;
 import com.fdkankan.ucenter.entity.Camera;
@@ -30,6 +31,7 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
+import io.netty.util.internal.UnstableApi;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -60,6 +62,10 @@ public class LoginService {
     private FYunFileServiceInterface fYunFileServiceInterface;
     @Autowired
     private IMailTemplateService mailTemplateService;
+    @Autowired
+    UcenterConfig ucenterConfig;
+    @Autowired
+    ISceneCooperationService sceneCooperationService;
 
 
     public LoginVo login(User user){
@@ -189,8 +195,9 @@ public class LoginService {
             throw new BusinessException(LoginConstant.FAILURE_CODE_3008, LoginConstant.FAILURE_MSG_3008);
         }
         param.setPassword(password);
-        userService.register(param);
-
+        User register = userService.register(param);
+        sceneCooperationService.saveByRegister(register,ucenterConfig.getRegisterCooperationMeshNum(),"mesh");
+        sceneCooperationService.saveByRegister(register,ucenterConfig.getRegisterCooperationLaserNum(),"laser");
     }
 
     public JSONObject createLoginQrCode() throws Exception {

+ 25 - 0
src/main/java/com/fdkankan/ucenter/service/impl/SceneCooperationServiceImpl.java

@@ -659,4 +659,29 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
     public Object cooperationSceneList(SceneParam param, String username) {
         return null;
     }
+
+
+    @Override
+    public void saveByRegister(User register, String registerCooperationNum, String sceneType) {
+        if(StringUtils.isNotBlank(registerCooperationNum)){
+            List<SceneCooperation> list = new ArrayList<>();
+            String[] split = registerCooperationNum.split(",");
+            for (String num : split) {
+                SceneCooperation sceneCooperation = new SceneCooperation();
+                sceneCooperation.setSceneNum(num);
+                sceneCooperation.setUserId(register.getId());
+                sceneCooperation.setSceneType(sceneType);
+                list.add(sceneCooperation);
+
+            }
+            if(!list.isEmpty()){
+                this.saveBatch(list);
+            }
+            if("laser".equals(sceneType)){
+                List<String> collect = list.stream().map(SceneCooperation::getSceneNum).collect(Collectors.toList());
+                laserService.saveBatchCooperation(collect,new ArrayList<>(),Arrays.asList(register.getUserName()),"scene","add");
+
+            }
+        }
+    }
 }

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

@@ -167,10 +167,11 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
 
         SceneEnum[] values = SceneEnum.values();
         for (SceneEnum sceneEnum : values) {
-            if(sceneEnum.getObj() == 0){
-                SceneNumVo sceneNumVo1 = fdkkLaserService.getLaserSceneNumByUser(token, sceneEnum.getSceneSource().get(0));
-                hashMap.put(sceneEnum.getName(),sceneNumVo1);
-            }else  if(sceneEnum.getName().equals("kk")){
+//            if(sceneEnum.getObj() == 0){
+//                SceneNumVo sceneNumVo1 = fdkkLaserService.getLaserSceneNumByUser(token, sceneEnum.getSceneSource().get(0));
+//                hashMap.put(sceneEnum.getName(),sceneNumVo1);
+//            }
+            if(sceneEnum.getName().equals("kk")){
                 SceneNumVo sceneNumVo = new SceneNumVo();
                 sceneNumVo.setSceneNum(Long.valueOf(count));
                 hashMap.put(sceneEnum.getName(),sceneNumVo);
@@ -181,8 +182,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         }
 
         for (SceneNumVo vo : groupBySceneSouceV4) {
-                SceneEnum sceneEnum = SceneEnum.getBySceneSource(vo.getType(), vo.getIsObj());
-            if(sceneEnum == null || sceneEnum.getObj() ==0){
+            SceneEnum sceneEnum = SceneEnum.getBySceneSource(vo.getType(), vo.getIsObj());
+            if(sceneEnum == null ){
                 continue;
             }
             SceneNumVo sceneNumVo = hashMap.get(sceneEnum.getName());

+ 2 - 1
src/main/java/com/fdkankan/ucenter/service/impl/UserServiceImpl.java

@@ -101,7 +101,7 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
     }
 
     @Override
-    public void register(RegisterParam param) {
+    public User register(RegisterParam param) {
         User userEntity = new User();
         userEntity.setPassword(SecurityUtil.MD5(param.getPassword()));
         userEntity.setEmail(param.getEmail());
@@ -116,6 +116,7 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
         userEntity.setUpdateTime(DateUserUtil.getDate(new Date()));
         userEntity.setAgentKey(param.getAgentKey());
         this.save(userEntity);
+        return userEntity;
     }
 
     @Override

+ 5 - 0
src/main/resources/mapper/ucenter/FeedbackOptionMapper.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.IFeedbackOptionMapper">
+
+</mapper>