zhijiezhao 2 years ago
parent
commit
e0a55691cd

+ 25 - 22
src/main/java/com/caimei/controller/admin/auth/AuthProductApi.java

@@ -29,6 +29,7 @@ import java.util.Map;
 
 
 /**
 /**
  * 授权商品API
  * 授权商品API
+ *
  * @author Aslee
  * @author Aslee
  * @date 2021/5/17
  * @date 2021/5/17
  */
  */
@@ -84,7 +85,7 @@ public class AuthProductApi {
     /**
     /**
      * 1.7.4:
      * 1.7.4:
      * 新加获取关联机构下的sn码
      * 新加获取关联机构下的sn码
-     * **/
+     **/
     @ApiOperation("供应商下审核通过设备sn码列表")
     @ApiOperation("供应商下审核通过设备sn码列表")
     @ApiImplicitParam(name = "authId", required = true, value = "授权id")
     @ApiImplicitParam(name = "authId", required = true, value = "授权id")
     @GetMapping("/sn/listSn")
     @GetMapping("/sn/listSn")
@@ -108,7 +109,7 @@ public class AuthProductApi {
     @ApiOperation("更新授权商品状态")
     @ApiOperation("更新授权商品状态")
     @ApiImplicitParam(name = "params", value = "productId:授权商品id;status:上线状态:0已下线,1已上线,2待上线", required = true)
     @ApiImplicitParam(name = "params", value = "productId:授权商品id;status:上线状态:0已下线,1已上线,2待上线", required = true)
     @PostMapping("/update/status")
     @PostMapping("/update/status")
-    public ResponseJson updateProductStatus(@RequestBody Map<String,Integer> params) {
+    public ResponseJson updateProductStatus(@RequestBody Map<String, Integer> params) {
         Integer productId = params.get("productId");
         Integer productId = params.get("productId");
         Integer status = params.get("status");
         Integer status = params.get("status");
         return authProductService.updateProductStatus(productId, status);
         return authProductService.updateProductStatus(productId, status);
@@ -120,26 +121,27 @@ public class AuthProductApi {
     @ApiOperation("删除授权商品")
     @ApiOperation("删除授权商品")
     @ApiImplicitParam(name = "params", value = "productId:授权商品id", required = true)
     @ApiImplicitParam(name = "params", value = "productId:授权商品id", required = true)
     @PostMapping("/delete")
     @PostMapping("/delete")
-    public ResponseJson deleteProduct(@RequestBody Map<String,Integer> params) {
+    public ResponseJson deleteProduct(@RequestBody Map<String, Integer> params) {
         Integer productId = params.get("productId");
         Integer productId = params.get("productId");
         return authProductService.deleteProduct(productId);
         return authProductService.deleteProduct(productId);
     }
     }
 
 
     /**
     /**
      * 添加/编辑授权商品
      * 添加/编辑授权商品
+     *
      * @param productSaveDto {
      * @param productSaveDto {
-     *                   productId              授权商品id
-     *                   authId                 授权id
-     *                   productTypeId          设备分类id
-     *                   snCode                 商品SN码
-     *                   productImage           商品图片
-     *                   certificateImage       授权牌照
-     *                   purchaseWay            购买渠道
-     *                   invoiceImage           发票图片
-     *                   status                 上线状态:0已下线,1已上线,2待上线
-     *                   createBy               创建人id
-     *                   source                 来源:1供应商保存,2机构保存
-     * }
+     *                       productId              授权商品id
+     *                       authId                 授权id
+     *                       productTypeId          设备分类id
+     *                       snCode                 商品SN码
+     *                       productImage           商品图片
+     *                       certificateImage       授权牌照
+     *                       purchaseWay            购买渠道
+     *                       invoiceImage           发票图片
+     *                       status                 上线状态:0已下线,1已上线,2待上线
+     *                       createBy               创建人id
+     *                       source                 来源:1供应商保存,2机构保存
+     *                       }
      */
      */
     @ApiOperation("添加/编辑授权商品")
     @ApiOperation("添加/编辑授权商品")
     @PostMapping("/save")
     @PostMapping("/save")
@@ -151,16 +153,17 @@ public class AuthProductApi {
         productSaveDto.setCreateBy(createBy);
         productSaveDto.setCreateBy(createBy);
         return authProductService.saveProduct(productSaveDto);
         return authProductService.saveProduct(productSaveDto);
     }
     }
+
     @ApiOperation("添加/编辑授权商品(关联机构sn码)")
     @ApiOperation("添加/编辑授权商品(关联机构sn码)")
     @PostMapping("/save/relation")
     @PostMapping("/save/relation")
     public ResponseJson saveProductAndRelaTion(@RequestBody ProductSaveDto productSaveDto) throws IOException {
     public ResponseJson saveProductAndRelaTion(@RequestBody ProductSaveDto productSaveDto) throws IOException {
         List<String> snList = productSaveDto.getSnList();
         List<String> snList = productSaveDto.getSnList();
-        Integer authId=productSaveDto.getAuthId();
-        Integer authType=productSaveDto.getAuthType();
-        if(snList.size()<0){
+        Integer authId = productSaveDto.getAuthId();
+        Integer authType = productSaveDto.getAuthType();
+        if (snList.size() < 0) {
             ResponseJson.error("该机构没有关联其他机构,请先关联机构");
             ResponseJson.error("该机构没有关联其他机构,请先关联机构");
         }
         }
-        return authProductService.saveProductAndRelaTion(authId,snList,authType);
+        return authProductService.saveProductAndRelaTion(authId, snList, authType);
 
 
     }
     }
 
 
@@ -193,7 +196,7 @@ public class AuthProductApi {
      */
      */
     @ApiOperation("更新所有商品的水印图片")
     @ApiOperation("更新所有商品的水印图片")
     @PostMapping("/update/all/watermark")
     @PostMapping("/update/all/watermark")
-    public ResponseJson updateAllWatermark(){
+    public ResponseJson updateAllWatermark() {
         return authProductService.updateAllWaterMark();
         return authProductService.updateAllWaterMark();
     }
     }
 
 
@@ -268,7 +271,7 @@ public class AuthProductApi {
     @ApiOperation("删除设备分类")
     @ApiOperation("删除设备分类")
     @ApiImplicitParam(name = "params", value = "productTypeId:设备分类id", required = true)
     @ApiImplicitParam(name = "params", value = "productTypeId:设备分类id", required = true)
     @PostMapping("/type/delete")
     @PostMapping("/type/delete")
-    public ResponseJson deleteProductType(@RequestBody Map<String,Integer> params) {
+    public ResponseJson deleteProductType(@RequestBody Map<String, Integer> params) {
         Integer productTypeId = params.get("productTypeId");
         Integer productTypeId = params.get("productTypeId");
         if (null == productTypeId) {
         if (null == productTypeId) {
             return ResponseJson.error("参数异常,设备分类id不能为空");
             return ResponseJson.error("参数异常,设备分类id不能为空");
@@ -307,7 +310,7 @@ public class AuthProductApi {
     @ApiOperation("更新设备分类状态")
     @ApiOperation("更新设备分类状态")
     @ApiImplicitParam(name = "params", value = "productTypeId:设备分类id;status:上线状态:0已下线,1已上线,2待上线", required = true)
     @ApiImplicitParam(name = "params", value = "productTypeId:设备分类id;status:上线状态:0已下线,1已上线,2待上线", required = true)
     @PostMapping("/type/update/status")
     @PostMapping("/type/update/status")
-    public ResponseJson updateProductTypeStatus(@RequestBody Map<String,Integer> params) {
+    public ResponseJson updateProductTypeStatus(@RequestBody Map<String, Integer> params) {
         Integer productTypeId = params.get("productTypeId");
         Integer productTypeId = params.get("productTypeId");
         Integer status = params.get("status");
         Integer status = params.get("status");
         if (productTypeId == null) {
         if (productTypeId == null) {

+ 47 - 41
src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java

@@ -60,6 +60,9 @@ public class AuthProductServiceImpl implements AuthProductService {
     @Value("${caimei.imageDomain}")
     @Value("${caimei.imageDomain}")
     private String imageDomain;
     private String imageDomain;
 
 
+    @Value("${caimei.zpapi}")
+    private String zpServer;
+
     private UploadService uploadService;
     private UploadService uploadService;
 
 
     @Value("${spring.profiles.active}")
     @Value("${spring.profiles.active}")
@@ -146,13 +149,12 @@ public class AuthProductServiceImpl implements AuthProductService {
         String productImage = productSaveDto.getProductImage();
         String productImage = productSaveDto.getProductImage();
         String snCode = productSaveDto.getSnCode();
         String snCode = productSaveDto.getSnCode();
         String certificateImage = productSaveDto.getCertificateImage();
         String certificateImage = productSaveDto.getCertificateImage();
-        String authImageLogo=productSaveDto.getAuthImageLogo();
+        String authImageLogo = productSaveDto.getAuthImageLogo();
         Integer certificateImageType = productSaveDto.getCertificateImageType();
         Integer certificateImageType = productSaveDto.getCertificateImageType();
         Integer createBy = productSaveDto.getCreateBy();
         Integer createBy = productSaveDto.getCreateBy();
         String purchaseWay = productSaveDto.getPurchaseWay();
         String purchaseWay = productSaveDto.getPurchaseWay();
         String invoiceImage = productSaveDto.getInvoiceImage();
         String invoiceImage = productSaveDto.getInvoiceImage();
         Integer source = null == productSaveDto.getSource() ? 1 : productSaveDto.getSource();
         Integer source = null == productSaveDto.getSource() ? 1 : productSaveDto.getSource();
-        List<String> snList=productSaveDto.getSnList();
         List<ProductParamPo> paramList = productSaveDto.getParamList();
         List<ProductParamPo> paramList = productSaveDto.getParamList();
         if (null == authId) {
         if (null == authId) {
             return ResponseJson.error("参数异常,请输入授权id", null);
             return ResponseJson.error("参数异常,请输入授权id", null);
@@ -204,7 +206,7 @@ public class AuthProductServiceImpl implements AuthProductService {
                 if (null != productIdBySnCode) {
                 if (null != productIdBySnCode) {
                     return ResponseJson.error("该商品SN码已存在,请重新输入", null);
                     return ResponseJson.error("该商品SN码已存在,请重新输入", null);
                 }
                 }
-            } else if (2 == authType){
+            } else if (2 == authType) {
                 // 关联设备
                 // 关联设备
                 productId = productIdBySnCode;
                 productId = productIdBySnCode;
                 // 检测机构是否已关联该设备
                 // 检测机构是否已关联该设备
@@ -213,7 +215,7 @@ public class AuthProductServiceImpl implements AuthProductService {
                     return ResponseJson.error("不能重复关联同一台设备");
                     return ResponseJson.error("不能重复关联同一台设备");
                 }
                 }
             }
             }
-        }else {
+        } else {
             // 编辑
             // 编辑
             dbRelation = authProductMapper.getProductRelation(relationId, null, null);
             dbRelation = authProductMapper.getProductRelation(relationId, null, null);
             dbProduct = authProductMapper.getProductFormData(relationId);
             dbProduct = authProductMapper.getProductFormData(relationId);
@@ -226,7 +228,7 @@ public class AuthProductServiceImpl implements AuthProductService {
                     if (null != productIdBySnCode && !productIdBySnCode.equals(productId)) {
                     if (null != productIdBySnCode && !productIdBySnCode.equals(productId)) {
                         return ResponseJson.error("该商品SN码已存在,请重新输入", null);
                         return ResponseJson.error("该商品SN码已存在,请重新输入", null);
                     }
                     }
-                } else if (2 == authType){
+                } else if (2 == authType) {
                     productId = productIdBySnCode;
                     productId = productIdBySnCode;
                     // 检测机构是否已关联该设备
                     // 检测机构是否已关联该设备
                     ProductRelationVo productRelation = authProductMapper.getProductRelation(null, productId, authId);
                     ProductRelationVo productRelation = authProductMapper.getProductRelation(null, productId, authId);
@@ -234,7 +236,7 @@ public class AuthProductServiceImpl implements AuthProductService {
                         return ResponseJson.error("不能重复关联同一台设备");
                         return ResponseJson.error("不能重复关联同一台设备");
                     }
                     }
                 }
                 }
-            } else if (2 == dbRelation.getAuthType()){
+            } else if (2 == dbRelation.getAuthType()) {
                 // 原本为关联设备
                 // 原本为关联设备
                 if (1 == authType) {
                 if (1 == authType) {
                     // 设备id为null
                     // 设备id为null
@@ -314,9 +316,9 @@ public class AuthProductServiceImpl implements AuthProductService {
                 authProductMapper.updateProductByProductId(product);
                 authProductMapper.updateProductByProductId(product);
             }
             }
             // 插入机构设备关联关系
             // 插入机构设备关联关系
-             authProductMapper.insertProductRelation(authId, product.getProductId(), authType);
+            authProductMapper.insertProductRelation(authId, product.getProductId(), authType);
             //查询最新关联id
             //查询最新关联id
-            relationId=authProductMapper.getNewestRelationId();
+            relationId = authProductMapper.getNewestRelationId();
         } else {
         } else {
             if (1 == dbRelation.getAuthType()) {
             if (1 == dbRelation.getAuthType()) {
                 // 更新设备
                 // 更新设备
@@ -377,37 +379,38 @@ public class AuthProductServiceImpl implements AuthProductService {
         }
         }
         return ResponseJson.success("保存授权商品成功");
         return ResponseJson.success("保存授权商品成功");
     }
     }
+
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
-    public  ResponseJson saveProductAndRelaTion(Integer authId,List<String> snlist,Integer authType) throws IOException{
+    public ResponseJson saveProductAndRelaTion(Integer authId, List<String> snlist, Integer authType) throws IOException {
         //判断机构关联id是否有值(有则机构关联关联了其他机构属于新增操作,无则属于编辑操作)
         //判断机构关联id是否有值(有则机构关联关联了其他机构属于新增操作,无则属于编辑操作)
         String relaId = authProductMapper.getRelationId(authId);
         String relaId = authProductMapper.getRelationId(authId);
-        List<Integer>  listSnId=new ArrayList<>();
-        if(null!=relaId&&!"".equals(relaId)){
+        List<Integer> listSnId = new ArrayList<>();
+        if (null != relaId && !"".equals(relaId)) {
             //根据sn码获取产品id
             //根据sn码获取产品id
-            for(int i=0;i<snlist.size();i++){
+            for (int i = 0; i < snlist.size(); i++) {
                 List<ProductPo> List = authProductMapper.getSnList(snlist.get(i));
                 List<ProductPo> List = authProductMapper.getSnList(snlist.get(i));
                 //判断本身机构下的设备和关联机构下 设备有不有重复的
                 //判断本身机构下的设备和关联机构下 设备有不有重复的
-                if(List.get(0).getAuthId()!=authId){
+                if (!List.get(0).getAuthId().equals(authId)) {
                     listSnId.add(List.get(0).getProductId());
                     listSnId.add(List.get(0).getProductId());
                 }
                 }
             }
             }
             //根据产品id插入机构设备关联关系
             //根据产品id插入机构设备关联关系
-            for(int i=0;i<snlist.size();i++){
+            for (int i = 0; i < snlist.size(); i++) {
                 authProductMapper.insertProductRelation(authId, listSnId.get(i), authType);
                 authProductMapper.insertProductRelation(authId, listSnId.get(i), authType);
             }
             }
             return ResponseJson.success("保存授权商品成功");
             return ResponseJson.success("保存授权商品成功");
-        }else{
+        } else {
             //根据sn码获取产品id
             //根据sn码获取产品id
-            for(int i=0;i<snlist.size();i++){
+            for (int i = 0; i < snlist.size(); i++) {
                 List<ProductPo> List = authProductMapper.getSnList(snlist.get(i));
                 List<ProductPo> List = authProductMapper.getSnList(snlist.get(i));
                 //判断本身机构下的设备和关联机构下 设备有不有重复的
                 //判断本身机构下的设备和关联机构下 设备有不有重复的
-                if(List.get(0).getAuthId()!=authId){
+                if (!List.get(0).getAuthId().equals(authId)) {
                     listSnId.add(List.get(0).getProductId());
                     listSnId.add(List.get(0).getProductId());
                 }
                 }
             }
             }
             //根据产品id插入机构设备关联关系
             //根据产品id插入机构设备关联关系
-            for(int i=0;i<snlist.size();i++){
+            for (int i = 0; i < snlist.size(); i++) {
                 authProductMapper.insertProductRelation(authId, listSnId.get(i), authType);
                 authProductMapper.insertProductRelation(authId, listSnId.get(i), authType);
             }
             }
             return ResponseJson.success("保存授权商品成功");
             return ResponseJson.success("保存授权商品成功");
@@ -440,6 +443,7 @@ public class AuthProductServiceImpl implements AuthProductService {
         }
         }
         return null;
         return null;
     }
     }
+
     public String generateAuthImageLogo(TemplateVo authTemplate, ProductFormVo product) {
     public String generateAuthImageLogo(TemplateVo authTemplate, ProductFormVo product) {
         if (null != authTemplate) {
         if (null != authTemplate) {
             // 根据模板id设置相关数据
             // 根据模板id设置相关数据
@@ -467,7 +471,7 @@ public class AuthProductServiceImpl implements AuthProductService {
         return null;
         return null;
     }
     }
 
 
-    private Map<String,Object> getTemplateInfo(TemplateVo template, ProductFormVo product) {
+    private Map<String, Object> getTemplateInfo(TemplateVo template, ProductFormVo product) {
         HashMap<String, Object> map = new HashMap<>();
         HashMap<String, Object> map = new HashMap<>();
         Integer templateId = template.getTemplateId();
         Integer templateId = template.getTemplateId();
         if (1 == templateId) {
         if (1 == templateId) {
@@ -514,7 +518,8 @@ public class AuthProductServiceImpl implements AuthProductService {
             }
             }
             // 添加二维码信息
             // 添加二维码信息
             if (StringUtils.isNotEmpty(template.getQrPosition())) {
             if (StringUtils.isNotEmpty(template.getQrPosition())) {
-                String qrCodeLink = wwwServer + "/product/auth/product-" + product.getProductId() + ".html";
+                String authUserId = authMapper.getauthUserId(product.getAuthId());
+                String qrCodeLink = zpServer + "/" + authUserId + "/" + authMapper.getPrefix(Integer.valueOf(authUserId)) + "/approve/device/detail?id=" + product.getProductId();
                 map.put("addQr1_link", qrCodeLink);
                 map.put("addQr1_link", qrCodeLink);
                 map.put("addQr1_size", template.getQrSize());
                 map.put("addQr1_size", template.getQrSize());
                 String[] split = template.getQrPosition().split(",");
                 String[] split = template.getQrPosition().split(",");
@@ -527,7 +532,7 @@ public class AuthProductServiceImpl implements AuthProductService {
         return map;
         return map;
     }
     }
 
 
-    private Map<String,Object> getTemplateLogoInfo(TemplateVo template, ProductFormVo product) {
+    private Map<String, Object> getTemplateLogoInfo(TemplateVo template, ProductFormVo product) {
         HashMap<String, Object> map = new HashMap<>();
         HashMap<String, Object> map = new HashMap<>();
         Integer templateId = template.getTemplateId();
         Integer templateId = template.getTemplateId();
         if (1 == templateId) {
         if (1 == templateId) {
@@ -591,7 +596,7 @@ public class AuthProductServiceImpl implements AuthProductService {
         return map;
         return map;
     }
     }
 
 
-    private String addWaterMark(String image,Integer type) throws IOException {
+    private String addWaterMark(String image, Integer type) throws IOException {
         //type:1pc,2applets
         //type:1pc,2applets
         ClassPathResource classPathResource = new ClassPathResource("/images/newPcWaterMark.png");
         ClassPathResource classPathResource = new ClassPathResource("/images/newPcWaterMark.png");
         InputStream inputStreamImg = classPathResource.getInputStream();
         InputStream inputStreamImg = classPathResource.getInputStream();
@@ -640,8 +645,8 @@ public class AuthProductServiceImpl implements AuthProductService {
             paramList = authProductMapper.getParamsByProductId(productForm.getProductId());
             paramList = authProductMapper.getParamsByProductId(productForm.getProductId());
         }
         }
         productForm.setParamList(paramList);
         productForm.setParamList(paramList);
-        if(null!=productForm){
-            SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
+        if (null != productForm) {
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
             String authDate = simpleDateFormat.format(productForm.getAuthDates());
             String authDate = simpleDateFormat.format(productForm.getAuthDates());
             productForm.setAuthDate(authDate);
             productForm.setAuthDate(authDate);
         }
         }
@@ -656,7 +661,7 @@ public class AuthProductServiceImpl implements AuthProductService {
     @Override
     @Override
     public ResponseJson updateAllWaterMark() {
     public ResponseJson updateAllWaterMark() {
         List<ProductPo> productList = authProductMapper.getAllImage();
         List<ProductPo> productList = authProductMapper.getAllImage();
-        productList.forEach(product->{
+        productList.forEach(product -> {
             try {
             try {
                 if (StringUtils.isNotEmpty(product.getImage())) {
                 if (StringUtils.isNotEmpty(product.getImage())) {
                     //商品图片添加水印
                     //商品图片添加水印
@@ -770,7 +775,7 @@ public class AuthProductServiceImpl implements AuthProductService {
         }
         }
         PageHelper.startPage(pageNum, pageSize);
         PageHelper.startPage(pageNum, pageSize);
         List<WxProductListVo> productList = authProductMapper.getWxProductList(listType, authId, authParty, productTypeId, snCode);
         List<WxProductListVo> productList = authProductMapper.getWxProductList(listType, authId, authParty, productTypeId, snCode);
-        productList.forEach(product->{
+        productList.forEach(product -> {
             List<WxClubListVo> clubList = authProductMapper.getProductClubList(product.getProductId());
             List<WxClubListVo> clubList = authProductMapper.getProductClubList(product.getProductId());
             product.setClubList(clubList);
             product.setClubList(clubList);
         });
         });
@@ -833,8 +838,8 @@ public class AuthProductServiceImpl implements AuthProductService {
             // 创建时间
             // 创建时间
             productType.setCreateTime(new Date());
             productType.setCreateTime(new Date());
             // 设备分类图片添加水印
             // 设备分类图片添加水印
-            productType.setPcImage(addWaterMark(productType.getImage(),1));
-            productType.setAppletsImage(addWaterMark(productType.getImage(),2));
+            productType.setPcImage(addWaterMark(productType.getImage(), 1));
+            productType.setAppletsImage(addWaterMark(productType.getImage(), 2));
             // 插入设备分类
             // 插入设备分类
             authProductMapper.insertProductType(productType);
             authProductMapper.insertProductType(productType);
         } else {
         } else {
@@ -892,16 +897,16 @@ public class AuthProductServiceImpl implements AuthProductService {
         List<ProductTypeListVo> productList = authProductMapper.getProductTypeList(listType, authUserId, name, status, auditStatus);
         List<ProductTypeListVo> productList = authProductMapper.getProductTypeList(listType, authUserId, name, status, auditStatus);
         //如果是手机号则进行脱敏处理
         //如果是手机号则进行脱敏处理
         //手机号脱敏处理(脱敏规则: 保留前三后四, 比如15638296218置换为156****6218)
         //手机号脱敏处理(脱敏规则: 保留前三后四, 比如15638296218置换为156****6218)
-        if(null!=productList&&productList.size()>0){
+        if (null != productList && productList.size() > 0) {
             productList.forEach(authVo -> {
             productList.forEach(authVo -> {
                 //判断是否是手机号
                 //判断是否是手机号
-                String phoneNumber=authVo.getCreateBy();
-                if(StringUtils.isNotEmpty(phoneNumber)){
+                String phoneNumber = authVo.getCreateBy();
+                if (StringUtils.isNotEmpty(phoneNumber)) {
 //                    boolean matches = phoneNumber.matches("^[1][3,4,5,7,8,9][0-9]{9}$");
 //                    boolean matches = phoneNumber.matches("^[1][3,4,5,7,8,9][0-9]{9}$");
 //                    if(matches){
 //                    if(matches){
-                        //脱敏处理
-                            phoneNumber = phoneNumber.replaceAll("(\\w{3})\\w*(\\w{4})", "$1****$2");
-                            authVo.setCreateBy(phoneNumber);
+                    //脱敏处理
+                    phoneNumber = phoneNumber.replaceAll("(\\w{3})\\w*(\\w{4})", "$1****$2");
+                    authVo.setCreateBy(phoneNumber);
 //                    }
 //                    }
                 }
                 }
             });
             });
@@ -954,7 +959,7 @@ public class AuthProductServiceImpl implements AuthProductService {
 
 
     @Override
     @Override
     public ResponseJson<ProductFormVo> getProductInfo(Integer productId, String snCode) {
     public ResponseJson<ProductFormVo> getProductInfo(Integer productId, String snCode) {
-        ProductFormVo product =  authProductMapper.getProductInfo(productId, snCode);
+        ProductFormVo product = authProductMapper.getProductInfo(productId, snCode);
         if (null == product) {
         if (null == product) {
             return ResponseJson.error(-1, "设备SN码不存在", null);
             return ResponseJson.error(-1, "设备SN码不存在", null);
         }
         }
@@ -972,7 +977,7 @@ public class AuthProductServiceImpl implements AuthProductService {
         //获取该机构下所有的sn码
         //获取该机构下所有的sn码
         List<Integer> liallSn = authProductMapper.getAllSn(authId);
         List<Integer> liallSn = authProductMapper.getAllSn(authId);
         List<String> allSnlist = authProductMapper.getAllSnlist(liallSn);
         List<String> allSnlist = authProductMapper.getAllSnlist(liallSn);
-        List<String> snCodeList = authProductMapper.getSnCodeList(authUserId, authId,allSnlist);
+        List<String> snCodeList = authProductMapper.getSnCodeList(authUserId, authId, allSnlist);
         return ResponseJson.success(snCodeList);
         return ResponseJson.success(snCodeList);
     }
     }
 
 
@@ -980,14 +985,14 @@ public class AuthProductServiceImpl implements AuthProductService {
     public ResponseJson<List<String>> getSnCodeList1(Integer authUserId, Integer authId) {
     public ResponseJson<List<String>> getSnCodeList1(Integer authUserId, Integer authId) {
         //判断该机构是否与其他机构关联
         //判断该机构是否与其他机构关联
         String relationId = authProductMapper.getRelationId(authId);
         String relationId = authProductMapper.getRelationId(authId);
-        String[] relationIdList=null;
-        List<String> snCodeList=new ArrayList<>();
-        if (!"".equals(relationId)&&null !=relationId){
+        String[] relationIdList = null;
+        List<String> snCodeList = new ArrayList<>();
+        if (!"".equals(relationId) && null != relationId) {
             relationIdList = relationId.split(",");
             relationIdList = relationId.split(",");
             //获取该机构下所有的sn码
             //获取该机构下所有的sn码
             List<Integer> liallSn = authProductMapper.getAllSn(authId);
             List<Integer> liallSn = authProductMapper.getAllSn(authId);
             List<String> allSnlist = authProductMapper.getAllSnlist(liallSn);
             List<String> allSnlist = authProductMapper.getAllSnlist(liallSn);
-            snCodeList = authProductMapper.getSnCodeList1(authUserId, authId,relationIdList,allSnlist);
+            snCodeList = authProductMapper.getSnCodeList1(authUserId, authId, relationIdList, allSnlist);
         }
         }
         return ResponseJson.success(snCodeList);
         return ResponseJson.success(snCodeList);
 
 
@@ -999,7 +1004,8 @@ public class AuthProductServiceImpl implements AuthProductService {
         return ResponseJson.success();
         return ResponseJson.success();
     }
     }
 
 
-    public ResponseJson<List<ProductListVo>> getPronductInfo( Integer authId,Integer authUserId){
+    @Override
+    public ResponseJson<List<ProductListVo>> getPronductInfo(Integer authId, Integer authUserId) {
         List<ProductListVo> pronductInfo = authProductMapper.getPronductInfo(authId, authUserId);
         List<ProductListVo> pronductInfo = authProductMapper.getPronductInfo(authId, authUserId);
         return ResponseJson.success(pronductInfo);
         return ResponseJson.success(pronductInfo);
     }
     }