6 місяців тому
батько
коміт
2ab5992e12
36 змінених файлів з 1153 додано та 538 видалено
  1. 2 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/newProd/service/impl/NewProdVoServiceImpl.java
  2. 30 1
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/controller/OrderController.java
  3. 73 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/controller/OrderDetailController.java
  4. 19 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/domain/OrderDetailVo.java
  5. 4 1
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/domain/OrderVo.java
  6. 31 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/mapper/OrderDetailVoMapper.java
  7. 1 1
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/mapper/OrderVoMapper.java
  8. 29 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/service/IOrderDetailVoService.java
  9. 2 2
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/service/IOrderVoService.java
  10. 43 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/service/impl/OrderDetailVoServiceImpl.java
  11. 13 4
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/service/impl/OrderVoServiceImpl.java
  12. 2 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/service/impl/PopularProdVoServiceImpl.java
  13. 2 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/impl/ProdInventoryOrderVoServiceImpl.java
  14. 2 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/impl/ProdInventoryVoServiceImpl.java
  15. 2 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/service/impl/SuggestProdVoServiceImpl.java
  16. 7 7
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/ipInfo/controller/IpInfoController.java
  17. 2 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/merchant/service/impl/MerchantProdVoServiceImpl.java
  18. 3 1
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/service/impl/ProdAttrVoServiceImpl.java
  19. 2 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/service/impl/ProdTagVoServiceImpl.java
  20. 3 3
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/service/IpInfoService.java
  21. 1 1
      08.src/Xingxi/xingxi-admin/src/main/resources/application-local.yml
  22. 67 0
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/OrderDetailVoMapper.xml
  23. 105 0
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/OrderVoMapper.xml
  24. 37 0
      08.src/Xingxi/xingxi-admin/src/main/resources/static/js/datatimeTool.js
  25. 1 0
      08.src/Xingxi/xingxi-admin/src/main/resources/static/js/datatimeTool.min.js
  26. 76 0
      08.src/Xingxi/xingxi-admin/src/main/resources/static/ruoyi/js/common.js
  27. 68 0
      08.src/Xingxi/xingxi-admin/src/main/resources/static/ruoyi/js/currency.js
  28. 100 496
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/order/order.html
  29. 138 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/order/orderDetail.html
  30. 13 0
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/core/domain/entity/SysUser.java
  31. 135 0
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/utils/MaskUtils.java
  32. 42 0
      08.src/Xingxi/xingxi-framework/src/main/java/com/xingxi/framework/web/service/UserService.java
  33. 8 0
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/system/mapper/SysUserMapper.java
  34. 7 0
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/system/service/ISysUserService.java
  35. 27 19
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/system/service/impl/SysUserServiceImpl.java
  36. 56 2
      08.src/Xingxi/xingxi-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 2 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/newProd/service/impl/NewProdVoServiceImpl.java

@@ -10,6 +10,7 @@ import com.xingxi.web.controller.business.newProd.service.INewProdVoService;
 import com.xingxi.web.controller.business.newProd.domain.NewProdVo;
 import com.xingxi.web.controller.business.newProd.mapper.NewProdVoMapper;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.Date;
