瀏覽代碼

操盘手业务,初版

zhaoxian 3 年之前
父節點
當前提交
7ba4b7f26f
共有 46 個文件被更改,包括 4516 次插入233 次删除
  1. 1 0
      ruixuan-framework/src/main/java/com/ruixuan/framework/config/SecurityConfig.java
  2. 98 0
      ruixuan-live/src/main/java/com/ruixuan/data/controller/KuaishouLiveDataAnalysisController.java
  3. 98 0
      ruixuan-live/src/main/java/com/ruixuan/data/controller/KuaishouLiveDataFunnelController.java
  4. 114 0
      ruixuan-live/src/main/java/com/ruixuan/data/controller/KuaishouLiveDataKanbanController.java
  5. 98 0
      ruixuan-live/src/main/java/com/ruixuan/data/controller/KuaishouLiveDataOverviewController.java
  6. 178 0
      ruixuan-live/src/main/java/com/ruixuan/data/entity/KuaishouLiveDataAnalysis.java
  7. 116 0
      ruixuan-live/src/main/java/com/ruixuan/data/entity/KuaishouLiveDataFunnel.java
  8. 313 0
      ruixuan-live/src/main/java/com/ruixuan/data/entity/KuaishouLiveDataKanban.java
  9. 118 0
      ruixuan-live/src/main/java/com/ruixuan/data/entity/KuaishouLiveDataOverview.java
  10. 61 0
      ruixuan-live/src/main/java/com/ruixuan/data/mapper/KuaishouLiveDataAnalysisMapper.java
  11. 61 0
      ruixuan-live/src/main/java/com/ruixuan/data/mapper/KuaishouLiveDataFunnelMapper.java
  12. 61 0
      ruixuan-live/src/main/java/com/ruixuan/data/mapper/KuaishouLiveDataKanbanMapper.java
  13. 61 0
      ruixuan-live/src/main/java/com/ruixuan/data/mapper/KuaishouLiveDataOverviewMapper.java
  14. 61 0
      ruixuan-live/src/main/java/com/ruixuan/data/service/IKuaishouLiveDataAnalysisService.java
  15. 61 0
      ruixuan-live/src/main/java/com/ruixuan/data/service/IKuaishouLiveDataFunnelService.java
  16. 61 0
      ruixuan-live/src/main/java/com/ruixuan/data/service/IKuaishouLiveDataKanbanService.java
  17. 61 0
      ruixuan-live/src/main/java/com/ruixuan/data/service/IKuaishouLiveDataOverviewService.java
  18. 90 0
      ruixuan-live/src/main/java/com/ruixuan/data/service/impl/KuaishouLiveDataAnalysisServiceImpl.java
  19. 90 0
      ruixuan-live/src/main/java/com/ruixuan/data/service/impl/KuaishouLiveDataFunnelServiceImpl.java
  20. 90 0
      ruixuan-live/src/main/java/com/ruixuan/data/service/impl/KuaishouLiveDataKanbanServiceImpl.java
  21. 90 0
      ruixuan-live/src/main/java/com/ruixuan/data/service/impl/KuaishouLiveDataOverviewServiceImpl.java
  22. 97 0
      ruixuan-live/src/main/java/com/ruixuan/live/controller/KuaishouLiveBroadcastController.java
  23. 119 0
      ruixuan-live/src/main/java/com/ruixuan/live/controller/KuaishouLiveUserAccountController.java
  24. 187 0
      ruixuan-live/src/main/java/com/ruixuan/live/entity/KuaishouLiveBroadcast.java
  25. 122 0
      ruixuan-live/src/main/java/com/ruixuan/live/entity/KuaishouLiveUserAccount.java
  26. 61 0
      ruixuan-live/src/main/java/com/ruixuan/live/entity/KuaishouLiveUserAccountPart.java
  27. 61 0
      ruixuan-live/src/main/java/com/ruixuan/live/mapper/KuaishouLiveBroadcastMapper.java
  28. 67 0
      ruixuan-live/src/main/java/com/ruixuan/live/mapper/KuaishouLiveUserAccountMapper.java
  29. 36 0
      ruixuan-live/src/main/java/com/ruixuan/live/mapper/KuaishouLiveUserAccountPartMapper.java
  30. 61 0
      ruixuan-live/src/main/java/com/ruixuan/live/service/IKuaishouLiveBroadcastService.java
  31. 29 0
      ruixuan-live/src/main/java/com/ruixuan/live/service/IKuaishouLiveUserAccountPartService.java
  32. 68 0
      ruixuan-live/src/main/java/com/ruixuan/live/service/IKuaishouLiveUserAccountService.java
  33. 90 0
      ruixuan-live/src/main/java/com/ruixuan/live/service/impl/KuaishouLiveBroadcastServiceImpl.java
  34. 45 0
      ruixuan-live/src/main/java/com/ruixuan/live/service/impl/KuaishouLiveUserAccountPartServiceImpl.java
  35. 161 0
      ruixuan-live/src/main/java/com/ruixuan/live/service/impl/KuaishouLiveUserAccountServiceImpl.java
  36. 124 0
      ruixuan-live/src/main/resources/mapper/data/KuaishouLiveDataAnalysisMapper.xml
  37. 100 0
      ruixuan-live/src/main/resources/mapper/data/KuaishouLiveDataFunnelMapper.xml
  38. 178 0
      ruixuan-live/src/main/resources/mapper/data/KuaishouLiveDataKanbanMapper.xml
  39. 100 0
      ruixuan-live/src/main/resources/mapper/data/KuaishouLiveDataOverviewMapper.xml
  40. 219 0
      ruixuan-live/src/main/resources/mapper/live/KuaishouLiveBroadcastMapper.xml
  41. 196 0
      ruixuan-live/src/main/resources/mapper/live/KuaishouLiveUserAccountMapper.xml
  42. 75 0
      ruixuan-live/src/main/resources/mapper/live/KuaishouLiveUserAccountPartMapper.xml
  43. 10 0
      ruixuan-system/src/main/java/com/ruixuan/system/mapper/SysUserMapper.java
  44. 33 23
      ruixuan-system/src/main/java/com/ruixuan/system/service/ISysUserService.java
  45. 7 0
      ruixuan-system/src/main/java/com/ruixuan/system/service/impl/SysUserServiceImpl.java
  46. 288 210
      ruixuan-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 1 - 0
ruixuan-framework/src/main/java/com/ruixuan/framework/config/SecurityConfig.java

@@ -116,6 +116,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                     .antMatchers("/test/**").permitAll()
                     .antMatchers("/demoController/**").permitAll()
                     .antMatchers("/sale/**").permitAll()
+                    .antMatchers("/live/**").permitAll()
 
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()

+ 98 - 0
ruixuan-live/src/main/java/com/ruixuan/data/controller/KuaishouLiveDataAnalysisController.java

@@ -0,0 +1,98 @@
+package com.ruixuan.data.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruixuan.common.annotation.Log;
+import com.ruixuan.common.core.controller.BaseController;
+import com.ruixuan.common.core.domain.AjaxResult;
+import com.ruixuan.common.core.page.TableDataInfo;
+import com.ruixuan.common.enums.BusinessType;
+import com.ruixuan.common.utils.poi.ExcelUtil;
+import com.ruixuan.data.entity.KuaishouLiveDataAnalysis;
+import com.ruixuan.data.service.IKuaishouLiveDataAnalysisService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 商品分析数据Controller
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@RestController
+@RequestMapping("/system/analysis")
+public class KuaishouLiveDataAnalysisController extends BaseController {
+    @Autowired
+    private IKuaishouLiveDataAnalysisService kuaishouLiveDataAnalysisService;
+
+    /**
+     * 查询商品分析数据列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:analysis:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis) {
+        startPage();
+        List<KuaishouLiveDataAnalysis> list = kuaishouLiveDataAnalysisService.selectKuaishouLiveDataAnalysisList(kuaishouLiveDataAnalysis);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品分析数据列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:analysis:export')")
+    @Log(title = "商品分析数据", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis) {
+        List<KuaishouLiveDataAnalysis> list = kuaishouLiveDataAnalysisService.selectKuaishouLiveDataAnalysisList(kuaishouLiveDataAnalysis);
+        ExcelUtil<KuaishouLiveDataAnalysis> util = new ExcelUtil<KuaishouLiveDataAnalysis>(KuaishouLiveDataAnalysis.class);
+        util.exportExcel(response, list, "商品分析数据数据");
+    }
+
+    /**
+     * 获取商品分析数据详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:analysis:query')")
+    @GetMapping(value = "/{ksId}")
+    public AjaxResult getInfo(@PathVariable("ksId") Long ksId) {
+        return AjaxResult.success(kuaishouLiveDataAnalysisService.selectKuaishouLiveDataAnalysisByKsId(ksId));
+    }
+
+    /**
+     * 新增商品分析数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:analysis:add')")
+    @Log(title = "商品分析数据", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis) {
+        return toAjax(kuaishouLiveDataAnalysisService.insertKuaishouLiveDataAnalysis(kuaishouLiveDataAnalysis));
+    }
+
+    /**
+     * 修改商品分析数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:analysis:edit')")
+    @Log(title = "商品分析数据", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis) {
+        return toAjax(kuaishouLiveDataAnalysisService.updateKuaishouLiveDataAnalysis(kuaishouLiveDataAnalysis));
+    }
+
+    /**
+     * 删除商品分析数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:analysis:remove')")
+    @Log(title = "商品分析数据", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ksIds}")
+    public AjaxResult remove(@PathVariable Long[] ksIds) {
+        return toAjax(kuaishouLiveDataAnalysisService.deleteKuaishouLiveDataAnalysisByKsIds(ksIds));
+    }
+}

+ 98 - 0
ruixuan-live/src/main/java/com/ruixuan/data/controller/KuaishouLiveDataFunnelController.java

@@ -0,0 +1,98 @@
+package com.ruixuan.data.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruixuan.common.annotation.Log;
+import com.ruixuan.common.core.controller.BaseController;
+import com.ruixuan.common.core.domain.AjaxResult;
+import com.ruixuan.common.core.page.TableDataInfo;
+import com.ruixuan.common.enums.BusinessType;
+import com.ruixuan.common.utils.poi.ExcelUtil;
+import com.ruixuan.data.entity.KuaishouLiveDataFunnel;
+import com.ruixuan.data.service.IKuaishouLiveDataFunnelService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 直播漏斗数据Controller
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@RestController
+@RequestMapping("/system/funnel")
+public class KuaishouLiveDataFunnelController extends BaseController {
+    @Autowired
+    private IKuaishouLiveDataFunnelService kuaishouLiveDataFunnelService;
+
+    /**
+     * 查询直播漏斗数据列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:funnel:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(KuaishouLiveDataFunnel kuaishouLiveDataFunnel) {
+        startPage();
+        List<KuaishouLiveDataFunnel> list = kuaishouLiveDataFunnelService.selectKuaishouLiveDataFunnelList(kuaishouLiveDataFunnel);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播漏斗数据列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:funnel:export')")
+    @Log(title = "直播漏斗数据", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, KuaishouLiveDataFunnel kuaishouLiveDataFunnel) {
+        List<KuaishouLiveDataFunnel> list = kuaishouLiveDataFunnelService.selectKuaishouLiveDataFunnelList(kuaishouLiveDataFunnel);
+        ExcelUtil<KuaishouLiveDataFunnel> util = new ExcelUtil<KuaishouLiveDataFunnel>(KuaishouLiveDataFunnel.class);
+        util.exportExcel(response, list, "直播漏斗数据数据");
+    }
+
+    /**
+     * 获取直播漏斗数据详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:funnel:query')")
+    @GetMapping(value = "/{ksId}")
+    public AjaxResult getInfo(@PathVariable("ksId") Long ksId) {
+        return AjaxResult.success(kuaishouLiveDataFunnelService.selectKuaishouLiveDataFunnelByKsId(ksId));
+    }
+
+    /**
+     * 新增直播漏斗数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:funnel:add')")
+    @Log(title = "直播漏斗数据", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody KuaishouLiveDataFunnel kuaishouLiveDataFunnel) {
+        return toAjax(kuaishouLiveDataFunnelService.insertKuaishouLiveDataFunnel(kuaishouLiveDataFunnel));
+    }
+
+    /**
+     * 修改直播漏斗数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:funnel:edit')")
+    @Log(title = "直播漏斗数据", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody KuaishouLiveDataFunnel kuaishouLiveDataFunnel) {
+        return toAjax(kuaishouLiveDataFunnelService.updateKuaishouLiveDataFunnel(kuaishouLiveDataFunnel));
+    }
+
+    /**
+     * 删除直播漏斗数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:funnel:remove')")
+    @Log(title = "直播漏斗数据", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ksIds}")
+    public AjaxResult remove(@PathVariable Long[] ksIds) {
+        return toAjax(kuaishouLiveDataFunnelService.deleteKuaishouLiveDataFunnelByKsIds(ksIds));
+    }
+}

+ 114 - 0
ruixuan-live/src/main/java/com/ruixuan/data/controller/KuaishouLiveDataKanbanController.java

@@ -0,0 +1,114 @@
+package com.ruixuan.data.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruixuan.common.annotation.Log;
+import com.ruixuan.common.core.controller.BaseController;
+import com.ruixuan.common.core.domain.AjaxResult;
+import com.ruixuan.common.core.page.TableDataInfo;
+import com.ruixuan.common.enums.BusinessType;
+import com.ruixuan.common.utils.poi.ExcelUtil;
+import com.ruixuan.data.entity.KuaishouLiveDataKanban;
+import com.ruixuan.data.service.IKuaishouLiveDataKanbanService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 直播数据看板Controller
+ * 
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@RestController
+@RequestMapping("/system/kanban")
+public class KuaishouLiveDataKanbanController extends BaseController
+{
+    @Autowired
+    private IKuaishouLiveDataKanbanService kuaishouLiveDataKanbanService;
+
+    /**
+     * 查询直播数据看板列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:kanban:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(KuaishouLiveDataKanban kuaishouLiveDataKanban)
+    {
+        startPage();
+        List<KuaishouLiveDataKanban> list = kuaishouLiveDataKanbanService.selectKuaishouLiveDataKanbanList(kuaishouLiveDataKanban);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播数据看板列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:kanban:export')")
+    @Log(title = "直播数据看板", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, KuaishouLiveDataKanban kuaishouLiveDataKanban)
+    {
+        List<KuaishouLiveDataKanban> list = kuaishouLiveDataKanbanService.selectKuaishouLiveDataKanbanList(kuaishouLiveDataKanban);
+        ExcelUtil<KuaishouLiveDataKanban> util = new ExcelUtil<KuaishouLiveDataKanban>(KuaishouLiveDataKanban.class);
+        util.exportExcel(response, list, "直播数据看板数据");
+    }
+
+    /**
+     * 获取直播数据看板详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:kanban:query')")
+    @GetMapping(value = "/{ksId}")
+    public AjaxResult getInfo(@PathVariable("ksId") Long ksId)
+    {
+        return AjaxResult.success(kuaishouLiveDataKanbanService.selectKuaishouLiveDataKanbanByKsId(ksId));
+    }
+
+    /**
+     * 新增直播数据看板
+     */
+    @PreAuthorize("@ss.hasPermi('system:kanban:add')")
+    @Log(title = "直播数据看板", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody KuaishouLiveDataKanban kuaishouLiveDataKanban)
+    {
+        return toAjax(kuaishouLiveDataKanbanService.insertKuaishouLiveDataKanban(kuaishouLiveDataKanban));
+    }
+
+    /**
+     * 修改直播数据看板
+     */
+    @PreAuthorize("@ss.hasPermi('system:kanban:edit')")
+    @Log(title = "直播数据看板", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody KuaishouLiveDataKanban kuaishouLiveDataKanban)
+    {
+        return toAjax(kuaishouLiveDataKanbanService.updateKuaishouLiveDataKanban(kuaishouLiveDataKanban));
+    }
+
+    /**
+     * 删除直播数据看板
+     */
+    @PreAuthorize("@ss.hasPermi('system:kanban:remove')")
+    @Log(title = "直播数据看板", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ksIds}")
+    public AjaxResult remove(@PathVariable Long[] ksIds)
+    {
+        return toAjax(kuaishouLiveDataKanbanService.deleteKuaishouLiveDataKanbanByKsIds(ksIds));
+    }
+}

+ 98 - 0
ruixuan-live/src/main/java/com/ruixuan/data/controller/KuaishouLiveDataOverviewController.java

@@ -0,0 +1,98 @@
+package com.ruixuan.data.controller;
+
+import com.ruixuan.common.annotation.Log;
+import com.ruixuan.common.core.controller.BaseController;
+import com.ruixuan.common.core.domain.AjaxResult;
+import com.ruixuan.common.core.page.TableDataInfo;
+import com.ruixuan.common.enums.BusinessType;
+import com.ruixuan.common.utils.poi.ExcelUtil;
+import com.ruixuan.data.entity.KuaishouLiveDataOverview;
+import com.ruixuan.data.service.IKuaishouLiveDataOverviewService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 直播数据概览Controller
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@RestController
+@RequestMapping("/system/overview")
+public class KuaishouLiveDataOverviewController extends BaseController {
+    @Autowired
+    private IKuaishouLiveDataOverviewService kuaishouLiveDataOverviewService;
+
+    /**
+     * 查询直播数据概览列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:overview:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(KuaishouLiveDataOverview kuaishouLiveDataOverview) {
+        startPage();
+        List<KuaishouLiveDataOverview> list = kuaishouLiveDataOverviewService.selectKuaishouLiveDataOverviewList(kuaishouLiveDataOverview);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播数据概览列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:overview:export')")
+    @Log(title = "直播数据概览", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, KuaishouLiveDataOverview kuaishouLiveDataOverview) {
+        List<KuaishouLiveDataOverview> list = kuaishouLiveDataOverviewService.selectKuaishouLiveDataOverviewList(kuaishouLiveDataOverview);
+        ExcelUtil<KuaishouLiveDataOverview> util = new ExcelUtil<KuaishouLiveDataOverview>(KuaishouLiveDataOverview.class);
+        util.exportExcel(response, list, "直播数据概览数据");
+    }
+
+    /**
+     * 获取直播数据概览详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:overview:query')")
+    @GetMapping(value = "/{ksId}")
+    public AjaxResult getInfo(@PathVariable("ksId") Long ksId) {
+        return AjaxResult.success(kuaishouLiveDataOverviewService.selectKuaishouLiveDataOverviewByKsId(ksId));
+    }
+
+    /**
+     * 新增直播数据概览
+     */
+    @PreAuthorize("@ss.hasPermi('system:overview:add')")
+    @Log(title = "直播数据概览", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody KuaishouLiveDataOverview kuaishouLiveDataOverview) {
+        return toAjax(kuaishouLiveDataOverviewService.insertKuaishouLiveDataOverview(kuaishouLiveDataOverview));
+    }
+
+    /**
+     * 修改直播数据概览
+     */
+    @PreAuthorize("@ss.hasPermi('system:overview:edit')")
+    @Log(title = "直播数据概览", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody KuaishouLiveDataOverview kuaishouLiveDataOverview) {
+        return toAjax(kuaishouLiveDataOverviewService.updateKuaishouLiveDataOverview(kuaishouLiveDataOverview));
+    }
+
+    /**
+     * 删除直播数据概览
+     */
+    @PreAuthorize("@ss.hasPermi('system:overview:remove')")
+    @Log(title = "直播数据概览", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ksIds}")
+    public AjaxResult remove(@PathVariable Long[] ksIds) {
+        return toAjax(kuaishouLiveDataOverviewService.deleteKuaishouLiveDataOverviewByKsIds(ksIds));
+    }
+}

+ 178 - 0
ruixuan-live/src/main/java/com/ruixuan/data/entity/KuaishouLiveDataAnalysis.java

