From af9dbca3efad378d31bbde9f78cea6e3ba08d39f Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 26 一月 2026 11:07:13 +0800
Subject: [PATCH] 经销商管理

---
 server/dmmall_service/src/main/java/com/doumee/dao/system/vo/CountDataVO.java                  |   27 ++
 server/dmmall_service/src/main/java/com/doumee/service/business/WorkbenchService.java          |   20 ++
 admin/src/views/index.vue                                                                      |  340 +++++++++++++++++++++++++++------
 server/dmmall_admin/src/main/java/com/doumee/api/business/WorkbenchController.java             |   38 +++
 server/dmmall_service/src/main/java/com/doumee/service/business/impl/WorkbenchServiceImpl.java |   89 ++++++++
 server/dmmall_service/src/main/java/com/doumee/dao/business/GoodsorderMapper.java              |    4 
 server/dmmall_service/src/main/java/com/doumee/dao/system/dto/CountDataDTO.java                |   28 ++
 server/dmmall_service/src/main/java/com/doumee/dao/system/vo/BusinessDataCountVO.java          |   28 ++
 8 files changed, 504 insertions(+), 70 deletions(-)

diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue
index 099186b..4c935ce 100644
--- a/admin/src/views/index.vue
+++ b/admin/src/views/index.vue
@@ -1,91 +1,204 @@
 <template>
   <TableLayout>
     <div slot="search-form" class="data">
-        <div class="item-title">鏁版嵁鐪嬫澘</div>
+      <div class="top-tab">
+        <div class="tab-title">缁忚惀鏁版嵁鍒嗘瀽</div>
+        <div class="tab-item">
+          <span v-for="(item,index) in tabs" :key="'tab'+index"  :class="item.index==tabIndex?'active-tab tab-btn':'tab-btn'" @click="changeTab(item)">{{item.name}}</span>
+        </div>
+      </div>
+        <div class="item-title"> </div>
         <div class="data-summary">
-          <div class="data-item">
-            <div>浼氬憳鏁伴噺</div>
-            <div class="data-num">{{ countData.users }}</div>
+          <div class="data-item blue">
+            <div>{{tabName}}閿�鍞</div>
+            <div class="data-num">锟{ (countData.totalPrice ||0).toFixed(2) }}</div>
           </div>
           <div class="parting"></div>
-          <div class="data-item">
-            <div>浠婃棩娲昏穬鐢ㄦ埛</div>
-            <div class="data-num">{{ countData.activeUsers }}</div>
+          <div class="data-item yellow">
+            <div>{{tabName}}鎴愪氦璁㈠崟閲�</div>
+            <div class="data-num">{{ countData.totalNum ||0}}</div>
           </div>
           <div class="parting"></div>
-          <div class="data-item">
-            <div>璁㈠崟鎬绘暟</div>
-            <div class="data-num">{{ countData.orders }}</div>
+          <div class="data-item green">
+            <div>{{tabName}}閫�娆鹃噾棰�</div>
+            <div class="data-num">锟{( countData.totalRefundPrice ||0).toFixed(2) }}</div>
           </div>
           <div class="parting"></div>
-          <div class="data-item">
-            <div>璁㈠崟鎬婚噾棰�</div>
-            <div class="data-num">{{ countData.money }}</div>
+          <div class="data-item orange">
+            <div>{{tabName}}閫�娆捐鍗曢噺</div>
+            <div class="data-num">{{ countData.totalRefundNum ||0 }}</div>
           </div>
           <div class="parting"></div>
-          <div class="data-item">
-            <div>鏈湀璁㈠崟鏁�</div>
-            <div class="data-num">{{ countData.mouthOrders }}</div>
-          </div>
-          <div class="parting"></div>
-          <div class="data-item">
-            <div>鏈湀璁㈠崟鎬婚噾棰�</div>
-            <div class="data-num">{{ countData.mouthMoney }}</div>
-          </div>
         </div>
       </div>
     <template v-slot:table-wrap>
       <div class="change-style">