@@ -47,6 +48,7 @@ public class NewProdVoServiceImpl implements INewProdVoService {
      * @return 结果
      */
     @Override
+    @Transactional
     public int updateSorts(List<NewProd> newProdList) {
         int effectRow = 0;
         Date nowDate = DateUtils.getNowDate();

+ 30 - 1
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/controller/OrderController.java

@@ -5,7 +5,9 @@ import com.xingxi.common.core.page.TableDataInfo;
 import com.xingxi.common.enums.EDelFlag;
 import com.xingxi.common.enums.ERoleKey;
 import com.xingxi.common.utils.ShiroUtils;
+import com.xingxi.web.controller.business.order.domain.OrderDetailVo;
 import com.xingxi.web.controller.business.order.domain.OrderVo;
+import com.xingxi.web.controller.business.order.service.IOrderDetailVoService;
 import com.xingxi.web.controller.business.order.service.IOrderVoService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.stereotype.Controller;
@@ -24,10 +26,12 @@ import java.util.List;
 @Controller
 @RequestMapping("/business/order")
 public class OrderController extends BaseController {
-    private String prefix = "business/order";
+    private final String prefix = "business/order";
 
     @Resource
     private IOrderVoService orderVoService;
+    @Resource
+    private IOrderDetailVoService orderDetailVoService;
 
     @RequiresPermissions("business:order:view")
     @GetMapping()
@@ -50,4 +54,29 @@ public class OrderController extends BaseController {
         List<OrderVo> list = orderVoService.selectOrderVoList(orderVo);
         return getDataTable(list);
     }
+
+    /**
+     * 显示订单明细页
+     */
+    @RequiresPermissions("business:order:detail")
+    @GetMapping("/detail/{orderId}")
+    public String detail(@PathVariable("orderId") Long orderId, ModelMap mmap) {
+        OrderVo orderVo = orderVoService.selectOrderVoByOrderId(orderId);
+        mmap.put("orderVo", orderVo);
+        return prefix + "/orderDetail";
+    }
+
+    /**
+     * 显示订单明细列表
+     */
+    @RequiresPermissions("business:order:detail")
+    @PostMapping("/detailList/{orderId}")
+    @ResponseBody
+    public TableDataInfo detailList(@PathVariable("orderId") Long orderId) {
+        OrderDetailVo cond = new OrderDetailVo();
+        cond.setOrderId(orderId);
+        cond.setDelFlag(EDelFlag.NO.getVal());
+        List<OrderDetailVo> orderDetailVoList = orderDetailVoService.selectOrderDetailVoList(cond);
+        return getDataTable(orderDetailVoList);
+    }
 }

+ 73 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/controller/OrderDetailController.java

@@ -0,0 +1,73 @@
+package com.xingxi.web.controller.business.order.controller;
+
+import com.xingxi.common.core.controller.BaseController;
+import com.xingxi.common.core.page.TableDataInfo;
+import com.xingxi.common.enums.EDelFlag;
+import com.xingxi.web.controller.business.order.domain.OrderDetailVo;
+import com.xingxi.web.controller.business.order.service.IOrderDetailVoService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 订单 操作处理
+ *
+ * @author hocy
+ * @date 2020-01-17
+ */
+@Controller
+@RequestMapping("/business/orderDetail")
+public class OrderDetailController extends BaseController {
+    private final String prefix = "business/orderDetail";
+
+    @Resource
+    private IOrderDetailVoService orderDetailVoService;
+
+    @RequiresPermissions("business:orderDetail:view")
+    @GetMapping()
+    public String orderDetail() {
+        return prefix + "/orderDetail";
+    }
+
+    /**
+     * 查询订单 列表
+     */
+    @RequiresPermissions("business:orderDetail:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(OrderDetailVo orderDetailVo) {
+        startPage();
+        orderDetailVo.setDelFlag(EDelFlag.NO.getVal());
+        List<OrderDetailVo> list = orderDetailVoService.selectOrderDetailVoList(orderDetailVo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 显示订单明细页
+     */
+    @RequiresPermissions("business:orderDetail:detail")
+    @GetMapping("/detail/{orderDetailId}")
+    public String detail(@PathVariable("orderDetailId") Long orderDetailId, ModelMap mmap) {
+        OrderDetailVo orderDetailVo = orderDetailVoService.selectOrderDetailVoByOrderDetailId(orderDetailId);
+        mmap.put("orderDetailVo", orderDetailVo);
+        return prefix + "/orderDetail";
+    }
+
+    /**
+     * 显示订单明细列表
+     */
+    @RequiresPermissions("business:orderDetail:detail")
+    @PostMapping("/detailList/{orderDetailId}")
+    @ResponseBody
+    public TableDataInfo detailList(@PathVariable("orderDetailId") Long orderDetailId) {
+        OrderDetailVo cond = new OrderDetailVo();
+        cond.setOrderDetailId(orderDetailId);
+        cond.setDelFlag(EDelFlag.NO.getVal());
+        List<OrderDetailVo> orderDetailVoList = orderDetailVoService.selectOrderDetailVoList(cond);
+        return getDataTable(orderDetailVoList);
+    }
+}

+ 19 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/domain/OrderDetailVo.java

@@ -0,0 +1,19 @@
+package com.xingxi.web.controller.business.order.domain;
+
+import com.xingxi.business.Order.domain.OrderDetail;
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * 订单 表 t_order
+ *
+ * @author xingxi
+ * @date 2025-05-20
+ */
+@Data
+@ToString(callSuper = true)
+public class OrderDetailVo extends OrderDetail {
+    private static final long serialVersionUID = 1L;
+    // 商品分类名称
+    private String className;
+}

+ 4 - 1
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/domain/OrderVo.java

@@ -13,6 +13,9 @@ import lombok.ToString;
 @Data
 @ToString(callSuper = true)
 public class OrderVo extends Order {
-
     private static final long serialVersionUID = 1L;
+    private String sellerName;
+    private String sellerMobile;
+    private String buyerName;
+    private String prodName;
 }

+ 31 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/mapper/OrderDetailVoMapper.java

@@ -0,0 +1,31 @@
+package com.xingxi.web.controller.business.order.mapper;
+
+import com.xingxi.web.controller.business.order.domain.OrderDetailVo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 订单详细 数据层
+ *
+ * @author xingxi
+ * @date 2025-05-20
+ */
+@Repository
+public interface OrderDetailVoMapper {
+    /**
+     * 查询订单详细Vo 信息
+     *
+     * @param orderDetailId 订单详细 ID
+     * @return 订单详细 信息
+     */
+    OrderDetailVo selectOrderDetailVoByOrderDetailId(Long orderDetailId);
+
+    /**
+     * 查询订单详细Vo 列表
+     *
+     * @param orderDetailVo 订单详细Vo
+     * @return 订单详细Vo 集合
+     */
+    List<OrderDetailVo> selectOrderDetailVoList(OrderDetailVo orderDetailVo);
+}

+ 1 - 1
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/mapper/OrderVoMapper.java

@@ -27,5 +27,5 @@ public interface OrderVoMapper {
      * @param orderVo 订单Vo
      * @return 订单Vo 集合
      */
-    List<OrderVo> selectOrderVoByOrderId(OrderVo orderVo);
+    List<OrderVo> selectOrderVoList(OrderVo orderVo);
 }

+ 29 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/service/IOrderDetailVoService.java

@@ -0,0 +1,29 @@
+package com.xingxi.web.controller.business.order.service;
+
+import com.xingxi.web.controller.business.order.domain.OrderDetailVo;
+
+import java.util.List;
+
+/**
+ * 订单详细 服务层
+ *
+ * @author xingxi
+ * @date 2025-05-17
+ */
+public interface IOrderDetailVoService {
+    /**
+     * 查询订单详细 信息
+     *
+     * @param orderDetailId 订单详细 ID
+     * @return 订单详细 信息
+     */
+    OrderDetailVo selectOrderDetailVoByOrderDetailId(Long orderDetailId);
+
+    /**
+     * 查询订单DetailVo 集合
+     *
+     * @param orderDetailVo 订单DetailVo
+     * @return 订单Vo 集合
+     */
+    List<OrderDetailVo> selectOrderDetailVoList(OrderDetailVo orderDetailVo);
+}

+ 2 - 2
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/service/IOrderVoService.java

@@ -7,8 +7,8 @@ import java.util.List;
 /**
  * 订单  服务层
  *
- * @author hocy
- * @date 2020-01-17
+ * @author xingxi
+ * @date 2025-05-17
  */
 public interface IOrderVoService {
     /**

+ 43 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/service/impl/OrderDetailVoServiceImpl.java

@@ -0,0 +1,43 @@
+package com.xingxi.web.controller.business.order.service.impl;
+
+import com.xingxi.web.controller.business.order.domain.OrderDetailVo;
+import com.xingxi.web.controller.business.order.mapper.OrderDetailVoMapper;
+import com.xingxi.web.controller.business.order.service.IOrderDetailVoService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 订单详细 服务层实现
+ *
+ * @author xingxi
+ * @date 2025-05-17
+ */
+@Service
+public class OrderDetailVoServiceImpl implements IOrderDetailVoService {
+    @Resource
+    private OrderDetailVoMapper orderDetailVoMapper;
+
+    /**
+     * 查询订单详细 信息
+     *
+     * @param orderDetailId 订单详细 ID
+     * @return 订单详细 信息
+     */
+    @Override
+    public OrderDetailVo selectOrderDetailVoByOrderDetailId(Long orderDetailId) {
+        return orderDetailVoMapper.selectOrderDetailVoByOrderDetailId(orderDetailId);
+    }
+
+    /**
+     * 查询订单详细Vo 列表
+     *
+     * @param orderDetailVo 订单详细Vo
+     * @return 订单详细Vo 集合
+     */
+    @Override
+    public List<OrderDetailVo> selectOrderDetailVoList(OrderDetailVo orderDetailVo) {
+        return orderDetailVoMapper.selectOrderDetailVoList(orderDetailVo);
+    }
+}

+ 13 - 4
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/order/service/impl/OrderVoServiceImpl.java

@@ -1,5 +1,6 @@
 package com.xingxi.web.controller.business.order.service.impl;
 
+import com.xingxi.common.utils.MaskUtils;
 import com.xingxi.web.controller.business.order.domain.OrderVo;
 import com.xingxi.web.controller.business.order.mapper.OrderVoMapper;
 import com.xingxi.web.controller.business.order.service.IOrderVoService;
@@ -11,8 +12,8 @@ import java.util.List;
 /**
  * 订单  服务层实现
  *
- * @author hocy
- * @date 2020-01-17
+ * @author xingxi
+ * @date 2025-05-17
  */
 @Service
 public class OrderVoServiceImpl implements IOrderVoService {
@@ -27,7 +28,10 @@ public class OrderVoServiceImpl implements IOrderVoService {
      */
     @Override
     public OrderVo selectOrderVoByOrderId(Long orderId) {
-        return orderVoMapper.selectOrderVoByOrderId(orderId);
+        OrderVo order = orderVoMapper.selectOrderVoByOrderId(orderId);
+        order.setRecMobile(MaskUtils.maskMobileNo(order.getRecMobile()));
+        order.setRecAddress(MaskUtils.maskAddress(order.getRecAddress()));
+        return order;
     }
 
     /**
@@ -38,6 +42,11 @@ public class OrderVoServiceImpl implements IOrderVoService {
      */
     @Override
     public List<OrderVo> selectOrderVoList(OrderVo orderVo) {
-        return orderVoMapper.selectOrderVoByOrderId(orderVo);
+        List<OrderVo> resultList = orderVoMapper.selectOrderVoList(orderVo);
+        for (OrderVo order : resultList) {
+            order.setRecMobile(MaskUtils.maskMobileNo(order.getRecMobile()));
+            order.setRecAddress(MaskUtils.maskAddress(order.getRecAddress()));
+        }
+        return resultList;
     }
 }

+ 2 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/service/impl/PopularProdVoServiceImpl.java

@@ -10,6 +10,7 @@ import com.xingxi.web.controller.business.popular.service.IPopularProdVoService;
 import com.xingxi.web.controller.business.popular.domain.PopularProdVo;
 import com.xingxi.web.controller.business.popular.mapper.PopularProdVoMapper;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.Date;
@@ -47,6 +48,7 @@ public class PopularProdVoServiceImpl implements IPopularProdVoService {
      * @return 结果
      */
     @Override
+    @Transactional
     public int updateSorts(List<PopularProd> popularProdList) {
         int effectRow = 0;
         Date nowDate = DateUtils.getNowDate();

+ 2 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/impl/ProdInventoryOrderVoServiceImpl.java

@@ -17,6 +17,7 @@ import com.xingxi.web.controller.business.prodInventory.mapper.ProdInventoryOrde
 import com.xingxi.web.controller.business.prodInventory.mapper.ProdInventoryVoMapper;
 import com.xingxi.web.controller.business.prodInventory.service.IProdInventoryOrderVoService;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.Date;
@@ -71,6 +72,7 @@ public class ProdInventoryOrderVoServiceImpl implements IProdInventoryOrderVoSer
      * @return 更新结果
      */
     @Override
+    @Transactional
     public int updateProdInventoryOrderVo(ProdInventoryOrderVo prodInventoryOrderVo) {
         int effectRows = 0;
         Date nowDate = DateUtils.getNowDate();

+ 2 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/impl/ProdInventoryVoServiceImpl.java

@@ -18,6 +18,7 @@ import com.xingxi.web.controller.business.prodInventory.domain.ProdInventoryVo;
 import com.xingxi.web.controller.business.prodInventory.mapper.ProdInventoryVoMapper;
 import com.xingxi.web.controller.business.prodInventory.service.IProdInventoryVoService;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.Date;
@@ -71,6 +72,7 @@ public class ProdInventoryVoServiceImpl implements IProdInventoryVoService {
      * @return 结果
      */
     @Override
+    @Transactional
     public int insertProdInventoryVo(ProdInventoryVo prodInventoryVo) {
         int effectRows;
         Integer addInvQty = prodInventoryVo.getAddInvQty();

+ 2 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/service/impl/SuggestProdVoServiceImpl.java

@@ -10,6 +10,7 @@ import com.xingxi.web.controller.business.suggest.domain.SuggestProdVo;
 import com.xingxi.web.controller.business.suggest.mapper.SuggestProdVoMapper;
 import com.xingxi.web.controller.business.suggest.service.ISuggestProdVoService;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.Date;
@@ -47,6 +48,7 @@ public class SuggestProdVoServiceImpl implements ISuggestProdVoService {
      * @return 结果
      */
     @Override
+    @Transactional
     public int updateSorts(List<SuggestProd> suggestProdList) {
         int effectRow = 0;
         Date nowDate = DateUtils.getNowDate();

+ 7 - 7
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/ipInfo/controller/IpInfoController.java

@@ -28,7 +28,7 @@ public class IpInfoController extends BaseController {
     private final String prefix = "master/ipInfo";
 
     @Resource
-    private IIpInfoService iIpInfoService;
+    private IIpInfoService ipInfoService;
 
     @RequiresPermissions("system:ipInfo:view")
     @GetMapping()
@@ -44,7 +44,7 @@ public class IpInfoController extends BaseController {
     @ResponseBody
     public TableDataInfo list(IpInfo ipInfo) {
         startPage();
-        List<IpInfo> list = iIpInfoService.selectIpInfoList(ipInfo);
+        List<IpInfo> list = ipInfoService.selectIpInfoList(ipInfo);
         return getDataTable(list);
     }
 
@@ -56,7 +56,7 @@ public class IpInfoController extends BaseController {
     @PostMapping("/export")
     @ResponseBody
     public AjaxResult export(IpInfo ipInfo) {
-        List<IpInfo> list = iIpInfoService.selectIpInfoList(ipInfo);
+        List<IpInfo> list = ipInfoService.selectIpInfoList(ipInfo);
         ExcelUtil<IpInfo> util = new ExcelUtil<>(IpInfo.class);
         return util.exportExcel(list, "文创品牌数据");
     }
@@ -77,7 +77,7 @@ public class IpInfoController extends BaseController {
     @PostMapping("/add")
     @ResponseBody
     public AjaxResult addSave(IpInfo ipInfo) {
-        return toAjax(iIpInfoService.insertIpInfo(ipInfo));
+        return toAjax(ipInfoService.insertIpInfo(ipInfo));
     }
 
     /**
@@ -86,7 +86,7 @@ public class IpInfoController extends BaseController {
     @RequiresPermissions("system:ipInfo:edit")
     @GetMapping("/edit/{ipInfoId}")
     public String edit(@PathVariable("ipInfoId") Long ipInfoId, ModelMap mMap) {
-        IpInfo ipInfo = iIpInfoService.selectIpInfoByIpId(ipInfoId);
+        IpInfo ipInfo = ipInfoService.selectIpInfoByIpId(ipInfoId);
         mMap.put("ipInfo", ipInfo);
         return prefix + "/edit";
     }
@@ -99,7 +99,7 @@ public class IpInfoController extends BaseController {
     @PostMapping("/edit")
     @ResponseBody
     public AjaxResult editSave(IpInfo ipInfo) {
-        return toAjax(iIpInfoService.updateIpInfo(ipInfo));
+        return toAjax(ipInfoService.updateIpInfo(ipInfo));
     }
 
     /**
@@ -110,6 +110,6 @@ public class IpInfoController extends BaseController {
     @PostMapping("/remove")
     @ResponseBody
     public AjaxResult remove(String ids) {
-        return toAjax(iIpInfoService.logicDeleteIpInfoByIpIds(ids));
+        return toAjax(ipInfoService.logicDeleteIpInfoByIpIds(ids));
     }
 }

+ 2 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/merchant/service/impl/MerchantProdVoServiceImpl.java

@@ -11,6 +11,7 @@ import com.xingxi.web.controller.master.merchant.domain.MerchantProdVo;
 import com.xingxi.web.controller.master.merchant.mapper.MerchantProdVoMapper;
 import com.xingxi.web.controller.master.merchant.service.IMerchantProdVoService;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
@@ -68,6 +69,7 @@ public class MerchantProdVoServiceImpl implements IMerchantProdVoService {
      * @return 结果
      */
     @Override
+    @Transactional
     public int updateMerchantProdVo(MerchantProdVo merchantProdVo) {
         String[] prodAttrIds = Convert.toStrArray(merchantProdVo.getProdAttrIds());
         MerchantProd cond = new MerchantProd();

+ 3 - 1
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/service/impl/ProdAttrVoServiceImpl.java

@@ -11,6 +11,7 @@ import com.xingxi.web.controller.master.product.domain.ProdAttrVo;
 import com.xingxi.web.controller.master.product.mapper.ProdAttrVoMapper;
 import com.xingxi.web.controller.master.product.service.IProdAttrVoService;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
@@ -71,6 +72,7 @@ public  class ProdAttrVoServiceImpl implements IProdAttrVoService {
      * @return 影响行数
      */
     @Override
+    @Transactional
     public int addProdAttr(ProdAttrVo prodAttrVo) {
         prodAttrVo.setDelFlag(EDelFlag.NO.getVal());
         prodAttrVo.setCreateUser(ShiroUtils.getLoginName());
@@ -118,7 +120,7 @@ public  class ProdAttrVoServiceImpl implements IProdAttrVoService {
                     ids.add(prodAttrJoint.getProdAttrJointId().toString());
                 }
             }
-            effectRows = prodAttrJointMapper.deleteProdAttrJointByProdAttrJointIds(ids.toArray(new String[0]));
+            prodAttrJointMapper.deleteProdAttrJointByProdAttrJointIds(ids.toArray(new String[0]));
             effectRows = prodAttrJointMapper.batchInsertProdAttrJoint(prodAttrVo.getProdAttrJoints());
         }
         return effectRows;

+ 2 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/product/service/impl/ProdTagVoServiceImpl.java

@@ -10,6 +10,7 @@ import com.xingxi.web.controller.master.product.domain.ProdTagVo;
 import com.xingxi.web.controller.master.product.mapper.ProdTagVoMapper;
 import com.xingxi.web.controller.master.product.service.IProdTagVoService;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
@@ -47,6 +48,7 @@ public class ProdTagVoServiceImpl implements IProdTagVoService {
      * @return 影响行数
      */
     @Override
+    @Transactional
     public int addProdTags(ProdTagVo prodTagVo) {
         List<ProdTag> prodTagVos = new ArrayList<>();
         String[] tagIds = Convert.toStrArray(prodTagVo.getTagIds());

+ 3 - 3
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/ipInfo/service/impl/IpInfoCommonService.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/service/IpInfoService.java

@@ -1,4 +1,4 @@
-package com.xingxi.web.controller.master.ipInfo.service.impl;
+package com.xingxi.web.service;
 
 import com.xingxi.web.controller.master.ipInfo.domain.IpInfoVo;
 import com.xingxi.web.controller.master.ipInfo.mapper.IpInfoVoMapper;
@@ -13,10 +13,10 @@ import java.util.List;
  * @date 2025-03-06
  */
 @Component("ipInfo")
-public class IpInfoCommonService {
+public class IpInfoService {
     private final IpInfoVoMapper ipInfoVoMapper;
 
-    public IpInfoCommonService(IpInfoVoMapper ipInfoVoMapper) {
+    public IpInfoService(IpInfoVoMapper ipInfoVoMapper) {
         this.ipInfoVoMapper = ipInfoVoMapper;
     }
 

+ 1 - 1
08.src/Xingxi/xingxi-admin/src/main/resources/application-local.yml

@@ -72,7 +72,7 @@ spring:
         host: redis.njnet.vip
         port: 6379
         password: Biandan123
-        timeout: 20000ms           # 连接超时时长(毫秒)
+        timeout: 200000ms           # 连接超时时长(毫秒)
         lettuce:
             pool:
                 max-active: 1000  # 连接池最大连接数(使用负值表示没有限制)

+ 67 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/OrderDetailVoMapper.xml

@@ -0,0 +1,67 @@
+<?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.xingxi.web.controller.business.order.mapper.OrderDetailVoMapper">
+    <resultMap type="OrderDetailVo" id="OrderDetailVoResult">
+        <result property="orderDetailId"        column="orderDetailId"      />
+        <result property="orderId"              column="orderId"            />
+        <result property="orderDetailStatus"    column="orderDetailStatus"  />
+        <result property="prodId"               column="prodId"             />
+        <result property="prodName"             column="prodName"           />
+        <result property="prodAttrId"           column="prodAttrId"         />
+        <result property="prodAttrName"         column="prodAttrName"       />
+        <result property="vendorId"             column="vendorId"           />
+        <result property="quantity"             column="quantity"           />
+        <result property="afterSalesQty"        column="afterSalesQty"      />
+        <result property="refundQty"            column="refundQty"          />
+        <result property="price"                column="price"              />
+        <result property="orderAmount"          column="orderAmount"        />
+        <result property="payAmount"            column="payAmount"          />
+        <result property="confirmTime"          column="confirmTime"        />
+        <result property="finishTime"           column="finishTime"         />
+        <result property="delFlag"              column="delFlag"            />
+        <result property="createUser"           column="createUser"         />
+        <result property="createTime"           column="createTime"         />
+        <result property="updateUser"           column="updateUser"         />
+        <result property="updateTime"           column="updateTime"         />
+        <result property="className"            column="className"          />
+    </resultMap>
+
+    <sql id="selectOrderDetailVo">
+        select t_order_detail.orderDetailId
+             , t_order_detail.orderId
+             , t_order_detail.orderDetailStatus
+             , t_order_detail.prodId
+             , t_order_detail.prodName
+             , t_order_detail.prodAttrId
+             , t_order_detail.prodAttrName
+             , t_order_detail.vendorId
+             , t_order_detail.quantity
+             , t_order_detail.afterSalesQty
+             , t_order_detail.refundQty
+             , t_order_detail.price
+             , t_order_detail.orderAmount
+             , t_order_detail.payAmount
+             , t_order_detail.confirmTime
+             , t_order_detail.finishTime
+             , t_order_detail.delFlag
+             , t_order_detail.createUser
+             , t_order_detail.createTime
+             , t_order_detail.updateUser
+             , t_order_detail.updateTime
+             , m_prod_class.className as className
+             , m_prod_class.className as className
+        from t_order_detail
+        inner join m_prod on m_prod.id = t_order_detail.prodId
+        inner join m_prod_class on m_prod_class.prodClassId = m_prod.prodClassId
+    </sql>
+
+    <select id="selectOrderDetailVoByOrderDetailId" parameterType="Long" resultMap="OrderDetailVoResult">
+        <include refid="selectOrderDetailVo"/>
+        where t_order_detail.orderDetailId = #{orderDetailId}
+    </select>
+
+    <select id="selectOrderDetailVoList" parameterType="OrderDetailVo" resultMap="OrderDetailVoResult">
+        <include refid="selectOrderDetailVo"/>
+        where t_order_detail.orderId = #{orderId}
+    </select>
+</mapper>

+ 105 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/OrderVoMapper.xml

@@ -0,0 +1,105 @@
+<?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.xingxi.web.controller.business.order.mapper.OrderVoMapper">
+    <resultMap type="OrderVo" id="OrderVoResult">
+        <result property="orderId"          column="orderId"        />
+        <result property="orderNo"          column="orderNo"        />
+        <result property="orderTime"        column="orderTime"      />
+        <result property="payTime"          column="payTime"        />
+        <result property="orderStatus"      column="orderStatus"    />
+        <result property="orderAmount"      column="orderAmount"    />
+        <result property="payAmount"        column="payAmount"      />
+        <result property="prodQuantity"     column="prodQuantity"   />
+        <result property="buyerId"          column="buyerId"        />
+        <result property="sellerId"         column="sellerId"       />
+        <result property="cancelTime"       column="cancelTime"     />
+        <result property="finishTime"       column="finishTime"     />
+        <result property="recProv"          column="recProv"        />
+        <result property="recCity"          column="recCity"        />
+        <result property="recDistrict"      column="recDistrict"    />
+        <result property="recAddress"       column="recAddress"     />
+        <result property="recName"          column="recName"        />
+        <result property="recMobile"        column="recMobile"      />
+        <result property="remark"           column="remark"         />
+        <result property="delFlag"          column="delFlag"        />
+        <result property="createTime"       column="createTime"     />
+        <result property="createUser"       column="createUser"     />
+        <result property="updateUser"       column="updateUser"     />
+        <result property="updateTime"       column="updateTime"     />
+        <result property="sellerName"       column="sellerName"     />
+        <result property="sellerMobile"     column="sellerMobile"   />
+        <result property="buyerName"        column="buyerName"      />
+        <result property="prodName"         column="prodName"       />
+    </resultMap>
+
+    <sql id="selectOrderVo">
+        select t_order.orderId
+             , t_order.orderNo
+             , t_order.orderTime
+             , t_order.payTime
+             , t_order.orderStatus
+             , t_order.orderAmount
+             , t_order.payAmount
+             , t_order.prodQuantity
+             , t_order.buyerId
+             , t_order.sellerId
+             , t_order.cancelTime
+             , t_order.finishTime
+             , t_order.recProv
+             , t_order.recCity
+             , t_order.recDistrict
+             , t_order.recAddress
+             , t_order.recName
+             , t_order.recMobile
+             , t_order.remark
+             , t_order.delFlag
+             , t_order.createUser
+             , t_order.createTime
+             , t_order.updateUser
+             , t_order.updateTime
+             , m_merchant.mercName as sellerName
+             , m_merchant.mobile as sellerMobile
+             , sys_user.user_name as buyerName
+        from t_order
+        inner join m_merchant on m_merchant.mercId = t_order.sellerId
+        inner join sys_user on sys_user.user_id = t_order.buyerId
+    </sql>
+
+    <select id="selectOrderVoByOrderId" parameterType="Long" resultMap="OrderVoResult">
+        <include refid="selectOrderVo"/>
+        where t_order.orderId = #{orderId}
+    </select>
+
+    <select id="selectOrderVoList" parameterType="OrderVo" resultMap="OrderVoResult">
+        <include refid="selectOrderVo"/>
+        <where>
+            <if test="orderNo != null and orderNo != ''"> and t_order.orderNo like concat('%', #{orderNo}, '%')</if>
+            <if test="orderStatus != null and orderStatus != ''"> and t_order.orderStatus = #{orderStatus}</if>
+            <if test="recProv != null and recProv != ''"> and t_order.recProv like concat('%', #{recProv}, '%')</if>
+            <if test="recCity != null and recCity != ''"> and t_order.recCity like concat('%', #{recCity}, '%')</if>
+            <if test="recDistrict != null and recDistrict != ''"> and t_order.recDistrict like concat('%', #{recDistrict}, '%')</if>
+            <if test="recName != null and recName != ''"> and t_order.recName like concat('%', #{recName}, '%')</if>
+            <if test="recMobile != null and recMobile != ''"> and t_order.recMobile like concat('%', #{recMobile}, '%')</if>
+            <if test="delFlag != null  and delFlag != ''"> and t_order.delFlag = #{delFlag}</if>
+            <if test="params.orderTimeFrom != null and params.orderTimeFrom != ''"><!-- 开始时间检索 -->
+                and date_format(t_order.orderTime,'%y%m%d') &gt;= date_format(#{params.orderTimeFrom},'%y%m%d')
+            </if>
+            <if test="params.orderTimeTo != null and params.orderTimeTo != ''"><!-- 结束时间检索 -->
+                and date_format(t_order.orderTime,'%y%m%d') &lt;= date_format(#{params.orderTimeTo},'%y%m%d')
+            </if>
+            <if test="params.cancelTimeFrom != null and params.cancelTimeFrom != ''"><!-- 开始时间检索 -->
+                and date_format(t_order.cancelTime,'%y%m%d') &gt;= date_format(#{params.cancelTimeFrom},'%y%m%d')
+            </if>
+            <if test="params.cancelTimeTo != null and params.cancelTimeTo != ''"><!-- 结束时间检索 -->
+                and date_format(t_order.cancelTime,'%y%m%d') &lt;= date_format(#{params.cancelTimeTo},'%y%m%d')
+            </if>
+            <if test="buyerName != null and buyerName != ''"> and sys_user.user_name like concat('%', #{buyerName}, '%')</if>
+            <if test="sellerName != null and sellerName != ''"> and m_merchant.mercName like concat('%', #{sellerName}, '%')</if>
+            <if test="prodName != null and prodName != '' ">
+                and exists(select t_order_detail.id from t_order_detail
+                where t_order_detail.prodName like concat('%', #{prodName}, '%')
+                )
+            </if>
+        </where>
+    </select>
+</mapper>

+ 37 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/static/js/datatimeTool.js

@@ -0,0 +1,37 @@
+//在Jquery里格式化Date日期时间数据
+function format2Ymd(time) {
+	try {
+		if($.common.isEmpty(time)) {
+			return "";
+		}
+		time = time.replace(/-/g, "/");
+		var datetime = new Date(time);
+		var year = datetime.getFullYear();
+		var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
+		var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
+
+		return year + "-" + month + "-" + date;
+	} catch(e) {
+		alert(e);
+		return "";
+	}
+}
+
+//在Jquery里格式化Date日期时间数据
+function format2Timestamp(time) {
+	try {
+		time = time.replace(/-/g, "/");
+		var datetime = new Date(time);
+		var year = datetime.getFullYear();
+		var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
+		var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
+		var hour = datetime.getHours()< 10 ? "0" + datetime.getHours() : datetime.getHours();
+		var minute = datetime.getMinutes()< 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
+		var second = datetime.getSeconds()< 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
+
+		return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
+	} catch(e) {
+		alert(e);
+		return "";
+	}
+}

+ 1 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/static/js/datatimeTool.min.js

@@ -0,0 +1 @@
+function format2Ymd(f){try{var g=new Date(f);var b=g.getFullYear();var d=g.getMonth()+1<10?"0"+(g.getMonth()+1):g.getMonth()+1;var a=g.getDate()<10?"0"+g.getDate():g.getDate();return b+"-"+d+"-"+a}catch(c){alert(c);return""}}function format2Timestamp(b){try{var i=new Date(b);var j=i.getFullYear();var h=i.getMonth()+1<10?"0"+(i.getMonth()+1):i.getMonth()+1;var c=i.getDate()<10?"0"+i.getDate():i.getDate();var f=i.getHours()<10?"0"+i.getHours():i.getHours();var d=i.getMinutes()<10?"0"+i.getMinutes():i.getMinutes();var a=i.getSeconds()<10?"0"+i.getSeconds():i.getSeconds();return j+"-"+h+"-"+c+" "+f+":"+d+":"+a}catch(g){alert(g);return""}};

+ 76 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/static/ruoyi/js/common.js

@@ -582,3 +582,79 @@ $.ajaxSetup({
         }
     }
 });
+
+Date.prototype.Format = function (fmt) { //author: meizz
+    var o = {
+        "M+": this.getMonth() + 1, //月份
+        "d+": this.getDate(), //日
+        "H+": this.getHours(), //小时
+        "m+": this.getMinutes(), //分
+        "s+": this.getSeconds(), //秒
+        "q+": Math.floor((this.getMonth() + 3) / 3), //季度
+        "S": this.getMilliseconds() //毫秒
+    };
+    if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+    for (var k in o)
+        if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+    return fmt;
+};
+
+/**
+ *   功能:实现VBScript的DateAdd功能.
+ *   参数:interval,字符串表达式,表示要添加的时间间隔.
+ *   参数:number,数值表达式,表示要添加的时间间隔的个数.
+ *   参数:date,时间对象.
+ *   返回:新的时间对象.
+ *   var now = new Date();
+ *   var newDate = DateAdd( "d", 5, now);
+ *---------------   DateAdd(interval,number,date)   -----------------
+ */
+function DateAdd(interval, number, date) {
+    switch (interval) {
+        case "y ": {
+            date.setFullYear(date.getFullYear() + number);
+            return date;
+            break;
+        }
+        case "q ": {
+            date.setMonth(date.getMonth() + number * 3);
+            return date;
+            break;
+        }
+        case "m ": {
+            date.setMonth(date.getMonth() + number);
+            return date;
+            break;
+        }
+        case "w ": {
+            date.setDate(date.getDate() + number * 7);
+            return date;
+            break;
+        }
+        case "d ": {
+            date.setDate(date.getDate() + number);
+            return date;
+            break;
+        }
+        case "h ": {
+            date.setHours(date.getHours() + number);
+            return date;
+            break;
+        }
+        case "m ": {
+            date.setMinutes(date.getMinutes() + number);
+            return date;
+            break;
+        }
+        case "s ": {
+            date.setSeconds(date.getSeconds() + number);
+            return date;
+            break;
+        }
+        default: {
+            date.setDate(d.getDate() + number);
+            return date;
+            break;
+        }
+    }
+}

+ 68 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/static/ruoyi/js/currency.js

@@ -0,0 +1,68 @@
+function formatCurrency(number, n) {
+    if(!number && number != 0) {
+        return null;
+    }
+    if (n != 0) {
+        n = (n > 0 && n <= 20) ? n : 2;
+    }
+    number = parseFloat((number + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";
+    var sub_val = number.split(".")[0].split("").reverse();
+    var sub_xs = number.split(".")[1];
+
+    var show_html = "";
+    for (i = 0; i < sub_val.length; i++) {
+        show_html += sub_val[i] + ((i + 1) % 3 == 0 && (i + 1) != sub_val.length ? "," : "");
+    }
+
+    if (n == 0) {
+        return show_html.split("").reverse().join("");
+    } else {
+        return show_html.split("").reverse().join("") + "." + sub_xs;
+    }
+}
+
+/**
+ * 分转元
+ * @param {number} yuan
+ * @param {boolean} format 是否格式化
+ */
+function centesToYuan(centes, format) {
+    if(!centes && centes != 0) {
+        return null;
+    }
+    var yuan = (centes / 100).toFixed(2);
+    if(format) {
+        var reg = /(\d{1,3})(?=(?:\d{3})+\.)/g
+        yuan = yuan.replace(reg, '$1,');
+    }
+    return yuan;
+}
+
+/**
+ * 元转分
+ * @param {number} yuan
+ */
+function yuanToCents(yuan) {
+    yuan = yuan.replace(/,/g, "");
+    return(yuan * 100).toFixed(0);
+}
+
+/**
+ * 积分增加千分位
+ * */
+function formatPoint(number) {
+    if(!number && number != 0) {
+        return null;
+    }
+
+    number = parseFloat((number + "").replace(/[^\d\.-]/g, "")) + "";
+    var sub_val = number.split(".")[0].split("").reverse();
+    var sub_xs = number.split(".")[1];
+
+    var show_html = "";
+    for (i = 0; i < sub_val.length; i++) {
+        show_html += sub_val[i] + ((i + 1) % 3 == 0 && (i + 1) != sub_val.length ? "," : "");
+    }
+
+    return show_html.split("").reverse().join("");
+}

+ 100 - 496
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/order/order.html

@@ -17,25 +17,6 @@
 								商品名称:<input type="text" name="srhProdName" placeholder="商品名称"/>
 							</li>
 							<li>
-								支付方式:
-								<select name="payType" th:with="type=${@dict.getType('pay_type')}">
-									<option value="">所有</option>
-									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-								</select>
-							</li>
-							<li>
-								代理姓名:<input type="text" name="agentName" placeholder="代理姓名"/>
-							</li>
-							<li>
-								代理手机:<input type="text" name="agentMobile" placeholder="代理手机"/>
-							</li>
-							<li>
-								客户姓名:<input type="text" name="buyerName" placeholder="客户姓名"/>
-							</li>
-							<li>
-								客户手机:<input type="text" name="buyerMobile" placeholder="客户手机"/>
-							</li>
-							<li>
 								收件人姓名:<input type="text" name="recName" placeholder="收件人姓名"/>
 							</li>
 							<li>
@@ -46,23 +27,9 @@
 							</li>
 							<li shiro:hasPermission="platform:order:show">
 								商品分类:
-								<select name="prodType" th:with="type=${@dict.getType('prod_type_all')}">
+								<select name="prodClass" style="width: 200px;" th:with="prodClasses=${@product.getProdClasses()}" >
 									<option value="">所有</option>
-									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-								</select>
-							</li>
-							<li shiro:hasPermission="stock:order:show">
-								商品分类:
-								<select name="prodType" th:with="type=${@dict.getType('prod_type_all')}">
-									<option value="">所有</option>
-									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-								</select>
-							</li>
-							<li>
-								正品分类:
-								<select name="giftType" th:with="type=${@dict.getType('gift_type')}">
-									<option value="">所有</option>
-									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+									<option th:each="prodClass : ${prodClasses}" th:text="${prodClass.className}" th:value="${prodClass.prodClassId}"></option>
 								</select>
 							</li>
 							<li shiro:hasPermission="platform:order:show">
@@ -72,12 +39,6 @@
 									<option th:each="u : ${us}" th:text="${u.userName}" th:value="${u.userId}"></option>
 								</select>
 							</li>
-<!--                            <li>-->
-<!--                                商品筛选:-->
-<!--                                <span>已选择 <label id="prodSelectCnt">0</label>项</span>-->
-<!--                                <input type="hidden" id="prodforsrh" name="prodforsrh">-->
-<!--                                <a class="btn btn-info btn-sm" onclick="showProductSelect()"><i class="fa fa-search"></i>&nbsp;商品选择</a>-->
-<!--                            </li>-->
 							<li class="select-time">
 								<label>订单时间: </label>
 								<input type="text" class="time-input" placeholder="开始时间" id="orderTimeFrom" name="params[orderTimeFrom]"/>
@@ -109,478 +70,121 @@
             </div>
             
             <div class="btn-group-sm" id="toolbar" role="group">
-				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="platform:order:export">
-					<i class="fa fa-download"></i> EXCEL导出
-				</a>
-				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="warehouse:order:export">
-					<i class="fa fa-download"></i> EXCEL导出
-				</a>
-<!--                <a class="btn btn-warning" onclick="$.table.exportExcel()">-->
-<!--					<i class="fa fa-download"></i> EXCEL导出-->
-<!--                 </a>-->
             </div>
             <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table" data-mobile-responsive="true"></table>
             </div>
         </div>
     </div>
+	<script th:src="@{/js/datatimeTool.js}"></script>
+	<script th:src="@{/ruoyi/js/currency.js}"></script>
 	<th:block th:include="include :: footer" />
-	<!-- 备注区域 -->
-	<script id="remarkDiv" type="text/template">
-		<div class="col-xs-offset-1" style="height: 150px;">
-			<form id="formRemark">
-				<div class="select-list">
-					<ul>
-						<li>
-							<label class="col-sm-5 control-label">备注:</label>
-							<div class="col-sm-8">
-								<textarea id="remark" name="remark" class="form-control" maxlength="500" style="width: 270px; height: 100px;"></textarea>
-							</div>
-						</li>
-					</ul>
-				</div>
-			</form>
-		</div>
-	</script>
-    <script th:src="@{/hocy/js/datatimeTool.js}"></script>
-    <script th:src="@{/hocy/js/currency.js}"></script>
     <script th:inline="javascript">
 		var editFlag = [[${@permission.hasPermi('platform:order:edit')}]];
-        var prefix = ctx + "hocy/order";
+        var prefix = ctx + "business/order";
         var datas = [[${@dict.getType('order_status')}]];
-		var datasPayType = [[${@dict.getType('pay_type')}]];
-
-        var platformFlag = [[${@permission.hasPermi('platform:order:show')}]];
-        var stockFlag = [[${@permission.hasPermi('stock:order:show')}]];
-        var cofounderFlag = [[${@permission.hasPermi('cofounder:order:show')}]];
 
 		var dateFrom = DateAdd("m ", -1, new Date());
 		var dateTo = new Date();
 		$("#orderTimeFrom").val(dateFrom.Format("yyyy-MM-dd"));
 		$("#orderTimeTo").val(dateTo.Format("yyyy-MM-dd"));
 
-        var showColumns = [];
-        if (platformFlag == "") {
-            showColumns = [{
-                field : 'orderNo',
-                title : '订单编号',
-                sortable: false,
-				formatter: function(value, row, index) {
-					var displayString = value;
-					if (row.remark != null && row.remark !== "") {
-						displayString += " <a href='#commenting' data-toggle='tooltip' data-placement='top' title='" + row.remark + "'><i class='fa fa-commenting'></i></a>";
-					}
-					return value;
-					// return displayString;
-				}
-            },
-            {
-                field : 'sumAmount',
-                title : '订单总额',
-                sortable: false,
-				align : "right",
-                formatter: function(value, row, index) {
-                    return formatCurrency(value / 100, 2);
-                }
-            },
-            {
-                field : 'payAmount',
-                title : '实付总额',
-                sortable: false,
-                align : "right",
-                formatter: function(value, row, index) {
-                    return formatCurrency(value / 100, 2);
-                }
-            },
-			// {
-			// 	field : 'payType',
-			// 	title : '支付方式',
-			// 	sortable: false,
-			// 	formatter: function(value, row, index) {
-			// 		return $.table.selectDictLabel(datasPayType, value);
-			// 	}
-			// },
-			{
-				field : 'salesmanTwoName',
-				title : 'HOCY STAR',
-				sortable: false
-			},
-			{
-				field : 'salesmanTwoPhonenumber',
-				title : 'HOCY STAR手机',
-				sortable: false
-			},
-            {
-                field : 'salesmanOneName',
-                title : '和浠店主',
-                sortable: false
-            },
-            {
-                field : 'salesmanOnePhonenumber',
-                title : '和浠店主手机',
-                sortable: false
-            },
-            {
-                field : 'salesmanCofoundName',
-                title : '和浠总代',
-                sortable: false
-            },
-            {
-                field : 'salesmanCofoundPhonenumber',
-                title : '和浠总代手机',
-                sortable: false
-            },
-			{
-				field : 'buyerName',
-				title : '客户姓名',
-				sortable: false
-			},
-			{
-				field : 'buyerMobile',
-				title : '客户手机',
-				sortable: false
-			},
-			{
-				field : 'recName',
-				title : '收件人姓名',
-				sortable: false
-			},
-			{
-				field : 'recMobile',
-				title : '收件人手机',
-				sortable: false
-			},
-            {
-                field : 'orderTime',
-                title : '订单时间',
-                sortable: false
-            },
-			{
-				field : 'cancelTime',
-				title : '取消时间',
-				sortable: false
-			},
-            {
-                field : 'orderStatus',
-                title : '订单状态',
-                sortable: false,
-                formatter: function(value, row, index) {
-                    return $.table.selectDictLabel(datas, value);
-                }
-            },
-            {
-                title: '操作',
-                align: 'center',
-                formatter: function(value, row, index) {
-                    var actions = [];
-					actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.modal.openTab(\'订单详情\', \'' + prefix + '/detail/' + row.id + '\')"><i class="fa fa-edit"></i>查看</a> ');
-					// actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="handleRemark(\'' + row.id + '\')"><i class="fa fa-info"></i>备注</a> ');
-                    return actions.join('');
-                }
-            }]
-        } else if (stockFlag == "") {
-            showColumns = [{
-                field : 'id',
-                visible: false
-            },
-            {
-                field : 'orderNo',
-                title : '订单编号',
-                sortable: false,
-				formatter: function(value, row, index) {
-					var displayString = value;
-					if (row.remark != null && row.remark !== "") {
-						displayString += " <a href='#commenting' data-toggle='tooltip' data-placement='top' title='" + row.remark + "'><i class='fa fa-commenting'></i></a>";
-					}
-                    return value;
-					// return displayString;
-				}
-            },
-            {
-                field : 'salesmanTwoName',
-                title : 'HOCY STAR',
-                sortable: false
-            },
-            {
-                field : 'salesmanTwoPhonenumber',
-                title : 'HOCY STAR手机',
-                sortable: false
-            },
-            {
-                field : 'salesmanOneName',
-                title : '和浠店主',
-                sortable: false
-            },
-            {
-                field : 'salesmanOnePhonenumber',
-                title : '和浠店主手机',
-                sortable: false
-            },
-            {
-                field : 'salesmanCofoundName',
-                title : '和浠总代',
-                sortable: false
-            },
-            {
-                field : 'salesmanCofoundPhonenumber',
-                title : '和浠总代手机',
-                sortable: false
-            },
-			{
-				field : 'buyerName',
-				title : '客户姓名',
-				sortable: false
-			},
-			{
-				field : 'buyerMobile',
-				title : '客户手机',
-				sortable: false
-			},
-			{
-				field : 'recName',
-				title : '收件人姓名',
-				sortable: false
-			},
-			{
-				field : 'recMobile',
-				title : '收件人手机',
-				sortable: false
-			},
-			{
-				field : 'orderTime',
-				title : '订单时间',
-				sortable: false,
-				formatter: function(value, row, index) {
-					return format2Timestamp(row.orderTime);
-				}
-			},
-			{
-				field : 'orderStatus',
-				title : '订单状态',
-				sortable: false,
-				formatter: function(value, row, index) {
-					return $.table.selectDictLabel(datas, value);
-				}
-			},
-            {
-                title: '操作',
-                align: 'center',
-                formatter: function(value, row, index) {
-                    var actions = [];
-                    actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\', 1000)"><i class="fa fa-edit"></i>查看</a> ');
-                    return actions.join('');
-                }
-            }]
-        } else if (cofounderFlag == "") {
-            showColumns = [{
-                field : 'id',
-                visible: false
-            },
-            {
-                field : 'orderNo',
-                title : '订单编号',
-                sortable: false
-            },
-            {
-                field : 'sumAmount',
-                title : '订单金额',
-				align : "right",
-                formatter: function(value, row, index) {
-                    return formatCurrency(value / 100, 2);
-                }
-            },
-            {
-                field : 'payAmount',
-                title : '实付总额',
-                sortable: false,
-                align : "right",
-                formatter: function(value, row, index) {
-                    return formatCurrency(value / 100, 2);
-                }
-            },
-			{
-				field : 'payType',
-				title : '支付方式',
-				sortable: false,
-				formatter: function(value, row, index) {
-					return $.table.selectDictLabel(datasPayType, value);
-				}
-			},
-			{
-				field : 'salesmanUserName',
-				title : '代理姓名',
-				sortable: false
-			},
-			{
-				field : 'salesmanUserPhonenumber',
-				title : '代理手机',
-				sortable: false
-			},
-			// {
-			// 	field : 'salesmanTwoName',
-			// 	title : 'HOCY STAR',
-			// 	sortable: false
-			// },
-			// {
-			// 	field : 'salesmanTwoPhonenumber',
-			// 	title : 'HOCY STAR手机',
-			// 	sortable: false
-			// },
-			// {
-			// 	field : 'salesmanOneName',
-			// 	title : 'HOCY TALENT',
-			// 	sortable: false
-			// },
-			// {
-			// 	field : 'salesmanOnePhonenumber',
-			// 	title : 'HOCY TALENT手机',
-			// 	sortable: false
-			// },
-			{
-				field : 'buyerName',
-				title : '客户姓名',
-				sortable: false
-			},
-			{
-				field : 'buyerMobile',
-				title : '客户手机',
-				sortable: false
-			},
-			{
-				field : 'recName',
-				title : '收件人姓名',
-				sortable: false
-			},
-			{
-				field : 'recMobile',
-				title : '收件人手机',
-				sortable: false
-			},
-			{
-				field : 'orderTime',
-				title : '订单时间',
-				sortable: false
-			},
-			{
-				field : 'orderStatus',
-				title : '订单状态',
-				sortable: false,
-				formatter: function(value, row, index) {
-					return $.table.selectDictLabel(datas, value);
-				}
-			},
-			{
-				field : 'cancelTime',
-				title : '取消时间',
-				sortable: false
-			},
-            {
-                title: '操作',
-                align: 'center',
-                formatter: function(value, row, index) {
-                    var actions = [];
-                    actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\', 1000)"><i class="fa fa-edit"></i>查看</a> ');
-                    return actions.join('');
-                }
-            }]
-        }
-
-        var selectedProducts;
-        function showProductSelect() {
-            layer.open({
-                type: 2,
-                area: ['800px', '600px'],
-                fix: false,
-                //不固定
-                maxmin: true,
-                shade: 0.3,
-                title: "商品选择",
-                content: ctx + "hocy/undelivery/prodSelect",
-                btn: ['确定', '关闭'],
-                // 弹层外区域关闭
-                shadeClose: true,
-                success: setSelectedToModel,
-                yes: function(index, layero) {
-                    var iframeWin = layero.find('iframe')[0];
-                    iframeWin.contentWindow.submitHandler(index, layero);
-                }
-            });
-        }
-
-        function setSelectedToModel(layero, index) {
-            if (selectedProducts != null) {
-                let body = layer.getChildFrame('body', index);
-                body.find("#selectedProds").val(selectedProducts);
-                var iframeWin = window[layero.find('iframe')[0]['name']];
-                iframeWin.$.table.search();
-            }
-        }
-
-        function modelCallback(modelsSelected) {
-            selectedProducts = modelsSelected;
-            $("#prodSelectCnt").text(selectedProducts.length);
-            $("#prodforsrh").val(selectedProducts.join())
-        }
-
-        $(function() {
-			var exportUrlString = prefix + "/export";
-			// if (platformFlag == "") {
-			// 	exportUrlString = prefix + "/exportForPlm";
-			// }
-            var options = {
-                url: prefix + "/list",
-				uniqueId : 'id',
-                createUrl: prefix + "/add",
-                updateUrl: prefix + "/edit/{id}",
-                exportUrl: exportUrlString,
-                detailUrl: prefix + "/detail/{id}",
-                modalName: "订单",
-				sortName: "orderTime",
-				sortOrder: "desc",
-                columns: showColumns
-            };
-            $.table.init(options);
-        });
-
-		function handleRemark(id) {
-			var rowData = $("#bootstrap-table").bootstrapTable('getRowByUniqueId', id)
-			var content = $('#remarkDiv').html();
-			layer.open({
-				type: 1,
-				fix: false,
-				maxmin: true,
-				shade: 0.3,
-				title: '备注',
-				// 弹层外区域关闭
-				shadeClose: true,
-				content: content, //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
-				btn: ['<i class="fa fa-check"></i> 确定', '<i class="fa fa-remove"></i> 关闭'],
-				btn1: function() {
-					var data = {};
-					data.orderId = id;
-					data.remark = $('#remark').val();
-					var index = layer.load(2, {shade: false});
-					$.modal.disable();
-
-					$.post(prefix + "/saveRemark", data, function(result) {
-						if (result.code === web_status.SUCCESS) {
-							$.modal.closeAll();
-							$.modal.alertSuccess(result.msg);
-							$.table.refresh();
-						} else if (result.code === web_status.WARNING) {
-							$.modal.closeAll();
-							$.modal.enable();
-							$.modal.alertWarning(result.msg)
-						} else {
-							$.modal.closeAll();
-							$.modal.enable();
-							$.modal.alertError(result.msg);
+		$(function() {
+			var options = {
+				url: prefix + "/list",
+				createUrl: prefix + "/add",
+				updateUrl: prefix + "/edit/{id}",
+				removeUrl: prefix + "/remove",
+				exportUrl: prefix + "/export",
+				modalName: "新闻广告",
+				showSearch: false,
+				showColumns: false,
+				columns: [
+					{
+						field : 'orderNo',
+						title : '订单编号',
+						sortable: false
+					},
+					{
+						field : 'orderAmount',
+						title : '订单总额',
+						sortable: false,
+						align : "right",
+						formatter: function(value, row, index) {
+							return formatCurrency(value / 100, 2);
 						}
-					});
-				}
-			});
-			$('#remark').val(rowData.remark);
-		}
+					},
+					{
+						field : 'payAmount',
+						title : '实付总额',
+						sortable: false,
+						align : "right",
+						formatter: function(value, row, index) {
+							return formatCurrency(value / 100, 2);
+						}
+					},
+					{
+						field : 'prodQuantity',
+						title : '商品数量',
+						sortable: false,
+						align : "right"
+					},
+					{
+						field : 'sellerName',
+						title : '店铺名称',
+						sortable: false
+					},
+					{
+						field : 'sellerMobile',
+						title : '店铺联系方式',
+						sortable: false
+					},
+					{
+						field : 'recName',
+						title : '收件人姓名',
+						sortable: false
+					},
+					{
+						field : 'recMobile',
+						title : '收件人手机',
+						sortable: false
+					},
+					{
+						field : 'orderTime',
+						title : '下单时间',
+						sortable: false
+					},
+					{
+						field : 'payTime',
+						title : '支付时间',
+						sortable: false
+					},
+					{
+						field : 'cancelTime',
+						title : '取消时间',
+						sortable: false
+					},
+					{
+						field : 'orderStatus',
+						title : '订单状态',
+						sortable: false,
+						formatter: function(value, row, index) {
+							return $.table.selectDictLabel(datas, value);
+						}
+					},
+					{
+						title: '操作',
+						align: 'center',
+						formatter: function(value, row, index) {
+							var actions = [];
+							actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.modal.openTab(\'订单详情\', \'' + prefix + '/detail/' + row.orderId + '\')"><i class="fa fa-edit"></i>查看</a> ');
+							return actions.join('');
+						}
+					}
+				]
+			};
+			$.table.init(options);
+		});
     </script>
 </body>
 </html>

+ 138 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/order/orderDetail.html

@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+	<th:block th:include="include :: header('订单详细')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content " >
+        <form class="form-horizontal" id="form-order-detail" th:object="${orderVo}">
+            <input id="orderId" name="orderId" th:field="*{orderId}"  type="hidden">
+			<div class="form-group">
+				<label class="col-sm-3 control-label">订单编号:</label>
+				<div class="col-sm-3">
+					<p class="form-control-static" th:text="*{orderNo}"></p>
+				</div>
+				<label class="col-sm-3 control-label">订单时间:</label>
+				<div class="col-sm-3">
+					<p class="form-control-static" th:text="${#dates.format(orderVo.orderTime, 'yyyy-MM-dd HH:mm:ss')}"></p>
+				</div>
+			</div>
+			<div class="form-group">
+				<label class="col-sm-3 control-label">店铺名称:</label>
+				<div class="col-sm-3">
+					<p class="form-control-static"  th:text="*{sellerName}"></p>
+				</div>
+				<label class="col-sm-3 control-label">店铺联系方式:</label>
+				<div class="col-sm-3">
+					<p class="form-control-static"  th:text="*{sellerMobile}"></p>
+				</div>
+			</div>
+			<div class="form-group">
+				<label class="col-sm-3 control-label">收件人名称:</label>
+				<div class="col-sm-3">
+					<p class="form-control-static"  th:text="*{recName}"></p>
+				</div>
+				<label class="col-sm-3 control-label">收件人手机:</label>
+				<div class="col-sm-3">
+					<p class="form-control-static"  th:text="*{recMobile}"></p>
+				</div>
+			</div>
+			<div class="form-group">
+				<label class="col-sm-3 control-label">收件人地址:</label>
+				<div class="col-sm-9">
+					<label class="control-label" th:text="*{recProv}"></label>
+					<label class="control-label" th:text="*{recCity}"></label>
+					<label class="control-label" th:text="*{recDistrict}"></label>
+					<label class="control-label" th:text="*{recAddress}"></label>
+				</div>
+			</div>
+			<div class="form-group">
+				<label class="col-sm-3 control-label">订单状态:</label>
+				<div class="col-sm-3" th:with="type=${@dict.getType('order_status')}">
+					<p class="form-control-static" th:each="dict : ${type}" th:if="${orderVo.orderStatus == dict.dictValue}"  th:text="${dict.dictLabel}"></p>
+				</div>
+			</div>
+			<div class="col-sm-12 select-table table-striped">
+				<table id="bootstrap-table" data-mobile-responsive="true"></table>
+			</div>
+		</form>
+    </div>
+    <div th:include="include::footer"></div>
+	<script th:src="@{/ruoyi/js/currency.js}"></script>
+	<script th:inline="javascript">
+		$(function() {
+			var datas = [[${@dict.getType('order_detail_status')}]];
+			var options = {
+				url: ctx + "business/orderDetail/list",
+				modalName: "订单",
+				showSearch: false,
+				showPageGo: false,
+				showRefresh: false,
+				showColumns: false,
+				showToggle: false,
+				columns: [
+					{
+						field : 'className',
+						title : '商品分类',
+						sortable: false
+					},
+					{
+						field : 'prodName',
+						title : '商品名称',
+						sortable: false
+					},
+					{
+						field : 'prodAttrName',
+						title : '商品属性',
+						sortable: false
+					},
+					{
+						field : 'quantity',
+						title : '订单数量',
+						align : "right"
+					},
+					{
+						field : 'price',
+						title : '单价(元)',
+						align : "right",
+						formatter: function(value, row, index) {
+							return formatCurrency(value / 100, 2);
+						}
+					},
+					{
+						field : 'orderAmount',
+						title : '订单金额',
+						align : "right",
+						formatter: function(value, row, index) {
+							return formatCurrency(value / 100, 2);
+						}
+					},
+					{
+						field : 'confirmTime',
+						title : '确认收货时间',
+						align : "center"
+					},
+					{
+						field : 'refundCount',
+						title : '已退货数量',
+						align : "right",
+						formatter: function(value, row, index) {
+							return formatPoint(value);
+						}
+					},
+					{
+						field : 'orderDetailStatus',
+						title : '状态',
+						sortable: false,
+						formatter: function(value, row, index) {
+							return $.table.selectDictLabel(datas, value);
+						}
+					}
+				]
+			};
+			$.table.init(options);
+		});
+		$("select").attr('disabled',true);
+	</script>
+</body>
+</html>

+ 13 - 0
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/core/domain/entity/SysUser.java

@@ -120,6 +120,11 @@ public class SysUser extends BaseEntity {
     // 密码最后更新时间
     private Date pwdUpdateDate;
 
+    /**
+     * 权限名称
+     */
+    private String roleKey;
+
     public String getWxOpenId() {
         return wxOpenId;
     }
@@ -214,6 +219,14 @@ public class SysUser extends BaseEntity {
         this.roleId = roleId;
     }
 
+    public String getRoleKey() {
+        return roleKey;
+    }
+
+    public void setRoleKey(String roleKey) {
+        this.roleKey = roleKey;
+    }
+
     @Xss(message = "登录账号不能包含脚本字符")
     @NotBlank(message = "登录账号不能为空")
     @Size(min = 0, max = 30, message = "登录账号长度不能超过30个字符")

+ 135 - 0
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/utils/MaskUtils.java

@@ -0,0 +1,135 @@
+package com.xingxi.common.utils;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.regex.Pattern;
+
+/**
+ * 掩码工具
+ */
+public final class MaskUtils {
+    private static final Pattern PATTERN = Pattern.compile("[0-9一二三四五六七八九十百千万]++|[A-Za-z]+(?=\\s*[座区])");
+
+    private MaskUtils() {
+    }
+
+    /**
+     * 掩饰姓名,前一半用*
+     *
+     * @param str
+     * @return
+     */
+    public static String maskName(String str) {
+        return str != null && !str.isEmpty() ?
+                maskText(str, 0, (str.length() + 1) / 2) : "";
+    }
+
+    /**
+     * 地址 上海市西藏北路 *** 号 *** 楼 *** 室
+     * @param str
+     * @return 上海市西藏北路 *** 号 *** 楼 *** 室
+     */
+    public static String maskAddress(String str) {
+        return str != null && !str.isEmpty() ?
+                String.valueOf(PATTERN.matcher(str).replaceAll("*").toCharArray()) : "";
+    }
+
+    /**
+     * 掩饰银行卡号,前6,后4,中间用*
+     *
+     * @param str
+     * @return
+     */
+    public static String maskBankCardNo(String str) {
+        return maskText(str, 6, 4);
+    }
+
+    /**
+     * 掩饰身份证,前6,后4,中间用*
+     *
+     * @param str
+     * @return
+     */
+    public static String maskIdCardNo(String str) {
+        return maskText(str, 6, 4);
+    }
+
+    /**
+     * 掩饰手机号,前6,后4,中间用*
+     *
+     * @param str
+     * @return
+     */
+    public static String maskMobileNo(String str) {
+        return maskText(str, 3, 4);
+    }
+
+    /**
+     * 掩饰邮箱,@符号前面字符的后一半用*
+     *
+     * @param str
+     * @return
+     */
+    public static String maskEmail(String str) {
+        if (str != null && !str.isEmpty()) {
+            int index = str.lastIndexOf(64);
+            return maskText(str, index / 2, str.length() - index);
+        } else {
+            return "";
+        }
+    }
+
+    /**
+     * 掩饰文本
+     *
+     * @param str
+     * @param prefixLen
+     * @param suffixLen
+     * @return
+     */
+    public static String maskText(String str, int prefixLen, int suffixLen) {
+        if (str != null && !str.isEmpty()) {
+            int len = str.length();
+            return len <= prefixLen + suffixLen ?
+                    str : str.substring(0, prefixLen)
+                    + StringUtils.repeat('*', len - (prefixLen + suffixLen))
+                    + str.substring(len - suffixLen);
+        } else {
+            return "";
+        }
+    }
+
+    /**
+     * 自动对字符串打掩码
+     * @param str 待掩码字符串
+     * @return 打了掩码的字符串
+     */
+    public static String maskText(String str) {
+        if (StringUtils.isBlank(str)) {
+            return "";
+        } else {
+            int maskLen = str.length() / 4;
+            if (maskLen < 1) {
+                maskLen = 1;
+            }
+            return maskText(str, maskLen, maskLen);
+        }
+    }
+
+    public static void main(String[] args) {
+        //  *三
+        //  185****1251
+        //  021*****2602
+        //  021****2602
+        //  557*2602
+        //  sasda*****@yeah.net
+        // 长虹路*号*栋*室 雨虹雅苑小
+        System.out.println(maskName("李三"));
+        System.out.println(maskMobileNo("18521351251"));
+        System.out.println(maskMobileNo("021-55722602"));
+        System.out.println(maskMobileNo("02155722602"));
+        System.out.println(maskMobileNo("55722602"));
+        System.out.println(maskEmail("sasdagdgag@yeah.net"));
+        System.out.println(maskAddress("长虹路296号2栋201室 雨虹雅苑小区"));
+    }
+}

+ 42 - 0
08.src/Xingxi/xingxi-framework/src/main/java/com/xingxi/framework/web/service/UserService.java

@@ -0,0 +1,42 @@
+package com.xingxi.framework.web.service;
+
+import com.xingxi.common.core.domain.entity.SysUser;
+import com.xingxi.common.enums.ERoleKey;
+import com.xingxi.system.service.ISysConfigService;
+import com.xingxi.system.service.ISysUserService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 用户信息
+ *
+ * @author xingxi
+ */
+@Service("user")
+public class UserService {
+    @Resource
+    private ISysConfigService configService;
+    @Resource
+    private ISysUserService userService;
+
+    /**
+     * 查询供应商
+     *
+     * @return 供应商集合
+     */
+    public List<SysUser> getVendorList() {
+        SysUser user = new SysUser();
+        user.setRoleKey(ERoleKey.VENDOR.getCode());
+        user.setStatus("0");
+        List<SysUser> userList = userService.selectVendorList(user);
+
+        SysUser platformUser = new SysUser();
+        platformUser.setUserId(0L);
+        platformUser.setUserName(configService.selectConfigByKey("sys.platformName"));
+
+        userList.add(0, platformUser);
+        return userList;
+    }
+}

+ 8 - 0
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/system/mapper/SysUserMapper.java

@@ -131,4 +131,12 @@ public interface SysUserMapper {
      * @return 结果
      */
     SysUser checkEmailUnique(String email);
+
+    /**
+     * 根据条件分页查询供应商列表
+     *
+     * @param sysUser 用户信息
+     * @return 供应商信息集合信息
+     */
+    List<SysUser> selectVendorList(SysUser sysUser);
 }

+ 7 - 0
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/system/service/ISysUserService.java

@@ -211,4 +211,11 @@ public interface ISysUserService {
      * @return 结果
      */
     int changeStatus(SysUser user);
+    /**
+     * 根据条件分页查询供应商列表
+     *
+     * @param user 用户信息
+     * @return 供应商信息集合信息
+     */
+    List<SysUser> selectVendorList(SysUser user);
 }

+ 27 - 19
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/system/service/impl/SysUserServiceImpl.java

@@ -1,17 +1,5 @@
 package com.xingxi.system.service.impl;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-import javax.validation.ConstraintViolationException;
-import javax.validation.Validator;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
 import com.xingxi.common.annotation.DataScope;
 import com.xingxi.common.constant.UserConstants;
 import com.xingxi.common.core.domain.entity.SysRole;
@@ -28,14 +16,22 @@ import com.xingxi.common.utils.spring.SpringUtils;
 import com.xingxi.system.domain.SysPost;
 import com.xingxi.system.domain.SysUserPost;
 import com.xingxi.system.domain.SysUserRole;
-import com.xingxi.system.mapper.SysPostMapper;
-import com.xingxi.system.mapper.SysRoleMapper;
-import com.xingxi.system.mapper.SysUserMapper;
-import com.xingxi.system.mapper.SysUserPostMapper;
-import com.xingxi.system.mapper.SysUserRoleMapper;
+import com.xingxi.system.mapper.*;
 import com.xingxi.system.service.ISysConfigService;
 import com.xingxi.system.service.ISysDeptService;
 import com.xingxi.system.service.ISysUserService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import javax.validation.ConstraintViolationException;
+import javax.validation.Validator;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 用户 业务层处理
@@ -293,7 +289,7 @@ public class SysUserServiceImpl implements ISysUserService {
     public void insertUserRole(Long userId, Long[] roleIds) {
         if (StringUtils.isNotNull(roleIds)) {
             // 新增用户与角色管理
-            List<SysUserRole> list = new ArrayList<SysUserRole>();
+            List<SysUserRole> list = new ArrayList<>();
             for (Long roleId : roleIds) {
                 SysUserRole ur = new SysUserRole();
                 ur.setUserId(userId);
@@ -315,7 +311,7 @@ public class SysUserServiceImpl implements ISysUserService {
         Long[] posts = user.getPostIds();
         if (StringUtils.isNotNull(posts)) {
             // 新增用户与岗位管理
-            List<SysUserPost> list = new ArrayList<SysUserPost>();
+            List<SysUserPost> list = new ArrayList<>();
             for (Long postId : posts) {
                 SysUserPost up = new SysUserPost();
                 up.setUserId(user.getUserId());
@@ -509,4 +505,16 @@ public class SysUserServiceImpl implements ISysUserService {
     public int changeStatus(SysUser user) {
         return userMapper.updateUser(user);
     }
+
+    /**
+     * 根据条件分页查询供应商列表
+     *
+     * @param user 用户信息
+     * @return 用户信息集合信息
+     */
+    @Override
+    @DataScope(deptAlias = "d", userAlias = "u")
+    public List<SysUser> selectVendorList(SysUser user) {
+        return userMapper.selectVendorList(user);
+    }
 }

+ 56 - 2
08.src/Xingxi/xingxi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -247,5 +247,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			sysdate()
  		)
 	</insert>
-	
-</mapper> 
+
+	<select id="selectVendorList" parameterType="SysUser" resultMap="SysUserResult">
+		select u.user_id
+		     , u.dept_id
+		     , u.login_name
+		     , u.user_name
+		     , u.user_type
+		     , u.email
+		     , u.wx_open_id
+		     , u.wx_union_id
+		     , u.wx_session_key
+		     , u.avatar
+		     , u.phonenumber
+		     , u.password
+		     , u.sex
+		     , u.salt
+		     , 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="loginName != null and loginName != ''">
+			AND u.login_name like concat('%', #{loginName}, '%')
+		</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>
+		<if test="roleKey != null and roleKey != ''">
+			AND d.deptType = #{roleKey}
+		</if>
+		<!-- 数据范围过滤 -->
+		${params.dataScope}
+	</select>
+</mapper>