@@ -0,0 +1,178 @@
+package com.ruixuan.data.entity;
+
+import com.ruixuan.common.annotation.Excel;
+import com.ruixuan.common.core.domain.BaseEntity;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+
+/**
+ * 商品分析数据对象 kuaishou_live_data_analysis
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Data
+public class KuaishouLiveDataAnalysis extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 快手ID
+     */
+    @Excel(name = "快手ID")
+    private Long ksId;
+
+    /**
+     * 快手昵称
+     */
+    @Excel(name = "快手昵称")
+    private String ksName;
+
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID")
+    private Long accountId;
+
+    /**
+     * 账户名称
+     */
+    @Excel(name = "账户名称")
+    private String accountName;
+
+    /**
+     * 商品名称
+     */
+    @Excel(name = "商品名称")
+    private String waresName;
+
+    /**
+     * 商品上架时间
+     */
+    @Excel(name = "商品上架时间")
+    private String waresPutDate;
+
+    /**
+     * 商品价格
+     */
+    @Excel(name = "商品价格")
+    private BigDecimal waresPrice;
+
+    /**
+     * 商品销售额
+     */
+    @Excel(name = "商品销售额")
+    private BigDecimal waresSalesAmount;
+
+    /**
+     * 商品销量
+     */
+    @Excel(name = "商品销量")
+    private BigDecimal waresSalesVolume;
+
+    /**
+     * 待支付订单数
+     */
+    @Excel(name = "待支付订单数")
+    private Long topayOrders;
+
+    public void setKsId(Long ksId) {
+        this.ksId = ksId;
+    }
+
+    public Long getKsId() {
+        return ksId;
+    }
+
+    public void setKsName(String ksName) {
+        this.ksName = ksName;
+    }
+
+    public String getKsName() {
+        return ksName;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountName(String accountName) {
+        this.accountName = accountName;
+    }
+
+    public String getAccountName() {
+        return accountName;
+    }
+
+    public void setWaresName(String waresName) {
+        this.waresName = waresName;
+    }
+
+    public String getWaresName() {
+        return waresName;
+    }
+
+    public void setWaresPutDate(String waresPutDate) {
+        this.waresPutDate = waresPutDate;
+    }
+
+    public String getWaresPutDate() {
+        return waresPutDate;
+    }
+
+    public void setWaresPrice(BigDecimal waresPrice) {
+        this.waresPrice = waresPrice;
+    }
+
+    public BigDecimal getWaresPrice() {
+        return waresPrice;
+    }
+
+    public void setWaresSalesAmount(BigDecimal waresSalesAmount) {
+        this.waresSalesAmount = waresSalesAmount;
+    }
+
+    public BigDecimal getWaresSalesAmount() {
+        return waresSalesAmount;
+    }
+
+    public void setWaresSalesVolume(BigDecimal waresSalesVolume) {
+        this.waresSalesVolume = waresSalesVolume;
+    }
+
+    public BigDecimal getWaresSalesVolume() {
+        return waresSalesVolume;
+    }
+
+    public void setTopayOrders(Long topayOrders) {
+        this.topayOrders = topayOrders;
+    }
+
+    public Long getTopayOrders() {
+        return topayOrders;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("ksId", getKsId())
+                .append("ksName", getKsName())
+                .append("accountId", getAccountId())
+                .append("accountName", getAccountName())
+                .append("waresName", getWaresName())
+                .append("waresPutDate", getWaresPutDate())
+                .append("waresPrice", getWaresPrice())
+                .append("waresSalesAmount", getWaresSalesAmount())
+                .append("waresSalesVolume", getWaresSalesVolume())
+                .append("topayOrders", getTopayOrders())
+                .append("createTime", getCreateTime())
+                .append("updateTime", getUpdateTime())
+                .toString();
+    }
+}

+ 116 - 0
ruixuan-live/src/main/java/com/ruixuan/data/entity/KuaishouLiveDataFunnel.java

@@ -0,0 +1,116 @@
+package com.ruixuan.data.entity;
+
+import com.ruixuan.common.annotation.Excel;
+import com.ruixuan.common.core.domain.BaseEntity;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 直播漏斗数据对象 kuaishou_live_data_funnel
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Data
+public class KuaishouLiveDataFunnel extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 快手ID
+     */
+    @Excel(name = "快手ID")
+    private Long ksId;
+
+    /**
+     * 快手昵称
+     */
+    @Excel(name = "快手昵称")
+    private String ksName;
+
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID")
+    private Long accountId;
+
+    /**
+     * 账户名称
+     */
+    @Excel(name = "账户名称")
+    private String accountName;
+
+    /**
+     * 累计观看人数
+     */
+    @Excel(name = "累计观看人数")
+    private Long allViewers;
+
+    /**
+     * 日期
+     */
+    @Excel(name = "日期")
+    private String statDate;
+
+    public void setKsId(Long ksId) {
+        this.ksId = ksId;
+    }
+
+    public Long getKsId() {
+        return ksId;
+    }
+
+    public void setKsName(String ksName) {
+        this.ksName = ksName;
+    }
+
+    public String getKsName() {
+        return ksName;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountName(String accountName) {
+        this.accountName = accountName;
+    }
+
+    public String getAccountName() {
+        return accountName;
+    }
+
+    public void setAllViewers(Long allViewers) {
+        this.allViewers = allViewers;
+    }
+
+    public Long getAllViewers() {
+        return allViewers;
+    }
+
+    public void setStatDate(String statDate) {
+        this.statDate = statDate;
+    }
+
+    public String getStatDate() {
+        return statDate;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("ksId", getKsId())
+                .append("ksName", getKsName())
+                .append("accountId", getAccountId())
+                .append("accountName", getAccountName())
+                .append("allViewers", getAllViewers())
+                .append("statDate", getStatDate())
+                .append("createTime", getCreateTime())
+                .append("updateTime", getUpdateTime())
+                .toString();
+    }
+}

+ 313 - 0
ruixuan-live/src/main/java/com/ruixuan/data/entity/KuaishouLiveDataKanban.java

@@ -0,0 +1,313 @@
+package com.ruixuan.data.entity;
+
+import com.ruixuan.common.annotation.Excel;
+import com.ruixuan.common.core.domain.BaseEntity;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+
+/**
+ * 直播数据看板对象 kuaishou_live_data_kanban
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Data
+public class KuaishouLiveDataKanban extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 快手ID
+     */
+    @Excel(name = "快手ID")
+    private Long ksId;
+
+    /**
+     * 快手昵称
+     */
+    @Excel(name = "快手昵称")
+    private String ksName;
+
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID")
+    private Long accountId;
+
+    /**
+     * 账户名称
+     */
+    @Excel(name = "账户名称")
+    private String accountName;
+
+    /**
+     * 实时在线观看人数
+     */
+    @Excel(name = "实时在线观看人数")
+    private Long onlineViewers;
+
+    /**
+     * 观看人数
+     */
+    @Excel(name = "观看人数")
+    private Long viewers;
+
+    /**
+     * 观看次数
+     */
+    @Excel(name = "观看次数")
+    private Long viewingTimes;
+
+    /**
+     * 人均观看时长
+     */
+    @Excel(name = "人均观看时长")
+    private Long perViewingTime;
+
+    /**
+     * 粉丝平均观看时长
+     */
+    @Excel(name = "粉丝平均观看时长")
+    private Long fansViewingTime;
+
+    /**
+     * 打赏数
+     */
+    @Excel(name = "打赏数")
+    private Long rewards;
+
+    /**
+     * 上架商品数
+     */
+    @Excel(name = "上架商品数")
+    private Long putWares;
+
+    /**
+     * 新增粉丝数
+     */
+    @Excel(name = "新增粉丝数")
+    private Long newFans;
+
+    /**
+     * 点赞数
+     */
+    @Excel(name = "点赞数")
+    private Long likes;
+
+    /**
+     * 商品点击人数
+     */
+    @Excel(name = "商品点击人数")
+    private Long waresClicks;
+
+    /**
+     * 小黄车点击数
+     */
+    @Excel(name = "小黄车点击数")
+    private Long carClicks;
+
+    /**
+     * 累计成交金额
+     */
+    @Excel(name = "累计成交金额")
+    private BigDecimal allAmount;
+
+    /**
+     * 累计成交人数
+     */
+    @Excel(name = "累计成交人数")
+    private Long allTurnover;
+
+    /**
+     * 累计成交订单数
+     */
+    @Excel(name = "累计成交订单数")
+    private Long allOrders;
+
+    /**
+     * 成交转化率
+     */
+    @Excel(name = "成交转化率")
+    private String turnoverRatio;
+
+    public void setKsId(Long ksId) {
+        this.ksId = ksId;
+    }
+
+    public Long getKsId() {
+        return ksId;
+    }
+
+    public void setKsName(String ksName) {
+        this.ksName = ksName;
+    }
+
+    public String getKsName() {
+        return ksName;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountName(String accountName) {
+        this.accountName = accountName;
+    }
+
+    public String getAccountName() {
+        return accountName;
+    }
+
+    public void setOnlineViewers(Long onlineViewers) {
+        this.onlineViewers = onlineViewers;
+    }
+
+    public Long getOnlineViewers() {
+        return onlineViewers;
+    }
+
+    public void setViewers(Long viewers) {
+        this.viewers = viewers;
+    }
+
+    public Long getViewers() {
+        return viewers;
+    }
+
+    public void setViewingTimes(Long viewingTimes) {
+        this.viewingTimes = viewingTimes;
+    }
+
+    public Long getViewingTimes() {
+        return viewingTimes;
+    }
+
+    public void setPerViewingTime(Long perViewingTime) {
+        this.perViewingTime = perViewingTime;
+    }
+
+    public Long getPerViewingTime() {
+        return perViewingTime;
+    }
+
+    public void setFansViewingTime(Long fansViewingTime) {
+        this.fansViewingTime = fansViewingTime;
+    }
+
+    public Long getFansViewingTime() {
+        return fansViewingTime;
+    }
+
+    public void setRewards(Long rewards) {
+        this.rewards = rewards;
+    }
+
+    public Long getRewards() {
+        return rewards;
+    }
+
+    public void setPutWares(Long putWares) {
+        this.putWares = putWares;
+    }
+
+    public Long getPutWares() {
+        return putWares;
+    }
+
+    public void setNewFans(Long newFans) {
+        this.newFans = newFans;
+    }
+
+    public Long getNewFans() {
+        return newFans;
+    }
+
+    public void setLikes(Long likes) {
+        this.likes = likes;
+    }
+
+    public Long getLikes() {
+        return likes;
+    }
+
+    public void setWaresClicks(Long waresClicks) {
+        this.waresClicks = waresClicks;
+    }
+
+    public Long getWaresClicks() {
+        return waresClicks;
+    }
+
+    public void setCarClicks(Long carClicks) {
+        this.carClicks = carClicks;
+    }
+
+    public Long getCarClicks() {
+        return carClicks;
+    }
+
+    public void setAllAmount(BigDecimal allAmount) {
+        this.allAmount = allAmount;
+    }
+
+    public BigDecimal getAllAmount() {
+        return allAmount;
+    }
+
+    public void setAllTurnover(Long allTurnover) {
+        this.allTurnover = allTurnover;
+    }
+
+    public Long getAllTurnover() {
+        return allTurnover;
+    }
+
+    public void setAllOrders(Long allOrders) {
+        this.allOrders = allOrders;
+    }
+
+    public Long getAllOrders() {
+        return allOrders;
+    }
+
+    public void setTurnoverRatio(String turnoverRatio) {
+        this.turnoverRatio = turnoverRatio;
+    }
+
+    public String getTurnoverRatio() {
+        return turnoverRatio;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("ksId", getKsId())
+                .append("ksName", getKsName())
+                .append("accountId", getAccountId())
+                .append("accountName", getAccountName())
+                .append("onlineViewers", getOnlineViewers())
+                .append("viewers", getViewers())
+                .append("viewingTimes", getViewingTimes())
+                .append("perViewingTime", getPerViewingTime())
+                .append("fansViewingTime", getFansViewingTime())
+                .append("rewards", getRewards())
+                .append("putWares", getPutWares())
+                .append("newFans", getNewFans())
+                .append("likes", getLikes())
+                .append("waresClicks", getWaresClicks())
+                .append("carClicks", getCarClicks())
+                .append("allAmount", getAllAmount())
+                .append("allTurnover", getAllTurnover())
+                .append("allOrders", getAllOrders())
+                .append("turnoverRatio", getTurnoverRatio())
+                .append("createTime", getCreateTime())
+                .append("updateTime", getUpdateTime())
+                .toString();
+    }
+}

+ 118 - 0
ruixuan-live/src/main/java/com/ruixuan/data/entity/KuaishouLiveDataOverview.java

