From 9552ca1443fb4401e4361a2f8b38c6a52eb151d0 Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期二, 09 五月 2023 17:36:10 +0800
Subject: [PATCH] DEMO初步完成

---
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/config/MyBatisPlusConfig.java               |   30 +++++++
 ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml                           |    6 +
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerGoodsController.java |    1 
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java    |   15 +++
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerOrderPageVo.java               |   17 ++++
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerGoodsPageVo.java               |    2 
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerOrderController.java |    1 
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/config/MyBatisPlusConfig.java             |   30 +++++++
 ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopMapper.xml                              |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/config/MyBatisPlusConfig.java             |   30 +++++++
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/config/MyBatisPlusConfig.java                 |   30 +++++++
 ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerStaffInfoVo.java         |   11 ++
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java    |    5 +
 13 files changed, 177 insertions(+), 5 deletions(-)

diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerStaffInfoVo.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerStaffInfoVo.java
index ea238cf..d34b1ec 100644
--- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerStaffInfoVo.java
+++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/MerStaffInfoVo.java
@@ -42,6 +42,17 @@
     @ApiModelProperty(value = "员工生日")
     private String staffBirthday;
 
+    @ApiModelProperty(value = "商户名称")
+    private String shopName;
 
+    @ApiModelProperty(value = "商户地址")
+    private String shopAddress;
+
+    @ApiModelProperty(value = "商户电话")
+    private String shopServicePhone;
+
+
+    @ApiModelProperty(value = "商户营业时间")
+    private String businessTime;
 
 }
diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/config/MyBatisPlusConfig.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/config/MyBatisPlusConfig.java
new file mode 100644
index 0000000..5268ca7
--- /dev/null
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/config/MyBatisPlusConfig.java
@@ -0,0 +1,30 @@
+package com.ruoyi.member.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author jqs34
+ * @ClassName MyBatisPlusConfig
+ * @description: TODO
+ * @date 2023年05月09日
+ * @version: 1.0
+ */
+
+@Configuration
+public class MyBatisPlusConfig {
+
+    /**
+     * MyBatisPlus拦截器(用于分页)
+     */
+    @Bean
+    public MybatisPlusInterceptor paginationInterceptor() {
+        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+        //添加MySQL的分页拦截器
+        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+        return interceptor;
+    }
+}
\ No newline at end of file
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/config/MyBatisPlusConfig.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/config/MyBatisPlusConfig.java
new file mode 100644
index 0000000..9043b26
--- /dev/null
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/config/MyBatisPlusConfig.java
@@ -0,0 +1,30 @@
+package com.ruoyi.order.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author jqs34
+ * @ClassName MyBatisPlusConfig
+ * @description: TODO
+ * @date 2023年05月09日
+ * @version: 1.0
+ */
+
+@Configuration
+public class MyBatisPlusConfig {
+
+    /**
+     * MyBatisPlus拦截器(用于分页)
+     */
+    @Bean
+    public MybatisPlusInterceptor paginationInterceptor() {
+        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+        //添加MySQL的分页拦截器
+        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+        return interceptor;
+    }
+}
\ No newline at end of file
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerGoodsController.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerGoodsController.java
index 9b45824..698bc2d 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerGoodsController.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerGoodsController.java
@@ -44,6 +44,7 @@
         Page<MerGoodsPageVo> page = new Page<>();
         page.setSize(merGoodsPageDto.getPageSize());
         page.setCurrent(merGoodsPageDto.getPageNum());
+        page.setOptimizeCountSql(false);
         List<MerGoodsPageVo> merGoodsPageVoList = goodsService.pageMerShopGoods(page,merGoodsPageDto);
         return R.ok(page.setRecords(merGoodsPageVoList));
     }
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerOrderController.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerOrderController.java
index c07fefb..e3277da 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerOrderController.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/business/MerOrderController.java
@@ -129,6 +129,7 @@
         Page<MerMemberNoClearOrderVo> page = new Page<>();
         page.setSize(merMemberNoClearOrderDto.getPageSize());
         page.setCurrent(merMemberNoClearOrderDto.getPageNum());
+
         List<MerMemberNoClearOrderVo> merMemberNoClearOrderVoList = orderService.pageMerMemberOrder(page,merMemberNoClearOrderDto);
         return R.ok(page.setRecords(merMemberNoClearOrderVoList));
     }
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerGoodsPageVo.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerGoodsPageVo.java
index 9d8b476..3ae0df2 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerGoodsPageVo.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerGoodsPageVo.java
@@ -35,7 +35,7 @@
     private Integer goodsType;
 
     @ApiModelProperty(value = "商品调理问题")
-    private BigDecimal goodsNurses;
+    private String goodsNurses;
 
     @ApiModelProperty(value = "商品建议售价")
     private BigDecimal suggestSalesPrice;;
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerOrderPageVo.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerOrderPageVo.java
index e11bf70..d4af3a8 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerOrderPageVo.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/domain/vo/MerOrderPageVo.java
@@ -1,9 +1,11 @@
 package com.ruoyi.order.domain.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.math.BigDecimal;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -18,6 +20,12 @@
 
     @ApiModelProperty(value = "用户id")
     private Long userId;
+
+    @ApiModelProperty(value = "用户姓名")
+    private String userName;
+
+    @ApiModelProperty(value = "用户电话")
+    private String userMobile;
 
     @ApiModelProperty(value = "订单id")
     private String orderId;