-        <div class="item-title">璁㈠崟閲戦瓒嬪娍</div>
-        <div style="display: flex;">
-          <el-button type="text" @click="changeCount(7)">7鏃�</el-button>
-          <div style="margin: 0 5px;">|</div>
-          <el-button type="text" @click="changeCount(30)">30鏃�</el-button>
+        <div class="count-left">
+          <div class="item-title">璁㈠崟閲忎笌閿�鍞瓒嬪娍</div>
+          <div ref="orderCount" class="bottom"></div>
+        </div>
+        <div class="count-right">
+          <div class="item-title">鍚勫搧绫婚攢鍞鍗犳瘮</div>
+          <div ref="cateCount" class="bottom"></div>
         </div>
       </div>
-      <div ref="orderChange" class="bottom">
-        
+      <div class="change-style">
+          <div class="tab-title" style="display: flex;align-items: center; ">
+            <span style="">鎺掑悕鍒嗘瀽</span>
+            <div class="tab-item" style="margin-left: 20px;" >
+              <el-date-picker  style="width: 110px;height: 22px;margin-right: 10px;"   v-model="searchForm.topYear"  type="year"
+                  clearable  value-format="yyyy"     format="yyyy'骞�'"   placeholder="骞翠唤" ></el-date-picker>
+              <el-date-picker  style="width: 100px;height: 22px;"   v-model="searchForm.topMonth"  type="month"
+                               clearable  value-format="MM"     format="MM'鏈�'"   placeholder="鏈堜唤" ></el-date-picker>
+            </div>
+          </div>
+      </div>
+      <div class="change-style">
+        <div class="count-left">
+          <div class="item-title" style="display: flex;">
+            <span style="flex: 1">缁忛攢鍟咺OP10</span>
+            <div class="tab-item" style="text-align: right;flex: 1.5; ">
+              <span v-for="(item,index) in tabs1" :key="'tab'+index"  :class="item.index==tabIndex1?'active-tab tab-btn':'tab-btn'" @click="changeTab1(item)">{{item.name}}</span>
+            </div>
+          </div>
+          <div class="bottom1">
+            <el-table  :data="dataList1||[]"  stripe  border inline >
+              <el-table-column prop="sortnum" label="鎺掑悕"  align="center">
+                <template slot-scope="scope">{{scope.$index +1}}</template>
+              </el-table-column>
+              <el-table-column prop="name" label="缁忛攢鍟嗗悕绉�"   align="center" >  </el-table-column>
+              <el-table-column prop="num" label="璁㈠崟閲�"   align="center" >  </el-table-column>
+              <el-table-column prop="price" label="閿�鍞锛堝厓锛�" align="center" ></el-table-column>
+              <el-table-column prop="num2" label="浼氬憳鏁�" align="center"  ></el-table-column>
+            </el-table>
+          </div>
+        </div>
+        <div class="count-right">
+          <div class="item-title">
+            <div class="item-title" style="display: flex;">
+              <span style="flex: 1">鍗曚竴鍟嗗搧TOP10</span>
+              <div class="tab-item" style="text-align: right;flex: 1.5; ">
+                <span v-for="(item,index) in tabs2" :key="'tab'+index"  :class="item.index==tabIndex2?'active-tab tab-btn':'tab-btn'" @click="changeTab2(item)">{{item.name}}</span>
+              </div>
+            </div>
+          </div>
+          <div class="bottom1">
+            <el-table  :data="dataList2||[]"  stripe  border >
+              <el-table-column prop="sortnum" label="鎺掑悕"   align="center">
+                <template slot-scope="scope">{{scope.$index +1}}</template>
+              </el-table-column>
+              <el-table-column prop="name" label="鍟嗗搧鍚嶇О"   align="center" >  </el-table-column>
+              <el-table-column prop="num" label="閿�閲�"   align="center" >  </el-table-column>
+              <el-table-column prop="price" label="閿�鍞锛堝厓锛�" align="center"  ></el-table-column>
+            </el-table>
+          </div>
+        </div>
+      </div>
+      <div class="change-style">
+        <div class="tab-title" style="display: flex;align-items: center; ">
+          <span style="">钀ラ攢鏁版嵁鍒嗘瀽</span>
+          <div class="tab-item" style="margin-left: 20px;" >
+            <el-date-picker  style="width: 110px;height: 22px;margin-right: 10px;"   v-model="searchForm.topYear2"  type="year"
+                             clearable  value-format="yyyy"     format="yyyy'骞�'"   placeholder="骞翠唤" ></el-date-picker>
+          </div>
+        </div>
+      </div>
+      <div class="change-style">
+        <div class="count-left">
+          <div class="item-title">绉垎鍙戞斁绫诲瀷鍗犳瘮</div>
+          <div  class="bottom2" style="display: flex">
+              <div ref="integralCount" style="flex: 1"></div>
+              <div style="flex: 1;font-size: 14px;font-weight: 500;">
+                  <div>绱娑堣�楋細{{10000}}</div>
+                  <div>绱浼樻儬閲戦锛氾骏{{10000 }}</div>
+              </div>
+          </div>
+        </div>
+        <div class="count-right">
+          <div class="item-title">浼樻儬鍒稿彂鏀剧被鍨嬪崰姣�</div>
+          <div  class="bottom2">
+            <div  class="bottom2" style="display: flex">
+              <div ref="couponCount" style="flex: 1"></div>
+              <div style="flex: 1;font-size: 14px;font-weight: 500;">
+                <div>宸蹭娇鐢ㄤ紭鎯犲埜锛歿{10000}}</div>
+                <div>绱浼樻儬閲戦锛氾骏{{10000 }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="change-style" v-if="1==2">
+          <div class="item-title">钀ラ攢鎶曞叆璐圭敤涓庨攢鍞鍒嗘瀽</div>
+          <div ref="feeCount" class="bottom"></div>
       </div>
     </template>
-    
+
   </TableLayout>
 </template>
 
 <script>
 import TableLayout from '@/layouts/TableLayout'
-import * as echarts from 'echarts';
-import { findAllList, createCoffeeTask } from '@/api/business/taskRule'
+import * as echarts from 'echarts'
 export default {
   components: {
     TableLayout
   },
-  data() {
+  data () {
     return {
-      countData: {
-        users: 1000,
-        activeUsers: 1000,
-        mouthOrders: 10,
-        mouthMoney: 100000,
-        orders: 10,
-        money: 100000
+      tabs2: [{ index: 0, name: '鎸夐攢閲�' }, { index: 1, name: '鎸夐攢鍞' } ],
+      tabs1: [{ index: 0, name: '鎸夎鍗曢噺' }, { index: 1, name: '鎸夐攢鍞' }, { index: 2, name: '鎸変細鍛樻暟' }],
+      tabs: [{ index: 0, name: '浠婃棩' }, { index: 1, name: '杩�7鏃�' }, { index: 2, name: '杩�30鏃�' }, { index: 3, name: '杩�1骞�' }],
+      tabName: '浠婃棩',
+      tabIndex: 0,
+      tabIndex1: 0,
+      tabIndex2: 0,
+      searchForm:{
+        topYear:null,
+        topMonth:null,
+        topYear2:null,
       },
-      orderCorderCount: [10,10,20,10,40,10,30],
+      countData: {
+        totalPrice: 1000,
+        totalNum: 1000,
+        totalRefundPrice: 10000,
+        totalRefundNum: 100
+      },
+      dataList1:[],
+      dataList2:[],
+      orderCorderCount: [10, 10, 20, 10, 40, 10, 30],
       opinionData: ['3.20', '3.21', '3.22', '3.23', '3.24', '3.25', '3.26'],
-      myChart: null
+      myChart0: null,
+      myChart1: null
     }
   },
-  mounted() {
-    this.myChart = echarts.init(this.$refs.orderChange)
-    window.addEventListener('resize', () => {
-      this.myChart.resize()
-    })
-    this.renderOrderChange()
-    findAllList({})
-
+  mounted () {
+    this.initCountData()
   },
   methods: {
-    renderOrderChange() {
-      this.myChart.setOption({
+    initCountData () {
+      this.myChart0 = echarts.init(this.$refs.orderCount)
+      window.addEventListener('resize', () => {
+        this.myChart0.resize()
+      })
+      this.myChart1 = echarts.init(this.$refs.cateCount)
+      window.addEventListener('resize', () => {
+        this.myChart1.resize()
+      })
+      this.renderOrderChange(this.myChart0)
+      this.renderOrderChange(this.myChart1)
+    },
+    changeTab (item) {
+      this.tabName = item.name
+      this.tabIndex = item.index
+    },
+    changeTab1 (item) {
+      this.tabIndex1 = item.index
+    },
+    changeTab2 (item) {
+      this.tabIndex2 = item.index
+    },
+    renderOrderChange (chart) {
+      chart.setOption({
         tooltip: {
           trigger: 'axis'
         },
@@ -97,7 +210,7 @@
         },
         toolbox: {
           feature: {
-            
+
           }
         },
         xAxis: {
@@ -115,37 +228,90 @@
           data: this.orderCorderCount
         }]
       })
-      
     },
-    changeCount(page) {
+    changeCount (page) {
       if (page == 7) {
-        this.orderCorderCount = [10,10,20,10,40,10,30]
+        this.orderCorderCount = [10, 10, 20, 10, 40, 10, 30]
         this.opinionData = ['3.20', '3.21', '3.22', '3.23', '3.24', '3.25', '3.26']
       } else {
-        this.orderCorderCount = [11,10,20,10,40,10,30,20,10,20,10,40,10,30,10,10,20,10,40,10,30,10,10,20,10,40,10,30,20,40]
-        this.opinionData = ['3.01','3.02','3.03','3.04','3.05','3.06','3.07','3.08','3.09','3.10','3.11','3.12','3.13','3.14','3.15','3.16','3.17','3.18','3.19','3.20', '3.21', '3.22', '3.23', '3.24', '3.25', '3.26', '3.27','3.28','3.28','3.30',]
+        this.orderCorderCount = [11, 10, 20, 10, 40, 10, 30, 20, 10, 20, 10, 40, 10, 30, 10, 10, 20, 10, 40, 10, 30, 10, 10, 20, 10, 40, 10, 30, 20, 40]
+        this.opinionData = ['3.01', '3.02', '3.03', '3.04', '3.05', '3.06', '3.07', '3.08', '3.09', '3.10', '3.11', '3.12', '3.13', '3.14', '3.15', '3.16', '3.17', '3.18', '3.19', '3.20', '3.21', '3.22', '3.23', '3.24', '3.25', '3.26', '3.27', '3.28', '3.28', '3.30']
       }
       // this.orderCorderCount.push(1)
       // this.opinionData.push(1)
       this.renderOrderChange()
-
     }
-  },
+  }
 }
 </script>
 
 <style lang="scss" scoped>
+::v-deep .el-input--small .el-input__inner{
+  height: 22px;
+  line-height: 22px;
+  border-radius: 0;
+}
+::v-deep .el-input--small .el-input__icon{
+  height: 22px;
+  line-height: 22px;
+}
+.top-tab{
+  margin-bottom: 30px;
+  display: block;
+}
+.tab-title{
+  font-weight: 600;
+  font-size: 16px;
+  color: #222222;
+  line-height: 22px;
+  display: inline;
+}
+.tab-item{
+  display: inline;
+  margin-left: 50px;
+  .active-tab{
+    border: 1px solid #216EEE !important;
+    color: #216EEE !important;
+  }
+  .tab-btn{
+    font-weight: normal;
+    cursor: pointer;
+    border-radius: 0px;
+    margin: 0px 5px;
+    font-size: 12px;
+    border: 1px solid #999;
+    color: #999;
+    padding: 1px 5px;
+    background-color: #f2f2f2;
+  }
+}
 .data {
   padding-bottom: 10px;
 }
 .item-title {
-  font-weight: 500;
-  
+  font-weight: 600;
+  font-size: 14px;
+  color: #222222;
+  margin-left: 20px;
+  line-height: 22px;
 }
 .data-summary {
   display: flex;
   justify-content: space-between;
   margin-top: 10px;
+  margin-bottom: 20px;
+  .green{
+    border-left: 8px solid #12bb8b;
+  }
+  .yellow{
+    border-left: 8px solid #f6cf46;
+  }
+  .blue{
+    border-left: 8px solid #216EEE;
+  }
+  .orange{
+    border-left: 8px solid #ff9e56;
+  }
   .data-item {
     flex: 1;
     height: 80px;
@@ -153,12 +319,15 @@
     box-sizing: border-box;
     padding: 15px;
     display: flex;
+    font-size: 14px;
     flex-direction: column;
     justify-content: space-between;
+    background-color: #f4f7fc;
+    color: #666;
     .data-num {
       font-size: 20px;
-      font-weight: 700;
-      color:aqua
+      font-weight: 800;
+      color: #333;
     }
   }
   .parting {
@@ -169,9 +338,42 @@
   display: flex;
   justify-content: space-between;
   line-height: 31px;
-}
-.bottom {
-  height: 500px;
-}
-</style>
+  margin-bottom: 50px;
+  .count-left{
+    display: inline-block;
+    margin-right: 10px;
+    flex: 1;
+    .bottom {
+      height: 500px;
+      width: 100%;
+    }
+    .bottom2 {
+      height: 300px;
+      width: 100%;
+    }
+    .bottom1 {
+      height: auto;
+      width: 100%;
+    }
+  }
+  .count-right{
+    display: inline-block;
+    margin-left: 10px;
+    flex: 1;
+    .bottom {
+      height: 500px;
+      width: 100%;
+    }
+    .bottom2 {
+      height: 300px;
+      width: 100%;
+    }
+    .bottom1 {
+      height: auto;
+      width: 100%;
+    }
+  }
 
+}
+
+</style>
diff --git a/server/dmmall_admin/src/main/java/com/doumee/api/business/WorkbenchController.java b/server/dmmall_admin/src/main/java/com/doumee/api/business/WorkbenchController.java
new file mode 100644
index 0000000..716c84b
--- /dev/null
+++ b/server/dmmall_admin/src/main/java/com/doumee/api/business/WorkbenchController.java
@@ -0,0 +1,38 @@
+package com.doumee.api.business;
+
+import com.doumee.api.BaseController;
+import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.dao.business.model.Fund;
+import com.doumee.dao.system.dto.CountDataDTO;
+import com.doumee.dao.system.vo.BusinessDataCountVO;
+import com.doumee.dao.system.vo.CountDataVO;
+import com.doumee.service.business.FundService;
+import com.doumee.service.business.WorkbenchService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/03/21 15:48
+ */
+@Api(tags = "宸ヤ綔鍙版暟鎹粺璁℃帴鍙�")
+@RestController
+@RequestMapping("/business/workbench")
+public class WorkbenchController extends BaseController {
+
+    @Autowired
+    private WorkbenchService workbenchService;
+
+    @PreventRepeat
+    @ApiOperation("鏂板缓")
+    @PostMapping("/businessData")
+    @RequiresPermissions("business:fund:create")
+    public ApiResponse<BusinessDataCountVO> create(@RequestBody CountDataDTO param) {
+        return ApiResponse.success(workbenchService.businessData(param));
+    }
+
+}
diff --git a/server/dmmall_service/src/main/java/com/doumee/dao/business/GoodsorderMapper.java b/server/dmmall_service/src/main/java/com/doumee/dao/business/GoodsorderMapper.java
index f5d15e1..6cd1c00 100644
--- a/server/dmmall_service/src/main/java/com/doumee/dao/business/GoodsorderMapper.java
+++ b/server/dmmall_service/src/main/java/com/doumee/dao/business/GoodsorderMapper.java
@@ -8,6 +8,8 @@
 import com.doumee.dao.web.request.goods.GoodsRequest;
 import com.doumee.dao.web.response.goods.GoodsInfoResponse;
 import com.doumee.dao.web.response.goods.MemberOrderResponse;
+import com.github.yulichang.base.mapper.MPJJoinMapper;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import io.swagger.annotations.ApiModelProperty;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
@@ -18,7 +20,7 @@
  * @author 姹熻箘韫�
  * @date 2023/03/21 15:48
  */
-public interface GoodsorderMapper extends BaseMapper<Goodsorder> {
+public interface GoodsorderMapper extends MPJJoinMapper<Goodsorder> {
 
 
     @Select(" select g.CODE AS code ,  g.id as orderId , g.CREATE_DATE as createDate    , g.TYPE as orderType , g.STATUS as orderStatus , g.IS_COMMENT as isComment , g.PAY_STATUS as  payStatus ," +
diff --git a/server/dmmall_service/src/main/java/com/doumee/dao/system/dto/CountDataDTO.java b/server/dmmall_service/src/main/java/com/doumee/dao/system/dto/CountDataDTO.java
new file mode 100644
index 0000000..9234e97
--- /dev/null
+++ b/server/dmmall_service/src/main/java/com/doumee/dao/system/dto/CountDataDTO.java
@@ -0,0 +1,28 @@
+package com.doumee.dao.system.dto;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel("缁忛攢鍟嗚处鎴锋槑缁嗗璞�")
+public class CountDataDTO {
+
+    @ApiModelProperty(value = "鎺掑悕", example = "1")
+    private Integer year;
+
+    @ApiModelProperty(value = "缁熻鏁伴噺(璁㈠崟鏁般�侀攢閲忋�佹秷鑰楃Н鍒嗛噺)")
+    private Integer month;
+    @ApiModelProperty(value = "缁熻鏁伴噺(璁㈠崟鏁般�侀攢閲忋�佹秷鑰楃Н鍒嗛噺)")
+    private Integer type;
+    @ApiModelProperty(value = "鏃堕棿绫诲瀷 0浠婂ぉ 1杩戜竷鏃� 2杩�30澶� 3涓�骞�")
+    private int dateType;
+    @ApiModelProperty(value = "寮�濮嬫椂闂�")
+    private Date startTime;
+    @ApiModelProperty(value = "鎴鏃堕棿")
+    private Date endTime;
+}
diff --git a/server/dmmall_service/src/main/java/com/doumee/dao/system/vo/BusinessDataCountVO.java b/server/dmmall_service/src/main/java/com/doumee/dao/system/vo/BusinessDataCountVO.java
new file mode 100644
index 0000000..af8fa59
--- /dev/null
+++ b/server/dmmall_service/src/main/java/com/doumee/dao/system/vo/BusinessDataCountVO.java
@@ -0,0 +1,28 @@
+package com.doumee.dao.system.vo;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+@ApiModel("缁忚惀鏁版嵁鍒嗘瀽缁熻瑙i泧")
+public class BusinessDataCountVO {
+    @ApiModelProperty(value = "缁熻鏁伴噺(璁㈠崟鏁般�侀攢閲忋�佹秷鑰楃Н鍒嗛噺)")
+    private Long num;
+    @ApiModelProperty(value = "缁熻鏁伴噺2 (浼氬憳鏁帮級")
+    private Long num2;
+    @ApiModelProperty(value = "閿�鍞锛屼紭鎯犻噾棰�")
+    private BigDecimal price;
+    @ApiModelProperty(value = "閿�鍞锛屼績鎴愪氦鏄撻噾棰濋噾棰�")
+    private BigDecimal price1;
+    @ApiModelProperty(value = "缁熻缁村害鍚嶇О")
+    private String name;
+    @ApiModelProperty(value = "缁熻鍒楄〃鏁版嵁")
+    private List<CountDataVO> dataList;
+    @ApiModelProperty(value = "缁熻鍒楄〃鏁版嵁2")
+    private List<CountDataVO> dataList2;
+}
diff --git a/server/dmmall_service/src/main/java/com/doumee/dao/system/vo/CountDataVO.java b/server/dmmall_service/src/main/java/com/doumee/dao/system/vo/CountDataVO.java
new file mode 100644
index 0000000..be3d75e
--- /dev/null
+++ b/server/dmmall_service/src/main/java/com/doumee/dao/system/vo/CountDataVO.java
@@ -0,0 +1,27 @@
+package com.doumee.dao.system.vo;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+@ApiModel("缁忛攢鍟嗚处鎴锋槑缁嗗璞�")
+public class CountDataVO {
+
+    @ApiModelProperty(value = "鎺掑悕", example = "1")
+    private Integer sortnum;
+
+    @ApiModelProperty(value = "缁熻鏁伴噺(璁㈠崟鏁般�侀攢閲忋�佹秷鑰楃Н鍒嗛噺)")
+    private Long num;
+    @ApiModelProperty(value = "缁熻鏁伴噺2 (浼氬憳鏁帮級")
+    private Long num2;
+    @ApiModelProperty(value = "閿�鍞锛屼紭鎯犻噾棰�")
+    private BigDecimal price;
+    @ApiModelProperty(value = "閿�鍞锛屼績鎴愪氦鏄撻噾棰濋噾棰�")
+    private BigDecimal price1;
+    @ApiModelProperty(value = "缁熻缁村害鍚嶇О")
+    private String name;
+}
diff --git a/server/dmmall_service/src/main/java/com/doumee/service/business/WorkbenchService.java b/server/dmmall_service/src/main/java/com/doumee/service/business/WorkbenchService.java
new file mode 100644
index 0000000..6f11655
--- /dev/null
+++ b/server/dmmall_service/src/main/java/com/doumee/service/business/WorkbenchService.java
@@ -0,0 +1,20 @@
+package com.doumee.service.business;
+
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.dao.business.model.Fund;
+import com.doumee.dao.system.dto.CountDataDTO;
+import com.doumee.dao.system.vo.BusinessDataCountVO;
+import com.doumee.dao.system.vo.CountDataVO;
+
+import java.util.List;
+
+/**
+ * 璧勯噾鏄庣粏淇℃伅琛⊿ervice瀹氫箟
+ * @author 姹熻箘韫�
+ * @date 2023/03/21 15:48
+ */
+public interface WorkbenchService {
+
+    BusinessDataCountVO businessData(CountDataDTO param);
+}
diff --git a/server/dmmall_service/src/main/java/com/doumee/service/business/impl/WorkbenchServiceImpl.java b/server/dmmall_service/src/main/java/com/doumee/service/business/impl/WorkbenchServiceImpl.java
new file mode 100644
index 0000000..1b84f94
--- /dev/null
+++ b/server/dmmall_service/src/main/java/com/doumee/service/business/impl/WorkbenchServiceImpl.java
@@ -0,0 +1,89 @@
+package com.doumee.service.business.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.config.rocketmq5.NormalMsgProducer;
+import com.doumee.core.constants.ResponseStatus;
+import com.doumee.core.exception.BusinessException;
+import com.doumee.core.model.LoginUserInfo;
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.DateUtil;
+import com.doumee.core.utils.Utils;
+import com.doumee.dao.business.*;
+import com.doumee.dao.business.model.*;
+import com.doumee.dao.system.SystemUserMapper;
+import com.doumee.dao.system.dto.CountDataDTO;
+import com.doumee.dao.system.model.SystemUser;
+import com.doumee.dao.system.vo.BusinessDataCountVO;
+import com.doumee.dao.system.vo.CountDataVO;
+import com.doumee.dao.web.dto.CollectDTO;
+import com.doumee.dao.web.dto.MemberDTO;
+import com.doumee.dao.web.dto.MultiFileDTO;
+import com.doumee.dao.web.dto.OrgDTO;
+import com.doumee.dao.web.dto.activity.*;
+import com.doumee.dao.web.dto.shop.ShopSimpleDTO;
+import com.doumee.dao.web.request.ActivityPageListRequest;
+import com.doumee.service.business.*;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationEventPublisher;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * 娲诲姩銆佽祫璁�佹帰搴椾俊鎭〃Service瀹炵幇
+ *
+ * @author 姹熻箘韫�
+ * @date 2023/03/21 15:48
+ */
+@Service
+public class WorkbenchServiceImpl implements WorkbenchService {
+    @Autowired
+    private GoodsorderMapper goodsorderMapper;
+
+    @Override
+    public BusinessDataCountVO businessData(CountDataDTO param) {
+        BusinessDataCountVO data = new BusinessDataCountVO();
+        int dataType = param.getDateType();//0浠婃棩 1杩戜竷鏃� 2杩�30鏃� 3杩�1骞�
+        int days = 1;
+        switch (dataType) {
+            case 1: {
+                days = 7;
+                break;
+            } case 2: {
+                days =30;
+                break;
+            } case 3: {
+                days = 365;
+                break;
+            } default:{
+
+            }
+        }
+        Date startDate = DateUtil.addDaysToDate(Utils.Date.getStart(new Date()),-days);
+        CountDataVO r=   goodsorderMapper.selectJoinOne(CountDataVO.class,new MPJLambdaWrapper<Goodsorder>()
+                .ge(Goodsorder::getCreateDate,startDate)
+                .in(Goodsorder::getStatus,Constants.OrderStatus.DONE.getKey(),Constants.OrderStatus.DONE.getKey())
+                );
+
+        return data;
+    }
+
+}

--
Gitblit v1.9.3