@@ -0,0 +1,118 @@
+package com.ruixuan.data.entity;
+
+import com.ruixuan.common.annotation.Excel;
+import com.ruixuan.common.core.domain.BaseEntity;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+
+/**
+ * 直播数据概览对象 kuaishou_live_data_overview
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Data
+public class KuaishouLiveDataOverview extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 快手ID
+     */
+    @Excel(name = "快手ID")
+    private Long ksId;
+
+    /**
+     * 快手昵称
+     */
+    @Excel(name = "快手昵称")
+    private String ksName;
+
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID")
+    private Long accountId;
+
+    /**
+     * 账户名称
+     */
+    @Excel(name = "账户名称")
+    private String accountName;
+
+    /**
+     * 成交金额
+     */
+    @Excel(name = "成交金额")
+    private BigDecimal amounts;
+
+    /**
+     * 日期
+     */
+    @Excel(name = "日期")
+    private String statDate;
+
+    public void setKsId(Long ksId) {
+        this.ksId = ksId;
+    }
+
+    public Long getKsId() {
+        return ksId;
+    }
+
+    public void setKsName(String ksName) {
+        this.ksName = ksName;
+    }
+
+    public String getKsName() {
+        return ksName;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountName(String accountName) {
+        this.accountName = accountName;
+    }
+
+    public String getAccountName() {
+        return accountName;
+    }
+
+    public void setAmounts(BigDecimal amounts) {
+        this.amounts = amounts;
+    }
+
+    public BigDecimal getAmounts() {
+        return amounts;
+    }
+
+    public void setStatDate(String statDate) {
+        this.statDate = statDate;
+    }
+
+    public String getStatDate() {
+        return statDate;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("ksId", getKsId())
+                .append("ksName", getKsName())
+                .append("accountId", getAccountId())
+                .append("accountName", getAccountName())
+                .append("amounts", getAmounts())
+                .append("statDate", getStatDate())
+                .append("createTime", getCreateTime())
+                .append("updateTime", getUpdateTime())
+                .toString();
+    }
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/data/mapper/KuaishouLiveDataAnalysisMapper.java

@@ -0,0 +1,61 @@
+package com.ruixuan.data.mapper;
+
+import com.ruixuan.data.entity.KuaishouLiveDataAnalysis;
+
+import java.util.List;
+
+/**
+ * 商品分析数据Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface KuaishouLiveDataAnalysisMapper {
+    /**
+     * 查询商品分析数据
+     *
+     * @param ksId 商品分析数据主键
+     * @return 商品分析数据
+     */
+    public KuaishouLiveDataAnalysis selectKuaishouLiveDataAnalysisByKsId(Long ksId);
+
+    /**
+     * 查询商品分析数据列表
+     *
+     * @param kuaishouLiveDataAnalysis 商品分析数据
+     * @return 商品分析数据集合
+     */
+    public List<KuaishouLiveDataAnalysis> selectKuaishouLiveDataAnalysisList(KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis);
+
+    /**
+     * 新增商品分析数据
+     *
+     * @param kuaishouLiveDataAnalysis 商品分析数据
+     * @return 结果
+     */
+    public int insertKuaishouLiveDataAnalysis(KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis);
+
+    /**
+     * 修改商品分析数据
+     *
+     * @param kuaishouLiveDataAnalysis 商品分析数据
+     * @return 结果
+     */
+    public int updateKuaishouLiveDataAnalysis(KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis);
+
+    /**
+     * 删除商品分析数据
+     *
+     * @param ksId 商品分析数据主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataAnalysisByKsId(Long ksId);
+
+    /**
+     * 批量删除商品分析数据
+     *
+     * @param ksIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataAnalysisByKsIds(Long[] ksIds);
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/data/mapper/KuaishouLiveDataFunnelMapper.java

@@ -0,0 +1,61 @@
+package com.ruixuan.data.mapper;
+
+import com.ruixuan.data.entity.KuaishouLiveDataFunnel;
+
+import java.util.List;
+
+/**
+ * 直播漏斗数据Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface KuaishouLiveDataFunnelMapper {
+    /**
+     * 查询直播漏斗数据
+     *
+     * @param ksId 直播漏斗数据主键
+     * @return 直播漏斗数据
+     */
+    public KuaishouLiveDataFunnel selectKuaishouLiveDataFunnelByKsId(Long ksId);
+
+    /**
+     * 查询直播漏斗数据列表
+     *
+     * @param kuaishouLiveDataFunnel 直播漏斗数据
+     * @return 直播漏斗数据集合
+     */
+    public List<KuaishouLiveDataFunnel> selectKuaishouLiveDataFunnelList(KuaishouLiveDataFunnel kuaishouLiveDataFunnel);
+
+    /**
+     * 新增直播漏斗数据
+     *
+     * @param kuaishouLiveDataFunnel 直播漏斗数据
+     * @return 结果
+     */
+    public int insertKuaishouLiveDataFunnel(KuaishouLiveDataFunnel kuaishouLiveDataFunnel);
+
+    /**
+     * 修改直播漏斗数据
+     *
+     * @param kuaishouLiveDataFunnel 直播漏斗数据
+     * @return 结果
+     */
+    public int updateKuaishouLiveDataFunnel(KuaishouLiveDataFunnel kuaishouLiveDataFunnel);
+
+    /**
+     * 删除直播漏斗数据
+     *
+     * @param ksId 直播漏斗数据主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataFunnelByKsId(Long ksId);
+
+    /**
+     * 批量删除直播漏斗数据
+     *
+     * @param ksIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataFunnelByKsIds(Long[] ksIds);
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/data/mapper/KuaishouLiveDataKanbanMapper.java

@@ -0,0 +1,61 @@
+package com.ruixuan.data.mapper;
+
+import com.ruixuan.data.entity.KuaishouLiveDataKanban;
+
+import java.util.List;
+
+/**
+ * 直播数据看板Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface KuaishouLiveDataKanbanMapper {
+    /**
+     * 查询直播数据看板
+     *
+     * @param ksId 直播数据看板主键
+     * @return 直播数据看板
+     */
+    public KuaishouLiveDataKanban selectKuaishouLiveDataKanbanByKsId(Long ksId);
+
+    /**
+     * 查询直播数据看板列表
+     *
+     * @param kuaishouLiveDataKanban 直播数据看板
+     * @return 直播数据看板集合
+     */
+    public List<KuaishouLiveDataKanban> selectKuaishouLiveDataKanbanList(KuaishouLiveDataKanban kuaishouLiveDataKanban);
+
+    /**
+     * 新增直播数据看板
+     *
+     * @param kuaishouLiveDataKanban 直播数据看板
+     * @return 结果
+     */
+    public int insertKuaishouLiveDataKanban(KuaishouLiveDataKanban kuaishouLiveDataKanban);
+
+    /**
+     * 修改直播数据看板
+     *
+     * @param kuaishouLiveDataKanban 直播数据看板
+     * @return 结果
+     */
+    public int updateKuaishouLiveDataKanban(KuaishouLiveDataKanban kuaishouLiveDataKanban);
+
+    /**
+     * 删除直播数据看板
+     *
+     * @param ksId 直播数据看板主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataKanbanByKsId(Long ksId);
+
+    /**
+     * 批量删除直播数据看板
+     *
+     * @param ksIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataKanbanByKsIds(Long[] ksIds);
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/data/mapper/KuaishouLiveDataOverviewMapper.java

@@ -0,0 +1,61 @@
+package com.ruixuan.data.mapper;
+
+import com.ruixuan.data.entity.KuaishouLiveDataOverview;
+
+import java.util.List;
+
+/**
+ * 直播数据概览Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface KuaishouLiveDataOverviewMapper {
+    /**
+     * 查询直播数据概览
+     *
+     * @param ksId 直播数据概览主键
+     * @return 直播数据概览
+     */
+    public KuaishouLiveDataOverview selectKuaishouLiveDataOverviewByKsId(Long ksId);
+
+    /**
+     * 查询直播数据概览列表
+     *
+     * @param kuaishouLiveDataOverview 直播数据概览
+     * @return 直播数据概览集合
+     */
+    public List<KuaishouLiveDataOverview> selectKuaishouLiveDataOverviewList(KuaishouLiveDataOverview kuaishouLiveDataOverview);
+
+    /**
+     * 新增直播数据概览
+     *
+     * @param kuaishouLiveDataOverview 直播数据概览
+     * @return 结果
+     */
+    public int insertKuaishouLiveDataOverview(KuaishouLiveDataOverview kuaishouLiveDataOverview);
+
+    /**
+     * 修改直播数据概览
+     *
+     * @param kuaishouLiveDataOverview 直播数据概览
+     * @return 结果
+     */
+    public int updateKuaishouLiveDataOverview(KuaishouLiveDataOverview kuaishouLiveDataOverview);
+
+    /**
+     * 删除直播数据概览
+     *
+     * @param ksId 直播数据概览主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataOverviewByKsId(Long ksId);
+
+    /**
+     * 批量删除直播数据概览
+     *
+     * @param ksIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataOverviewByKsIds(Long[] ksIds);
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/data/service/IKuaishouLiveDataAnalysisService.java

@@ -0,0 +1,61 @@
+package com.ruixuan.data.service;
+
+import com.ruixuan.data.entity.KuaishouLiveDataAnalysis;
+
+import java.util.List;
+
+/**
+ * 商品分析数据Service接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface IKuaishouLiveDataAnalysisService {
+    /**
+     * 查询商品分析数据
+     *
+     * @param ksId 商品分析数据主键
+     * @return 商品分析数据
+     */
+    public KuaishouLiveDataAnalysis selectKuaishouLiveDataAnalysisByKsId(Long ksId);
+
+    /**
+     * 查询商品分析数据列表
+     *
+     * @param kuaishouLiveDataAnalysis 商品分析数据
+     * @return 商品分析数据集合
+     */
+    public List<KuaishouLiveDataAnalysis> selectKuaishouLiveDataAnalysisList(KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis);
+
+    /**
+     * 新增商品分析数据
+     *
+     * @param kuaishouLiveDataAnalysis 商品分析数据
+     * @return 结果
+     */
+    public int insertKuaishouLiveDataAnalysis(KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis);
+
+    /**
+     * 修改商品分析数据
+     *
+     * @param kuaishouLiveDataAnalysis 商品分析数据
+     * @return 结果
+     */
+    public int updateKuaishouLiveDataAnalysis(KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis);
+
+    /**
+     * 批量删除商品分析数据
+     *
+     * @param ksIds 需要删除的商品分析数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataAnalysisByKsIds(Long[] ksIds);
+
+    /**
+     * 删除商品分析数据信息
+     *
+     * @param ksId 商品分析数据主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataAnalysisByKsId(Long ksId);
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/data/service/IKuaishouLiveDataFunnelService.java

@@ -0,0 +1,61 @@
+package com.ruixuan.data.service;
+
+import com.ruixuan.data.entity.KuaishouLiveDataFunnel;
+
+import java.util.List;
+
+/**
+ * 直播漏斗数据Service接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface IKuaishouLiveDataFunnelService {
+    /**
+     * 查询直播漏斗数据
+     *
+     * @param ksId 直播漏斗数据主键
+     * @return 直播漏斗数据
+     */
+    public KuaishouLiveDataFunnel selectKuaishouLiveDataFunnelByKsId(Long ksId);
+
+    /**
+     * 查询直播漏斗数据列表
+     *
+     * @param kuaishouLiveDataFunnel 直播漏斗数据
+     * @return 直播漏斗数据集合
+     */
+    public List<KuaishouLiveDataFunnel> selectKuaishouLiveDataFunnelList(KuaishouLiveDataFunnel kuaishouLiveDataFunnel);
+
+    /**
+     * 新增直播漏斗数据
+     *
+     * @param kuaishouLiveDataFunnel 直播漏斗数据
+     * @return 结果
+     */
+    public int insertKuaishouLiveDataFunnel(KuaishouLiveDataFunnel kuaishouLiveDataFunnel);
+
+    /**
+     * 修改直播漏斗数据
+     *
+     * @param kuaishouLiveDataFunnel 直播漏斗数据
+     * @return 结果
+     */
+    public int updateKuaishouLiveDataFunnel(KuaishouLiveDataFunnel kuaishouLiveDataFunnel);
+
+    /**
+     * 批量删除直播漏斗数据
+     *
+     * @param ksIds 需要删除的直播漏斗数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataFunnelByKsIds(Long[] ksIds);
+
+    /**
+     * 删除直播漏斗数据信息
+     *
+     * @param ksId 直播漏斗数据主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataFunnelByKsId(Long ksId);
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/data/service/IKuaishouLiveDataKanbanService.java

@@ -0,0 +1,61 @@
+package com.ruixuan.data.service;
+
+import com.ruixuan.data.entity.KuaishouLiveDataKanban;
+
+import java.util.List;
+
+/**
+ * 直播数据看板Service接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface IKuaishouLiveDataKanbanService {
+    /**
+     * 查询直播数据看板
+     *
+     * @param ksId 直播数据看板主键
+     * @return 直播数据看板
+     */
+    public KuaishouLiveDataKanban selectKuaishouLiveDataKanbanByKsId(Long ksId);
+
+    /**
+     * 查询直播数据看板列表
+     *
+     * @param kuaishouLiveDataKanban 直播数据看板
+     * @return 直播数据看板集合
+     */
+    public List<KuaishouLiveDataKanban> selectKuaishouLiveDataKanbanList(KuaishouLiveDataKanban kuaishouLiveDataKanban);
+
+    /**
+     * 新增直播数据看板
+     *
+     * @param kuaishouLiveDataKanban 直播数据看板
+     * @return 结果
+     */
+    public int insertKuaishouLiveDataKanban(KuaishouLiveDataKanban kuaishouLiveDataKanban);
+
+    /**
+     * 修改直播数据看板
+     *
+     * @param kuaishouLiveDataKanban 直播数据看板
+     * @return 结果
+     */
+    public int updateKuaishouLiveDataKanban(KuaishouLiveDataKanban kuaishouLiveDataKanban);
+
+    /**
+     * 批量删除直播数据看板
+     *
+     * @param ksIds 需要删除的直播数据看板主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataKanbanByKsIds(Long[] ksIds);
+
+    /**
+     * 删除直播数据看板信息
+     *
+     * @param ksId 直播数据看板主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataKanbanByKsId(Long ksId);
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/data/service/IKuaishouLiveDataOverviewService.java

@@ -0,0 +1,61 @@
+package com.ruixuan.data.service;
+
+import com.ruixuan.data.entity.KuaishouLiveDataOverview;
+
+import java.util.List;
+
+/**
+ * 直播数据概览Service接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface IKuaishouLiveDataOverviewService {
+    /**
+     * 查询直播数据概览
+     *
+     * @param ksId 直播数据概览主键
+     * @return 直播数据概览
+     */
+    public KuaishouLiveDataOverview selectKuaishouLiveDataOverviewByKsId(Long ksId);
+
+    /**
+     * 查询直播数据概览列表
+     *
+     * @param kuaishouLiveDataOverview 直播数据概览
+     * @return 直播数据概览集合
+     */
+    public List<KuaishouLiveDataOverview> selectKuaishouLiveDataOverviewList(KuaishouLiveDataOverview kuaishouLiveDataOverview);
+
+    /**
+     * 新增直播数据概览
+     *
+     * @param kuaishouLiveDataOverview 直播数据概览
+     * @return 结果
+     */
+    public int insertKuaishouLiveDataOverview(KuaishouLiveDataOverview kuaishouLiveDataOverview);
+
+    /**
+     * 修改直播数据概览
+     *
+     * @param kuaishouLiveDataOverview 直播数据概览
+     * @return 结果
+     */
+    public int updateKuaishouLiveDataOverview(KuaishouLiveDataOverview kuaishouLiveDataOverview);
+
+    /**
+     * 批量删除直播数据概览
+     *
+     * @param ksIds 需要删除的直播数据概览主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataOverviewByKsIds(Long[] ksIds);
+
+    /**
+     * 删除直播数据概览信息
+     *
+     * @param ksId 直播数据概览主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveDataOverviewByKsId(Long ksId);
+}

+ 90 - 0
ruixuan-live/src/main/java/com/ruixuan/data/service/impl/KuaishouLiveDataAnalysisServiceImpl.java

@@ -0,0 +1,90 @@
+package com.ruixuan.data.service.impl;
+
+import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.data.entity.KuaishouLiveDataAnalysis;
+import com.ruixuan.data.mapper.KuaishouLiveDataAnalysisMapper;
+import com.ruixuan.data.service.IKuaishouLiveDataAnalysisService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 商品分析数据Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Service
+public class KuaishouLiveDataAnalysisServiceImpl implements IKuaishouLiveDataAnalysisService {
+    @Autowired
+    private KuaishouLiveDataAnalysisMapper kuaishouLiveDataAnalysisMapper;
+
+    /**
+     * 查询商品分析数据
+     *
+     * @param ksId 商品分析数据主键
+     * @return 商品分析数据
+     */
+    @Override
+    public KuaishouLiveDataAnalysis selectKuaishouLiveDataAnalysisByKsId(Long ksId) {
+        return kuaishouLiveDataAnalysisMapper.selectKuaishouLiveDataAnalysisByKsId(ksId);
+    }
+
+    /**
+     * 查询商品分析数据列表
+     *
+     * @param kuaishouLiveDataAnalysis 商品分析数据
+     * @return 商品分析数据
+     */
+    @Override
+    public List<KuaishouLiveDataAnalysis> selectKuaishouLiveDataAnalysisList(KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis) {
+        return kuaishouLiveDataAnalysisMapper.selectKuaishouLiveDataAnalysisList(kuaishouLiveDataAnalysis);
+    }
+
+    /**
+     * 新增商品分析数据
+     *
+     * @param kuaishouLiveDataAnalysis 商品分析数据
+     * @return 结果
+     */
+    @Override
+    public int insertKuaishouLiveDataAnalysis(KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis) {
+        kuaishouLiveDataAnalysis.setCreateTime(DateUtils.getNowDate());
+        return kuaishouLiveDataAnalysisMapper.insertKuaishouLiveDataAnalysis(kuaishouLiveDataAnalysis);
+    }
+
+    /**
+     * 修改商品分析数据
+     *
+     * @param kuaishouLiveDataAnalysis 商品分析数据
+     * @return 结果
+     */
+    @Override
+    public int updateKuaishouLiveDataAnalysis(KuaishouLiveDataAnalysis kuaishouLiveDataAnalysis) {
+        kuaishouLiveDataAnalysis.setUpdateTime(DateUtils.getNowDate());
+        return kuaishouLiveDataAnalysisMapper.updateKuaishouLiveDataAnalysis(kuaishouLiveDataAnalysis);
+    }
+
+    /**
+     * 批量删除商品分析数据
+     *
+     * @param ksIds 需要删除的商品分析数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveDataAnalysisByKsIds(Long[] ksIds) {
+        return kuaishouLiveDataAnalysisMapper.deleteKuaishouLiveDataAnalysisByKsIds(ksIds);
+    }
+
+    /**
+     * 删除商品分析数据信息
+     *
+     * @param ksId 商品分析数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveDataAnalysisByKsId(Long ksId) {
+        return kuaishouLiveDataAnalysisMapper.deleteKuaishouLiveDataAnalysisByKsId(ksId);
+    }
+}

+ 90 - 0
ruixuan-live/src/main/java/com/ruixuan/data/service/impl/KuaishouLiveDataFunnelServiceImpl.java

@@ -0,0 +1,90 @@
+package com.ruixuan.data.service.impl;
+
+import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.data.entity.KuaishouLiveDataFunnel;
+import com.ruixuan.data.mapper.KuaishouLiveDataFunnelMapper;
+import com.ruixuan.data.service.IKuaishouLiveDataFunnelService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 直播漏斗数据Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Service
+public class KuaishouLiveDataFunnelServiceImpl implements IKuaishouLiveDataFunnelService {
+    @Autowired
+    private KuaishouLiveDataFunnelMapper kuaishouLiveDataFunnelMapper;
+
+    /**
+     * 查询直播漏斗数据
+     *
+     * @param ksId 直播漏斗数据主键
+     * @return 直播漏斗数据
+     */
+    @Override
+    public KuaishouLiveDataFunnel selectKuaishouLiveDataFunnelByKsId(Long ksId) {
+        return kuaishouLiveDataFunnelMapper.selectKuaishouLiveDataFunnelByKsId(ksId);
+    }
+
+    /**
+     * 查询直播漏斗数据列表
+     *
+     * @param kuaishouLiveDataFunnel 直播漏斗数据
+     * @return 直播漏斗数据
+     */
+    @Override
+    public List<KuaishouLiveDataFunnel> selectKuaishouLiveDataFunnelList(KuaishouLiveDataFunnel kuaishouLiveDataFunnel) {
+        return kuaishouLiveDataFunnelMapper.selectKuaishouLiveDataFunnelList(kuaishouLiveDataFunnel);
+    }
+
+    /**
+     * 新增直播漏斗数据
+     *
+     * @param kuaishouLiveDataFunnel 直播漏斗数据
+     * @return 结果
+     */
+    @Override
+    public int insertKuaishouLiveDataFunnel(KuaishouLiveDataFunnel kuaishouLiveDataFunnel) {
+        kuaishouLiveDataFunnel.setCreateTime(DateUtils.getNowDate());
+        return kuaishouLiveDataFunnelMapper.insertKuaishouLiveDataFunnel(kuaishouLiveDataFunnel);
+    }
+
+    /**
+     * 修改直播漏斗数据
+     *
+     * @param kuaishouLiveDataFunnel 直播漏斗数据
+     * @return 结果
+     */
+    @Override
+    public int updateKuaishouLiveDataFunnel(KuaishouLiveDataFunnel kuaishouLiveDataFunnel) {
+        kuaishouLiveDataFunnel.setUpdateTime(DateUtils.getNowDate());
+        return kuaishouLiveDataFunnelMapper.updateKuaishouLiveDataFunnel(kuaishouLiveDataFunnel);
+    }
+
+    /**
+     * 批量删除直播漏斗数据
+     *
+     * @param ksIds 需要删除的直播漏斗数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveDataFunnelByKsIds(Long[] ksIds) {
+        return kuaishouLiveDataFunnelMapper.deleteKuaishouLiveDataFunnelByKsIds(ksIds);
+    }
+
+    /**
+     * 删除直播漏斗数据信息
+     *
+     * @param ksId 直播漏斗数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveDataFunnelByKsId(Long ksId) {
+        return kuaishouLiveDataFunnelMapper.deleteKuaishouLiveDataFunnelByKsId(ksId);
+    }
+}

+ 90 - 0
ruixuan-live/src/main/java/com/ruixuan/data/service/impl/KuaishouLiveDataKanbanServiceImpl.java

@@ -0,0 +1,90 @@
+package com.ruixuan.data.service.impl;
+
+import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.data.entity.KuaishouLiveDataKanban;
+import com.ruixuan.data.mapper.KuaishouLiveDataKanbanMapper;
+import com.ruixuan.data.service.IKuaishouLiveDataKanbanService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 直播数据看板Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Service
+public class KuaishouLiveDataKanbanServiceImpl implements IKuaishouLiveDataKanbanService {
+    @Autowired
+    private KuaishouLiveDataKanbanMapper kuaishouLiveDataKanbanMapper;
+
+    /**
+     * 查询直播数据看板
+     *
+     * @param ksId 直播数据看板主键
+     * @return 直播数据看板
+     */
+    @Override
+    public KuaishouLiveDataKanban selectKuaishouLiveDataKanbanByKsId(Long ksId) {
+        return kuaishouLiveDataKanbanMapper.selectKuaishouLiveDataKanbanByKsId(ksId);
+    }
+
+    /**
+     * 查询直播数据看板列表
+     *
+     * @param kuaishouLiveDataKanban 直播数据看板
+     * @return 直播数据看板
+     */
+    @Override
+    public List<KuaishouLiveDataKanban> selectKuaishouLiveDataKanbanList(KuaishouLiveDataKanban kuaishouLiveDataKanban) {
+        return kuaishouLiveDataKanbanMapper.selectKuaishouLiveDataKanbanList(kuaishouLiveDataKanban);
+    }
+
+    /**
+     * 新增直播数据看板
+     *
+     * @param kuaishouLiveDataKanban 直播数据看板
+     * @return 结果
+     */
+    @Override
+    public int insertKuaishouLiveDataKanban(KuaishouLiveDataKanban kuaishouLiveDataKanban) {
+        kuaishouLiveDataKanban.setCreateTime(DateUtils.getNowDate());
+        return kuaishouLiveDataKanbanMapper.insertKuaishouLiveDataKanban(kuaishouLiveDataKanban);
+    }
+
+    /**
+     * 修改直播数据看板
+     *
+     * @param kuaishouLiveDataKanban 直播数据看板
+     * @return 结果
+     */
+    @Override
+    public int updateKuaishouLiveDataKanban(KuaishouLiveDataKanban kuaishouLiveDataKanban) {
+        kuaishouLiveDataKanban.setUpdateTime(DateUtils.getNowDate());
+        return kuaishouLiveDataKanbanMapper.updateKuaishouLiveDataKanban(kuaishouLiveDataKanban);
+    }
+
+    /**
+     * 批量删除直播数据看板
+     *
+     * @param ksIds 需要删除的直播数据看板主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveDataKanbanByKsIds(Long[] ksIds) {
+        return kuaishouLiveDataKanbanMapper.deleteKuaishouLiveDataKanbanByKsIds(ksIds);
+    }
+
+    /**
+     * 删除直播数据看板信息
+     *
+     * @param ksId 直播数据看板主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveDataKanbanByKsId(Long ksId) {
+        return kuaishouLiveDataKanbanMapper.deleteKuaishouLiveDataKanbanByKsId(ksId);
+    }
+}

+ 90 - 0
ruixuan-live/src/main/java/com/ruixuan/data/service/impl/KuaishouLiveDataOverviewServiceImpl.java

@@ -0,0 +1,90 @@
+package com.ruixuan.data.service.impl;
+
+import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.data.entity.KuaishouLiveDataOverview;
+import com.ruixuan.data.mapper.KuaishouLiveDataOverviewMapper;
+import com.ruixuan.data.service.IKuaishouLiveDataOverviewService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 直播数据概览Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Service
+public class KuaishouLiveDataOverviewServiceImpl implements IKuaishouLiveDataOverviewService {
+    @Autowired
+    private KuaishouLiveDataOverviewMapper kuaishouLiveDataOverviewMapper;
+
+    /**
+     * 查询直播数据概览
+     *
+     * @param ksId 直播数据概览主键
+     * @return 直播数据概览
+     */
+    @Override
+    public KuaishouLiveDataOverview selectKuaishouLiveDataOverviewByKsId(Long ksId) {
+        return kuaishouLiveDataOverviewMapper.selectKuaishouLiveDataOverviewByKsId(ksId);
+    }
+
+    /**
+     * 查询直播数据概览列表
+     *
+     * @param kuaishouLiveDataOverview 直播数据概览
+     * @return 直播数据概览
+     */
+    @Override
+    public List<KuaishouLiveDataOverview> selectKuaishouLiveDataOverviewList(KuaishouLiveDataOverview kuaishouLiveDataOverview) {
+        return kuaishouLiveDataOverviewMapper.selectKuaishouLiveDataOverviewList(kuaishouLiveDataOverview);
+    }
+
+    /**
+     * 新增直播数据概览
+     *
+     * @param kuaishouLiveDataOverview 直播数据概览
+     * @return 结果
+     */
+    @Override
+    public int insertKuaishouLiveDataOverview(KuaishouLiveDataOverview kuaishouLiveDataOverview) {
+        kuaishouLiveDataOverview.setCreateTime(DateUtils.getNowDate());
+        return kuaishouLiveDataOverviewMapper.insertKuaishouLiveDataOverview(kuaishouLiveDataOverview);
+    }
+
+    /**
+     * 修改直播数据概览
+     *
+     * @param kuaishouLiveDataOverview 直播数据概览
+     * @return 结果
+     */
+    @Override
+    public int updateKuaishouLiveDataOverview(KuaishouLiveDataOverview kuaishouLiveDataOverview) {
+        kuaishouLiveDataOverview.setUpdateTime(DateUtils.getNowDate());
+        return kuaishouLiveDataOverviewMapper.updateKuaishouLiveDataOverview(kuaishouLiveDataOverview);
+    }
+
+    /**
+     * 批量删除直播数据概览
+     *
+     * @param ksIds 需要删除的直播数据概览主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveDataOverviewByKsIds(Long[] ksIds) {
+        return kuaishouLiveDataOverviewMapper.deleteKuaishouLiveDataOverviewByKsIds(ksIds);
+    }
+
+    /**
+     * 删除直播数据概览信息
+     *
+     * @param ksId 直播数据概览主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveDataOverviewByKsId(Long ksId) {
+        return kuaishouLiveDataOverviewMapper.deleteKuaishouLiveDataOverviewByKsId(ksId);
+    }
+}

+ 97 - 0
ruixuan-live/src/main/java/com/ruixuan/live/controller/KuaishouLiveBroadcastController.java

@@ -0,0 +1,97 @@
+package com.ruixuan.live.controller;
+
+import com.ruixuan.common.annotation.Log;
+import com.ruixuan.common.core.controller.BaseController;
+import com.ruixuan.common.core.domain.AjaxResult;
+import com.ruixuan.common.core.page.TableDataInfo;
+import com.ruixuan.common.enums.BusinessType;
+import com.ruixuan.common.utils.poi.ExcelUtil;
+import com.ruixuan.live.entity.KuaishouLiveBroadcast;
+import com.ruixuan.live.service.IKuaishouLiveBroadcastService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 快手—直播Controller
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Api(tags = "操盘手——直播业务")
+@RestController
+@RequestMapping("/live/broadcast")
+public class KuaishouLiveBroadcastController extends BaseController {
+    @Autowired
+    private IKuaishouLiveBroadcastService kuaishouLiveBroadcastService;
+
+    /**
+     * 查询快手—直播列表
+     */
+    @GetMapping("/list")
+    @ApiOperation(value = "查询快手直播账户列表")
+    public TableDataInfo list(KuaishouLiveBroadcast kuaishouLiveBroadcast) {
+        startPage();
+        List<KuaishouLiveBroadcast> list = kuaishouLiveBroadcastService.selectKuaishouLiveBroadcastList(kuaishouLiveBroadcast);
+        return getDataTable(list);
+    }
+
+    /**
+     * 获取快手—直播详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id) {
+        return AjaxResult.success(kuaishouLiveBroadcastService.selectKuaishouLiveBroadcastById(id));
+    }
+
+    /**
+     * 新增快手—直播
+     */
+    @Log(title = "快手—直播", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody KuaishouLiveBroadcast kuaishouLiveBroadcast) {
+        return toAjax(kuaishouLiveBroadcastService.insertKuaishouLiveBroadcast(kuaishouLiveBroadcast));
+    }
+
+    /**
+     * 修改快手—直播
+     */
+    @Log(title = "快手—直播", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody KuaishouLiveBroadcast kuaishouLiveBroadcast) {
+        return toAjax(kuaishouLiveBroadcastService.updateKuaishouLiveBroadcast(kuaishouLiveBroadcast));
+    }
+
+    /**
+     * 删除快手—直播
+     */
+    @Log(title = "快手—直播", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids) {
+        return toAjax(kuaishouLiveBroadcastService.deleteKuaishouLiveBroadcastByIds(ids));
+    }
+
+
+    /**
+     * 导出快手—直播列表
+     */
+    @Log(title = "快手—直播", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, KuaishouLiveBroadcast kuaishouLiveBroadcast) {
+        List<KuaishouLiveBroadcast> list = kuaishouLiveBroadcastService.selectKuaishouLiveBroadcastList(kuaishouLiveBroadcast);
+        ExcelUtil<KuaishouLiveBroadcast> util = new ExcelUtil<KuaishouLiveBroadcast>(KuaishouLiveBroadcast.class);
+        util.exportExcel(response, list, "快手—直播数据");
+    }
+
+}

