Kaynağa Gözat

大屏功能代码提交

user5 1 yıl önce
ebeveyn
işleme
d239a4f96e
23 değiştirilmiş dosya ile 970 ekleme ve 24 silme
  1. 62 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/core/excel/converter/ExcelMerchantProductListDTOConverter.java
  2. 1 1
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/core/excel/converter/ExcelSettledPlatformListDTOConverter.java
  3. 14 8
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/controller/MerchantCompanyController.java
  4. 24 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/controller/MerchantDetailsController.java
  5. 160 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/controller/MerchantProductController.java
  6. 11 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/domain/MerchantCompany.java
  7. 16 1
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/domain/MerchantDetails.java
  8. 40 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/domain/MerchantProduct.java
  9. 13 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/MerchantCompanyMapper.java
  10. 13 1
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/MerchantDetailsMapper.java
  11. 45 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/MerchantProductMapper.java
  12. 25 1
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/xml/MerchantCommanyMapper.xml
  13. 18 1
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/xml/MerchantDetailsMapper.xml
  14. 52 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/xml/MerchantProductMapper.xml
  15. 56 4
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/MerchantCompanyService.java
  16. 71 4
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/MerchantDetailsService.java
  17. 81 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/MerchantProductService.java
  18. 55 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantCompanyDTO.java
  19. 56 2
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantCompanyExportDTO.java
  20. 53 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantCompanyScreenDTO.java
  21. 21 1
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantDetailsDTO.java
  22. 52 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantProductDTO.java
  23. 31 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/mapstuct/MerchantProductWrapper.java

+ 62 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/core/excel/converter/ExcelMerchantProductListDTOConverter.java

@@ -0,0 +1,62 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.test.core.excel.converter;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.data.ReadCellData;
+import com.alibaba.excel.metadata.data.WriteCellData;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+import com.google.common.collect.Lists;
+import com.jeeplus.test.wdt.merchantCompany.domain.MerchantProduct;
+import com.jeeplus.test.wdt.merchantCompany.service.MerchantProductService;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantProductDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.MerchantProductWrapper;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 入驻产品类型转换
+ *
+ * @author jeeplus
+ * @version 2016-03-10
+ */
+
+public class ExcelMerchantProductListDTOConverter implements Converter <List <MerchantProductDTO>> {
+
+    @Override
+    public Class <?> supportJavaTypeKey() {
+        return List.class;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey() {
+        return CellDataTypeEnum.STRING;
+    }
+
+    @Override
+    public List <MerchantProductDTO> convertToJavaData(ReadCellData <?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
+
+        List <MerchantProductDTO> postList = Lists.newArrayList ( );
+        String val = cellData.getStringValue ( );
+        for (String postName : StrUtil.split ( val, "," )) {
+            MerchantProductDTO postDTO = MerchantProductWrapper.INSTANCE.toDTO ( SpringUtil.getBean ( MerchantProductService.class ).lambdaQuery ( ).eq ( MerchantProduct::getName, postName ).one ( ) );
+            postList.add ( postDTO );
+        }
+        return postList.size ( ) > 0 ? postList : null;
+    }
+
+    @Override
+    public WriteCellData <?> convertToExcelData(List <MerchantProductDTO> postDTOList, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
+        List <String> postNames = postDTOList.stream ( ).map ( postDTO -> postDTO.getName ( ) ).collect ( Collectors.toList ( ) );
+        return new WriteCellData <> ( StrUtil.join ( ",", postNames ) );
+    }
+
+
+}
+

+ 1 - 1
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/core/excel/converter/ExcelSettledPlatformListDTOConverter.java

@@ -21,7 +21,7 @@ import java.util.List;
 import java.util.stream.Collectors;
 
 /**
- * 岗位类型转换
+ * 入驻平台类型转换
  *
  * @author jeeplus
  * @version 2016-03-10

+ 14 - 8
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/controller/MerchantCompanyController.java

@@ -9,13 +9,9 @@ import com.jeeplus.core.excel.EasyExcelUtils;
 import com.jeeplus.core.excel.ExcelOptions;
 import com.jeeplus.core.excel.annotation.ExportMode;
 import com.jeeplus.core.query.QueryWrapperGenerator;
-import com.jeeplus.sys.service.dto.UserDTO;
-import com.jeeplus.sys.utils.UserUtils;
 import com.jeeplus.test.utils.excel.MerchantCompanyEasyExcel;
 import com.jeeplus.test.wdt.merchantCompany.service.MerchantCompanyService;
-import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
-import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyExportDTO;
-import com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.*;
 import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.MerchantCompanyWrapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -128,12 +124,13 @@ public class MerchantCompanyController {
         List<MerchantCompanyDTO> list = Lists.newArrayList();
         MerchantCompanyDTO info = new MerchantCompanyDTO();
         info.setCompanyName("测试公司名称");
+        info.setCompanyType("产品加工企业/合作企业");
         info.setLinkmanName("测试联系人名称");
         info.setLinkmanPhone("138xxxx8888");
+        info.setCommerceShop("是/否");
         info.setPractitionerCount(15);
         info.setAnnualSales("100000");
         info.setOnlineRetailSales("200000");
-        info.setSettledPlatformStr("淘宝,抖音(使用英文','隔开)");
         SettledPlatformDTO settledPlatformDTO = new SettledPlatformDTO();
         settledPlatformDTO.setName("抖音");
         SettledPlatformDTO settledPlatformDTO1 = new SettledPlatformDTO();
@@ -142,6 +139,15 @@ public class MerchantCompanyController {
         settledPlatformDTOList.add(settledPlatformDTO);
         settledPlatformDTOList.add(settledPlatformDTO1);
         info.setSettledPlatformDTOList(settledPlatformDTOList);
+
+        MerchantProductDTO merchantProductDTO = new MerchantProductDTO();
+        merchantProductDTO.setName("农产品");
+        MerchantProductDTO merchantProductDTO1 = new MerchantProductDTO();
+        merchantProductDTO1.setName("手工产品");
+        List<MerchantProductDTO> merchantProductDTOList = Lists.newArrayList();
+        merchantProductDTOList.add(merchantProductDTO);
+        merchantProductDTOList.add(merchantProductDTO1);
+        info.setMerchantProductDTOList(merchantProductDTOList);
         list.add (info);
         EasyExcelUtils.newInstance ( merchantCompanyService, merchantCompanyWrapper ).exportExcel ( list,  "入驻商家数据", MerchantCompanyDTO.class, fileName, null, response );
     }
@@ -183,8 +189,8 @@ public class MerchantCompanyController {
     @ApiLog("查询入驻商家列表数据(大屏数据)")
     @ApiOperation(value = "查询入驻商家列表数据(大屏数据)")
     @GetMapping("getListJson")
-    public List<MerchantCompanyDTO> getListJson(MerchantCompanyDTO merchantCompanyDTO) throws Exception {
-        List<MerchantCompanyDTO> result = merchantCompanyService.getListJson (merchantCompanyDTO);
+    public List<MerchantCompanyScreenDTO> getListJson(MerchantCompanyDTO merchantCompanyDTO) throws Exception {
+        List<MerchantCompanyScreenDTO> result = merchantCompanyService.getListJson (merchantCompanyDTO);
         return result;
     }
 

+ 24 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/controller/MerchantDetailsController.java

@@ -85,6 +85,18 @@ public class MerchantDetailsController {
         return ResponseEntity.ok ( "保存入驻详情信息获取方式成功" );
     }
 
+    /**
+     * 保存入驻详情信息获取方式
+     */
+    @ApiLog("保存大屏名称")
+    @ApiOperation(value = "保存大屏名称")
+    @PostMapping("screenSave")
+    public  ResponseEntity <String> screenSave(String screenName) {
+        //新增或编辑表单保存
+        merchantDetailsService.screenSave (screenName);
+        return ResponseEntity.ok ( "保存大屏名称成功" );
+    }
+
 
 
 
@@ -100,5 +112,17 @@ public class MerchantDetailsController {
     }
 
 
+    /**
+     * 查询大屏名称(大屏数据)
+     */
+    @ApiLog("查询大屏名称(大屏数据)")
+    @ApiOperation(value = "查询大屏名称(大屏数据)")
+    @GetMapping("getScreenName")
+    public Map<String,String> getScreenName() {
+        Map<String,String> map = merchantDetailsService.getScreenName ();
+        return map;
+    }
+
+
 
 }