@@ -49,6 +57,15 @@
     @ApiModelProperty("订单备注")
     private String orderRemark;
 
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("订单来源")
+    private Integer orderFrom;
+
+    @ApiModelProperty("订单来源")
+    private String orderFromDesc;
+
     @ApiModelProperty("订单商品列表")
     private List<MerOrderGoodsPageVo> merOrderGoodsVoList;
 }
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
index fa69482..3c76a3a 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
@@ -780,6 +780,21 @@
     @Override
     public List<MerOrderPageVo> pageMerOrder(Page page, MerOrderPageDto merOrderPageDto){
         List<MerOrderPageVo> merOrderPageVoList = orderMapper.pageMerOrder(page, merOrderPageDto);
+        if(merOrderPageVoList!=null&&!merOrderPageVoList.isEmpty()){
+            Long userId;
+            Member member;
+            Integer orderFrom;
+            String orderFromDesc;
+            for(MerOrderPageVo merOrderPageVo : merOrderPageVoList){
+                userId = merOrderPageVo.getUserId();
+                member = remoteMemberService.getMember(userId).getData();
+                merOrderPageVo.setUserName(member.getRealName());
+                merOrderPageVo.setUserMobile(member.getMobile());
+                orderFrom = merOrderPageVo.getOrderFrom();
+                orderFromDesc = "商城订单";
+                merOrderPageVo.setOrderFromDesc(orderFromDesc);
+            }
+        }
         return merOrderPageVoList;
     }
 
diff --git a/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml b/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
index d1bcede..380dd11 100644
--- a/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
+++ b/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -60,6 +60,8 @@
         <result column="receivableDeposit" property="receivableDeposit"/>
         <result column="payMoney" property="payMoney"/>
         <result column="orderRemark" property="orderRemark" />
+        <result column="orderFrom" property="orderFrom" />
+        <result column="createTime" property="createTime" />
         <collection property="merOrderGoodsVoList" ofType="com.ruoyi.order.domain.vo.MerOrderGoodsPageVo">
             <result column="goodsName" property="goodsName"/>
             <result column="goodsType" property="goodsType"/>
@@ -253,7 +255,9 @@
         toc.order_remark orderRemark,
         tg.goods_name goodsName,
         tog.goods_type goodsType,
-        tog.buy_num buyNum
+        tog.buy_num buyNum,
+        toc.create_time createTime,
+        toc.order_from orderFrom
         FROM t_order toc
         INNER JOIN t_order_goods tog ON tog.order_id = toc.order_id
         INNER JOIN t_goods tg ON tg.goods_id = tog.goods_id
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/config/MyBatisPlusConfig.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/config/MyBatisPlusConfig.java
new file mode 100644
index 0000000..9faae51
--- /dev/null
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/config/MyBatisPlusConfig.java
@@ -0,0 +1,30 @@
+package com.ruoyi.shop.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author jqs34
+ * @ClassName MyBatisPlusConfig
+ * @description: TODO
+ * @date 2023年05月09日
+ * @version: 1.0
+ */
+
+@Configuration
+public class MyBatisPlusConfig {
+
+    /**
+     * MyBatisPlus拦截器(用于分页)
+     */
+    @Bean
+    public MybatisPlusInterceptor paginationInterceptor() {
+        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+        //添加MySQL的分页拦截器
+        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+        return interceptor;
+    }
+}
\ No newline at end of file
diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
index 8a0922d..c6a0eb7 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
@@ -110,10 +110,13 @@
     }
 
     @RequestMapping(value = "/editShopStaffInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "获取员工信息")
+    @ApiOperation(value = "修改员工信息")
     public R editShopStaffInfo(@RequestBody MerEditUserDto merEditUserDto) {
         Long userId = SecurityUtils.getUserId();
         shopStaffService.editShopStaffInfo(merEditUserDto);
         return R.ok();
     }
+
+
+
 }
diff --git a/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopMapper.xml b/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopMapper.xml
index a6b635f..9d24942 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopMapper.xml
+++ b/ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopMapper.xml
@@ -316,9 +316,9 @@
         CONCAT(ts.shop_area_name,ts.shop_address) shopAddress,
         ts.shopowner_name shopownerName,
         ts.shopowner_phone shopownerPhone,
-        ts.cooperationEndTime cooperationEndTime
+        ts.cooperation_end_time cooperationEndTime
         FROM t_shop ts
-        WHERE ts.del_flag = 0 AND r.shop_id = #{param.shopId}
+        WHERE ts.del_flag = 0 AND ts.shop_id = #{param.shopId}
         <if test="param.keyword!=null and param.keyword!=''">
             AND (ts.shop_name LIKE CONCAT('%',#{param.keyword},'%') OR ts.shopowner_name LIKE CONCAT('%',#{param.keyword},'%')
             OR ts.shopowner_phone LIKE CONCAT('%',#{param.keyword},'%'))
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/config/MyBatisPlusConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/config/MyBatisPlusConfig.java
new file mode 100644
index 0000000..aba8c64
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/config/MyBatisPlusConfig.java
@@ -0,0 +1,30 @@
+package com.ruoyi.system.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author jqs34
+ * @ClassName MyBatisPlusConfig
+ * @description: TODO
+ * @date 2023年05月09日
+ * @version: 1.0
+ */
+
+@Configuration
+public class MyBatisPlusConfig {
+
+    /**
+     * MyBatisPlus拦截器(用于分页)
+     */
+    @Bean
+    public MybatisPlusInterceptor paginationInterceptor() {
+        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+        //添加MySQL的分页拦截器
+        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+        return interceptor;
+    }
+}
\ No newline at end of file

--
Gitblit v1.7.1