+ 119 - 0
ruixuan-live/src/main/java/com/ruixuan/live/controller/KuaishouLiveUserAccountController.java

@@ -0,0 +1,119 @@
+package com.ruixuan.live.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ruixuan.common.annotation.Log;
+import com.ruixuan.common.core.controller.BaseController;
+import com.ruixuan.common.core.domain.AjaxResult;
+import com.ruixuan.common.core.domain.ResultResponse;
+import com.ruixuan.common.core.page.TableDataInfo;
+import com.ruixuan.common.enums.BusinessType;
+import com.ruixuan.common.utils.poi.ExcelUtil;
+import com.ruixuan.live.entity.KuaishouLiveUserAccount;
+import com.ruixuan.live.service.IKuaishouLiveUserAccountService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 快手直播账户Controller
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Api(tags = "操盘手——直播账户")
+@RestController
+@RequestMapping("/live/account")
+public class KuaishouLiveUserAccountController extends BaseController {
+    @Autowired
+    private IKuaishouLiveUserAccountService kuaishouLiveUserAccountService;
+
+    /**
+     * 查询快手直播账户列表
+     */
+    @GetMapping("/list")
+    @ApiOperation(value = "查询快手直播账户列表")
+    public TableDataInfo list(KuaishouLiveUserAccount kuaishouLiveUserAccount) {
+        startPage();
+        List<KuaishouLiveUserAccount> list = kuaishouLiveUserAccountService.selectKuaishouLiveUserAccountList(kuaishouLiveUserAccount);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询快手昵称/账户集合
+     */
+    @GetMapping("/queryNicknameList")
+    @ApiOperation(value = "查询快手昵称/账户集合")
+    public TableDataInfo queryNicknameList(KuaishouLiveUserAccount kuaishouLiveUserAccount) {
+        startPage();
+        List<JSONObject> list = kuaishouLiveUserAccountService.queryNicknameList(kuaishouLiveUserAccount);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询运营/销售
+     */
+    @GetMapping("/queryRoles")
+    @ApiOperation(value = "查询(1-运营/2-销售)人员集")
+    public ResultResponse queryRoles(String type) {
+        return kuaishouLiveUserAccountService.queryRoles(type);
+    }
+
+    /**
+     * 新增快手直播账户
+     */
+    @PostMapping(value = "/add")
+    @ApiOperation(value = "新增快手直播账户")
+    public ResultResponse add(@RequestBody KuaishouLiveUserAccount kuaishouLiveUserAccount) {
+        return kuaishouLiveUserAccountService.insertKuaishouLiveUserAccount(kuaishouLiveUserAccount);
+    }
+
+    /**
+     * 修改快手直播账户
+     */
+    @PostMapping(value = "/edit")
+    @ApiOperation(value = "修改快手直播账户")
+    public ResultResponse edit(@RequestBody KuaishouLiveUserAccount kuaishouLiveUserAccount) {
+        return kuaishouLiveUserAccountService.updateKuaishouLiveUserAccount(kuaishouLiveUserAccount);
+    }
+
+    /**
+     * 获取快手直播账户详细信息
+     */
+    @GetMapping(value = "getById")
+    @ApiOperation(value = "获取快手直播账户详细信息")
+    public AjaxResult getInfo(@ApiParam("id")  String id) {
+        return AjaxResult.success(kuaishouLiveUserAccountService.selectKuaishouLiveUserAccountById(id));
+    }
+
+    /**
+     * 导出快手直播账户列表
+     */
+    @Log(title = "快手直播账户", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, KuaishouLiveUserAccount kuaishouLiveUserAccount) {
+        List<KuaishouLiveUserAccount> list = kuaishouLiveUserAccountService.selectKuaishouLiveUserAccountList(kuaishouLiveUserAccount);
+        ExcelUtil<KuaishouLiveUserAccount> util = new ExcelUtil<KuaishouLiveUserAccount>(KuaishouLiveUserAccount.class);
+        util.exportExcel(response, list, "快手直播账户数据");
+    }
+
+    /**
+     * 删除快手直播账户
+     */
+    @Log(title = "快手直播账户", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids) {
+        return toAjax(kuaishouLiveUserAccountService.deleteKuaishouLiveUserAccountByIds(ids));
+    }
+}

+ 187 - 0
ruixuan-live/src/main/java/com/ruixuan/live/entity/KuaishouLiveBroadcast.java

@@ -0,0 +1,187 @@
+package com.ruixuan.live.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruixuan.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 快手—直播对象 kuaishou_live_broadcast
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Data
+public class KuaishouLiveBroadcast implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    private String id;
+
+    /**
+     * 快手ID
+     */
+    @Excel(name = "快手ID")
+    private Long ksId;
+
+    /**
+     * 快手昵称
+     */
+    @Excel(name = "快手昵称")
+    private String ksName;
+
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID")
+    private Long accountId;
+
+    /**
+     * 账户名称
+     */
+    @Excel(name = "账户名称")
+    private String accountName;
+
+    /**
+     * 实际GMV
+     */
+    @Excel(name = "实际GMV")
+    private String actualGmv;
+
+    /**
+     * 目标GMV
+     */
+    @Excel(name = "目标GMV")
+    private String goalGmv;
+
+    private String gmvRoi;
+
+    /**
+     * 上传文件数 (默认为0,后续上传数据时更新)
+     */
+    private int uploadFileCount;
+
+    /**
+     * 上传图片数 (默认为0,后续上传数据时更新)
+     */
+    private int uploadPictureCount;
+
+    /**
+     * 直播时间
+     */
+    @Excel(name = "直播时间")
+    private String liveTime;
+
+    /**
+     * 直播开始时间
+     */
+    @Excel(name = "直播开始时间")
+    private String startTime;
+
+    /**
+     * 直播结束时间
+     */
+    @Excel(name = "直播结束时间")
+    private String endTime;
+
+    /**
+     * 直播间级别:S、A、 B
+     */
+    @Excel(name = "直播间级别:S、A、 B")
+    private String liveLevel;
+
+    /**
+     * 主播id
+     */
+    @Excel(name = "主播id")
+    private String anchorId;
+
+    /**
+     * 主播
+     */
+    @Excel(name = "主播")
+    private String anchor;
+
+    /**
+     * 操盘手id
+     */
+    @Excel(name = "操盘手id")
+    private String traderId;
+
+    /**
+     * 操盘手
+     */
+    @Excel(name = "操盘手")
+    private String trader;
+
+    /**
+     * 中控id
+     */
+    @Excel(name = "中控id")
+    private String centralControlId;
+
+    /**
+     * 中控
+     */
+    @Excel(name = "中控")
+    private String centralController;
+
+    /**
+     * 场控id
+     */
+    @Excel(name = "场控id")
+    private String fieldControlId;
+
+    /**
+     * 场控
+     */
+    @Excel(name = "场控")
+    private String fieldController;
+
+    /**
+     * 内容id
+     */
+    @Excel(name = "内容id")
+    private String contentControlId;
+
+    /**
+     * 内容
+     */
+    @Excel(name = "内容")
+    private String contentController;
+
+    /**
+     * 投流id
+     */
+    @Excel(name = "投流id")
+    private String inputControlId;
+
+    /**
+     * 投流
+     */
+    @Excel(name = "投流")
+    private String inputController;
+
+    /**
+     * 创建人ID
+     */
+    @Excel(name = "创建人ID")
+    private String createrId;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+}

+ 122 - 0
ruixuan-live/src/main/java/com/ruixuan/live/entity/KuaishouLiveUserAccount.java

@@ -0,0 +1,122 @@
+package com.ruixuan.live.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruixuan.common.annotation.Excel;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 快手直播账户对象 kuaishou_live_user_account
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Data
+@ApiModel(value = "kuaishouLiveUserAccount", description = "快手直播账户对象")
+public class KuaishouLiveUserAccount implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    private String id;
+
+    /**
+     * 快手ID
+     */
+    @Excel(name = "快手ID")
+    private Long ksId;
+
+    /**
+     * 快手昵称
+     */
+    @Excel(name = "快手昵称")
+    private String ksName;
+
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID")
+    private Long accountId;
+
+    /**
+     * 账户名称
+     */
+    @Excel(name = "账户名称")
+    private String accountName;
+
+    /**
+     * 账户类型
+     */
+    @Excel(name = "账户类型")
+    private String accountType;
+
+    /**
+     * 销售负责人Id
+     */
+    @Excel(name = "销售负责人Id")
+    private String saleLeaderId;
+
+    /**
+     * 销售负责人
+     */
+    @Excel(name = "销售负责人")
+    private String saleLeader;
+
+    /**
+     * 运营负责人Id
+     */
+    @Excel(name = "运营负责人Id")
+    private String operatorLeaderId;
+
+    /**
+     * 运营负责人
+     */
+    @Excel(name = "运营负责人")
+    private String operatorLeader;
+
+    /**
+     * 设计负责人Id
+     */
+    @Excel(name = "设计负责人Id")
+    private String designerLeaderId;
+
+    /**
+     * 设计负责人
+     */
+    @Excel(name = "设计负责人")
+    private String designerLeader;
+
+    /**
+     * 投放类型
+     */
+    @Excel(name = "投放类型")
+    private String putType;
+
+    /**
+     * 创建人ID
+     */
+    @Excel(name = "创建人ID")
+    private String createrId;
+
+    /**
+     * 协作人集
+     */
+    private String collaboratorList;
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    private Integer count;
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/live/entity/KuaishouLiveUserAccountPart.java

@@ -0,0 +1,61 @@
+package com.ruixuan.live.entity;
+
+import com.ruixuan.common.annotation.Excel;
+import com.ruixuan.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * 快手账户协作人群对象 kuaishou_live_user_account_part
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Data
+@ApiModel(value = "KuaishouLiveUserAccountPart", description = "快手账户协作人群对象")
+public class KuaishouLiveUserAccountPart extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 快手ID
+     */
+    @Excel(name = "快手ID")
+    private Long ksId;
+
+    /**
+     * 快手昵称
+     */
+    @Excel(name = "快手昵称")
+    private String ksName;
+
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID")
+    private Long accountId;
+
+    /**
+     * 账户名称
+     */
+    @Excel(name = "账户名称")
+    private String accountName;
+
+    /**
+     * 协作人ID
+     */
+    @Excel(name = "协作人ID")
+    private String collaboratorId;
+
+    /**
+     * 协作人
+     */
+    @Excel(name = "协作人")
+    private String collaborator;
+
+    /**
+     * 创建人ID
+     */
+    @Excel(name = "创建人ID")
+    private String createrId;
+
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/live/mapper/KuaishouLiveBroadcastMapper.java

@@ -0,0 +1,61 @@
+package com.ruixuan.live.mapper;
+
+import com.ruixuan.live.entity.KuaishouLiveBroadcast;
+
+import java.util.List;
+
+/**
+ * 快手—直播Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface KuaishouLiveBroadcastMapper {
+    /**
+     * 查询快手—直播
+     *
+     * @param id 快手—直播主键
+     * @return 快手—直播
+     */
+    public KuaishouLiveBroadcast selectKuaishouLiveBroadcastById(String id);
+
+    /**
+     * 查询快手—直播列表
+     *
+     * @param kuaishouLiveBroadcast 快手—直播
+     * @return 快手—直播集合
+     */
+    public List<KuaishouLiveBroadcast> selectKuaishouLiveBroadcastList(KuaishouLiveBroadcast kuaishouLiveBroadcast);
+
+    /**
+     * 新增快手—直播
+     *
+     * @param kuaishouLiveBroadcast 快手—直播
+     * @return 结果
+     */
+    public int insertKuaishouLiveBroadcast(KuaishouLiveBroadcast kuaishouLiveBroadcast);
+
+    /**
+     * 修改快手—直播
+     *
+     * @param kuaishouLiveBroadcast 快手—直播
+     * @return 结果
+     */
+    public int updateKuaishouLiveBroadcast(KuaishouLiveBroadcast kuaishouLiveBroadcast);
+
+    /**
+     * 删除快手—直播
+     *
+     * @param id 快手—直播主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveBroadcastById(String id);
+
+    /**
+     * 批量删除快手—直播
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveBroadcastByIds(String[] ids);
+}

+ 67 - 0
ruixuan-live/src/main/java/com/ruixuan/live/mapper/KuaishouLiveUserAccountMapper.java

@@ -0,0 +1,67 @@
+package com.ruixuan.live.mapper;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ruixuan.live.entity.KuaishouLiveUserAccount;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 快手直播账户Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface KuaishouLiveUserAccountMapper {
+    /**
+     * 查询快手直播账户
+     *
+     * @param id 快手直播账户主键
+     * @return 快手直播账户
+     */
+    KuaishouLiveUserAccount selectKuaishouLiveUserAccountById(String id);
+
+    /**
+     * 查询快手直播账户列表
+     *
+     * @param kuaishouLiveUserAccount 快手直播账户
+     * @return 快手直播账户集合
+     */
+    List<KuaishouLiveUserAccount> selectKuaishouLiveUserAccountList(KuaishouLiveUserAccount kuaishouLiveUserAccount);
+
+    /**
+     * 新增快手直播账户
+     *
+     * @param kuaishouLiveUserAccount 快手直播账户
+     * @return 结果
+     */
+    int insertKuaishouLiveUserAccount(KuaishouLiveUserAccount kuaishouLiveUserAccount);
+
+    /**
+     * 修改快手直播账户
+     *
+     * @param kuaishouLiveUserAccount 快手直播账户
+     * @return 结果
+     */
+    int updateKuaishouLiveUserAccount(KuaishouLiveUserAccount kuaishouLiveUserAccount);
+
+    /**
+     * 删除快手直播账户
+     *
+     * @param id 快手直播账户主键
+     * @return 结果
+     */
+    int deleteKuaishouLiveUserAccountById(String id);
+
+    /**
+     * 批量删除快手直播账户
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteKuaishouLiveUserAccountByIds(String[] ids);
+
+    List<JSONObject> queryNicknameList(KuaishouLiveUserAccount kuaishouLiveUserAccount);
+
+    KuaishouLiveUserAccount getOne(@Param("ksId") Long ksId,@Param("accountName") String accountName);
+}

+ 36 - 0
ruixuan-live/src/main/java/com/ruixuan/live/mapper/KuaishouLiveUserAccountPartMapper.java

@@ -0,0 +1,36 @@
+package com.ruixuan.live.mapper;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ruixuan.live.entity.KuaishouLiveUserAccountPart;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 快手账户协作人群Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface KuaishouLiveUserAccountPartMapper {
+    /**
+     * 查询快手账户协作人群
+     *
+     * @param id 快手账户协作人群主键
+     * @return 快手账户协作人群
+     */
+    List<KuaishouLiveUserAccountPart> selectKuaishouLiveUserAccountPartById(Long ksId);
+
+    /**
+     * 删除快手账户协作人群
+     *
+     * @param id 快手账户协作人群主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveUserAccountPartById(Long ksId);
+
+
+    void replaceBatch(@Param(value = "collaborators") List<JSONObject> collaborators);
+
+    List<JSONObject> queryCollaboratorsById(Long ksId);
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/live/service/IKuaishouLiveBroadcastService.java

@@ -0,0 +1,61 @@
+package com.ruixuan.live.service;
+
+import com.ruixuan.live.entity.KuaishouLiveBroadcast;
+
+import java.util.List;
+
+/**
+ * 快手—直播Service接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface IKuaishouLiveBroadcastService {
+    /**
+     * 查询快手—直播
+     *
+     * @param id 快手—直播主键
+     * @return 快手—直播
+     */
+    public KuaishouLiveBroadcast selectKuaishouLiveBroadcastById(String id);
+
+    /**
+     * 查询快手—直播列表
+     *
+     * @param kuaishouLiveBroadcast 快手—直播
+     * @return 快手—直播集合
+     */
+    public List<KuaishouLiveBroadcast> selectKuaishouLiveBroadcastList(KuaishouLiveBroadcast kuaishouLiveBroadcast);
+
+    /**
+     * 新增快手—直播
+     *
+     * @param kuaishouLiveBroadcast 快手—直播
+     * @return 结果
+     */
+    public int insertKuaishouLiveBroadcast(KuaishouLiveBroadcast kuaishouLiveBroadcast);
+
+    /**
+     * 修改快手—直播
+     *
+     * @param kuaishouLiveBroadcast 快手—直播
+     * @return 结果
+     */
+    public int updateKuaishouLiveBroadcast(KuaishouLiveBroadcast kuaishouLiveBroadcast);
+
+    /**
+     * 批量删除快手—直播
+     *
+     * @param ids 需要删除的快手—直播主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveBroadcastByIds(String[] ids);
+
+    /**
+     * 删除快手—直播信息
+     *
+     * @param id 快手—直播主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveBroadcastById(String id);
+}

+ 29 - 0
ruixuan-live/src/main/java/com/ruixuan/live/service/IKuaishouLiveUserAccountPartService.java

@@ -0,0 +1,29 @@
+package com.ruixuan.live.service;
+
+import com.ruixuan.live.entity.KuaishouLiveUserAccountPart;
+
+import java.util.List;
+
+/**
+ * 快手账户协作人群Service接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface IKuaishouLiveUserAccountPartService {
+    /**
+     * 查询快手账户协作人群
+     *
+     * @param id 快手账户协作人群主键
+     * @return 快手账户协作人群
+     */
+    public List<KuaishouLiveUserAccountPart> selectKuaishouLiveUserAccountPartById(Long ksId);
+
+    /**
+     * 删除快手账户协作人群信息
+     *
+     * @param id 快手账户协作人群主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveUserAccountPartById(Long ksId);
+}

+ 68 - 0
ruixuan-live/src/main/java/com/ruixuan/live/service/IKuaishouLiveUserAccountService.java

@@ -0,0 +1,68 @@
+package com.ruixuan.live.service;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ruixuan.common.core.domain.ResultResponse;
+import com.ruixuan.common.core.page.TableDataInfo;
+import com.ruixuan.live.entity.KuaishouLiveUserAccount;
+
+import java.util.List;
+
+/**
+ * 快手直播账户Service接口
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+public interface IKuaishouLiveUserAccountService {
+    /**
+     * 查询快手直播账户
+     *
+     * @param id 快手直播账户主键
+     * @return 快手直播账户
+     */
+     JSONObject selectKuaishouLiveUserAccountById(String id);
+
+    /**
+     * 查询快手直播账户列表
+     *
+     * @param kuaishouLiveUserAccount 快手直播账户
+     * @return 快手直播账户集合
+     */
+    public List<KuaishouLiveUserAccount> selectKuaishouLiveUserAccountList(KuaishouLiveUserAccount kuaishouLiveUserAccount);
+
+    /**
+     * 新增快手直播账户
+     *
+     * @param kuaishouLiveUserAccount 快手直播账户
+     * @return 结果
+     */
+    public ResultResponse insertKuaishouLiveUserAccount(KuaishouLiveUserAccount kuaishouLiveUserAccount);
+
+    /**
+     * 修改快手直播账户
+     *
+     * @param kuaishouLiveUserAccount 快手直播账户
+     * @return 结果
+     */
+    public ResultResponse updateKuaishouLiveUserAccount(KuaishouLiveUserAccount kuaishouLiveUserAccount);
+
+    /**
+     * 批量删除快手直播账户
+     *
+     * @param ids 需要删除的快手直播账户主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveUserAccountByIds(String[] ids);
+
+    /**
+     * 删除快手直播账户信息
+     *
+     * @param id 快手直播账户主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveUserAccountById(String id);
+
+    List<JSONObject> queryNicknameList(KuaishouLiveUserAccount kuaishouLiveUserAccount);
+
+    ResultResponse queryRoles(String type);
+}

+ 90 - 0
ruixuan-live/src/main/java/com/ruixuan/live/service/impl/KuaishouLiveBroadcastServiceImpl.java

@@ -0,0 +1,90 @@
+package com.ruixuan.live.service.impl;
+
+import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.live.entity.KuaishouLiveBroadcast;
+import com.ruixuan.live.mapper.KuaishouLiveBroadcastMapper;
+import com.ruixuan.live.service.IKuaishouLiveBroadcastService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 快手—直播Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Service
+public class KuaishouLiveBroadcastServiceImpl implements IKuaishouLiveBroadcastService {
+    @Autowired
+    private KuaishouLiveBroadcastMapper kuaishouLiveBroadcastMapper;
+
+    /**
+     * 查询快手—直播
+     *
+     * @param id 快手—直播主键
+     * @return 快手—直播
+     */
+    @Override
+    public KuaishouLiveBroadcast selectKuaishouLiveBroadcastById(String id) {
+        return kuaishouLiveBroadcastMapper.selectKuaishouLiveBroadcastById(id);
+    }
+
+    /**
+     * 查询快手—直播列表
+     *
+     * @param kuaishouLiveBroadcast 快手—直播
+     * @return 快手—直播
+     */
+    @Override
+    public List<KuaishouLiveBroadcast> selectKuaishouLiveBroadcastList(KuaishouLiveBroadcast kuaishouLiveBroadcast) {
+        return kuaishouLiveBroadcastMapper.selectKuaishouLiveBroadcastList(kuaishouLiveBroadcast);
+    }
+
+    /**
+     * 新增快手—直播
+     *
+     * @param kuaishouLiveBroadcast 快手—直播
+     * @return 结果
+     */
+    @Override
+    public int insertKuaishouLiveBroadcast(KuaishouLiveBroadcast kuaishouLiveBroadcast) {
+        kuaishouLiveBroadcast.setCreateTime(DateUtils.getNowDate());
+        return kuaishouLiveBroadcastMapper.insertKuaishouLiveBroadcast(kuaishouLiveBroadcast);
+    }
+
+    /**
+     * 修改快手—直播
+     *
+     * @param kuaishouLiveBroadcast 快手—直播
+     * @return 结果
+     */
+    @Override
+    public int updateKuaishouLiveBroadcast(KuaishouLiveBroadcast kuaishouLiveBroadcast) {
+        kuaishouLiveBroadcast.setUpdateTime(DateUtils.getNowDate());
+        return kuaishouLiveBroadcastMapper.updateKuaishouLiveBroadcast(kuaishouLiveBroadcast);
+    }
+
+    /**
+     * 批量删除快手—直播
+     *
+     * @param ids 需要删除的快手—直播主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveBroadcastByIds(String[] ids) {
+        return kuaishouLiveBroadcastMapper.deleteKuaishouLiveBroadcastByIds(ids);
+    }
+
+    /**
+     * 删除快手—直播信息
+     *
+     * @param id 快手—直播主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveBroadcastById(String id) {
+        return kuaishouLiveBroadcastMapper.deleteKuaishouLiveBroadcastById(id);
+    }
+}

+ 45 - 0
ruixuan-live/src/main/java/com/ruixuan/live/service/impl/KuaishouLiveUserAccountPartServiceImpl.java

@@ -0,0 +1,45 @@
+package com.ruixuan.live.service.impl;
+
+import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.live.entity.KuaishouLiveUserAccountPart;
+import com.ruixuan.live.mapper.KuaishouLiveUserAccountPartMapper;
+import com.ruixuan.live.service.IKuaishouLiveUserAccountPartService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 快手账户协作人群Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Service
+public class KuaishouLiveUserAccountPartServiceImpl implements IKuaishouLiveUserAccountPartService {
+    @Autowired
+    private KuaishouLiveUserAccountPartMapper kuaishouLiveUserAccountPartMapper;
+
+    /**
+     * 查询快手账户协作人群
+     *
+     * @param id 快手账户协作人群主键
+     * @return 快手账户协作人群
+     */
+    @Override
+    public List<KuaishouLiveUserAccountPart> selectKuaishouLiveUserAccountPartById(Long ksId) {
+        return kuaishouLiveUserAccountPartMapper.selectKuaishouLiveUserAccountPartById(ksId);
+    }
+
+
+    /**
+     * 删除快手账户协作人群信息
+     *
+     * @param id 快手账户协作人群主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveUserAccountPartById(Long ksId) {
+        return kuaishouLiveUserAccountPartMapper.deleteKuaishouLiveUserAccountPartById(ksId);
+    }
+}

+ 161 - 0
ruixuan-live/src/main/java/com/ruixuan/live/service/impl/KuaishouLiveUserAccountServiceImpl.java

@@ -0,0 +1,161 @@
+package com.ruixuan.live.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.ruixuan.common.core.domain.ResultResponse;
+import com.ruixuan.live.entity.KuaishouLiveUserAccount;
+import com.ruixuan.live.entity.KuaishouLiveUserAccountPart;
+import com.ruixuan.live.mapper.KuaishouLiveUserAccountMapper;
+import com.ruixuan.live.mapper.KuaishouLiveUserAccountPartMapper;
+import com.ruixuan.live.service.IKuaishouLiveUserAccountService;
+import com.ruixuan.system.service.ISysUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * 快手直播账户Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-05-31
+ */
+@Service
+public class KuaishouLiveUserAccountServiceImpl implements IKuaishouLiveUserAccountService {
+    @Autowired
+    private KuaishouLiveUserAccountMapper kuaishouLiveUserAccountMapper;
+    @Autowired
+    private KuaishouLiveUserAccountPartMapper accountPartMapper;
+
+    @Autowired
+    private ISysUserService sysUserService;
+
+    /**
+     * 查询快手直播账户
+     *
+     * @param id 快手直播账户主键
+     * @return 快手直播账户
+     */
+    @Override
+    public JSONObject selectKuaishouLiveUserAccountById(String id) {
+        KuaishouLiveUserAccount account = kuaishouLiveUserAccountMapper.selectKuaishouLiveUserAccountById(id);
+        JSONObject object = JSONObject.parseObject(JSON.toJSONString(account));
+        if (object != null) {
+            List<JSONObject> parts = accountPartMapper.queryCollaboratorsById(account.getKsId());
+            object.put("collaborators", parts);
+        }
+        return object;
+    }
+
+    /**
+     * 查询快手直播账户列表
+     *
+     * @param kuaishouLiveUserAccount 快手直播账户
+     * @return 快手直播账户
+     */
+    @Override
+    public List<KuaishouLiveUserAccount> selectKuaishouLiveUserAccountList(KuaishouLiveUserAccount kuaishouLiveUserAccount) {
+        return kuaishouLiveUserAccountMapper.selectKuaishouLiveUserAccountList(kuaishouLiveUserAccount);
+    }
+
+    /**
+     * 新增快手直播账户
+     *
+     * @param kuaishouLiveUserAccount 快手直播账户
+     * @return 结果
+     */
+    @Override
+    public ResultResponse insertKuaishouLiveUserAccount(KuaishouLiveUserAccount account) {
+        KuaishouLiveUserAccount one = kuaishouLiveUserAccountMapper.getOne(account.getKsId(), account.getAccountName());
+        if (one != null) {
+            return ResultResponse.error("快手ID:" + account.getKsId() + "下已存在该账户名,请重新命名!");
+        }
+        String collaboratorList = account.getCollaboratorList();
+        if (collaboratorList != null) {
+            List<JSONObject> collaborators = JSONArray.parseArray(collaboratorList, JSONObject.class);
+            for (JSONObject obj : collaborators) {
+                obj.put("ksId", account.getKsId());
+                obj.put("ksName", account.getKsName());
+                obj.put("accountId", account.getAccountId());
+                obj.put("accountName", account.getAccountName());
+                obj.put("createrId", account.getCreaterId());
+            }
+            if (collaborators != null) {
+                accountPartMapper.replaceBatch(collaborators);
+            }
+        }
+        account.setId(UUID.randomUUID().toString().replace("-", ""));
+        int num = kuaishouLiveUserAccountMapper.insertKuaishouLiveUserAccount(account);
+        if (num > 0) {
+            return ResultResponse.success();
+        }
+        return ResultResponse.error("fail");
+    }
+
+    /**
+     * 修改快手直播账户
+     */
+    @Override
+    public ResultResponse updateKuaishouLiveUserAccount(KuaishouLiveUserAccount account) {
+        KuaishouLiveUserAccount one = kuaishouLiveUserAccountMapper.getOne(account.getKsId(), account.getAccountName());
+        if (one == null) {
+            return ResultResponse.error("未查询到账户");
+        }
+        int i = kuaishouLiveUserAccountMapper.updateKuaishouLiveUserAccount(account);
+        if (i > 0) {
+            String collaboratorList = account.getCollaboratorList();
+            if (collaboratorList != null) {
+                List<JSONObject> collaborators = JSONArray.parseArray(collaboratorList, JSONObject.class);
+                for (JSONObject obj : collaborators) {
+                    obj.put("ksId", account.getKsId());
+                    obj.put("ksName", account.getKsName());
+                    obj.put("accountId", account.getAccountId());
+                    obj.put("accountName", account.getAccountName());
+                    obj.put("createrId", account.getCreaterId());
+                }
+                if (collaborators != null) {
+                    accountPartMapper.deleteKuaishouLiveUserAccountPartById(account.getKsId());
+                    accountPartMapper.replaceBatch(collaborators);
+                }
+            }
+            return ResultResponse.success();
+        }
+        return ResultResponse.error("fail");
+    }
+
+    /**
+     * 批量删除快手直播账户
+     *
+     * @param ids 需要删除的快手直播账户主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveUserAccountByIds(String[] ids) {
+        return kuaishouLiveUserAccountMapper.deleteKuaishouLiveUserAccountByIds(ids);
+    }
+
+    /**
+     * 删除快手直播账户信息
+     *
+     * @param id 快手直播账户主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouLiveUserAccountById(String id) {
+        return kuaishouLiveUserAccountMapper.deleteKuaishouLiveUserAccountById(id);
+    }
+
+    @Override
+    public List<JSONObject> queryNicknameList(KuaishouLiveUserAccount kuaishouLiveUserAccount) {
+        return kuaishouLiveUserAccountMapper.queryNicknameList(kuaishouLiveUserAccount);
+    }
+
+    @Override
+    public ResultResponse queryRoles(String type) {
+        List<JSONObject> list = sysUserService.queryRoles(type);
+        return ResultResponse.success(list);
+    }
+
+}

+ 124 - 0
ruixuan-live/src/main/resources/mapper/data/KuaishouLiveDataAnalysisMapper.xml

@@ -0,0 +1,124 @@
+<?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.ruixuan.data.mapper.KuaishouLiveDataAnalysisMapper">
+
+    <resultMap type="com.ruixuan.data.entity.KuaishouLiveDataAnalysis" id="KuaishouLiveDataAnalysisResult">
+        <result property="ksId" column="ks_id"/>
+        <result property="ksName" column="ks_name"/>
+        <result property="accountId" column="account_id"/>
+        <result property="accountName" column="account_name"/>
+        <result property="waresName" column="wares_name"/>
+        <result property="waresPutDate" column="wares_put_date"/>
+        <result property="waresPrice" column="wares_price"/>
+        <result property="waresSalesAmount" column="wares_sales_amount"/>
+        <result property="waresSalesVolume" column="wares_sales_volume"/>
+        <result property="topayOrders" column="topay_orders"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectKuaishouLiveDataAnalysisVo">
+        select ks_id,
+               ks_name,
+               account_id,
+               account_name,
+               wares_name,
+               wares_put_date,
+               wares_price,
+               wares_sales_amount,
+               wares_sales_volume,
+               topay_orders,
+               create_time,
+               update_time
+        from kuaishou_live_data_analysis
+    </sql>
+
+    <select id="selectKuaishouLiveDataAnalysisList" parameterType="com.ruixuan.data.entity.KuaishouLiveDataAnalysis"
+            resultMap="KuaishouLiveDataAnalysisResult">
+        <include refid="selectKuaishouLiveDataAnalysisVo"/>
+        <where>
+            <if test="ksId != null ">and ks_id = #{ksId}</if>
+            <if test="ksName != null  and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
+            <if test="accountId != null ">and account_id = #{accountId}</if>
+            <if test="accountName != null  and accountName != ''">and account_name like concat('%', #{accountName},
+                '%')
+            </if>
+            <if test="waresName != null  and waresName != ''">and wares_name like concat('%', #{waresName}, '%')</if>
+            <if test="waresPutDate != null  and waresPutDate != ''">and wares_put_date = #{waresPutDate}</if>
+            <if test="waresPrice != null ">and wares_price = #{waresPrice}</if>
+            <if test="waresSalesAmount != null ">and wares_sales_amount = #{waresSalesAmount}</if>
+            <if test="waresSalesVolume != null ">and wares_sales_volume = #{waresSalesVolume}</if>
+            <if test="topayOrders != null ">and topay_orders = #{topayOrders}</if>
+        </where>
+    </select>
+
+    <select id="selectKuaishouLiveDataAnalysisByKsId" parameterType="Long" resultMap="KuaishouLiveDataAnalysisResult">
+        <include refid="selectKuaishouLiveDataAnalysisVo"/>
+        where ks_id = #{ksId}
+    </select>
+
+    <insert id="insertKuaishouLiveDataAnalysis" parameterType="com.ruixuan.data.entity.KuaishouLiveDataAnalysis">
+        insert into kuaishou_live_data_analysis
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="ksId != null">ks_id,</if>
+            <if test="ksName != null">ks_name,</if>
+            <if test="accountId != null">account_id,</if>
+            <if test="accountName != null">account_name,</if>
+            <if test="waresName != null">wares_name,</if>
+            <if test="waresPutDate != null">wares_put_date,</if>
+            <if test="waresPrice != null">wares_price,</if>
+            <if test="waresSalesAmount != null">wares_sales_amount,</if>
+            <if test="waresSalesVolume != null">wares_sales_volume,</if>
+            <if test="topayOrders != null">topay_orders,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="ksId != null">#{ksId},</if>
+            <if test="ksName != null">#{ksName},</if>
+            <if test="accountId != null">#{accountId},</if>
+            <if test="accountName != null">#{accountName},</if>
+            <if test="waresName != null">#{waresName},</if>
+            <if test="waresPutDate != null">#{waresPutDate},</if>
+            <if test="waresPrice != null">#{waresPrice},</if>
+            <if test="waresSalesAmount != null">#{waresSalesAmount},</if>
+            <if test="waresSalesVolume != null">#{waresSalesVolume},</if>
+            <if test="topayOrders != null">#{topayOrders},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateKuaishouLiveDataAnalysis" parameterType="com.ruixuan.data.entity.KuaishouLiveDataAnalysis">
+        update kuaishou_live_data_analysis
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="ksName != null">ks_name = #{ksName},</if>
+            <if test="accountId != null">account_id = #{accountId},</if>
+            <if test="accountName != null">account_name = #{accountName},</if>
+            <if test="waresName != null">wares_name = #{waresName},</if>
+            <if test="waresPutDate != null">wares_put_date = #{waresPutDate},</if>
+            <if test="waresPrice != null">wares_price = #{waresPrice},</if>
+            <if test="waresSalesAmount != null">wares_sales_amount = #{waresSalesAmount},</if>
+            <if test="waresSalesVolume != null">wares_sales_volume = #{waresSalesVolume},</if>
+            <if test="topayOrders != null">topay_orders = #{topayOrders},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where ks_id = #{ksId}
+    </update>
+
+    <delete id="deleteKuaishouLiveDataAnalysisByKsId" parameterType="Long">
+        delete
+        from kuaishou_live_data_analysis
+        where ks_id = #{ksId}
+    </delete>
+
+    <delete id="deleteKuaishouLiveDataAnalysisByKsIds" parameterType="String">
+        delete from kuaishou_live_data_analysis where ks_id in
+        <foreach item="ksId" collection="array" open="(" separator="," close=")">
+            #{ksId}
+        </foreach>
+    </delete>
+</mapper>

+ 100 - 0
ruixuan-live/src/main/resources/mapper/data/KuaishouLiveDataFunnelMapper.xml

@@ -0,0 +1,100 @@
+<?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.ruixuan.data.mapper.KuaishouLiveDataFunnelMapper">
+
+    <resultMap type="com.ruixuan.data.entity.KuaishouLiveDataFunnel" id="KuaishouLiveDataFunnelResult">
+        <result property="ksId" column="ks_id"/>
+        <result property="ksName" column="ks_name"/>
+        <result property="accountId" column="account_id"/>
+        <result property="accountName" column="account_name"/>
+        <result property="allViewers" column="all_viewers"/>
+        <result property="statDate" column="stat_date"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectKuaishouLiveDataFunnelVo">
+        select ks_id,
+               ks_name,
+               account_id,
+               account_name,
+               all_viewers,
+               stat_date,
+               create_time,
+               update_time
+        from kuaishou_live_data_funnel
+    </sql>
+
+    <select id="selectKuaishouLiveDataFunnelList" parameterType="com.ruixuan.data.entity.KuaishouLiveDataFunnel"
+            resultMap="KuaishouLiveDataFunnelResult">
+        <include refid="selectKuaishouLiveDataFunnelVo"/>
+        <where>
+            <if test="ksId != null ">and ks_id = #{ksId}</if>
+            <if test="ksName != null  and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
+            <if test="accountId != null ">and account_id = #{accountId}</if>
+            <if test="accountName != null  and accountName != ''">and account_name like concat('%', #{accountName},
+                '%')
+            </if>
+            <if test="allViewers != null ">and all_viewers = #{allViewers}</if>
+            <if test="statDate != null  and statDate != ''">and stat_date = #{statDate}</if>
+        </where>
+    </select>
+
+    <select id="selectKuaishouLiveDataFunnelByKsId" parameterType="Long" resultMap="KuaishouLiveDataFunnelResult">
+        <include refid="selectKuaishouLiveDataFunnelVo"/>
+        where ks_id = #{ksId}
+    </select>
+
+    <insert id="insertKuaishouLiveDataFunnel" parameterType="com.ruixuan.data.entity.KuaishouLiveDataFunnel">
+        insert into kuaishou_live_data_funnel
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="ksId != null">ks_id,</if>
+            <if test="ksName != null">ks_name,</if>
+            <if test="accountId != null">account_id,</if>
+            <if test="accountName != null">account_name,</if>
+            <if test="allViewers != null">all_viewers,</if>
+            <if test="statDate != null">stat_date,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="ksId != null">#{ksId},</if>
+            <if test="ksName != null">#{ksName},</if>
+            <if test="accountId != null">#{accountId},</if>
+            <if test="accountName != null">#{accountName},</if>
+            <if test="allViewers != null">#{allViewers},</if>
+            <if test="statDate != null">#{statDate},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateKuaishouLiveDataFunnel" parameterType="com.ruixuan.data.entity.KuaishouLiveDataFunnel">
+        update kuaishou_live_data_funnel
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="ksName != null">ks_name = #{ksName},</if>
+            <if test="accountId != null">account_id = #{accountId},</if>
+            <if test="accountName != null">account_name = #{accountName},</if>
+            <if test="allViewers != null">all_viewers = #{allViewers},</if>
+            <if test="statDate != null">stat_date = #{statDate},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where ks_id = #{ksId}
+    </update>
+
+    <delete id="deleteKuaishouLiveDataFunnelByKsId" parameterType="Long">
+        delete
+        from kuaishou_live_data_funnel
+        where ks_id = #{ksId}
+    </delete>
+
+    <delete id="deleteKuaishouLiveDataFunnelByKsIds" parameterType="String">
+        delete from kuaishou_live_data_funnel where ks_id in
+        <foreach item="ksId" collection="array" open="(" separator="," close=")">
+            #{ksId}
+        </foreach>
+    </delete>
+</mapper>

+ 178 - 0
ruixuan-live/src/main/resources/mapper/data/KuaishouLiveDataKanbanMapper.xml

@@ -0,0 +1,178 @@
+<?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.ruixuan.data.mapper.KuaishouLiveDataKanbanMapper">
+
+    <resultMap type="com.ruixuan.data.entity.KuaishouLiveDataKanban" id="KuaishouLiveDataKanbanResult">
+        <result property="ksId" column="ks_id"/>
+        <result property="ksName" column="ks_name"/>
+        <result property="accountId" column="account_id"/>
+        <result property="accountName" column="account_name"/>
+        <result property="onlineViewers" column="online_viewers"/>
+        <result property="viewers" column="viewers"/>
+        <result property="viewingTimes" column="viewing_times"/>
+        <result property="perViewingTime" column="per_viewing_time"/>
+        <result property="fansViewingTime" column="fans_viewing_time"/>
+        <result property="rewards" column="rewards"/>
+        <result property="putWares" column="put_wares"/>
+        <result property="newFans" column="new_fans"/>
+        <result property="likes" column="likes"/>
+        <result property="waresClicks" column="wares_clicks"/>
+        <result property="carClicks" column="car_clicks"/>
+        <result property="allAmount" column="all_amount"/>
+        <result property="allTurnover" column="all_turnover"/>
+        <result property="allOrders" column="all_orders"/>
+        <result property="turnoverRatio" column="turnover_ratio"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectKuaishouLiveDataKanbanVo">
+        select ks_id,
+               ks_name,
+               account_id,
+               account_name,
+               online_viewers,
+               viewers,
+               viewing_times,
+               per_viewing_time,
+               fans_viewing_time,
+               rewards,
+               put_wares,
+               new_fans,
+               likes,
+               wares_clicks,
+               car_clicks,
+               all_amount,
+               all_turnover,
+               all_orders,
+               turnover_ratio,
+               create_time,
+               update_time
+        from kuaishou_live_data_kanban
+    </sql>
+
+    <select id="selectKuaishouLiveDataKanbanList" parameterType="com.ruixuan.data.entity.KuaishouLiveDataKanban"
+            resultMap="KuaishouLiveDataKanbanResult">
+        <include refid="selectKuaishouLiveDataKanbanVo"/>
+        <where>
+            <if test="ksId != null ">and ks_id = #{ksId}</if>
+            <if test="ksName != null  and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
+            <if test="accountId != null ">and account_id = #{accountId}</if>
+            <if test="accountName != null  and accountName != ''">and account_name like concat('%', #{accountName},
+                '%')
+            </if>
+            <if test="onlineViewers != null ">and online_viewers = #{onlineViewers}</if>
+            <if test="viewers != null ">and viewers = #{viewers}</if>
+            <if test="viewingTimes != null ">and viewing_times = #{viewingTimes}</if>
+            <if test="perViewingTime != null ">and per_viewing_time = #{perViewingTime}</if>
+            <if test="fansViewingTime != null ">and fans_viewing_time = #{fansViewingTime}</if>
+            <if test="rewards != null ">and rewards = #{rewards}</if>
+            <if test="putWares != null ">and put_wares = #{putWares}</if>
+            <if test="newFans != null ">and new_fans = #{newFans}</if>
+            <if test="likes != null ">and likes = #{likes}</if>
+            <if test="waresClicks != null ">and wares_clicks = #{waresClicks}</if>
+            <if test="carClicks != null ">and car_clicks = #{carClicks}</if>
+            <if test="allAmount != null ">and all_amount = #{allAmount}</if>
+            <if test="allTurnover != null ">and all_turnover = #{allTurnover}</if>
+            <if test="allOrders != null ">and all_orders = #{allOrders}</if>
+            <if test="turnoverRatio != null  and turnoverRatio != ''">and turnover_ratio = #{turnoverRatio}</if>
+        </where>
+    </select>
+
+    <select id="selectKuaishouLiveDataKanbanByKsId" parameterType="Long" resultMap="KuaishouLiveDataKanbanResult">
+        <include refid="selectKuaishouLiveDataKanbanVo"/>
+        where ks_id = #{ksId}
+    </select>
+
+    <insert id="insertKuaishouLiveDataKanban" parameterType="com.ruixuan.data.entity.KuaishouLiveDataKanban">
+        insert into kuaishou_live_data_kanban
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="ksId != null">ks_id,</if>
+            <if test="ksName != null">ks_name,</if>
+            <if test="accountId != null">account_id,</if>
+            <if test="accountName != null">account_name,</if>
+            <if test="onlineViewers != null">online_viewers,</if>
+            <if test="viewers != null">viewers,</if>
+            <if test="viewingTimes != null">viewing_times,</if>
+            <if test="perViewingTime != null">per_viewing_time,</if>
+            <if test="fansViewingTime != null">fans_viewing_time,</if>
+            <if test="rewards != null">rewards,</if>
+            <if test="putWares != null">put_wares,</if>
+            <if test="newFans != null">new_fans,</if>
+            <if test="likes != null">likes,</if>
+            <if test="waresClicks != null">wares_clicks,</if>
+            <if test="carClicks != null">car_clicks,</if>
+            <if test="allAmount != null">all_amount,</if>
+            <if test="allTurnover != null">all_turnover,</if>
+            <if test="allOrders != null">all_orders,</if>
+            <if test="turnoverRatio != null">turnover_ratio,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="ksId != null">#{ksId},</if>
+            <if test="ksName != null">#{ksName},</if>
+            <if test="accountId != null">#{accountId},</if>
+            <if test="accountName != null">#{accountName},</if>
+            <if test="onlineViewers != null">#{onlineViewers},</if>
+            <if test="viewers != null">#{viewers},</if>
+            <if test="viewingTimes != null">#{viewingTimes},</if>
+            <if test="perViewingTime != null">#{perViewingTime},</if>
+            <if test="fansViewingTime != null">#{fansViewingTime},</if>
+            <if test="rewards != null">#{rewards},</if>
+            <if test="putWares != null">#{putWares},</if>
+            <if test="newFans != null">#{newFans},</if>
+            <if test="likes != null">#{likes},</if>
+            <if test="waresClicks != null">#{waresClicks},</if>
+            <if test="carClicks != null">#{carClicks},</if>
+            <if test="allAmount != null">#{allAmount},</if>
+            <if test="allTurnover != null">#{allTurnover},</if>
+            <if test="allOrders != null">#{allOrders},</if>
+            <if test="turnoverRatio != null">#{turnoverRatio},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateKuaishouLiveDataKanban" parameterType="com.ruixuan.data.entity.KuaishouLiveDataKanban">
+        update kuaishou_live_data_kanban
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="ksName != null">ks_name = #{ksName},</if>
+            <if test="accountId != null">account_id = #{accountId},</if>
+            <if test="accountName != null">account_name = #{accountName},</if>
+            <if test="onlineViewers != null">online_viewers = #{onlineViewers},</if>
+            <if test="viewers != null">viewers = #{viewers},</if>
+            <if test="viewingTimes != null">viewing_times = #{viewingTimes},</if>
+            <if test="perViewingTime != null">per_viewing_time = #{perViewingTime},</if>
+            <if test="fansViewingTime != null">fans_viewing_time = #{fansViewingTime},</if>
+            <if test="rewards != null">rewards = #{rewards},</if>
+            <if test="putWares != null">put_wares = #{putWares},</if>
+            <if test="newFans != null">new_fans = #{newFans},</if>
+            <if test="likes != null">likes = #{likes},</if>
+            <if test="waresClicks != null">wares_clicks = #{waresClicks},</if>
+            <if test="carClicks != null">car_clicks = #{carClicks},</if>
+            <if test="allAmount != null">all_amount = #{allAmount},</if>
+            <if test="allTurnover != null">all_turnover = #{allTurnover},</if>
+            <if test="allOrders != null">all_orders = #{allOrders},</if>
+            <if test="turnoverRatio != null">turnover_ratio = #{turnoverRatio},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where ks_id = #{ksId}
+    </update>
+
+    <delete id="deleteKuaishouLiveDataKanbanByKsId" parameterType="Long">
+        delete
+        from kuaishou_live_data_kanban
+        where ks_id = #{ksId}
+    </delete>
+
+    <delete id="deleteKuaishouLiveDataKanbanByKsIds" parameterType="String">
+        delete from kuaishou_live_data_kanban where ks_id in
+        <foreach item="ksId" collection="array" open="(" separator="," close=")">
+            #{ksId}
+        </foreach>
+    </delete>
+</mapper>

+ 100 - 0
ruixuan-live/src/main/resources/mapper/data/KuaishouLiveDataOverviewMapper.xml

@@ -0,0 +1,100 @@
+<?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.ruixuan.data.mapper.KuaishouLiveDataOverviewMapper">
+
+    <resultMap type="com.ruixuan.data.entity.KuaishouLiveDataOverview" id="KuaishouLiveDataOverviewResult">
+        <result property="ksId" column="ks_id"/>
+        <result property="ksName" column="ks_name"/>
+        <result property="accountId" column="account_id"/>
+        <result property="accountName" column="account_name"/>
+        <result property="amounts" column="amounts"/>
+        <result property="statDate" column="stat_date"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectKuaishouLiveDataOverviewVo">
+        select ks_id,
+               ks_name,
+               account_id,
+               account_name,
+               amounts,
+               stat_date,
+               create_time,
+               update_time
+        from kuaishou_live_data_overview
+    </sql>
+
+    <select id="selectKuaishouLiveDataOverviewList" parameterType="com.ruixuan.data.entity.KuaishouLiveDataOverview"
+            resultMap="KuaishouLiveDataOverviewResult">
+        <include refid="selectKuaishouLiveDataOverviewVo"/>
+        <where>
+            <if test="ksId != null ">and ks_id = #{ksId}</if>
+            <if test="ksName != null  and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
+            <if test="accountId != null ">and account_id = #{accountId}</if>
+            <if test="accountName != null  and accountName != ''">and account_name like concat('%', #{accountName},
+                '%')
+            </if>
+            <if test="amounts != null ">and amounts = #{amounts}</if>
+            <if test="statDate != null  and statDate != ''">and stat_date = #{statDate}</if>
+        </where>
+    </select>
+
+    <select id="selectKuaishouLiveDataOverviewByKsId" parameterType="Long" resultMap="KuaishouLiveDataOverviewResult">
+        <include refid="selectKuaishouLiveDataOverviewVo"/>
+        where ks_id = #{ksId}
+    </select>
+
+    <insert id="insertKuaishouLiveDataOverview" parameterType="com.ruixuan.data.entity.KuaishouLiveDataOverview">
+        insert into kuaishou_live_data_overview
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="ksId != null">ks_id,</if>
+            <if test="ksName != null">ks_name,</if>
+            <if test="accountId != null">account_id,</if>
+            <if test="accountName != null">account_name,</if>
+            <if test="amounts != null">amounts,</if>
+            <if test="statDate != null">stat_date,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="ksId != null">#{ksId},</if>
+            <if test="ksName != null">#{ksName},</if>
+            <if test="accountId != null">#{accountId},</if>
+            <if test="accountName != null">#{accountName},</if>
+            <if test="amounts != null">#{amounts},</if>
+            <if test="statDate != null">#{statDate},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateKuaishouLiveDataOverview" parameterType="com.ruixuan.data.entity.KuaishouLiveDataOverview">
+        update kuaishou_live_data_overview
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="ksName != null">ks_name = #{ksName},</if>
+            <if test="accountId != null">account_id = #{accountId},</if>
+            <if test="accountName != null">account_name = #{accountName},</if>
+            <if test="amounts != null">amounts = #{amounts},</if>
+            <if test="statDate != null">stat_date = #{statDate},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where ks_id = #{ksId}
+    </update>
+
+    <delete id="deleteKuaishouLiveDataOverviewByKsId" parameterType="Long">
+        delete
+        from kuaishou_live_data_overview
+        where ks_id = #{ksId}
+    </delete>
+
+    <delete id="deleteKuaishouLiveDataOverviewByKsIds" parameterType="String">
+        delete from kuaishou_live_data_overview where ks_id in
+        <foreach item="ksId" collection="array" open="(" separator="," close=")">
+            #{ksId}
+        </foreach>
+    </delete>
+</mapper>

+ 219 - 0
ruixuan-live/src/main/resources/mapper/live/KuaishouLiveBroadcastMapper.xml

@@ -0,0 +1,219 @@
+<?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.ruixuan.live.mapper.KuaishouLiveBroadcastMapper">
+
+    <resultMap type="com.ruixuan.live.entity.KuaishouLiveBroadcast" id="KuaishouLiveBroadcastResult">
+        <result property="id" column="id"/>
+        <result property="ksId" column="ks_id"/>
+        <result property="ksName" column="ks_name"/>
+        <result property="accountId" column="account_id"/>
+        <result property="accountName" column="account_name"/>
+        <result property="goalGmv" column="goal_gmv"/>
+        <result property="actualGmv" column="actual_gmv"/>
+        <result property="gmvRoi" column="gmvRoi"/>
+        <result property="liveTime" column="live_time"/>
+        <result property="startTime" column="start_time"/>
+        <result property="endTime" column="end_time"/>
+        <result property="liveLevel" column="live_level"/>
+        <result property="anchorId" column="anchor_id"/>
+        <result property="anchor" column="anchor"/>
+        <result property="traderId" column="trader_id"/>
+        <result property="trader" column="trader"/>
+        <result property="centralControlId" column="central_control_id"/>
+        <result property="centralController" column="central_controller"/>
+        <result property="fieldControlId" column="field_control_id"/>
+        <result property="fieldController" column="field_controller"/>
+        <result property="contentControlId" column="content_control_id"/>
+        <result property="contentController" column="content_controller"/>
+        <result property="inputControlId" column="input_control_id"/>
+        <result property="inputController" column="input_controller"/>
+        <result property="createrId" column="creater_id"/>
+        <result property="uploadFileCount" column="upload_file_count"/>
+        <result property="uploadFileCount" column="upload_file_count"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectKuaishouLiveBroadcastVo">
+        select id,
+               ks_id,
+               ks_name,
+               account_id,
+               account_name,
+               if(goal_gmv > 10000, CONCAT(ROUND(goal_gmv / 10000, 2), 'W'), goal_gmv) as 'goal_gmv',
+               actual_gmv,
+               if(actual_gmv is null, '-', CONCAT(ROUND(actual_gmv / goal_gmv * 100, 2), '%')) as 'gmvRoi',
+               live_time,
+               start_time,
+               end_time,
+               live_level,
+               anchor_id,
+               anchor,
+               trader_id,
+               trader,
+               central_control_id,
+               central_controller,
+               field_control_id,
+               field_controller,
+               content_control_id,
+               content_controller,
+               input_control_id,
+               input_controller,
+               upload_file_count,
+               upload_picture_count
+        from kuaishou_live_broadcast
+    </sql>
+
+    <select id="selectKuaishouLiveBroadcastList" parameterType="com.ruixuan.live.entity.KuaishouLiveBroadcast"
+            resultMap="KuaishouLiveBroadcastResult">
+        <include refid="selectKuaishouLiveBroadcastVo"/>
+        <where>
+            <if test="ksId != null ">and ks_id = #{ksId}</if>
+            <if test="ksName != null  and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
+            <if test="accountId != null ">and account_id = #{accountId}</if>
+            <if test="accountName != null  and accountName != ''">and account_name like concat('%', #{accountName},
+                '%')
+            </if>
+            <if test="goalGmv != null  and goalGmv != ''">and goal_gmv = #{goalGmv}</if>
+            <if test="startTime != null  and startTime != ''">and start_time >= #{startTime}</if>
+            <if test="endTime != null  and endTime != ''">and end_time &lt;= #{endTime}</if>
+            <if test="liveLevel != null  and liveLevel != ''">and live_level = #{liveLevel}</if>
+            <if test="anchorId != null  and anchorId != ''">and anchor_id = #{anchorId}</if>
+            <if test="anchor != null  and anchor != ''">and anchor = #{anchor}</if>
+            <if test="traderId != null  and traderId != ''">and trader_id = #{traderId}</if>
+            <if test="trader != null  and trader != ''">and trader = #{trader}</if>
+            <if test="centralControlId != null  and centralControlId != ''">and central_control_id =
+                #{centralControlId}
+            </if>
+            <if test="centralController != null  and centralController != ''">and central_controller
+                like concat('%', #{centralController}, '%')
+            </if>
+            <if test="fieldControlId != null  and fieldControlId != ''">and field_control_id = #{fieldControlId}</if>
+            <if test="fieldController != null  and fieldController != ''">and field_controller
+                like concat('%', #{fieldController}, '%')
+            </if>
+            <if test="contentControlId != null  and contentControlId != ''">and content_control_id =
+                #{contentControlId}
+            </if>
+            <if test="contentController != null  and contentController != ''">and content_controller
+                like concat('%', #{contentController}, '%')
+            </if>
+            <if test="inputControlId != null  and inputControlId != ''">and input_control_id = #{inputControlId}</if>
+            <if test="inputController != null  and inputController != ''">and input_controller
+                like concat('%', #{inputController}, '%')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectKuaishouLiveBroadcastById" parameterType="String" resultMap="KuaishouLiveBroadcastResult">
+        <include refid="selectKuaishouLiveBroadcastVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertKuaishouLiveBroadcast" parameterType="com.ruixuan.live.entity.KuaishouLiveBroadcast">
+        insert into kuaishou_live_broadcast
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="ksId != null">ks_id,</if>
+            <if test="ksName != null">ks_name,</if>
+            <if test="accountId != null">account_id,</if>
+            <if test="accountName != null">account_name,</if>
+            <if test="actualGmv != null">actual_gmv,</if>
+            <if test="goalGmv != null">goal_gmv,</if>
+            <if test="liveTime != null">live_time,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="endTime != null">end_time,</if>
+            <if test="liveLevel != null">live_level,</if>
+            <if test="anchorId != null">anchor_id,</if>
+            <if test="anchor != null">anchor,</if>
+            <if test="traderId != null">trader_id,</if>
+            <if test="trader != null">trader,</if>
+            <if test="centralControlId != null">central_control_id,</if>
+            <if test="centralController != null">central_controller,</if>
+            <if test="fieldControlId != null">field_control_id,</if>
+            <if test="fieldController != null">field_controller,</if>
+            <if test="contentControlId != null">content_control_id,</if>
+            <if test="contentController != null">content_controller,</if>
+            <if test="inputControlId != null">input_control_id,</if>
+            <if test="inputController != null">input_controller,</if>
+            <if test="createrId != null">creater_id,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="ksId != null">#{ksId},</if>
+            <if test="ksName != null">#{ksName},</if>
+            <if test="accountId != null">#{accountId},</if>
+            <if test="accountName != null">#{accountName},</if>
+            <if test="actualGmv != null">#{actualGmv},</if>
+            <if test="goalGmv != null">#{goalGmv},</if>
+            <if test="liveTime != null">#{liveTime},</if>
+            <if test="startTime != null">#{startTime},</if>
+            <if test="endTime != null">#{endTime},</if>
+            <if test="liveLevel != null">#{liveLevel},</if>
+            <if test="anchorId != null">#{anchorId},</if>
+            <if test="anchor != null">#{anchor},</if>
+            <if test="traderId != null">#{traderId},</if>
+            <if test="trader != null">#{trader},</if>
+            <if test="centralControlId != null">#{centralControlId},</if>
+            <if test="centralController != null">#{centralController},</if>
+            <if test="fieldControlId != null">#{fieldControlId},</if>
+            <if test="fieldController != null">#{fieldController},</if>
+            <if test="contentControlId != null">#{contentControlId},</if>
+            <if test="contentController != null">#{contentController},</if>
+            <if test="inputControlId != null">#{inputControlId},</if>
+            <if test="inputController != null">#{inputController},</if>
+            <if test="createrId != null">#{createrId},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateKuaishouLiveBroadcast" parameterType="com.ruixuan.live.entity.KuaishouLiveBroadcast">
+        update kuaishou_live_broadcast
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="ksId != null">ks_id = #{ksId},</if>
+            <if test="ksName != null">ks_name = #{ksName},</if>
+            <if test="accountId != null">account_id = #{accountId},</if>
+            <if test="accountName != null">account_name = #{accountName},</if>
+            <if test="actualGmv != null">actual_gmv = #{actualGmv},</if>
+            <if test="goalGmv != null">goal_gmv = #{goalGmv},</if>
+            <if test="liveTime != null">live_time = #{liveTime},</if>
+            <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="endTime != null">end_time = #{endTime},</if>
+            <if test="liveLevel != null">live_level = #{liveLevel},</if>
+            <if test="anchorId != null">anchor_id = #{anchorId},</if>
+            <if test="anchor != null">anchor = #{anchor},</if>
+            <if test="traderId != null">trader_id = #{traderId},</if>
+            <if test="trader != null">trader = #{trader},</if>
+            <if test="centralControlId != null">central_control_id = #{centralControlId},</if>
+            <if test="centralController != null">central_controller = #{centralController},</if>
+            <if test="fieldControlId != null">field_control_id = #{fieldControlId},</if>
+            <if test="fieldController != null">field_controller = #{fieldController},</if>
+            <if test="contentControlId != null">content_control_id = #{contentControlId},</if>
+            <if test="contentController != null">content_controller = #{contentController},</if>
+            <if test="inputControlId != null">input_control_id = #{inputControlId},</if>
+            <if test="inputController != null">input_controller = #{inputController},</if>
+            <if test="createrId != null">creater_id = #{createrId},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteKuaishouLiveBroadcastById" parameterType="String">
+        delete
+        from kuaishou_live_broadcast
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteKuaishouLiveBroadcastByIds" parameterType="String">
+        delete from kuaishou_live_broadcast where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 196 - 0
ruixuan-live/src/main/resources/mapper/live/KuaishouLiveUserAccountMapper.xml

@@ -0,0 +1,196 @@
+<?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.ruixuan.live.mapper.KuaishouLiveUserAccountMapper">
+
+    <resultMap type="com.ruixuan.live.entity.KuaishouLiveUserAccount" id="KuaishouLiveUserAccountResult">
+        <result property="id" column="id"/>
+        <result property="ksId" column="ks_id"/>
+        <result property="ksName" column="ks_name"/>
+        <result property="accountId" column="account_id"/>
+        <result property="accountName" column="account_name"/>
+        <result property="accountType" column="account_type"/>
+        <result property="saleLeaderId" column="sale_leader_id"/>
+        <result property="saleLeader" column="sale_leader"/>
+        <result property="operatorLeaderId" column="operator_leader_id"/>
+        <result property="operatorLeader" column="operator_leader"/>
+        <result property="designerLeaderId" column="designer_leader_id"/>
+        <result property="designerLeader" column="designer_leader"/>
+        <result property="putType" column="put_type"/>
+        <result property="createrId" column="creater_id"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="count" column="count"/>
+    </resultMap>
+
+    <sql id="selectKuaishouLiveUserAccountVo">
+        select id,
+               ks_id,
+               ks_name,
+               account_id,
+               account_name,
+               account_type,
+               sale_leader_id,
+               sale_leader,
+               operator_leader_id,
+               operator_leader,
+               designer_leader_id,
+               designer_leader,
+               put_type
+        from kuaishou_live_user_account
+    </sql>
+
+    <select id="selectKuaishouLiveUserAccountList" parameterType="com.ruixuan.live.entity.KuaishouLiveUserAccount"
+            resultMap="KuaishouLiveUserAccountResult">
+        select id,
+        ks_id,
+        ks_name,
+        account_id,
+        account_name,
+        account_type,
+        sale_leader_id,
+        sale_leader,
+        operator_leader_id,
+        operator_leader,
+        designer_leader_id,
+        designer_leader,
+        put_type,
+        IFNULL(t2.count,0) as 'count'
+        from kuaishou_live_user_account t1
+        left join  (
+        SELECT ks_id as ksId,account_name as accountName, sum(1) as 'count' FROM kuaishou_live_user_account_part
+        GROUP BY ks_id,account_name
+        ) t2 ON t2.accountName = t1.account_name AND t2.ksId = t1.ks_id
+        <where>
+            <if test="ksId != null ">and ks_id = #{ksId}</if>
+            <if test="ksName != null  and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
+            <if test="accountId != null ">and account_id = #{accountId}</if>
+            <if test="accountName != null  and accountName != ''">and account_name like concat('%', #{accountName},
+                '%')
+            </if>
+            <if test="accountType != null  and accountType != ''">and account_type = #{accountType}</if>
+            <if test="saleLeaderId != null  and saleLeaderId != ''">and sale_leader_id = #{saleLeaderId}</if>
+            <if test="saleLeader != null  and saleLeader != ''">and sale_leader = #{saleLeader}</if>
+            <if test="operatorLeaderId != null  and operatorLeaderId != ''">and operator_leader_id =
+                #{operatorLeaderId}
+            </if>
+            <if test="operatorLeader != null  and operatorLeader != ''">and operator_leader = #{operatorLeader}</if>
+            <if test="designerLeaderId != null  and designerLeaderId != ''">and designer_leader_id =
+                #{designerLeaderId}
+            </if>
+            <if test="designerLeader != null  and designerLeader != ''">and designer_leader = #{designerLeader}</if>
+            <if test="putType != null  and putType != ''">and put_type = #{putType}</if>
+            <if test="createrId != null  and createrId != ''">and creater_id = #{createrId}</if>
+        </where>
+    </select>
+
+    <select id="getOne" parameterType="String" resultType="com.ruixuan.live.entity.KuaishouLiveUserAccount">
+        <include refid="selectKuaishouLiveUserAccountVo"/>
+        <where>
+            <if test="ksId != null ">and ks_id = #{ksId}</if>
+            <if test="accountName != null  and accountName != ''">and account_name=#{accountName}</if>
+        </where>
+        LIMIT 1
+    </select>
+
+    <select id="selectKuaishouLiveUserAccountById" parameterType="String" resultMap="KuaishouLiveUserAccountResult">
+        <include refid="selectKuaishouLiveUserAccountVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="queryNicknameList" parameterType="com.ruixuan.live.entity.KuaishouLiveUserAccount"
+            resultType="com.alibaba.fastjson.JSONObject">
+        select
+        ks_id as 'ksId',
+        ks_name as 'ksName',
+        account_id as 'accountId',
+        account_name as 'accountName'
+        from kuaishou_live_user_account
+        <where>
+            <if test="ksId != null ">and ks_id = #{ksId}</if>
+            <if test="ksName != null  and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
+            <if test="accountId != null ">and account_id = #{accountId}</if>
+            <if test="accountName != null  and accountName != ''">and account_name like concat('%', #{accountName},
+                '%')
+            </if>
+        </where>
+    </select>
+
+
+    <insert id="insertKuaishouLiveUserAccount" parameterType="com.ruixuan.live.entity.KuaishouLiveUserAccount">
+        insert into kuaishou_live_user_account
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="ksId != null">ks_id,</if>
+            <if test="ksName != null">ks_name,</if>
+            <if test="accountId != null">account_id,</if>
+            <if test="accountName != null">account_name,</if>
+            <if test="accountType != null">account_type,</if>
+            <if test="saleLeaderId != null">sale_leader_id,</if>
+            <if test="saleLeader != null">sale_leader,</if>
+            <if test="operatorLeaderId != null">operator_leader_id,</if>
+            <if test="operatorLeader != null">operator_leader,</if>
+            <if test="designerLeaderId != null">designer_leader_id,</if>
+            <if test="designerLeader != null">designer_leader,</if>
+            <if test="putType != null">put_type,</if>
+            <if test="createrId != null">creater_id,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="ksId != null">#{ksId},</if>
+            <if test="ksName != null">#{ksName},</if>
+            <if test="accountId != null">#{accountId},</if>
+            <if test="accountName != null">#{accountName},</if>
+            <if test="accountType != null">#{accountType},</if>
+            <if test="saleLeaderId != null">#{saleLeaderId},</if>
+            <if test="saleLeader != null">#{saleLeader},</if>
+            <if test="operatorLeaderId != null">#{operatorLeaderId},</if>
+            <if test="operatorLeader != null">#{operatorLeader},</if>
+            <if test="designerLeaderId != null">#{designerLeaderId},</if>
+            <if test="designerLeader != null">#{designerLeader},</if>
+            <if test="putType != null">#{putType},</if>
+            <if test="createrId != null">#{createrId},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateKuaishouLiveUserAccount" parameterType="com.ruixuan.live.entity.KuaishouLiveUserAccount">
+        update kuaishou_live_user_account
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="ksId != null">ks_id = #{ksId},</if>
+            <if test="ksName != null">ks_name = #{ksName},</if>
+            <if test="accountId != null">account_id = #{accountId},</if>
+            <if test="accountName != null">account_name = #{accountName},</if>
+            <if test="accountType != null">account_type = #{accountType},</if>
+            <if test="saleLeaderId != null">sale_leader_id = #{saleLeaderId},</if>
+            <if test="saleLeader != null">sale_leader = #{saleLeader},</if>
+            <if test="operatorLeaderId != null">operator_leader_id = #{operatorLeaderId},</if>
+            <if test="operatorLeader != null">operator_leader = #{operatorLeader},</if>
+            <if test="designerLeaderId != null">designer_leader_id = #{designerLeaderId},</if>
+            <if test="designerLeader != null">designer_leader = #{designerLeader},</if>
+            <if test="putType != null">put_type = #{putType},</if>
+            <if test="createrId != null">creater_id = #{createrId},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteKuaishouLiveUserAccountById" parameterType="String">
+        delete
+        from kuaishou_live_user_account
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteKuaishouLiveUserAccountByIds" parameterType="String">
+        delete from kuaishou_live_user_account where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 75 - 0
ruixuan-live/src/main/resources/mapper/live/KuaishouLiveUserAccountPartMapper.xml

@@ -0,0 +1,75 @@
+<?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.ruixuan.live.mapper.KuaishouLiveUserAccountPartMapper">
+
+    <resultMap type="com.ruixuan.live.entity.KuaishouLiveUserAccountPart" id="KuaishouLiveUserAccountPartResult">
+        <result property="ksId" column="ks_id"/>
+        <result property="ksName" column="ks_name"/>
+        <result property="accountId" column="account_id"/>
+        <result property="accountName" column="account_name"/>
+        <result property="collaboratorId" column="collaborator_id"/>
+        <result property="collaborator" column="collaborator"/>
+        <result property="createrId" column="creater_id"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectKuaishouLiveUserAccountPartVo">
+        select ks_id,
+               ks_name,
+               account_id,
+               account_name,
+               collaborator_id,
+               collaborator,
+               creater_id,
+               create_time,
+               update_time
+        from kuaishou_live_user_account_part
+    </sql>
+
+
+    <select id="queryCollaboratorsById" parameterType="Long" resultType="com.alibaba.fastjson.JSONObject">
+        select collaborator_id as 'userId', collaborator as 'name'
+        from kuaishou_live_user_account_part
+        where ks_id = #{ksId}
+    </select>
+
+    <select id="selectKuaishouLiveUserAccountPartById" parameterType="Long"
+            resultMap="KuaishouLiveUserAccountPartResult">
+        <include refid="selectKuaishouLiveUserAccountPartVo"/>
+        where ks_id = #{ksId}
+    </select>
+
+
+    <delete id="deleteKuaishouLiveUserAccountPartById" parameterType="Long">
+        delete
+        from kuaishou_live_user_account_part
+        where ks_id = #{ksId}
+    </delete>
+
+
+    <insert id="replaceBatch">
+        replace into kuaishou_live_user_account_part(
+        ks_id,
+        ks_name,
+        account_id,
+        account_name,
+        collaborator_id,
+        collaborator,
+        creater_id)
+        values
+        <foreach collection="collaborators" item="coll" separator=",">
+            (
+            #{coll.ksId},
+            #{coll.ksName},
+            #{coll.accountId},
+            #{coll.accountName},
+            #{coll.userId},
+            #{coll.nickName},
+            #{coll.createrId}
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 10 - 0
ruixuan-system/src/main/java/com/ruixuan/system/mapper/SysUserMapper.java

@@ -1,6 +1,8 @@
 package com.ruixuan.system.mapper;
 
 import java.util.List;
+
+import com.alibaba.fastjson.JSONObject;
 import org.apache.ibatis.annotations.Param;
 import com.ruixuan.common.core.domain.entity.SysUser;
 
@@ -124,4 +126,12 @@ public interface SysUserMapper
      * @return 结果
      */
     public SysUser checkEmailUnique(String email);
+
+    /**
+     * 查询角色集
+     *
+     * @param type 1-运营/2-销售
+     * @return 结果
+     */
+    List<JSONObject> queryRoles(String type);
 }

+ 33 - 23
ruixuan-system/src/main/java/com/ruixuan/system/service/ISysUserService.java

@@ -1,18 +1,20 @@
 package com.ruixuan.system.service;
 
 import java.util.List;
+
+import com.alibaba.fastjson.JSONObject;
 import com.ruixuan.common.core.domain.entity.SysUser;
 
 /**
  * 用户 业务层
- * 
+ *
  * @author ruixuan
  */
 public interface ISysUserService
 {
     /**
      * 根据条件分页查询用户列表
-     * 
+     *
      * @param user 用户信息
      * @return 用户信息集合信息
      */
@@ -20,7 +22,7 @@ public interface ISysUserService
 
     /**
      * 根据条件分页查询已分配用户角色列表
-     * 
+     *
      * @param user 用户信息
      * @return 用户信息集合信息
      */
@@ -28,7 +30,7 @@ public interface ISysUserService
 
     /**
      * 根据条件分页查询未分配用户角色列表
-     * 
+     *
      * @param user 用户信息
      * @return 用户信息集合信息
      */
@@ -36,7 +38,7 @@ public interface ISysUserService
 
     /**
      * 通过用户名查询用户
-     * 
+     *
      * @param userName 用户名
      * @return 用户对象信息
      */
@@ -44,7 +46,7 @@ public interface ISysUserService
 
     /**
      * 通过用户ID查询用户
-     * 
+     *
      * @param userId 用户ID
      * @return 用户对象信息
      */
@@ -52,7 +54,7 @@ public interface ISysUserService
 
     /**
      * 根据用户ID查询用户所属角色组
-     * 
+     *
      * @param userName 用户名
      * @return 结果
      */
@@ -60,7 +62,7 @@ public interface ISysUserService
 
     /**
      * 根据用户ID查询用户所属岗位组
-     * 
+     *
      * @param userName 用户名
      * @return 结果
      */
@@ -68,7 +70,7 @@ public interface ISysUserService
 
     /**
      * 校验用户名称是否唯一
-     * 
+     *
      * @param userName 用户名称
      * @return 结果
      */
@@ -92,21 +94,21 @@ public interface ISysUserService
 
     /**
      * 校验用户是否允许操作
-     * 
+     *
      * @param user 用户信息
      */
     public void checkUserAllowed(SysUser user);
 
     /**
      * 校验用户是否有数据权限
-     * 
+     *
      * @param userId 用户id
      */
     public void checkUserDataScope(Long userId);
 
     /**
      * 新增用户信息
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
@@ -114,7 +116,7 @@ public interface ISysUserService
 
     /**
      * 注册用户信息
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
@@ -122,7 +124,7 @@ public interface ISysUserService
 
     /**
      * 修改用户信息
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
@@ -130,7 +132,7 @@ public interface ISysUserService
 
     /**
      * 用户授权角色
-     * 
+     *
      * @param userId 用户ID
      * @param roleIds 角色组
      */
@@ -138,7 +140,7 @@ public interface ISysUserService
 
     /**
      * 修改用户状态
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
@@ -146,7 +148,7 @@ public interface ISysUserService
 
     /**
      * 修改用户基本信息
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
@@ -154,7 +156,7 @@ public interface ISysUserService
 
     /**
      * 修改用户头像
-     * 
+     *
      * @param userName 用户名
      * @param avatar 头像地址
      * @return 结果
@@ -163,7 +165,7 @@ public interface ISysUserService
 
     /**
      * 重置用户密码
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
@@ -171,7 +173,7 @@ public interface ISysUserService
 
     /**
      * 重置用户密码
-     * 
+     *
      * @param userName 用户名
      * @param password 密码
      * @return 结果
@@ -180,7 +182,7 @@ public interface ISysUserService
 
     /**
      * 通过用户ID删除用户
-     * 
+     *
      * @param userId 用户ID
      * @return 结果
      */
@@ -188,7 +190,7 @@ public interface ISysUserService
 
     /**
      * 批量删除用户信息
-     * 
+     *
      * @param userIds 需要删除的用户ID
      * @return 结果
      */
@@ -196,11 +198,19 @@ public interface ISysUserService
 
     /**
      * 导入用户数据
-     * 
+     *
      * @param userList 用户数据列表
      * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
      * @param operName 操作用户
      * @return 结果
      */
     public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
+
+    /**
+     * 查询角色集
+     *
+     * @param type 1-运营/2-销售
+     * @return 结果
+     */
+    List<JSONObject> queryRoles(String type);
 }

+ 7 - 0
ruixuan-system/src/main/java/com/ruixuan/system/service/impl/SysUserServiceImpl.java

@@ -4,6 +4,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 import javax.validation.Validator;
+
+import com.alibaba.fastjson.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -559,4 +561,9 @@ public class SysUserServiceImpl implements ISysUserService
         }
         return successMsg.toString();
     }