+ 160 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/controller/MerchantProductController.java

@@ -0,0 +1,160 @@
+package com.jeeplus.test.wdt.merchantCompany.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.google.common.collect.Lists;
+import com.jeeplus.aop.logging.annotation.ApiLog;
+import com.jeeplus.test.wdt.merchantCompany.service.MerchantProductService;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantProductDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.MerchantProductWrapper;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 入驻产品controller
+ * @author: 徐滕
+ * @version: 2024-01-04 15:12
+ */
+@Api("入驻产品管理")
+@RestController
+@RequestMapping(value = "/wdt/merchantProduct")
+public class MerchantProductController {
+    @Autowired
+    private MerchantProductService merchantProductService;
+
+    @Autowired
+    private MerchantProductWrapper merchantProductWrapper;
+
+    /**
+     * 入驻产品列表数据
+     */
+    @ApiLog("查询入驻产品列表数据")
+    @ApiOperation(value = "查询入驻产品列表数据")
+    @PreAuthorize("hasAuthority('wdt:merchantProduct:list')")
+    @GetMapping("list")
+    public ResponseEntity<IPage<MerchantProductDTO>> list(MerchantProductDTO merchantProductDTO, Page<MerchantProductDTO> page) throws Exception {
+        IPage<MerchantProductDTO> result = merchantProductService.findPage (page, merchantProductDTO);
+        return ResponseEntity.ok (result);
+    }
+
+    /**
+     * 根据Id获取商家基本信息
+     */
+    @ApiLog("根据Id获取入驻产品基本信息")
+    @ApiOperation(value = "根据Id获取入驻产品基本信息")
+    @PreAuthorize("hasAnyAuthority('wdt:merchantProduct:view','wdt:merchantProduct:add','wdt:merchantProduct:edit')")
+    @GetMapping("queryById")
+    public ResponseEntity<MerchantProductDTO> queryById(String id) {
+        return ResponseEntity.ok ( merchantProductService.findById ( id ) );
+    }
+
+
+
+    /**
+     * 保存请假表单
+     */
+    @ApiLog("保存入驻产品基本信息")
+    @ApiOperation(value = "保存入驻产品基本信息")
+    @PreAuthorize("hasAnyAuthority('wdt:merchantProduct:add','wdt:merchantProduct:edit')")
+    @PostMapping("save")
+    public ResponseEntity<String> save(@Valid @RequestBody MerchantProductDTO merchantProductDTO) {
+        //新增或编辑表单保存
+        merchantProductService.saveOrUpdate (merchantProductWrapper.toEntity (merchantProductDTO));
+        return ResponseEntity.ok ( "保存入驻产品基本信息成功" );
+    }
+
+
+    /**
+     * 删除请假表单
+     */
+    @ApiLog("删除入驻产品基本信息")
+    @ApiOperation(value = "删除入驻产品基本信息")
+    @PreAuthorize("hasAuthority('wdt:merchantProduct:del')")
+    @DeleteMapping("delete")
+    public ResponseEntity <String> delete(String ids) {
+        String idArray[] = ids.split(",");
+        merchantProductService.removeByIds ( Lists.newArrayList ( idArray ) );
+        return ResponseEntity.ok( "删除入驻产品基本信息成功" );
+    }
+
+
+    /**
+     * 查询入驻产品数据(大屏数据)
+     */
+    @ApiLog("查询入驻产品数据(大屏数据)")
+    @ApiOperation(value = "查询入驻产品数据(大屏数据)")
+    @GetMapping("getListJson")
+    public List<Map<String,String>> getListJson(MerchantProductDTO merchantProductDTO) throws Exception {
+        Map<String,Object> map = new HashMap<>();
+        map.put("unit","个");
+        List<Map<String,String>> mapList = Lists.newArrayList();
+        List<MerchantProductDTO> listJson = merchantProductService.getListJson(merchantProductDTO);
+        for (MerchantProductDTO info : listJson) {
+            Map<String,String> mapInfo = new HashMap<>();
+            mapInfo.put("name",info.getName());
+            mapInfo.put("value",info.getSalesVolume());
+            mapList.add(mapInfo);
+        }
+        map.put("data",mapList);
+        return mapList;
+    }
+
+    /**
+     * 查询入驻产品月销售额数据(大屏数据)
+     */
+    @ApiLog("查询入驻产品月销售额数据(大屏数据)")
+    @ApiOperation(value = "查询入驻产品月销售额数据(大屏数据)")
+    @GetMapping("getListMonthJson")
+    public Map<String,Object> getListMonthJson(MerchantProductDTO merchantProductDTO) throws Exception {
+        Map<String,Object> map = new HashMap<>();
+        Map<String,Object> map1 = new HashMap<>();
+
+        List<String> categories = Lists.newArrayList();
+        List<Object> series = Lists.newArrayList();
+
+        List<String> data = Lists.newArrayList();
+
+        List<Map<String,String>> mapList = Lists.newArrayList();
+        List<MerchantProductDTO> listJson = merchantProductService.getListJson(merchantProductDTO);
+        for (MerchantProductDTO info : listJson) {
+            categories.add(info.getName());
+            data.add(info.getMonthlySalesVolume());
+        }
+        map1.put("name","月销售额");
+        map1.put("data",data);
+        series.add(map1);
+        map.put("categories",categories);
+        map.put("series",series);
+        return map;
+    }
+
+    /**
+     * 查询入驻产品销售额数据(大屏数据)
+     */
+    @ApiLog("查询入驻产品销售额数据(大屏数据)")
+    @ApiOperation(value = "查询入驻产品销售额数据(大屏数据)")
+    @GetMapping("getListSaleroomJson")
+    public List<Map<String,String>> getListSaleroomJson(MerchantProductDTO merchantProductDTO) throws Exception {
+        Map<String,Object> map = new HashMap<>();
+        List<Map<String,String>> mapList = Lists.newArrayList();
+        List<MerchantProductDTO> listJson = merchantProductService.getListJson(merchantProductDTO);
+        for (MerchantProductDTO info : listJson) {
+            Map<String,String> mapInfo = new HashMap<>();
+            mapInfo.put("name",info.getName());
+            mapInfo.put("value",info.getSalesVolume());
+            mapInfo.put("url","");
+            mapList.add(mapInfo);
+        }
+        map.put("data",mapList);
+        return mapList;
+    }
+}