+
+    @Override
+    public List<JSONObject> queryRoles(String type) {
+        return userMapper.queryRoles(type);
+    }
 }

+ 288 - 210
ruixuan-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -1,221 +1,299 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruixuan.system.mapper.SysUserMapper">
 
-    <resultMap type="SysUser" id="SysUserResult">
-        <id     property="userId"       column="user_id"      />
-        <result property="deptId"       column="dept_id"      />
-        <result property="userName"     column="user_name"    />
-        <result property="nickName"     column="nick_name"    />
-        <result property="email"        column="email"        />
-        <result property="phonenumber"  column="phonenumber"  />
-        <result property="sex"          column="sex"          />
-        <result property="avatar"       column="avatar"       />
-        <result property="password"     column="password"     />
-        <result property="status"       column="status"       />
-        <result property="delFlag"      column="del_flag"     />
-        <result property="loginIp"      column="login_ip"     />
-        <result property="loginDate"    column="login_date"   />
-        <result property="createBy"     column="create_by"    />
-        <result property="createTime"   column="create_time"  />
-        <result property="updateBy"     column="update_by"    />
-        <result property="updateTime"   column="update_time"  />
-        <result property="remark"       column="remark"       />
-        <association property="dept"    column="dept_id" javaType="SysDept" resultMap="deptResult" />
-        <collection  property="roles"   javaType="java.util.List"           resultMap="RoleResult" />
+    <resultMap type="com.ruixuan.common.core.domain.entity.SysUser" id="SysUserResult">
+        <id property="userId" column="user_id"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="userName" column="user_name"/>
+        <result property="nickName" column="nick_name"/>
+        <result property="email" column="email"/>
+        <result property="phonenumber" column="phonenumber"/>
+        <result property="sex" column="sex"/>
+        <result property="avatar" column="avatar"/>
+        <result property="password" column="password"/>
+        <result property="status" column="status"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="loginIp" column="login_ip"/>
+        <result property="loginDate" column="login_date"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
+        <association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
+        <collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
     </resultMap>