+ 11 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/domain/MerchantCompany.java

@@ -1,5 +1,6 @@
 package com.jeeplus.test.wdt.merchantCompany.domain;
 
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jeeplus.core.domain.BaseEntity;
 import lombok.Data;
@@ -23,6 +24,11 @@ public class MerchantCompany extends BaseEntity {
     private String companyName;
 
     /**
+     * 公司类型
+     */
+    private String companyType;
+
+    /**
      * 联系人名称
      */
     private String linkmanName;
@@ -33,6 +39,11 @@ public class MerchantCompany extends BaseEntity {
     private String linkmanPhone;
 
     /**
+     * 是否为电商小铺
+     */
+    private String commerceShop;
+
+    /**
      * 从业人员
      */
     private Integer practitionerCount;

+ 16 - 1
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/domain/MerchantDetails.java

@@ -18,16 +18,26 @@ public class MerchantDetails extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
     /**
-     * 入驻企业数
+     * 入驻企业数(产品加工企业)
      */
     private Integer settledEnterpriseNumber;
 
     /**
+     * 入驻企业数(合作企业)
+     */
+    private Integer cooperativeEnterpriseNumber;
+
+    /**
      * 电商从业人员
      */
     private Integer practitionerCount;
 
     /**
+     * 电商小铺
+     */
+    private Integer commerceShopCount;
+
+    /**
      * 年销售额
      */
     private String annualSales;
@@ -38,6 +48,11 @@ public class MerchantDetails extends BaseEntity {
     private String onlineRetailSales;
 
     /**
+     * 入驻产品种类
+     */
+    private String merchantProductCount;
+
+    /**
      * 抖音入驻商家数
      */
     private String enterNumber;

+ 40 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/domain/MerchantProduct.java

@@ -0,0 +1,40 @@
+package com.jeeplus.test.wdt.merchantCompany.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author: 徐滕
+ * @version: 2024-01-04 14:54
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("merchant_product")
+public class MerchantProduct extends BaseEntity {
+
+    /**
+     * 入驻产品名称
+     */
+    String name;
+    /**
+     * 入驻产品排序
+     */
+    String sort;
+
+    /**
+     * 产品销售量
+     */
+    String salesVolume;
+
+    /**
+     * 产品销售额
+     */
+    String saleroom;
+
+    /**
+     * 产品月销售额
+     */
+    String monthlySalesVolume;
+}

+ 13 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/MerchantCompanyMapper.java

@@ -63,4 +63,17 @@ public interface MerchantCompanyMapper extends BaseMapper<MerchantCompany> {
      * @param settledPlatformId
      */
     void insertSettledPlatform(@Param("id") String id ,@Param("settledPlatformId") String settledPlatformId);
+
+    /**
+     * 根据商户id删除入驻产品信息
+     * @param id
+     */
+    void deleteMerchantProduct(String id);
+
+    /**
+     * 根据商户id和入驻产品id新增数据
+     * @param id
+     * @param merchantProductId
+     */
+    void insertMerchantProduct(@Param("id") String id ,@Param("merchantProductId") String merchantProductId);
 }

+ 13 - 1
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/MerchantDetailsMapper.java

@@ -26,7 +26,7 @@ public interface MerchantDetailsMapper extends BaseMapper<MerchantDetails> {
      * 入驻企业数汇总
      * @return
      */
-    String getSettledEnterpriseNumber();
+    String getSettledEnterpriseNumber(String type);
 
     /**
      * 电商从业人数汇总
@@ -52,4 +52,16 @@ public interface MerchantDetailsMapper extends BaseMapper<MerchantDetails> {
      */
     String getEnterNumber(String settledEnterpriseType);
 
+    /**
+     * 电商小铺汇总
+     * @return
+     */
+    String getCommerceShopCountCount();
+
+    /**
+     * 电商小铺汇总
+     * @return
+     */
+    String getMerchantProductCount();
+
 }

+ 45 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/MerchantProductMapper.java

@@ -0,0 +1,45 @@
+package com.jeeplus.test.wdt.merchantCompany.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.test.wdt.merchantCompany.domain.MerchantProduct;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantProductDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 入驻产品mapper
+ * @author: 徐滕
+ * @version: 2024-01-04 15:59
+ */
+public interface MerchantProductMapper extends BaseMapper<MerchantProduct> {
+
+    /**
+     * 根据id获取入驻产品信息
+     * @param id
+     * @return
+     */
+    MerchantProductDTO findById(String id);
+
+
+    /**
+     * 获取入驻产品表单列表
+     *
+     * @param queryWrapper
+     * @return
+     */
+    IPage<MerchantProductDTO> findList(Page<MerchantProductDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+
+
+    /**
+     * 获取入驻商家表单列表
+     *
+     * @param queryWrapper
+     * @return
+     */
+    List<MerchantProductDTO> getListJson(@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+}

+ 25 - 1
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/xml/MerchantCommanyMapper.xml

@@ -5,16 +5,23 @@
     <resultMap id="merchantCompanyResult" type="com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO">
         <id property="id" column="id"/>
         <result property="companyName" column="companyName"/>
+        <result property="companyType" column="companyType"/>
         <result property="linkmanName" column="linkmanName"/>
         <result property="linkmanPhone" column="linkmanPhone"/>
         <result property="practitionerCount" column="practitionerCount"/>
         <result property="annualSales" column="annualSales"/>
+        <result property="commerceShop" column="commerceShop"/>
         <result property="onlineRetailSales" column="onlineRetailSales"/>
         <collection property="settledPlatformDTOList" javaType="java.util.List" ofType="com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO">
             <id property="id" column="settledPlatformDTO.id"/>
             <result property="name" column="settledPlatformDTO.name"/>
             <result property="sort" column="settledPlatformDTO.sort"/>
         </collection>
+        <collection property="merchantProductDTOList" javaType="java.util.List" ofType="com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantProductDTO">
+            <id property="id" column="merchantProductDTO.id"/>
+            <result property="name" column="merchantProductDTO.name"/>
+            <result property="sort" column="merchantProductDTO.sort"/>
+        </collection>
     </resultMap>
 
     <sql id="merchantCompanyColumns">
@@ -26,10 +33,12 @@
 		a.del_flag AS "delFlag",
 		a.remarks AS "remarks",
         a.company_name AS "companyName",
+        a.company_type AS "companyType",
         a.linkman_name AS "linkmanName",
         a.linkman_phone AS "linkmanPhone",
         a.practitioner_count AS "practitionerCount",
         a.annual_sales AS "annualSales",
+        a.commerce_shop AS "commerceShop",
         a.online_retail_sales AS "onlineRetailSales"
 	</sql>
 
@@ -44,11 +53,17 @@
         <include refid="merchantCompanyColumns"/>
         ,msp.id AS "settledPlatformDTO.id",
         msp.sort AS "settledPlatformDTO.sort",
-        msp.name AS "settledPlatformDTO.name"
+        msp.name AS "settledPlatformDTO.name",
+        mp.id AS "merchantProductDTO.id",
+        mp.sort AS "merchantProductDTO.sort",
+        mp.name AS "merchantProductDTO.name"
         FROM merchant_company_info a
         <include refid="merchantCompanyJoins"/>
         left join merchant_company_occupancy_relation_info mcori on mcori.company_id = a.id
         left join merchant_settled_platform msp on msp.id = mcori.occupancy_id
+
+        left join merchant_company_product_relation_info mcpri on mcpri.company_id = a.id
+        left join merchant_product mp on mp.id = mcpri.product_id
         WHERE a.id = #{id} and a.del_flag = 0
     </select>
 
@@ -90,4 +105,13 @@
         VALUES (#{id}, #{settledPlatformId})
     </insert>
 
+    <delete id="deleteMerchantProduct">
+        delete from merchant_company_product_relation_info where company_id = #{id}
+    </delete>
+
+    <insert id="insertMerchantProduct">
+        INSERT INTO merchant_company_product_relation_info(company_id, product_id)
+        VALUES (#{id}, #{merchantProductId})
+    </insert>
+
 </mapper>

+ 18 - 1
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/xml/MerchantDetailsMapper.xml

@@ -15,6 +15,9 @@
         a.practitioner_count AS "practitionerCount",
         a.annual_sales AS "annualSales",
         a.online_retail_sales AS "onlineRetailSales",
+        a.cooperative_enterprise_number as "cooperativeEnterpriseNumber",
+        a.commerce_shop_count as "commerceShopCount",
+        a.merchant_product_count as "merchantProductCount",
         a.enter_number as "enterNumber"
 	</sql>
 
@@ -32,7 +35,7 @@
     </select>
 
     <select id="getSettledEnterpriseNumber" resultType="java.lang.String">
-        select count(id) from merchant_company_info where del_flag = 0
+        select count(id) from merchant_company_info where del_flag = 0 and company_type = #{type}
     </select>
 
     <select id="getPractitionerCount" resultType="java.lang.String">
@@ -59,4 +62,18 @@
         </where>
     </select>
 
+    <select id="getCommerceShopCountCount" resultType="java.lang.String">
+        select count(id) from merchant_company_info where del_flag = 0 and commerce_shop = 1
+    </select>
+
+    <select id="getMerchantProductCount" resultType="java.lang.String">
+        select count(z.product_id) from (
+            select mcpri.* from merchant_company_product_relation_info mcpri
+
+            left join merchant_company_info a on mcpri.company_id = a.id
+            where a.del_flag = 0
+            group by mcpri.product_id
+        ) z
+    </select>
+
 </mapper>

+ 52 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/xml/MerchantProductMapper.xml

@@ -0,0 +1,52 @@
+<?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.jeeplus.test.wdt.merchantCompany.mapper.MerchantProductMapper">
+
+
+    <sql id="merchantProductColumns">
+		a.id AS "id",
+		a.create_by_id AS "createBy.id",
+		a.create_time AS "createTime",
+		a.update_by_id AS "updateBy.id",
+		a.update_time AS "updateTime",
+		a.del_flag AS "delFlag",
+		a.remarks AS "remarks",
+        a.name AS "name",
+        a.sales_volume AS "salesVolume",
+        a.saleroom AS "saleroom",
+        a.monthly_sales_volume AS "monthlySalesVolume",
+        a.sort AS "sort"
+	</sql>
+
+    <sql id="merchantProductJoins">
+		LEFT JOIN sys_user user ON user.id = a.create_by_id
+	</sql>
+
+
+
+    <select id="findById" resultType="com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantProductDTO">
+        SELECT
+        <include refid="merchantProductColumns"/>
+        FROM merchant_product a
+        <include refid="merchantProductJoins"/>
+        WHERE a.id = #{id} and a.del_flag = 0
+    </select>
+
+    <select id="findList" resultType="com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantProductDTO">
+        SELECT
+        <include refid="merchantProductColumns"/>
+        FROM merchant_product a
+        <include refid="merchantProductJoins"/>
+        ${ew.customSqlSegment}
+    </select>
+
+
+    <select id="getListJson" resultType="com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantProductDTO">
+        SELECT
+        <include refid="merchantProductColumns"/>
+        FROM merchant_product a
+        <include refid="merchantProductJoins"/>
+        ${ew.customSqlSegment}
+    </select>
+
+</mapper>

+ 56 - 4
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/MerchantCompanyService.java

@@ -5,10 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Lists;
 import com.jeeplus.core.query.QueryWrapperGenerator;
 import com.jeeplus.test.wdt.merchantCompany.domain.MerchantCompany;
 import com.jeeplus.test.wdt.merchantCompany.mapper.MerchantCompanyMapper;
 import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyScreenDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantProductDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO;
 import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.MerchantCompanyWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -81,7 +85,7 @@ public class MerchantCompanyService extends ServiceImpl<MerchantCompanyMapper, M
      * @param merchantCompanyDTO
      * @return
      */
-    public List<MerchantCompanyDTO> getListJson(MerchantCompanyDTO merchantCompanyDTO) throws Exception {
+    public List<MerchantCompanyScreenDTO> getListJson(MerchantCompanyDTO merchantCompanyDTO) throws Exception {
         QueryWrapper<MerchantCompany> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( MerchantCompanyWrapper.INSTANCE.toEntity(merchantCompanyDTO), MerchantCompany.class );
 
         queryWrapper.eq ("a.del_flag", 0 ); // 排除已经删除
@@ -119,7 +123,18 @@ public class MerchantCompanyService extends ServiceImpl<MerchantCompanyMapper, M
         if(StringUtils.isNotBlank(merchantCompanyDTO.getSettledPlatformId())){
             queryWrapper.like("mcori.occupancy_id",merchantCompanyDTO.getSettledPlatformId());
         }
-        return  baseMapper.getListJson (queryWrapper);
+        List<MerchantCompanyDTO> listJson = baseMapper.getListJson(queryWrapper);
+
+        List<MerchantCompanyScreenDTO> result = Lists.newArrayList();
+        for (MerchantCompanyDTO companyDTO : listJson) {
+            MerchantCompanyScreenDTO info = new MerchantCompanyScreenDTO();
+            info.setAnnualSales(companyDTO.getAnnualSales());
+            info.setCompanyName(companyDTO.getCompanyName());
+            info.setLinkmanName(companyDTO.getLinkmanName());
+            info.setLinkmanPhone(companyDTO.getLinkmanPhone());
+            result.add(info);
+        }
+        return result;
     }
 
 
@@ -150,6 +165,34 @@ public class MerchantCompanyService extends ServiceImpl<MerchantCompanyMapper, M
      * @param merchantCompanyDTO
      */
     public void saveOrUpdate(MerchantCompanyDTO merchantCompanyDTO) {
+        //处理是否为电商小铺
+        if(StringUtils.isNotBlank(merchantCompanyDTO.getCommerceShop())){
+            switch (merchantCompanyDTO.getCommerceShop()){
+                case "是":
+                    merchantCompanyDTO.setCommerceShop("1");
+                    break;
+                case "否":
+                    merchantCompanyDTO.setCommerceShop("0");
+                    break;
+                default:
+                    merchantCompanyDTO.setCommerceShop("");
+                    break;
+            }
+        }
+        //处理公司类型
+        if(StringUtils.isNotBlank(merchantCompanyDTO.getCompanyType())){
+            switch (merchantCompanyDTO.getCompanyType()){
+                case "产品加工企业":
+                    merchantCompanyDTO.setCompanyType("1");
+                    break;
+                case "合作企业":
+                    merchantCompanyDTO.setCompanyType("2");
+                    break;
+                default:
+                    merchantCompanyDTO.setCompanyType("");
+                    break;
+            }
+        }
         MerchantCompany merchantCompany = merchantCompanyWrapper.toEntity ( merchantCompanyDTO );
         super.saveOrUpdate ( merchantCompany );
         if ( StrUtil.isBlank ( merchantCompanyDTO.getId ( ) ) ) {
@@ -158,12 +201,21 @@ public class MerchantCompanyService extends ServiceImpl<MerchantCompanyMapper, M
         // 更新商户与入驻平台关系
         baseMapper.deleteSettledPlatform ( merchantCompanyDTO.getId ( ) );
         if ( merchantCompanyDTO.getSettledPlatformDTOList ( ) != null ) {
-            merchantCompanyDTO.getSettledPlatformDTOList ( ).forEach ( SettledPlatformDTO -> {
-                baseMapper.insertSettledPlatform ( merchantCompanyDTO.getId ( ), SettledPlatformDTO.getId ( ) );
+            merchantCompanyDTO.getSettledPlatformDTOList ( ).forEach ( settledPlatformDTO -> {
+                baseMapper.insertSettledPlatform ( merchantCompanyDTO.getId ( ), settledPlatformDTO.getId ( ) );
             } );
         } else {
             throw new RuntimeException ( merchantCompanyDTO.getCompanyName() + "没有入驻平台!" );
         }
+        // 更新商户与入驻产品关系
+        baseMapper.deleteMerchantProduct ( merchantCompanyDTO.getId ( ) );
+        if ( merchantCompanyDTO.getMerchantProductDTOList ( ) != null ) {
+            merchantCompanyDTO.getMerchantProductDTOList ( ).forEach ( merchantProductDTO -> {
+                baseMapper.insertMerchantProduct ( merchantCompanyDTO.getId ( ), merchantProductDTO.getId ( ) );
+            } );
+        } else {
+            throw new RuntimeException ( merchantCompanyDTO.getCompanyName() + "没有入驻产品!" );
+        }
     }
 
 }

+ 71 - 4
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/MerchantDetailsService.java

@@ -60,6 +60,17 @@ public class MerchantDetailsService extends ServiceImpl<MerchantDetailsMapper, M
                 }
             }
         }
+        //查询字典中 大屏名称信息
+        List<DictValueDTO> screenNameList = DictUtils.getDictDTOList("merchant_screen_name");
+        if(screenNameList.size()>0){
+            for (DictValueDTO dictValueDTO : screenNameList) {
+                if("name".equals(dictValueDTO.getLabel())){
+                    if(null != limit1){
+                        limit1.setScreenName(dictValueDTO.getValue());
+                    }
+                }
+            }
+        }
         return limit1;
     }
 
@@ -97,6 +108,27 @@ public class MerchantDetailsService extends ServiceImpl<MerchantDetailsMapper, M
     }
 
     /**
+     * 保存或者更新详情信息
+     *
+     * @param screenName
+     */
+    public void screenSave(String screenName) {
+
+
+        //查询字典中数据获取方式并修改
+        List<DictValueDTO> merchantDataSourcesList = DictUtils.getDictDTOList("merchant_screen_name");
+        if(merchantDataSourcesList.size()>0){
+            for (DictValueDTO dictValueDTO : merchantDataSourcesList) {
+                if("name".equals(dictValueDTO.getLabel())){
+                    dictValueDTO.setValue(screenName);
+                    DictValue dictValue = dictValueWrapper.toEntity ( dictValueDTO );
+                    dictTypeService.saveDictValue(dictValue);
+                }
+            }
+        }
+    }
+
+    /**
      * 获取大屏数据并返回
      * @param type 获取数据类型
      * @param settledEnterpriseType 入驻类型
@@ -118,27 +150,39 @@ public class MerchantDetailsService extends ServiceImpl<MerchantDetailsMapper, M
             case "0":   //查询填写值
                 //获取数据信息
                 MerchantDetailsDTO info = this.getLimit1();
-                if ("settledEnterpriseNumber".equals(type)) {   //入驻企业数
+                if ("settledEnterpriseNumber".equals(type)) {   //入驻企业数(产品加工企业)
                     map.put("value",info.getSettledEnterpriseNumber().toString());
+                }else if ("cooperativeEnterpriseNumber".equals(type)) {   //入驻企业数(合作企业)
+                    map.put("value",info.getCooperativeEnterpriseNumber().toString());
                 }else if ("practitionerCount".equals(type)){    //电商从业人数
                     map.put("value",info.getPractitionerCount().toString());
+                }else if ("commerceShopCount".equals(type)){    //电商小铺
+                    map.put("value",info.getCommerceShopCount().toString());
                 }else if ("annualSales".equals(type)){          //年交易额
                     map.put("value",info.getAnnualSales());
                 }else if ("onlineRetailSales".equals(type)){    //网络零售额
                     map.put("value",info.getOnlineRetailSales());
-                }else if ("enterNumber".equals(type)){          //抖音入驻
+                }else if ("merchantProductCount".equals(type)){    //入驻产品种类
+                    map.put("value",info.getMerchantProductCount());
+                }else if ("enterNumber".equals(type)){          //入驻平台
                     map.put("value",info.getEnterNumber());
                 }
                 break;
 
             case "1":   //计算汇总值
 
-                if ("settledEnterpriseNumber".equals(type)) {   //入驻企业数
-                    String settledEnterpriseNumber = baseMapper.getSettledEnterpriseNumber();
+                if ("settledEnterpriseNumber".equals(type)) {   //入驻企业数(产品加工企业)
+                    String settledEnterpriseNumber = baseMapper.getSettledEnterpriseNumber("1");
+                    map.put("value",settledEnterpriseNumber);
+                }else if ("cooperativeEnterpriseNumber".equals(type)) {   //入驻企业数(合作企业)
+                    String settledEnterpriseNumber = baseMapper.getSettledEnterpriseNumber("2");
                     map.put("value",settledEnterpriseNumber);
                 }else if ("practitionerCount".equals(type)){    //电商从业人数
                     String practitionerCount = baseMapper.getPractitionerCount();
                     map.put("value",practitionerCount);
+                }else if ("commerceShopCount".equals(type)){    //电商小铺
+                    String commerceShopCount = baseMapper.getCommerceShopCountCount();
+                    map.put("value",commerceShopCount);
                 }else if ("annualSales".equals(type)){          //年交易额
                     String annualSales = baseMapper.getAnnualSales();
                     BigDecimal bigDecimal = MoneyUtil.toTenThousand(annualSales);
@@ -149,6 +193,9 @@ public class MerchantDetailsService extends ServiceImpl<MerchantDetailsMapper, M
                     BigDecimal bigDecimal = MoneyUtil.toTenThousand(onlineRetailSales);
                     map.put("value",bigDecimal.toString());
 
+                }else if ("merchantProductCount".equals(type)){    //入驻产品种类
+                    String merchantProductCount = baseMapper.getMerchantProductCount();
+                    map.put("value",merchantProductCount);
                 }else if ("enterNumber".equals(type)){          //抖音入驻
                     String enterNumber = baseMapper.getEnterNumber(settledEnterpriseType);
                     map.put("value",enterNumber);
@@ -161,4 +208,24 @@ public class MerchantDetailsService extends ServiceImpl<MerchantDetailsMapper, M
         return map;
     }
 
+
+    /**
+     * 获取大屏名称
+     * @return
+     */
+    public Map<String,String> getScreenName(){
+        Map<String,String> map = new HashMap<>();
+        map.put("value","");
+        //查询字典中 大屏名称信息
+        List<DictValueDTO> screenNameList = DictUtils.getDictDTOList("merchant_screen_name");
+        if(screenNameList.size()>0){
+            for (DictValueDTO dictValueDTO : screenNameList) {
+                if("name".equals(dictValueDTO.getLabel())){
+                    map.put("value",dictValueDTO.getValue());
+                }
+            }
+        }
+        return map;
+    }
+
 }

+ 81 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/MerchantProductService.java

@@ -0,0 +1,81 @@
+/**
+ * Copyright © 2021-2026 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.test.wdt.merchantCompany.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.test.wdt.merchantCompany.domain.MerchantCompany;
+import com.jeeplus.test.wdt.merchantCompany.domain.MerchantProduct;
+import com.jeeplus.test.wdt.merchantCompany.mapper.MerchantProductMapper;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantProductDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.MerchantCompanyWrapper;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.MerchantProductWrapper;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 入驻产品Service
+ * @author 徐滕
+ * @version 2024-01-04 15:18
+ */
+@Service
+@Transactional
+public class MerchantProductService extends ServiceImpl <MerchantProductMapper, MerchantProduct> {
+
+    /**
+     * 自定义分页检索
+     * @param page
+     * @param merchantProductDTO
+     * @return
+     */
+    public IPage<MerchantProductDTO> findPage(Page<MerchantProductDTO> page, MerchantProductDTO merchantProductDTO) throws Exception {
+        QueryWrapper<MerchantProduct> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( MerchantProductWrapper.INSTANCE.toEntity(merchantProductDTO), MerchantProduct.class );
+        queryWrapper.eq ("a.del_flag", 0 ); // 排除已经删除
+        queryWrapper.orderByAsc("a.sort");
+        if(StringUtils.isNotBlank(merchantProductDTO.getName())){
+            queryWrapper.like("a.name",merchantProductDTO.getName());
+        }
+        if (merchantProductDTO.getDates() != null && merchantProductDTO.getDates().length > 0) {
+            if(merchantProductDTO.getDates().length == 1){
+                queryWrapper.ge("a.create_time",merchantProductDTO.getDates()[0]);
+            }else {
+                queryWrapper.between("a.create_time", merchantProductDTO.getDates()[0], merchantProductDTO.getDates()[1]);
+            }
+        }
+        return  baseMapper.findList (page, queryWrapper);
+    }
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    public MerchantProductDTO findById(String id) {
+        return baseMapper.findById ( id );
+    }
+
+
+
+    /**
+     * 自定义分页检索
+     * @param merchantCompanyDTO
+     * @return
+     */
+    public List<MerchantProductDTO> getListJson(MerchantProductDTO merchantProductDTO) throws Exception {
+        QueryWrapper<MerchantProduct> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( MerchantProductWrapper.INSTANCE.toEntity(merchantProductDTO), MerchantProduct.class );
+
+        queryWrapper.eq ("a.del_flag", 0 ); // 排除已经删除
+        queryWrapper.orderByDesc("a.name");
+        return  baseMapper.getListJson (queryWrapper);
+    }
+
+
+}

+ 55 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantCompanyDTO.java

@@ -9,6 +9,7 @@ import com.jeeplus.core.query.Query;
 import com.jeeplus.core.query.QueryType;
 import com.jeeplus.core.service.dto.BaseDTO;
 import com.jeeplus.sys.service.dto.PostDTO;
+import com.jeeplus.test.core.excel.converter.ExcelMerchantProductListDTOConverter;
 import com.jeeplus.test.core.excel.converter.ExcelSettledPlatformListDTOConverter;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -37,6 +38,12 @@ public class MerchantCompanyDTO extends BaseDTO {
     private String companyName;
 
     /**
+     * 公司类型
+     */
+    @ExcelProperty("公司类型")
+    private String companyType;
+
+    /**
      * 联系人名称
      */
     @ExcelProperty("联系人名称")
@@ -51,10 +58,17 @@ public class MerchantCompanyDTO extends BaseDTO {
     /**
      * 从业人员
      */
+    @ExcelIgnore
     @ExcelProperty("从业人员")
     private Integer practitionerCount;
 
     /**
+     * 是否为电商小铺
+     */
+    @ExcelProperty("是否为电商小铺")
+    private String commerceShop;
+
+    /**
      * 年销售额
      */
     @ExcelProperty("年销售额")
@@ -63,6 +77,7 @@ public class MerchantCompanyDTO extends BaseDTO {
     /**
      * 网络零售额
      */
+    @ExcelIgnore
     @ExcelProperty("网络零售额")
     private String onlineRetailSales;
 
@@ -139,4 +154,44 @@ public class MerchantCompanyDTO extends BaseDTO {
             settledPlatformDTOList.add ( postDTO );
         }
     }
+
+    /**
+     * 入驻产品
+     */
+    @ExcelIgnore
+    @Query(type = QueryType.EQ, javaField = "merchantProductDTO.id", tableColumn = "mp.id")
+    private MerchantProductDTO merchantProductDTO;
+
+    /**
+     * 入驻产品列表
+     */
+    @ApiModelProperty(hidden = true)
+    @JsonIgnore
+    @ExcelProperty(value = "入驻产品", converter = ExcelMerchantProductListDTOConverter.class)
+    private List<MerchantProductDTO> merchantProductDTOList = Lists.newArrayList ( );
+
+    /**
+     * 获取包含的入驻产品id列表
+     *
+     * @return
+     */
+    public List <String> getMerchantProductIdList() {
+        if ( settledPlatformDTOList == null ) {
+            return Lists.newArrayList ( );
+        }
+        List <String> merchantProductIdList = merchantProductDTOList.stream ( ).map ( merchantProductDTO -> merchantProductDTO.getId ( ) ).collect ( Collectors.toList ( ) );
+        return merchantProductIdList;
+    }
+
+    /**
+     * 设置入驻产品
+     *
+     * @param merchantProductIdList
+     */
+    public void setMerchantProductIdList(List <String> merchantProductIdList) {
+        for (String merchantProductId : merchantProductIdList) {
+            MerchantProductDTO postDTO = new MerchantProductDTO ( merchantProductId );
+            merchantProductDTOList.add ( postDTO );
+        }
+    }
 }

+ 56 - 2
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantCompanyExportDTO.java

@@ -8,6 +8,7 @@ import com.google.common.collect.Lists;
 import com.jeeplus.core.query.Query;
 import com.jeeplus.core.query.QueryType;
 import com.jeeplus.core.service.dto.BaseDTO;
+import com.jeeplus.test.core.excel.converter.ExcelMerchantProductListDTOConverter;
 import com.jeeplus.test.core.excel.converter.ExcelSettledPlatformListDTOConverter;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -36,6 +37,12 @@ public class MerchantCompanyExportDTO extends BaseDTO {
     private String companyName;
 
     /**
+     * 公司类型
+     */
+    @ExcelProperty("公司类型")
+    private String companyType;
+
+    /**
      * 联系人名称
      */
     @ExcelProperty("联系人名称")
@@ -50,7 +57,7 @@ public class MerchantCompanyExportDTO extends BaseDTO {
     /**
      * 从业人员
      */
-    @ExcelProperty("从业人员")
+    //@ExcelProperty("从业人员")
     private Integer practitionerCount;
 
     /**
@@ -60,9 +67,15 @@ public class MerchantCompanyExportDTO extends BaseDTO {
     private String annualSales;
 
     /**
+     * 是否为电商小铺
+     */
+    @ExcelProperty("是否为电商小铺")
+    private Integer commerceShop;
+
+    /**
      * 网络零售额
      */
-    @ExcelProperty("网络零售额")
+    //@ExcelProperty("网络零售额")
     private String onlineRetailSales;
 
     /**
@@ -106,6 +119,22 @@ public class MerchantCompanyExportDTO extends BaseDTO {
     private List<SettledPlatformDTO> settledPlatformDTOList = Lists.newArrayList ( );
 
 
+    /**
+     * 入驻产品
+     */
+    @ExcelIgnore
+    @Query(type = QueryType.EQ, javaField = "merchantProductDTO.id", tableColumn = "mp.id")
+    private MerchantProductDTO merchantProductDTO;
+
+    /**
+     * 入驻产品列表
+     */
+    @ApiModelProperty(hidden = true)
+    @JsonIgnore
+    @ExcelProperty(value = "入驻产品", converter = ExcelMerchantProductListDTOConverter.class)
+    private List<MerchantProductDTO> merchantProductDTOList = Lists.newArrayList ( );
+
+
 
     /**
      * 获取包含的入驻平台id列表
@@ -131,4 +160,29 @@ public class MerchantCompanyExportDTO extends BaseDTO {
             settledPlatformDTOList.add ( postDTO );
         }
     }
+
+    /**
+     * 获取包含的入驻产品id列表
+     *
+     * @return
+     */
+    public List <String> getMerchantProductIdList() {
+        if ( settledPlatformDTOList == null ) {
+            return Lists.newArrayList ( );
+        }
+        List <String> merchantProductIdList = merchantProductDTOList.stream ( ).map ( merchantProductDTO -> merchantProductDTO.getId ( ) ).collect ( Collectors.toList ( ) );
+        return merchantProductIdList;
+    }
+
+    /**
+     * 设置入驻产品
+     *
+     * @param merchantProductIdList
+     */
+    public void setMerchantProductIdList(List <String> merchantProductIdList) {
+        for (String merchantProductId : merchantProductIdList) {
+            MerchantProductDTO postDTO = new MerchantProductDTO ( merchantProductId );
+            merchantProductDTOList.add ( postDTO );
+        }
+    }
 }

+ 53 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantCompanyScreenDTO.java

@@ -0,0 +1,53 @@
+package com.jeeplus.test.wdt.merchantCompany.service.dto;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.google.common.collect.Lists;
+import com.jeeplus.core.query.Query;
+import com.jeeplus.core.query.QueryType;
+import com.jeeplus.core.service.dto.BaseDTO;
+import com.jeeplus.test.core.excel.converter.ExcelMerchantProductListDTOConverter;
+import com.jeeplus.test.core.excel.converter.ExcelSettledPlatformListDTOConverter;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+
+/**
+ * 入驻商家表
+ * @author: 徐滕
+ * @version: 2024-01-04 10:42
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ColumnWidth(20)
+public class MerchantCompanyScreenDTO {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 公司名称
+     */
+    private String companyName;
+
+    /**
+     * 联系人名称
+     */
+    private String linkmanName;
+
+    /**
+     * 联系人电话
+     */
+    private String linkmanPhone;
+
+    /**
+     * 年销售额
+     */
+    private String annualSales;
+
+}

+ 21 - 1
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantDetailsDTO.java

@@ -30,16 +30,26 @@ public class MerchantDetailsDTO extends BaseDTO {
     private static final long serialVersionUID = 1L;
 
     /**
-     * 入驻企业数
+     * 入驻企业数(产品加工企业)
      */
     private Integer settledEnterpriseNumber;
 
     /**
+     * 入驻企业数(合作企业)
+     */
+    private Integer cooperativeEnterpriseNumber;
+
+    /**
      * 电商从业人员
      */
     private Integer practitionerCount;
 
     /**
+     * 电商小铺
+     */
+    private Integer commerceShopCount;
+
+    /**
      * 年销售额
      */
     private String annualSales;
@@ -50,6 +60,11 @@ public class MerchantDetailsDTO extends BaseDTO {
     private String onlineRetailSales;
 
     /**
+     * 入驻产品种类
+     */
+    private String merchantProductCount;
+
+    /**
      * 抖音入驻商家数
      */
     private String enterNumber;
@@ -58,4 +73,9 @@ public class MerchantDetailsDTO extends BaseDTO {
      * 开关数据获取类型
      */
     private String dataSourcesType;
+
+    /**
+     * 大屏名称
+     */
+    private String screenName;
 }

+ 52 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantProductDTO.java

@@ -0,0 +1,52 @@
+package com.jeeplus.test.wdt.merchantCompany.service.dto;
+
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author: 徐滕
+ * @version: 2024-01-04 14:54
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class MerchantProductDTO extends BaseDTO {
+
+    /**
+     * 入驻产品名称
+     */
+    String name;
+    /**
+     * 入驻产品排序
+     */
+    String sort;
+
+    /**
+     * 产品销售量
+     */
+    String salesVolume;
+
+    /**
+     * 产品销售额
+     */
+    String saleroom;
+
+    /**
+     * 产品月销售额
+     */
+    String monthlySalesVolume;
+
+    /**
+     * 创建时间区间
+     */
+    private String[] dates;
+
+
+    public MerchantProductDTO() {
+        super ( );
+    }
+
+    public MerchantProductDTO(String id) {
+        super ( id );
+    }
+}

+ 31 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/mapstuct/MerchantProductWrapper.java

@@ -0,0 +1,31 @@
+package com.jeeplus.test.wdt.merchantCompany.service.mapstuct;
+
+import com.jeeplus.core.mapstruct.TreeWrapper;
+import com.jeeplus.test.wdt.merchantCompany.domain.MerchantProduct;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantProductDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.Mappings;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+/**
+ * 入驻产品MAPPER接口
+ * @author 刘高峰
+ * @version 2024-01-04 10:42
+ */
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {} )
+public interface MerchantProductWrapper extends TreeWrapper<MerchantProductDTO, MerchantProduct> {
+
+    MerchantProductWrapper INSTANCE = Mappers.getMapper(MerchantProductWrapper.class);
+    @Mappings({
+            @Mapping(source = "createBy.id", target = "createById"),
+            @Mapping (source = "updateBy.id", target = "updateById")})
+    MerchantProduct toEntity(MerchantProductDTO dto);
+
+
+    @Mappings({
+            @Mapping (source = "createById", target = "createBy.id"),
+            @Mapping (source = "updateById", target = "updateBy.id")})
+    MerchantProductDTO toDTO(MerchantProduct entity);
+}