-	
-    <resultMap id="deptResult" type="SysDept">
-        <id     property="deptId"    column="dept_id"     />
-        <result property="parentId"  column="parent_id"   />
-        <result property="deptName"  column="dept_name"   />
-        <result property="ancestors" column="ancestors"   />
-        <result property="orderNum"  column="order_num"   />
-        <result property="leader"    column="leader"      />
-        <result property="status"    column="dept_status" />
+
+    <resultMap id="deptResult" type="com.ruixuan.common.core.domain.entity.SysDept">
+        <id property="deptId" column="dept_id"/>
+        <result property="parentId" column="parent_id"/>
+        <result property="deptName" column="dept_name"/>
+        <result property="ancestors" column="ancestors"/>
+        <result property="orderNum" column="order_num"/>
+        <result property="leader" column="leader"/>
+        <result property="status" column="dept_status"/>
     </resultMap>
-	
-    <resultMap id="RoleResult" type="SysRole">
-        <id     property="roleId"       column="role_id"        />
-        <result property="roleName"     column="role_name"      />
-        <result property="roleKey"      column="role_key"       />
-        <result property="roleSort"     column="role_sort"      />
-        <result property="dataScope"     column="data_scope"    />
-        <result property="status"       column="role_status"    />
+
+    <resultMap id="RoleResult" type="com.ruixuan.common.core.domain.entity.SysRole">
+        <id property="roleId" column="role_id"/>
+        <result property="roleName" column="role_name"/>
+        <result property="roleKey" column="role_key"/>
+        <result property="roleSort" column="role_sort"/>
+        <result property="dataScope" column="data_scope"/>
+        <result property="status" column="role_status"/>
     </resultMap>
-	
-	<sql id="selectUserVo">
-        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, 
-        d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
-        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
+
+    <sql id="selectUserVo">
+        select u.user_id,
+               u.dept_id,
+               u.user_name,
+               u.nick_name,
+               u.email,
+               u.avatar,
+               u.phonenumber,
+               u.password,
+               u.sex,
+               u.status,
+               u.del_flag,
+               u.login_ip,
+               u.login_date,
+               u.create_by,
+               u.create_time,
+               u.remark,
+               d.dept_id,
+               d.parent_id,
+               d.ancestors,
+               d.dept_name,
+               d.order_num,
+               d.leader,
+               d.status as dept_status,
+               r.role_id,
+               r.role_name,
+               r.role_key,
+               r.role_sort,
+               r.data_scope,
+               r.status as role_status
         from sys_user u
-		    left join sys_dept d on u.dept_id = d.dept_id
-		    left join sys_user_role ur on u.user_id = ur.user_id
-		    left join sys_role r on r.role_id = ur.role_id
+                 left join sys_dept d on u.dept_id = d.dept_id
+                 left join sys_user_role ur on u.user_id = ur.user_id
+                 left join sys_role r on r.role_id = ur.role_id
     </sql>
-    
+
     <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
-		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
-		left join sys_dept d on u.dept_id = d.dept_id
-		where u.del_flag = '0'
-		<if test="userId != null and userId != 0">
-			AND u.user_id = #{userId}
-		</if>
-		<if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
-		</if>
-		<if test="status != null and status != ''">
-			AND u.status = #{status}
-		</if>
-		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
-		</if>
-		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-			AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
-		</if>
-		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-			AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
-		</if>
-		<if test="deptId != null and deptId != 0">
-			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
-		</if>
-		<!-- 数据范围过滤 -->
-		${params.dataScope}
-	</select>
-	
-	<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
-	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
-	    from sys_user u
-			 left join sys_dept d on u.dept_id = d.dept_id
-			 left join sys_user_role ur on u.user_id = ur.user_id
-			 left join sys_role r on r.role_id = ur.role_id
-	    where u.del_flag = '0' and r.role_id = #{roleId}
-	    <if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
-		</if>
-		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
-		</if>
-		<!-- 数据范围过滤 -->
-		${params.dataScope}
-	</select>
-	
-	<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
-	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
-	    from sys_user u
-			 left join sys_dept d on u.dept_id = d.dept_id
-			 left join sys_user_role ur on u.user_id = ur.user_id
-			 left join sys_role r on r.role_id = ur.role_id
-	    where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
-	    and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
-	    <if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
-		</if>
-		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
-		</if>
-		<!-- 数据范围过滤 -->
-		${params.dataScope}
-	</select>
-	
-	<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
-	    <include refid="selectUserVo"/>
-		where u.user_name = #{userName}
-	</select>
-	
-	<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
-		<include refid="selectUserVo"/>
-		where u.user_id = #{userId}
-	</select>
-	
-	<select id="checkUserNameUnique" parameterType="String" resultType="int">
-		select count(1) from sys_user where user_name = #{userName} limit 1
-	</select>
-	
-	<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} limit 1
-	</select>
-	
-	<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, email from sys_user where email = #{email} limit 1
-	</select>
-	
-	<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
- 		insert into sys_user(
- 			<if test="userId != null and userId != 0">user_id,</if>
- 			<if test="deptId != null and deptId != 0">dept_id,</if>
- 			<if test="userName != null and userName != ''">user_name,</if>
- 			<if test="nickName != null and nickName != ''">nick_name,</if>
- 			<if test="email != null and email != ''">email,</if>
- 			<if test="avatar != null and avatar != ''">avatar,</if>
- 			<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
- 			<if test="sex != null and sex != ''">sex,</if>
- 			<if test="password != null and password != ''">password,</if>
- 			<if test="status != null and status != ''">status,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
- 			<if test="remark != null and remark != ''">remark,</if>
- 			create_time
- 		)values(
- 			<if test="userId != null and userId != ''">#{userId},</if>
- 			<if test="deptId != null and deptId != ''">#{deptId},</if>
- 			<if test="userName != null and userName != ''">#{userName},</if>
- 			<if test="nickName != null and nickName != ''">#{nickName},</if>
- 			<if test="email != null and email != ''">#{email},</if>
- 			<if test="avatar != null and avatar != ''">#{avatar},</if>
- 			<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
- 			<if test="sex != null and sex != ''">#{sex},</if>
- 			<if test="password != null and password != ''">#{password},</if>
- 			<if test="status != null and status != ''">#{status},</if>
- 			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			<if test="remark != null and remark != ''">#{remark},</if>
- 			sysdate()
- 		)
-	</insert>
-	
-	<update id="updateUser" parameterType="SysUser">
- 		update sys_user
- 		<set>
- 			<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
- 			<if test="userName != null and userName != ''">user_name = #{userName},</if>
- 			<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
- 			<if test="email != null ">email = #{email},</if>
- 			<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
- 			<if test="sex != null and sex != ''">sex = #{sex},</if>
- 			<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
- 			<if test="password != null and password != ''">password = #{password},</if>
- 			<if test="status != null and status != ''">status = #{status},</if>
- 			<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
- 			<if test="loginDate != null">login_date = #{loginDate},</if>
- 			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			<if test="remark != null">remark = #{remark},</if>
- 			update_time = sysdate()
- 		</set>
- 		where user_id = #{userId}
-	</update>
-	
-	<update id="updateUserStatus" parameterType="SysUser">
- 		update sys_user set status = #{status} where user_id = #{userId}
-	</update>
-	
-	<update id="updateUserAvatar" parameterType="SysUser">
- 		update sys_user set avatar = #{avatar} where user_name = #{userName}
-	</update>
-	
-	<update id="resetUserPwd" parameterType="SysUser">
- 		update sys_user set password = #{password} where user_name = #{userName}
-	</update>
-	
-	<delete id="deleteUserById" parameterType="Long">
-		update sys_user set del_flag = '2' where user_id = #{userId}
- 	</delete>
- 	
- 	<delete id="deleteUserByIds" parameterType="Long">
- 		update sys_user set del_flag = '2' where user_id in
- 		<foreach collection="array" item="userId" open="(" separator="," close=")">
- 			#{userId}
-        </foreach> 
- 	</delete>
-	
+        select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,
+        u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from
+        sys_user u
+        left join sys_dept d on u.dept_id = d.dept_id
+        where u.del_flag = '0'
+        <if test="userId != null and userId != 0">
+            AND u.user_id = #{userId}
+        </if>
+        <if test="userName != null and userName != ''">
+            AND u.user_name like concat('%', #{userName}, '%')
+        </if>
+        <if test="status != null and status != ''">
+            AND u.status = #{status}
+        </if>
+        <if test="phonenumber != null and phonenumber != ''">
+            AND u.phonenumber like concat('%', #{phonenumber}, '%')
+        </if>
+        <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+            AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+        </if>
+        <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+            AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+        </if>
+        <if test="deptId != null and deptId != 0">
+            AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
+            ancestors) ))
+        </if>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
+    <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
+        select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
+        from sys_user u
+        left join sys_dept d on u.dept_id = d.dept_id
+        left join sys_user_role ur on u.user_id = ur.user_id
+        left join sys_role r on r.role_id = ur.role_id
+        where u.del_flag = '0' and r.role_id = #{roleId}
+        <if test="userName != null and userName != ''">
+            AND u.user_name like concat('%', #{userName}, '%')
+        </if>
+        <if test="phonenumber != null and phonenumber != ''">
+            AND u.phonenumber like concat('%', #{phonenumber}, '%')
+        </if>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
+    <select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
+        select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
+        from sys_user u
+        left join sys_dept d on u.dept_id = d.dept_id
+        left join sys_user_role ur on u.user_id = ur.user_id
+        left join sys_role r on r.role_id = ur.role_id
+        where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
+        and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and
+        ur.role_id = #{roleId})
+        <if test="userName != null and userName != ''">
+            AND u.user_name like concat('%', #{userName}, '%')
+        </if>
+        <if test="phonenumber != null and phonenumber != ''">
+            AND u.phonenumber like concat('%', #{phonenumber}, '%')
+        </if>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
+    <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
+        <include refid="selectUserVo"/>
+        where u.user_name = #{userName}
+    </select>
+
+    <select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
+        <include refid="selectUserVo"/>
+        where u.user_id = #{userId}
+    </select>
+
+    <select id="checkUserNameUnique" parameterType="String" resultType="int">
+        select count(1)
+        from sys_user
+        where user_name = #{userName} limit 1
+    </select>
+
+    <select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
+        select user_id, phonenumber
+        from sys_user
+        where phonenumber = #{phonenumber} limit 1
+    </select>
+
+    <select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
+        select user_id, email
+        from sys_user
+        where email = #{email} limit 1
+    </select>
+
+    <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
+        insert into sys_user(
+        <if test="userId != null and userId != 0">user_id,</if>
+        <if test="deptId != null and deptId != 0">dept_id,</if>
+        <if test="userName != null and userName != ''">user_name,</if>
+        <if test="nickName != null and nickName != ''">nick_name,</if>
+        <if test="email != null and email != ''">email,</if>
+        <if test="avatar != null and avatar != ''">avatar,</if>
+        <if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
+        <if test="sex != null and sex != ''">sex,</if>
+        <if test="password != null and password != ''">password,</if>
+        <if test="status != null and status != ''">status,</if>
+        <if test="createBy != null and createBy != ''">create_by,</if>
+        <if test="remark != null and remark != ''">remark,</if>
+        create_time
+        )values(
+        <if test="userId != null and userId != ''">#{userId},</if>
+        <if test="deptId != null and deptId != ''">#{deptId},</if>
+        <if test="userName != null and userName != ''">#{userName},</if>
+        <if test="nickName != null and nickName != ''">#{nickName},</if>
+        <if test="email != null and email != ''">#{email},</if>
+        <if test="avatar != null and avatar != ''">#{avatar},</if>
+        <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
+        <if test="sex != null and sex != ''">#{sex},</if>
+        <if test="password != null and password != ''">#{password},</if>
+        <if test="status != null and status != ''">#{status},</if>
+        <if test="createBy != null and createBy != ''">#{createBy},</if>
+        <if test="remark != null and remark != ''">#{remark},</if>
+        sysdate()
+        )
+    </insert>
+
+    <update id="updateUser" parameterType="SysUser">
+        update sys_user
+        <set>
+            <if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
+            <if test="userName != null and userName != ''">user_name = #{userName},</if>
+            <if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
+            <if test="email != null ">email = #{email},</if>
+            <if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
+            <if test="sex != null and sex != ''">sex = #{sex},</if>
+            <if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
+            <if test="password != null and password != ''">password = #{password},</if>
+            <if test="status != null and status != ''">status = #{status},</if>
+            <if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
+            <if test="loginDate != null">login_date = #{loginDate},</if>
+            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            update_time = sysdate()
+        </set>
+        where user_id = #{userId}
+    </update>
+
+    <update id="updateUserStatus" parameterType="SysUser">
+        update sys_user
+        set status = #{status}
+        where user_id = #{userId}
+    </update>
+
+    <update id="updateUserAvatar" parameterType="SysUser">
+        update sys_user
+        set avatar = #{avatar}
+        where user_name = #{userName}
+    </update>
+
+    <update id="resetUserPwd" parameterType="SysUser">
+        update sys_user
+        set password = #{password}
+        where user_name = #{userName}
+    </update>
+
+    <delete id="deleteUserById" parameterType="Long">
+        update sys_user
+        set del_flag = '2'
+        where user_id = #{userId}
+    </delete>
+
+    <delete id="deleteUserByIds" parameterType="Long">
+        update sys_user set del_flag = '2' where user_id in
+        <foreach collection="array" item="userId" open="(" separator="," close=")">
+            #{userId}
+        </foreach>
+    </delete>
+
+
+    <select id="queryRoles" parameterType="String" resultType="com.alibaba.fastjson.JSONObject">
+        SELECT
+        t1.user_id as 'userId',
+        nick_name as 'nickName'
+        FROM sys_user t1
+        INNER JOIN sys_user_role t2 ON t1.user_id = t2.user_id
+        WHERE t1.status = 0
+        <if test="type == 1 ">
+            AND t2.role_id in (SELECT role_id FROM sys_role WHERE role_key in (
+            'liveBroadcastOperation',
+            'centralControl',
+            'fieldControl',
+            'component',
+            'operations',
+            'operationsManager',
+            'directorOperations'
+            )
+            )
+        </if>
+        <if test="type == 2 ">
+            AND t2.role_id in (
+            SELECT role_id FROM sys_role WHERE role_key in (
+            'electricPin',
+            'facePin',
+            'eBayAmazon',
+            'salesDirector',
+            'merchantOperation',
+            'trader',
+            'traderTwo'
+            )
+            )
+        </if>
+    </select>
 </mapper>