Browse Source

商城代码

chenguo 1 week ago
parent
commit
72e017d77d
86 changed files with 5948 additions and 582 deletions
  1. 9 0
      fs-admin/pom.xml
  2. 107 0
      fs-admin/src/main/java/com/fs/bean/AliPayBean.java
  3. 98 0
      fs-admin/src/main/java/com/fs/hisStore/FsMaterialGroupScrmController.java
  4. 90 0
      fs-admin/src/main/java/com/fs/hisStore/FsMaterialScrmController.java
  5. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsPrescribeDrugScrmController.java
  6. 103 0
      fs-admin/src/main/java/com/fs/hisStore/FsPrescribeScrmController.java
  7. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsShippingTemplatesFreeScrmController.java
  8. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsShippingTemplatesRegionScrmController.java
  9. 106 0
      fs-admin/src/main/java/com/fs/hisStore/FsShippingTemplatesScrmController.java
  10. 107 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreActivityScrmController.java
  11. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreAfterSalesItemScrmController.java
  12. 198 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreAfterSalesScrmController.java
  13. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreAfterSalesStatusScrmController.java
  14. 52 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreCanvasScrmController.java
  15. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreCartScrmController.java
  16. 98 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreCouponIssueScrmController.java
  17. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreCouponIssueUserScrmController.java
  18. 146 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreCouponScrmController.java
  19. 102 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreCouponUserScrmController.java
  20. 176 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreHealthOrderScrmController.java
  21. 41 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderAuditScrmController.java
  22. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderItemScrmController.java
  23. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderNoticeScrmController.java
  24. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderOfflineItemScrmController.java
  25. 159 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderOfflineScrmController.java
  26. 162 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderPromotionScrmController.java
  27. 644 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderScrmController.java
  28. 54 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderStatisticsScrmController.java
  29. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderStatusScrmController.java
  30. 298 0
      fs-admin/src/main/java/com/fs/hisStore/FsStorePaymentScrmController.java
  31. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductAttrScrmController.java
  32. 99 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductAttrValueScrmController.java
  33. 105 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductCategoryScrmController.java
  34. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductDetailsScrmController.java
  35. 133 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductGroupScrmController.java
  36. 200 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductPackageScrmController.java
  37. 58 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductRelationScrmController.java
  38. 110 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductReplyScrmController.java
  39. 119 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductRuleScrmController.java
  40. 189 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductScrmController.java
  41. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductTemplateScrmController.java
  42. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreShopScrmController.java
  43. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreShopStaffScrmController.java
  44. 174 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreStatisticsScrmController.java
  45. 97 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreVisitScrmController.java
  46. 10 0
      fs-admin/src/main/resources/pay/alipay.properties
  47. 8 0
      fs-admin/src/main/resources/pay/alipay1.properties
  48. BIN
      fs-admin/src/main/resources/pay/cert/apiclient_cert.p12
  49. 26 0
      fs-admin/src/main/resources/pay/cert/apiclient_cert.pem
  50. 28 0
      fs-admin/src/main/resources/pay/cert/apiclient_key.pem
  51. 18 0
      fs-admin/src/main/resources/pay/cert/证书使用说明.txt
  52. 8 0
      fs-admin/src/main/resources/pay/wxpay.properties
  53. 9 0
      fs-admin/src/main/resources/pay/wxpay_v3.properties
  54. 22 19
      fs-service/src/main/java/com/fs/hisStore/domain/FsPatientScrm.java
  55. 34 29
      fs-service/src/main/java/com/fs/hisStore/domain/FsPrescribeDrugScrm.java
  56. 3 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsUserAddressScrm.java
  57. 2 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreOrderScrmMapper.java
  58. 2 0
      fs-service/src/main/java/com/fs/hisStore/service/IFsStoreOrderScrmService.java
  59. 32 4
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java
  60. 19 0
      fs-service/src/main/java/com/fs/hisStore/vo/CityVO.java
  61. 13 0
      fs-service/src/main/java/com/fs/hisStore/vo/FsStoreProductCountsVO.java
  62. 28 0
      fs-service/src/main/java/com/fs/hisStore/vo/StoreOrderStatisticsVo.java
  63. 0 16
      fs-service/src/main/java/com/fs/store/dto/ProductArrtScrmDTO.java
  64. 0 22
      fs-service/src/main/java/com/fs/store/dto/ProductAttrScrmCountDto.java
  65. 0 10
      fs-service/src/main/java/com/fs/store/param/ExpressScrmParam.java
  66. 0 18
      fs-service/src/main/java/com/fs/store/param/FsCustomerStoreOrderScrmListQueryParam.java
  67. 0 16
      fs-service/src/main/java/com/fs/store/param/FsMyStoreOrderScrmQueryParam.java
  68. 0 16
      fs-service/src/main/java/com/fs/store/param/FsProductAttrValueScrmParam.java
  69. 0 13
      fs-service/src/main/java/com/fs/store/param/FsStoreCartScrmCountParam.java
  70. 0 90
      fs-service/src/main/java/com/fs/store/param/FsStoreOrderScrmParam.java
  71. 0 26
      fs-service/src/main/java/com/fs/store/param/FsStoreOrderScrmStatisticsParam.java
  72. 0 18
      fs-service/src/main/java/com/fs/store/param/FsStoreProductAttrValueScrmQueryParam.java
  73. 0 148
      fs-service/src/main/java/com/fs/store/param/FsStoreProductScrmAddEditParam.java
  74. 0 31
      fs-service/src/main/java/com/fs/store/param/FsStoreProductScrmQueryParam.java
  75. 0 19
      fs-service/src/main/java/com/fs/store/param/FsStoreScrmStatisticsParam.java
  76. 0 17
      fs-service/src/main/java/com/fs/store/param/FsStoreTuiProductAttrValueScrmParam.java
  77. 0 13
      fs-service/src/main/java/com/fs/store/param/OrderScrmListParam.java
  78. 1 1
      fs-service/src/main/resources/mapper/hisStore/FsAdvScrmMapper.xml
  79. 8 8
      fs-service/src/main/resources/mapper/hisStore/FsCityScrmMapper.xml
  80. 15 15
      fs-service/src/main/resources/mapper/hisStore/FsPatientScrmMapper.xml
  81. 13 13
      fs-service/src/main/resources/mapper/hisStore/FsPrescribeDrugScrmMapper.xml
  82. 35 2
      fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml
  83. 17 17
      fs-service/src/main/resources/mapper/hisStore/FsUserAddressScrmMapper.xml
  84. 3 0
      fs-user-app/src/main/java/com/fs/app/controller/store/AddressScrmController.java
  85. 1 1
      fs-user-app/src/main/java/com/fs/app/controller/store/UserScrmController.java
  86. 7 0
      pom.xml

+ 9 - 0
fs-admin/pom.xml

@@ -16,6 +16,15 @@
     </description>
 
     <dependencies>
+        <dependency>
+            <groupId>com.github.javen205</groupId>
+            <artifactId>IJPay-All</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alipay.sdk</groupId>
+            <artifactId>alipay-sdk-java</artifactId>
+            <version>4.8.62.ALL</version>
+        </dependency>
 
         <!-- spring-boot-devtools -->
         <dependency>

+ 107 - 0
fs-admin/src/main/java/com/fs/bean/AliPayBean.java

@@ -0,0 +1,107 @@
+package com.fs.bean;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+
+@Component
+@PropertySource("classpath:/pay/alipay.properties")
+@ConfigurationProperties(prefix = "alipay")
+public class AliPayBean {
+    private String appId;
+    private String privateKey;
+    private String publicKey;
+    private String appCertPath;
+    private String aliPayCertPath;
+    private String aliPayRootCertPath;
+    private String serverUrl;
+    private String domain;
+    private String returnDomain;
+
+    public String getReturnDomain() {
+        return returnDomain;
+    }
+
+    public void setReturnDomain(String returnDomain) {
+        this.returnDomain = returnDomain;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
+    public String getPrivateKey() {
+        return privateKey;
+    }
+
+    public void setPrivateKey(String privateKey) {
+        this.privateKey = privateKey;
+    }
+
+    public String getPublicKey() {
+        return publicKey;
+    }
+
+    public void setPublicKey(String publicKey) {
+        this.publicKey = publicKey;
+    }
+
+    public String getAppCertPath() {
+        return appCertPath;
+    }
+
+    public void setAppCertPath(String appCertPath) {
+        this.appCertPath = appCertPath;
+    }
+
+    public String getAliPayCertPath() {
+        return aliPayCertPath;
+    }
+
+    public void setAliPayCertPath(String aliPayCertPath) {
+        this.aliPayCertPath = aliPayCertPath;
+    }
+
+    public String getAliPayRootCertPath() {
+        return aliPayRootCertPath;
+    }
+
+    public void setAliPayRootCertPath(String aliPayRootCertPath) {
+        this.aliPayRootCertPath = aliPayRootCertPath;
+    }
+
+    public String getServerUrl() {
+        return serverUrl;
+    }
+
+    public void setServerUrl(String serverUrl) {
+        this.serverUrl = serverUrl;
+    }
+
+
+    public String getDomain() {
+        return domain;
+    }
+
+    public void setDomain(String domain) {
+        this.domain = domain;
+    }
+
+    @Override
+    public String toString() {
+        return "AliPayBean{" +
+                "appId='" + appId + '\'' +
+                ", privateKey='" + privateKey + '\'' +
+                ", publicKey='" + publicKey + '\'' +
+                ", appCertPath='" + appCertPath + '\'' +
+                ", aliPayCertPath='" + aliPayCertPath + '\'' +
+                ", aliPayRootCertPath='" + aliPayRootCertPath + '\'' +
+                ", serverUrl='" + serverUrl + '\'' +
+                ", domain='" + domain + '\'' +
+                '}';
+    }
+}

+ 98 - 0
fs-admin/src/main/java/com/fs/hisStore/FsMaterialGroupScrmController.java

@@ -0,0 +1,98 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsMaterialGroupScrm;
+import com.fs.hisStore.service.IFsMaterialGroupScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 素材分组Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/materialGroup")
+public class FsMaterialGroupScrmController extends BaseController
+{
+    @Autowired
+    private IFsMaterialGroupScrmService fsMaterialGroupService;
+
+    /**
+     * 查询素材分组列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(FsMaterialGroupScrm fsMaterialGroup)
+    {
+        startPage();
+        List<FsMaterialGroupScrm> list = fsMaterialGroupService.selectFsMaterialGroupList(fsMaterialGroup);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出素材分组列表
+     */
+    @Log(title = "素材分组", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsMaterialGroupScrm fsMaterialGroup)
+    {
+        List<FsMaterialGroupScrm> list = fsMaterialGroupService.selectFsMaterialGroupList(fsMaterialGroup);
+        ExcelUtil<FsMaterialGroupScrm> util = new ExcelUtil<FsMaterialGroupScrm>(FsMaterialGroupScrm.class);
+        return util.exportExcel(list, "materialGroup");
+    }
+
+    /**
+     * 获取素材分组详细信息
+     */
+    @GetMapping(value = "/{groupId}")
+    public AjaxResult getInfo(@PathVariable("groupId") Long groupId)
+    {
+        return AjaxResult.success(fsMaterialGroupService.selectFsMaterialGroupById(groupId));
+    }
+
+    /**
+     * 新增素材分组
+     */
+    @Log(title = "素材分组", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsMaterialGroupScrm fsMaterialGroup)
+    {
+        return toAjax(fsMaterialGroupService.insertFsMaterialGroup(fsMaterialGroup));
+    }
+
+    /**
+     * 修改素材分组
+     */
+    @Log(title = "素材分组", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsMaterialGroupScrm fsMaterialGroup)
+    {
+        return toAjax(fsMaterialGroupService.updateFsMaterialGroup(fsMaterialGroup));
+    }
+
+    /**
+     * 删除素材分组
+     */
+    @Log(title = "素材分组", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{groupIds}")
+    public AjaxResult remove(@PathVariable Long[] groupIds)
+    {
+        return toAjax(fsMaterialGroupService.deleteFsMaterialGroupByIds(groupIds));
+    }
+
+    @GetMapping("/getAllList")
+    public R getAllList(FsMaterialGroupScrm fsMaterialGroup)
+    {
+        List<FsMaterialGroupScrm> list = fsMaterialGroupService.selectFsMaterialGroupList(fsMaterialGroup);
+        return R.ok().put("data",list);
+    }
+}

+ 90 - 0
fs-admin/src/main/java/com/fs/hisStore/FsMaterialScrmController.java

@@ -0,0 +1,90 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsMaterialScrm;
+import com.fs.hisStore.service.IFsMaterialScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 素材库Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/material")
+public class FsMaterialScrmController extends BaseController
+{
+    @Autowired
+    private IFsMaterialScrmService fsMaterialService;
+
+    /**
+     * 查询素材库列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(FsMaterialScrm fsMaterial)
+    {
+        startPage();
+        List<FsMaterialScrm> list = fsMaterialService.selectFsMaterialList(fsMaterial);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出素材库列表
+     */
+    @Log(title = "素材库", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsMaterialScrm fsMaterial)
+    {
+        List<FsMaterialScrm> list = fsMaterialService.selectFsMaterialList(fsMaterial);
+        ExcelUtil<FsMaterialScrm> util = new ExcelUtil<FsMaterialScrm>(FsMaterialScrm.class);
+        return util.exportExcel(list, "material");
+    }
+
+    /**
+     * 获取素材库详细信息
+     */
+    @GetMapping(value = "/{materialId}")
+    public AjaxResult getInfo(@PathVariable("materialId") Long materialId)
+    {
+        return AjaxResult.success(fsMaterialService.selectFsMaterialById(materialId));
+    }
+
+    /**
+     * 新增素材库
+     */
+    @Log(title = "素材库", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsMaterialScrm fsMaterial)
+    {
+        return toAjax(fsMaterialService.insertFsMaterial(fsMaterial));
+    }
+
+    /**
+     * 修改素材库
+     */
+    @Log(title = "素材库", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsMaterialScrm fsMaterial)
+    {
+        return toAjax(fsMaterialService.updateFsMaterial(fsMaterial));
+    }
+
+    /**
+     * 删除素材库
+     */
+    @Log(title = "素材库", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{materialIds}")
+    public AjaxResult remove(@PathVariable Long[] materialIds)
+    {
+        return toAjax(fsMaterialService.deleteFsMaterialByIds(materialIds));
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsPrescribeDrugScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsPrescribeDrugScrm;
+import com.fs.hisStore.service.IFsPrescribeDrugScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 处方药品Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/prescribeDrug")
+public class FsPrescribeDrugScrmController extends BaseController
+{
+    @Autowired
+    private IFsPrescribeDrugScrmService fsPrescribeDrugService;
+
+    /**
+     * 查询处方药品列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribeDrug:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsPrescribeDrugScrm fsPrescribeDrug)
+    {
+        startPage();
+        List<FsPrescribeDrugScrm> list = fsPrescribeDrugService.selectFsPrescribeDrugList(fsPrescribeDrug);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出处方药品列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribeDrug:export')")
+    @Log(title = "处方药品", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsPrescribeDrugScrm fsPrescribeDrug)
+    {
+        List<FsPrescribeDrugScrm> list = fsPrescribeDrugService.selectFsPrescribeDrugList(fsPrescribeDrug);
+        ExcelUtil<FsPrescribeDrugScrm> util = new ExcelUtil<FsPrescribeDrugScrm>(FsPrescribeDrugScrm.class);
+        return util.exportExcel(list, "prescribeDrug");
+    }
+
+    /**
+     * 获取处方药品详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribeDrug:query')")
+    @GetMapping(value = "/{drugId}")
+    public AjaxResult getInfo(@PathVariable("drugId") Long drugId)
+    {
+        return AjaxResult.success(fsPrescribeDrugService.selectFsPrescribeDrugById(drugId));
+    }
+
+    /**
+     * 新增处方药品
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribeDrug:add')")
+    @Log(title = "处方药品", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsPrescribeDrugScrm fsPrescribeDrug)
+    {
+        return toAjax(fsPrescribeDrugService.insertFsPrescribeDrug(fsPrescribeDrug));
+    }
+
+    /**
+     * 修改处方药品
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribeDrug:edit')")
+    @Log(title = "处方药品", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsPrescribeDrugScrm fsPrescribeDrug)
+    {
+        return toAjax(fsPrescribeDrugService.updateFsPrescribeDrug(fsPrescribeDrug));
+    }
+
+    /**
+     * 删除处方药品
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribeDrug:remove')")
+    @Log(title = "处方药品", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{drugIds}")
+    public AjaxResult remove(@PathVariable Long[] drugIds)
+    {
+        return toAjax(fsPrescribeDrugService.deleteFsPrescribeDrugByIds(drugIds));
+    }
+}

+ 103 - 0
fs-admin/src/main/java/com/fs/hisStore/FsPrescribeScrmController.java

@@ -0,0 +1,103 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ParseUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsPrescribeScrm;
+import com.fs.hisStore.param.FsPrescribeVOParam;
+import com.fs.hisStore.service.IFsPrescribeScrmService;
+import com.fs.hisStore.vo.FsPrescribeVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 处方Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/prescribe")
+public class FsPrescribeScrmController extends BaseController
+{
+    @Autowired
+    private IFsPrescribeScrmService fsPrescribeService;
+
+    /**
+     * 查询处方列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribe:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsPrescribeVOParam fsPrescribe)
+    {
+        startPage();
+        List<FsPrescribeVO> list = fsPrescribeService.selectFsPrescribeListVO(fsPrescribe);
+        for (FsPrescribeVO vo : list){
+            vo.setUserPhone(ParseUtils.parsePhone(vo.getUserPhone()));
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出处方列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribe:export')")
+    @Log(title = "处方", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsPrescribeScrm fsPrescribe)
+    {
+        List<FsPrescribeScrm> list = fsPrescribeService.selectFsPrescribeList(fsPrescribe);
+        ExcelUtil<FsPrescribeScrm> util = new ExcelUtil<FsPrescribeScrm>(FsPrescribeScrm.class);
+        return util.exportExcel(list, "prescribe");
+    }
+
+    /**
+     * 获取处方详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribe:query')")
+    @GetMapping(value = "/{prescribeId}")
+    public AjaxResult getInfo(@PathVariable("prescribeId") Long prescribeId)
+    {
+        return AjaxResult.success(fsPrescribeService.selectFsPrescribeById(prescribeId));
+    }
+
+    /**
+     * 新增处方
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribe:add')")
+    @Log(title = "处方", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsPrescribeScrm fsPrescribe)
+    {
+        return toAjax(fsPrescribeService.insertFsPrescribe(fsPrescribe));
+    }
+
+    /**
+     * 修改处方
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribe:edit')")
+    @Log(title = "处方", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsPrescribeScrm fsPrescribe)
+    {
+        return toAjax(fsPrescribeService.updateFsPrescribe(fsPrescribe));
+    }
+
+    /**
+     * 删除处方
+     */
+    @PreAuthorize("@ss.hasPermi('store:prescribe:remove')")
+    @Log(title = "处方", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{prescribeIds}")
+    public AjaxResult remove(@PathVariable Long[] prescribeIds)
+    {
+        return toAjax(fsPrescribeService.deleteFsPrescribeByIds(prescribeIds));
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsShippingTemplatesFreeScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsShippingTemplatesFreeScrm;
+import com.fs.hisStore.service.IFsShippingTemplatesFreeScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 免邮费Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/shippingTemplatesFree")
+public class FsShippingTemplatesFreeScrmController extends BaseController
+{
+    @Autowired
+    private IFsShippingTemplatesFreeScrmService fsShippingTemplatesFreeService;
+
+    /**
+     * 查询免邮费列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesFree:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsShippingTemplatesFreeScrm fsShippingTemplatesFree)
+    {
+        startPage();
+        List<FsShippingTemplatesFreeScrm> list = fsShippingTemplatesFreeService.selectFsShippingTemplatesFreeList(fsShippingTemplatesFree);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出免邮费列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesFree:export')")
+    @Log(title = "免邮费", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsShippingTemplatesFreeScrm fsShippingTemplatesFree)
+    {
+        List<FsShippingTemplatesFreeScrm> list = fsShippingTemplatesFreeService.selectFsShippingTemplatesFreeList(fsShippingTemplatesFree);
+        ExcelUtil<FsShippingTemplatesFreeScrm> util = new ExcelUtil<FsShippingTemplatesFreeScrm>(FsShippingTemplatesFreeScrm.class);
+        return util.exportExcel(list, "shippingTemplatesFree");
+    }
+
+    /**
+     * 获取免邮费详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesFree:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsShippingTemplatesFreeService.selectFsShippingTemplatesFreeById(id));
+    }
+
+    /**
+     * 新增免邮费
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesFree:add')")
+    @Log(title = "免邮费", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsShippingTemplatesFreeScrm fsShippingTemplatesFree)
+    {
+        return toAjax(fsShippingTemplatesFreeService.insertFsShippingTemplatesFree(fsShippingTemplatesFree));
+    }
+
+    /**
+     * 修改免邮费
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesFree:edit')")
+    @Log(title = "免邮费", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsShippingTemplatesFreeScrm fsShippingTemplatesFree)
+    {
+        return toAjax(fsShippingTemplatesFreeService.updateFsShippingTemplatesFree(fsShippingTemplatesFree));
+    }
+
+    /**
+     * 删除免邮费
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesFree:remove')")
+    @Log(title = "免邮费", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsShippingTemplatesFreeService.deleteFsShippingTemplatesFreeByIds(ids));
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsShippingTemplatesRegionScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsShippingTemplatesRegionScrm;
+import com.fs.hisStore.service.IFsShippingTemplatesRegionScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 邮费区域Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/shippingTemplatesRegion")
+public class FsShippingTemplatesRegionScrmController extends BaseController
+{
+    @Autowired
+    private IFsShippingTemplatesRegionScrmService fsShippingTemplatesRegionService;
+
+    /**
+     * 查询邮费区域列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesRegion:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsShippingTemplatesRegionScrm fsShippingTemplatesRegion)
+    {
+        startPage();
+        List<FsShippingTemplatesRegionScrm> list = fsShippingTemplatesRegionService.selectFsShippingTemplatesRegionList(fsShippingTemplatesRegion);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出邮费区域列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesRegion:export')")
+    @Log(title = "邮费区域", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsShippingTemplatesRegionScrm fsShippingTemplatesRegion)
+    {
+        List<FsShippingTemplatesRegionScrm> list = fsShippingTemplatesRegionService.selectFsShippingTemplatesRegionList(fsShippingTemplatesRegion);
+        ExcelUtil<FsShippingTemplatesRegionScrm> util = new ExcelUtil<FsShippingTemplatesRegionScrm>(FsShippingTemplatesRegionScrm.class);
+        return util.exportExcel(list, "shippingTemplatesRegion");
+    }
+
+    /**
+     * 获取邮费区域详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesRegion:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsShippingTemplatesRegionService.selectFsShippingTemplatesRegionById(id));
+    }
+
+    /**
+     * 新增邮费区域
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesRegion:add')")
+    @Log(title = "邮费区域", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsShippingTemplatesRegionScrm fsShippingTemplatesRegion)
+    {
+        return toAjax(fsShippingTemplatesRegionService.insertFsShippingTemplatesRegion(fsShippingTemplatesRegion));
+    }
+
+    /**
+     * 修改邮费区域
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesRegion:edit')")
+    @Log(title = "邮费区域", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsShippingTemplatesRegionScrm fsShippingTemplatesRegion)
+    {
+        return toAjax(fsShippingTemplatesRegionService.updateFsShippingTemplatesRegion(fsShippingTemplatesRegion));
+    }
+
+    /**
+     * 删除邮费区域
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplatesRegion:remove')")
+    @Log(title = "邮费区域", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsShippingTemplatesRegionService.deleteFsShippingTemplatesRegionByIds(ids));
+    }
+}

+ 106 - 0
fs-admin/src/main/java/com/fs/hisStore/FsShippingTemplatesScrmController.java

@@ -0,0 +1,106 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsShippingTemplatesScrm;
+import com.fs.hisStore.param.FsShippingTemplatesAddEditParam;
+import com.fs.hisStore.service.IFsShippingTemplatesScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 运费模板Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/shippingTemplates")
+public class FsShippingTemplatesScrmController extends BaseController
+{
+    @Autowired
+    private IFsShippingTemplatesScrmService fsShippingTemplatesService;
+
+    /**
+     * 查询运费模板列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplates:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsShippingTemplatesScrm fsShippingTemplates)
+    {
+        startPage();
+        fsShippingTemplates.setIsDel(0);
+        List<FsShippingTemplatesScrm> list = fsShippingTemplatesService.selectFsShippingTemplatesList(fsShippingTemplates);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出运费模板列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplates:export')")
+    @Log(title = "运费模板", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsShippingTemplatesScrm fsShippingTemplates)
+    {
+        List<FsShippingTemplatesScrm> list = fsShippingTemplatesService.selectFsShippingTemplatesList(fsShippingTemplates);
+        ExcelUtil<FsShippingTemplatesScrm> util = new ExcelUtil<FsShippingTemplatesScrm>(FsShippingTemplatesScrm.class);
+        return util.exportExcel(list, "shippingTemplates");
+    }
+
+    /**
+     * 获取运费模板详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplates:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsShippingTemplatesService.selectFsShippingTemplatesById(id));
+    }
+
+    /**
+     * 新增运费模板
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplates:add')")
+    @Log(title = "运费模板", businessType = BusinessType.INSERT)
+    @PostMapping
+    public R add(@RequestBody FsShippingTemplatesAddEditParam param)
+    {
+        return fsShippingTemplatesService.addOrEdit(param);
+    }
+    /**
+     * 修改运费模板
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplates:edit')")
+    @Log(title = "运费模板", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public R edit(@RequestBody FsShippingTemplatesAddEditParam param)
+    {
+        return fsShippingTemplatesService.addOrEdit(param);
+    }
+    /**
+     * 删除运费模板
+     */
+    @PreAuthorize("@ss.hasPermi('store:shippingTemplates:remove')")
+    @Log(title = "运费模板", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsShippingTemplatesService.deleteFsShippingTemplatesByIds(ids));
+    }
+
+    @GetMapping("/getAllList")
+    public R getAllList(FsShippingTemplatesScrm fsShippingTemplates)
+    {
+        fsShippingTemplates.setIsDel(0);
+        List<FsShippingTemplatesScrm> list = fsShippingTemplatesService.selectFsShippingTemplatesList(fsShippingTemplates);
+        return R.ok().put("data",list);
+    }
+}

+ 107 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreActivityScrmController.java

@@ -0,0 +1,107 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreActivityScrm;
+import com.fs.hisStore.service.IFsStoreActivityScrmService;
+import com.fs.hisStore.service.IFsStoreProductScrmService;
+import com.fs.hisStore.vo.FsStoreProductActivityListVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 活动Controller
+ *
+ * @author fs
+ * @date 2022-11-18
+ */
+@RestController
+@RequestMapping("/store/store/storeActivity")
+public class FsStoreActivityScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreActivityScrmService fsStoreActivityService;
+    @Autowired
+    private IFsStoreProductScrmService productService;
+    /**
+     * 查询活动列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeActivity:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreActivityScrm fsStoreActivity)
+    {
+        startPage();
+        List<FsStoreActivityScrm> list = fsStoreActivityService.selectFsStoreActivityList(fsStoreActivity);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出活动列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeActivity:export')")
+    @Log(title = "活动", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreActivityScrm fsStoreActivity)
+    {
+        List<FsStoreActivityScrm> list = fsStoreActivityService.selectFsStoreActivityList(fsStoreActivity);
+        ExcelUtil<FsStoreActivityScrm> util = new ExcelUtil<FsStoreActivityScrm>(FsStoreActivityScrm.class);
+        return util.exportExcel(list, "storeActivity");
+    }
+
+    /**
+     * 获取活动详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeActivity:query')")
+    @GetMapping(value = "/{activityId}")
+    public R getInfo(@PathVariable("activityId") Long activityId)
+    {
+        FsStoreActivityScrm activity=fsStoreActivityService.selectFsStoreActivityById(activityId);
+        List<FsStoreProductActivityListVO> products =new ArrayList<>();
+        if(activity.getProductIds()!=null){
+            products=productService.selectFsStoreProductByIds(activity.getProductIds());
+        }
+        return R.ok().put("activity",activity).put("products",products);
+    }
+
+    /**
+     * 新增活动
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeActivity:add')")
+    @Log(title = "活动", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreActivityScrm fsStoreActivity)
+    {
+        return toAjax(fsStoreActivityService.insertFsStoreActivity(fsStoreActivity));
+    }
+
+    /**
+     * 修改活动
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeActivity:edit')")
+    @Log(title = "活动", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreActivityScrm fsStoreActivity)
+    {
+        return toAjax(fsStoreActivityService.updateFsStoreActivity(fsStoreActivity));
+    }
+
+    /**
+     * 删除活动
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeActivity:remove')")
+    @Log(title = "活动", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{activityIds}")
+    public AjaxResult remove(@PathVariable Long[] activityIds)
+    {
+        return toAjax(fsStoreActivityService.deleteFsStoreActivityByIds(activityIds));
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreAfterSalesItemScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreAfterSalesItemScrm;
+import com.fs.hisStore.service.IFsStoreAfterSalesItemScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 售后子Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeAfterSalesItem")
+public class FsStoreAfterSalesItemScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreAfterSalesItemScrmService fsStoreAfterSalesItemService;
+
+    /**
+     * 查询售后子列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesItem:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreAfterSalesItemScrm fsStoreAfterSalesItem)
+    {
+        startPage();
+        List<FsStoreAfterSalesItemScrm> list = fsStoreAfterSalesItemService.selectFsStoreAfterSalesItemList(fsStoreAfterSalesItem);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出售后子列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesItem:export')")
+    @Log(title = "售后子", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreAfterSalesItemScrm fsStoreAfterSalesItem)
+    {
+        List<FsStoreAfterSalesItemScrm> list = fsStoreAfterSalesItemService.selectFsStoreAfterSalesItemList(fsStoreAfterSalesItem);
+        ExcelUtil<FsStoreAfterSalesItemScrm> util = new ExcelUtil<FsStoreAfterSalesItemScrm>(FsStoreAfterSalesItemScrm.class);
+        return util.exportExcel(list, "storeAfterSalesItem");
+    }
+
+    /**
+     * 获取售后子详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesItem:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreAfterSalesItemService.selectFsStoreAfterSalesItemById(id));
+    }
+
+    /**
+     * 新增售后子
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesItem:add')")
+    @Log(title = "售后子", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreAfterSalesItemScrm fsStoreAfterSalesItem)
+    {
+        return toAjax(fsStoreAfterSalesItemService.insertFsStoreAfterSalesItem(fsStoreAfterSalesItem));
+    }
+
+    /**
+     * 修改售后子
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesItem:edit')")
+    @Log(title = "售后子", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreAfterSalesItemScrm fsStoreAfterSalesItem)
+    {
+        return toAjax(fsStoreAfterSalesItemService.updateFsStoreAfterSalesItem(fsStoreAfterSalesItem));
+    }
+
+    /**
+     * 删除售后子
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesItem:remove')")
+    @Log(title = "售后子", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreAfterSalesItemService.deleteFsStoreAfterSalesItemByIds(ids));
+    }
+}

+ 198 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreAfterSalesScrmController.java

@@ -0,0 +1,198 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.domain.model.LoginUser;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ParseUtils;
+import com.fs.common.utils.ServletUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.framework.web.service.TokenService;
+import com.fs.his.domain.FsUser;
+import com.fs.his.service.IFsUserService;
+import com.fs.hisStore.domain.FsStoreAfterSalesItemScrm;
+import com.fs.hisStore.domain.FsStoreAfterSalesScrm;
+import com.fs.hisStore.domain.FsStoreAfterSalesStatusScrm;
+import com.fs.hisStore.domain.FsStoreOrderScrm;
+import com.fs.hisStore.param.FsStoreAfterSalesAudit1Param;
+import com.fs.hisStore.param.FsStoreAfterSalesAudit2Param;
+import com.fs.hisStore.param.FsStoreAfterSalesCancelParam;
+import com.fs.hisStore.param.FsStoreAfterSalesRefundParam;
+import com.fs.hisStore.service.IFsStoreAfterSalesItemScrmService;
+import com.fs.hisStore.service.IFsStoreAfterSalesScrmService;
+import com.fs.hisStore.service.IFsStoreAfterSalesStatusScrmService;
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
+import com.fs.hisStore.vo.FsStoreAfterSalesVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.text.ParseException;
+import java.util.List;
+
+/**
+ * 售后记录Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeAfterSales")
+public class FsStoreAfterSalesScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreOrderScrmService fsStoreOrderService;
+    @Autowired
+    private IFsUserService userService;
+    @Autowired
+    private IFsStoreAfterSalesScrmService fsStoreAfterSalesService;
+    @Autowired
+    private IFsStoreAfterSalesItemScrmService fsStoreAfterSalesItemService;
+    @Autowired
+    private IFsStoreAfterSalesStatusScrmService storeAfterSalesStatusService;
+
+    @Autowired
+    private TokenService tokenService;
+    /**
+     * 查询售后记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSales:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreAfterSalesScrm fsStoreAfterSales)
+    {
+        startPage();
+        List<FsStoreAfterSalesVO> list = fsStoreAfterSalesService.selectFsStoreAfterSalesListVO(fsStoreAfterSales);
+        for (FsStoreAfterSalesVO vo : list){
+            vo.setUserPhone(ParseUtils.parsePhone(vo.getUserPhone()));
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出售后记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSales:export')")
+    @Log(title = "售后记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreAfterSalesScrm fsStoreAfterSales)
+    {
+        if (fsStoreAfterSales.getBeginTime().equals("") && fsStoreAfterSales.getEndTime().equals("")){
+            fsStoreAfterSales.setBeginTime(null);
+            fsStoreAfterSales.setEndTime(null);
+        }
+        Boolean a = fsStoreAfterSalesService.isEntityNull(fsStoreAfterSales);
+        if (fsStoreAfterSalesService.isEntityNull(fsStoreAfterSales)){
+            return AjaxResult.error("请筛选数据导出");
+        }
+        List<FsStoreAfterSalesVO> list = fsStoreAfterSalesService.selectFsStoreAfterSalesListVO(fsStoreAfterSales);
+        for (FsStoreAfterSalesVO vo : list){
+            vo.setUserPhone(ParseUtils.parsePhone(vo.getUserPhone()));
+        }
+        ExcelUtil<FsStoreAfterSalesVO> util = new ExcelUtil<FsStoreAfterSalesVO>(FsStoreAfterSalesVO.class);
+        return util.exportExcel(list, "storeAfterSales");
+    }
+    /**
+     * 获取售后记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSales:query')")
+    @GetMapping(value = "/{id}")
+    public R getInfo(@PathVariable("id") Long id)
+    {
+        FsStoreAfterSalesScrm afterSales=fsStoreAfterSalesService.selectFsStoreAfterSalesById(id);
+        FsStoreAfterSalesItemScrm map=new FsStoreAfterSalesItemScrm();
+        map.setStoreAfterSalesId(id);
+        List<FsStoreAfterSalesItemScrm> items=fsStoreAfterSalesItemService.selectFsStoreAfterSalesItemList(map);
+        FsStoreAfterSalesStatusScrm statusMap=new FsStoreAfterSalesStatusScrm();
+        statusMap.setStoreAfterSalesId(id);
+        List<FsStoreAfterSalesStatusScrm> logs=storeAfterSalesStatusService.selectFsStoreAfterSalesStatusList(statusMap);
+        FsUser user=userService.selectFsUserById(afterSales.getUserId());
+        user.setPhone(ParseUtils.parsePhone(user.getPhone()));
+        FsStoreOrderScrm order=fsStoreOrderService.selectFsStoreOrderByOrderCode(afterSales.getOrderCode());
+        return R.ok().put("afterSales",afterSales).put("items",items).put("logs",logs).put("user",user).put("order",order);
+    }
+
+    /**
+     * 新增售后记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSales:add')")
+    @Log(title = "售后记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreAfterSalesScrm fsStoreAfterSales)
+    {
+        return toAjax(fsStoreAfterSalesService.insertFsStoreAfterSales(fsStoreAfterSales));
+    }
+
+    /**
+     * 修改售后记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSales:edit')")
+    @Log(title = "售后记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreAfterSalesScrm fsStoreAfterSales)
+    {
+        if ((!"".equals(fsStoreAfterSales.getDeliveryName()) && !"".equals(fsStoreAfterSales.getDeliverySn())) || (fsStoreAfterSales.getDeliveryName() == null && fsStoreAfterSales.getDeliverySn() == null)){
+            fsStoreAfterSales.setStatus(2);
+        }
+        return toAjax(fsStoreAfterSalesService.updateDelivery(fsStoreAfterSales));
+    }
+
+    /**
+     * 删除售后记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSales:remove')")
+    @Log(title = "售后记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreAfterSalesService.deleteFsStoreAfterSalesByIds(ids));
+    }
+
+
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSales:audit1')")
+    @PostMapping("/audit1")
+    //平台审核
+    public R audit1(@RequestBody FsStoreAfterSalesAudit1Param param)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        param.setOperator(loginUser.getUser().getNickName());
+        return fsStoreAfterSalesService.audit1(param);
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSales:audit2')")
+    @PostMapping("/audit2")
+    //仓库审核
+    public R audit2(@RequestBody FsStoreAfterSalesAudit2Param param)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        param.setOperator(loginUser.getUser().getNickName());
+        return fsStoreAfterSalesService.audit2(param);
+    }
+    //财务审核
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSales:refund')")
+    @PostMapping("/refund")
+    public R refund(@RequestBody FsStoreAfterSalesRefundParam param)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        param.setOperator(loginUser.getUser().getNickName());
+        return fsStoreAfterSalesService.refundMoney(param);
+    }
+    //平台撤销
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSales:cancel')")
+    @PostMapping("/cancel")
+    public R cancel(@RequestBody FsStoreAfterSalesCancelParam param) throws ParseException {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        param.setOperator(loginUser.getUser().getNickName());
+        return fsStoreAfterSalesService.cancel(param);
+    }
+
+    @GetMapping("/getStoreAfterSales")
+    public R getStoreAfterSales(@RequestParam("orderCode") String orderCode)
+    {
+        List<FsStoreAfterSalesVO> vo = fsStoreAfterSalesService.selectFsStoreAfterSalesVOByOrderCode(orderCode);
+        return R.ok().put("data",vo);
+    }
+
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreAfterSalesStatusScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreAfterSalesStatusScrm;
+import com.fs.hisStore.service.IFsStoreAfterSalesStatusScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 售后订单操作Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeAfterSalesStatus")
+public class FsStoreAfterSalesStatusScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreAfterSalesStatusScrmService fsStoreAfterSalesStatusService;
+
+    /**
+     * 查询售后订单操作列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesStatus:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreAfterSalesStatusScrm fsStoreAfterSalesStatus)
+    {
+        startPage();
+        List<FsStoreAfterSalesStatusScrm> list = fsStoreAfterSalesStatusService.selectFsStoreAfterSalesStatusList(fsStoreAfterSalesStatus);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出售后订单操作列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesStatus:export')")
+    @Log(title = "售后订单操作", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreAfterSalesStatusScrm fsStoreAfterSalesStatus)
+    {
+        List<FsStoreAfterSalesStatusScrm> list = fsStoreAfterSalesStatusService.selectFsStoreAfterSalesStatusList(fsStoreAfterSalesStatus);
+        ExcelUtil<FsStoreAfterSalesStatusScrm> util = new ExcelUtil<FsStoreAfterSalesStatusScrm>(FsStoreAfterSalesStatusScrm.class);
+        return util.exportExcel(list, "storeAfterSalesStatus");
+    }
+
+    /**
+     * 获取售后订单操作详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesStatus:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreAfterSalesStatusService.selectFsStoreAfterSalesStatusById(id));
+    }
+
+    /**
+     * 新增售后订单操作
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesStatus:add')")
+    @Log(title = "售后订单操作", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreAfterSalesStatusScrm fsStoreAfterSalesStatus)
+    {
+        return toAjax(fsStoreAfterSalesStatusService.insertFsStoreAfterSalesStatus(fsStoreAfterSalesStatus));
+    }
+
+    /**
+     * 修改售后订单操作
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesStatus:edit')")
+    @Log(title = "售后订单操作", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreAfterSalesStatusScrm fsStoreAfterSalesStatus)
+    {
+        return toAjax(fsStoreAfterSalesStatusService.updateFsStoreAfterSalesStatus(fsStoreAfterSalesStatus));
+    }
+
+    /**
+     * 删除售后订单操作
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeAfterSalesStatus:remove')")
+    @Log(title = "售后订单操作", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreAfterSalesStatusService.deleteFsStoreAfterSalesStatusByIds(ids));
+    }
+}

+ 52 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreCanvasScrmController.java

@@ -0,0 +1,52 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.hisStore.domain.FsStoreCanvasScrm;
+import com.fs.hisStore.service.IFsStoreCanvasScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 画布信息Controller
+ *
+ * @author fs
+ * @date 2022-08-29
+ */
+@RestController
+@RequestMapping("/store/store/storeCanvas")
+public class FsStoreCanvasScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreCanvasScrmService fsStoreCanvasService;
+
+
+
+    /**
+     * 获取画布信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCanvas:query')")
+    @GetMapping(value = "/{terminal}")
+    public AjaxResult getInfo(@PathVariable("terminal") Integer terminal)
+    {
+
+        return AjaxResult.success(fsStoreCanvasService.selectFsStoreCanvasByTerminal(terminal));
+    }
+
+
+    /**
+     * 修改画布信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCanvas:edit')")
+    @Log(title = "画布信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreCanvasScrm fsStoreCanvas)
+    {
+        return toAjax(fsStoreCanvasService.updateFsStoreCanvas(fsStoreCanvas));
+    }
+
+
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreCartScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreCartScrm;
+import com.fs.hisStore.service.IFsStoreCartScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 购物车Controller
+ *
+ * @author fs
+ * @date 2022-03-21
+ */
+@RestController
+@RequestMapping("/store/store/storeCart")
+public class FsStoreCartScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreCartScrmService fsStoreCartService;
+
+    /**
+     * 查询购物车列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCart:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreCartScrm fsStoreCart)
+    {
+        startPage();
+        List<FsStoreCartScrm> list = fsStoreCartService.selectFsStoreCartList(fsStoreCart);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出购物车列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCart:export')")
+    @Log(title = "购物车", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreCartScrm fsStoreCart)
+    {
+        List<FsStoreCartScrm> list = fsStoreCartService.selectFsStoreCartList(fsStoreCart);
+        ExcelUtil<FsStoreCartScrm> util = new ExcelUtil<FsStoreCartScrm>(FsStoreCartScrm.class);
+        return util.exportExcel(list, "storeCart");
+    }
+
+    /**
+     * 获取购物车详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCart:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreCartService.selectFsStoreCartById(id));
+    }
+
+    /**
+     * 新增购物车
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCart:add')")
+    @Log(title = "购物车", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreCartScrm fsStoreCart)
+    {
+        return toAjax(fsStoreCartService.insertFsStoreCart(fsStoreCart));
+    }
+
+    /**
+     * 修改购物车
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCart:edit')")
+    @Log(title = "购物车", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreCartScrm fsStoreCart)
+    {
+        return toAjax(fsStoreCartService.updateFsStoreCart(fsStoreCart));
+    }
+
+    /**
+     * 删除购物车
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCart:remove')")
+    @Log(title = "购物车", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreCartService.deleteFsStoreCartByIds(ids));
+    }
+}

+ 98 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreCouponIssueScrmController.java

@@ -0,0 +1,98 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreCouponIssueScrm;
+import com.fs.hisStore.service.IFsStoreCouponIssueScrmService;
+import com.fs.hisStore.vo.FsStoreCouponIssueVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 优惠券领取Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeCouponIssue")
+public class FsStoreCouponIssueScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreCouponIssueScrmService fsStoreCouponIssueService;
+
+    /**
+     * 查询优惠券领取列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssue:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreCouponIssueScrm fsStoreCouponIssue)
+    {
+        startPage();
+        List<FsStoreCouponIssueVO> list = fsStoreCouponIssueService.selectFsStoreCouponIssueListVO(fsStoreCouponIssue);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出优惠券领取列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssue:export')")
+    @Log(title = "优惠券领取", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreCouponIssueScrm fsStoreCouponIssue)
+    {
+        List<FsStoreCouponIssueScrm> list = fsStoreCouponIssueService.selectFsStoreCouponIssueList(fsStoreCouponIssue);
+        ExcelUtil<FsStoreCouponIssueScrm> util = new ExcelUtil<FsStoreCouponIssueScrm>(FsStoreCouponIssueScrm.class);
+        return util.exportExcel(list, "storeCouponIssue");
+    }
+
+    /**
+     * 获取优惠券领取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssue:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreCouponIssueService.selectFsStoreCouponIssueById(id));
+    }
+
+    /**
+     * 新增优惠券领取
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssue:add')")
+    @Log(title = "优惠券领取", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreCouponIssueScrm fsStoreCouponIssue)
+    {
+        return toAjax(fsStoreCouponIssueService.insertFsStoreCouponIssue(fsStoreCouponIssue));
+    }
+
+    /**
+     * 修改优惠券领取
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssue:edit')")
+    @Log(title = "优惠券领取", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreCouponIssueScrm fsStoreCouponIssue)
+    {
+        return toAjax(fsStoreCouponIssueService.updateFsStoreCouponIssue(fsStoreCouponIssue));
+    }
+
+    /**
+     * 删除优惠券领取
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssue:remove')")
+    @Log(title = "优惠券领取", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreCouponIssueService.deleteFsStoreCouponIssueByIds(ids));
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreCouponIssueUserScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreCouponIssueUserScrm;
+import com.fs.hisStore.service.IFsStoreCouponIssueUserScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 优惠券用户领取记录Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeCouponIssueUser")
+public class FsStoreCouponIssueUserScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreCouponIssueUserScrmService fsStoreCouponIssueUserService;
+
+    /**
+     * 查询优惠券用户领取记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssueUser:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreCouponIssueUserScrm fsStoreCouponIssueUser)
+    {
+        startPage();
+        List<FsStoreCouponIssueUserScrm> list = fsStoreCouponIssueUserService.selectFsStoreCouponIssueUserList(fsStoreCouponIssueUser);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出优惠券用户领取记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssueUser:export')")
+    @Log(title = "优惠券用户领取记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreCouponIssueUserScrm fsStoreCouponIssueUser)
+    {
+        List<FsStoreCouponIssueUserScrm> list = fsStoreCouponIssueUserService.selectFsStoreCouponIssueUserList(fsStoreCouponIssueUser);
+        ExcelUtil<FsStoreCouponIssueUserScrm> util = new ExcelUtil<FsStoreCouponIssueUserScrm>(FsStoreCouponIssueUserScrm.class);
+        return util.exportExcel(list, "storeCouponIssueUser");
+    }
+
+    /**
+     * 获取优惠券用户领取记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssueUser:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreCouponIssueUserService.selectFsStoreCouponIssueUserById(id));
+    }
+
+    /**
+     * 新增优惠券用户领取记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssueUser:add')")
+    @Log(title = "优惠券用户领取记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreCouponIssueUserScrm fsStoreCouponIssueUser)
+    {
+        return toAjax(fsStoreCouponIssueUserService.insertFsStoreCouponIssueUser(fsStoreCouponIssueUser));
+    }
+
+    /**
+     * 修改优惠券用户领取记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssueUser:edit')")
+    @Log(title = "优惠券用户领取记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreCouponIssueUserScrm fsStoreCouponIssueUser)
+    {
+        return toAjax(fsStoreCouponIssueUserService.updateFsStoreCouponIssueUser(fsStoreCouponIssueUser));
+    }
+
+    /**
+     * 删除优惠券用户领取记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponIssueUser:remove')")
+    @Log(title = "优惠券用户领取记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreCouponIssueUserService.deleteFsStoreCouponIssueUserByIds(ids));
+    }
+}

+ 146 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreCouponScrmController.java

@@ -0,0 +1,146 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreCouponScrm;
+import com.fs.hisStore.domain.FsStoreCouponIssueScrm;
+import com.fs.hisStore.param.FsStoreCouponPublishParam;
+import com.fs.hisStore.service.IFsStoreCouponIssueScrmService;
+import com.fs.hisStore.service.IFsStoreCouponScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 优惠券Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeCoupon")
+public class FsStoreCouponScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreCouponScrmService fsStoreCouponService;
+    @Autowired
+    private IFsStoreCouponIssueScrmService fsStoreCouponIssueService;
+    /**
+     * 查询优惠券列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCoupon:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreCouponScrm fsStoreCoupon)
+    {
+        startPage();
+        fsStoreCoupon.setIsDel(0);
+        List<FsStoreCouponScrm> list = fsStoreCouponService.selectFsStoreCouponList(fsStoreCoupon);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出优惠券列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCoupon:export')")
+    @Log(title = "优惠券", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreCouponScrm fsStoreCoupon)
+    {
+        List<FsStoreCouponScrm> list = fsStoreCouponService.selectFsStoreCouponList(fsStoreCoupon);
+        ExcelUtil<FsStoreCouponScrm> util = new ExcelUtil<FsStoreCouponScrm>(FsStoreCouponScrm.class);
+        return util.exportExcel(list, "storeCoupon");
+    }
+
+    /**
+     * 获取优惠券详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCoupon:query')")
+    @GetMapping(value = "/{couponId}")
+    public AjaxResult getInfo(@PathVariable("couponId") Long couponId)
+    {
+        return AjaxResult.success(fsStoreCouponService.selectFsStoreCouponById(couponId));
+    }
+
+    /**
+     * 新增优惠券
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCoupon:add')")
+    @Log(title = "优惠券", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreCouponScrm fsStoreCoupon)
+    {
+        return toAjax(fsStoreCouponService.insertFsStoreCoupon(fsStoreCoupon));
+    }
+
+    /**
+     * 修改优惠券
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCoupon:edit')")
+    @Log(title = "优惠券", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreCouponScrm fsStoreCoupon)
+    {
+        return toAjax(fsStoreCouponService.updateFsStoreCoupon(fsStoreCoupon));
+    }
+
+    /**
+     * 删除优惠券
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCoupon:remove')")
+    @Log(title = "优惠券", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{couponIds}")
+    public AjaxResult remove(@PathVariable Long[] couponIds)
+    {
+        return toAjax(fsStoreCouponService.deleteFsStoreCouponByIds(couponIds));
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:storeCoupon:publish')")
+    @PostMapping("/publish")
+    public AjaxResult publish(@RequestBody FsStoreCouponPublishParam publishParam)
+    {
+        FsStoreCouponScrm coupon=fsStoreCouponService.selectFsStoreCouponById(publishParam.getCouponId());
+        FsStoreCouponIssueScrm issue=new FsStoreCouponIssueScrm();
+        issue.setCouponId(publishParam.getCouponId());
+        issue.setCouponName(coupon.getTitle());
+        issue.setCouponType(coupon.getType());
+        issue.setStartTime(publishParam.getStartTime());
+        issue.setLimitTime(publishParam.getLimitTime());
+        issue.setTotalCount(publishParam.getTotalCount());
+        issue.setRemainCount(0);
+        issue.setIsPermanent(0);
+        issue.setStatus(1);
+        issue.setCreateTime(new Date());
+        return toAjax( fsStoreCouponIssueService.insertFsStoreCouponIssue(issue));
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:storeCoupon:batchPublish')")
+    @PostMapping("/batchPublish")
+    public R batchPublish(@RequestBody FsStoreCouponPublishParam publishParam)
+    {
+
+        List<FsStoreCouponScrm> list=fsStoreCouponService.selectFsStoreCouponByIds(publishParam.getIds());
+        for (FsStoreCouponScrm coupon :list ){
+            FsStoreCouponIssueScrm issue=new FsStoreCouponIssueScrm();
+            issue.setCouponId(coupon.getCouponId());
+            issue.setCouponName(coupon.getTitle());
+            issue.setCouponType(coupon.getType());
+            issue.setStartTime(publishParam.getStartTime());
+            issue.setLimitTime(publishParam.getLimitTime());
+            issue.setTotalCount(publishParam.getTotalCount());
+            issue.setRemainCount(0);
+            issue.setIsPermanent(0);
+            issue.setStatus(1);
+            issue.setCreateTime(new Date());
+            fsStoreCouponIssueService.insertFsStoreCouponIssue(issue);
+        }
+        return R.ok();
+    }
+}

+ 102 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreCouponUserScrmController.java

@@ -0,0 +1,102 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ParseUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreCouponUserScrm;
+import com.fs.hisStore.service.IFsStoreCouponUserScrmService;
+import com.fs.hisStore.vo.FsStoreCouponUserVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 优惠券发放记录Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeCouponUser")
+public class FsStoreCouponUserScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreCouponUserScrmService fsStoreCouponUserService;
+
+    /**
+     * 查询优惠券发放记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponUser:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreCouponUserScrm fsStoreCouponUser)
+    {
+        startPage();
+        List<FsStoreCouponUserVO> list = fsStoreCouponUserService.selectFsStoreCouponUserListVO(fsStoreCouponUser);
+        for (FsStoreCouponUserVO  vo : list){
+            vo.setPhone(ParseUtils.parsePhone(vo.getPhone()));
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出优惠券发放记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponUser:export')")
+    @Log(title = "优惠券发放记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreCouponUserScrm fsStoreCouponUser)
+    {
+        List<FsStoreCouponUserVO> list = fsStoreCouponUserService.selectFsStoreCouponUserListVO(fsStoreCouponUser);
+        ExcelUtil<FsStoreCouponUserVO> util = new ExcelUtil<FsStoreCouponUserVO>(FsStoreCouponUserVO.class);
+        return util.exportExcel(list, "优惠券领取记录");
+    }
+
+    /**
+     * 获取优惠券发放记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponUser:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreCouponUserService.selectFsStoreCouponUserById(id));
+    }
+
+    /**
+     * 新增优惠券发放记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponUser:add')")
+    @Log(title = "优惠券发放记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreCouponUserScrm fsStoreCouponUser)
+    {
+        return toAjax(fsStoreCouponUserService.insertFsStoreCouponUser(fsStoreCouponUser));
+    }
+
+    /**
+     * 修改优惠券发放记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponUser:edit')")
+    @Log(title = "优惠券发放记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreCouponUserScrm fsStoreCouponUser)
+    {
+        return toAjax(fsStoreCouponUserService.updateFsStoreCouponUser(fsStoreCouponUser));
+    }
+
+    /**
+     * 删除优惠券发放记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeCouponUser:remove')")
+    @Log(title = "优惠券发放记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreCouponUserService.deleteFsStoreCouponUserByIds(ids));
+    }
+}

+ 176 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreHealthOrderScrmController.java

@@ -0,0 +1,176 @@
+package com.fs.hisStore;
+
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.StringUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.company.service.ICompanyMoneyLogsService;
+import com.fs.erp.service.IErpOrderService;
+import com.fs.his.service.IFsUserService;
+import com.fs.hisStore.dto.StoreOrderProductDTO;
+import com.fs.hisStore.param.FsStoreOrderParam;
+import com.fs.hisStore.service.*;
+import com.fs.hisStore.vo.FsStoreOrderExportVO;
+import com.fs.hisStore.vo.FsStoreOrderItemExportVO;
+import com.fs.hisStore.vo.FsStoreOrderVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/store/store/storeOrder")
+public class FsStoreHealthOrderScrmController extends BaseController {
+    @Autowired
+    private IFsExpressScrmService expressService;
+    @Autowired
+    private IFsStoreOrderScrmService fsStoreOrderService;
+    @Autowired
+    private IFsStoreOrderItemScrmService orderItemService;
+
+    @Autowired
+    private IFsUserService userService;
+
+    @Autowired
+    private IFsStoreOrderStatusScrmService orderStatusService;
+
+    @Autowired
+    IErpOrderService erpOrderService;
+    @Autowired
+    IFsStorePaymentScrmService paymentService;
+
+    @Autowired
+    private ICompanyMoneyLogsService moneyLogsService;
+
+    /**
+     * 查询健康商城订单列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:healthStoreOrder:list')")
+    @GetMapping("/healthList")
+    public TableDataInfo healthStoreList(FsStoreOrderParam param) {
+        startPage();
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
+            param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
+        }
+        param.setIsHealth("1");
+        List<FsStoreOrderVO> list = fsStoreOrderService.selectFsStoreOrderListVO(param);
+        if (list != null) {
+            for (FsStoreOrderVO vo : list) {
+                if(vo.getPhone()!=null){
+                    vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                    vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+
+            }
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出健康商城列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:healthStoreOrder:export')")
+    @Log(title = "健康商城订单", businessType = BusinessType.EXPORT)
+    @GetMapping("/healthExport")
+    public AjaxResult export1(FsStoreOrderParam param) {
+        if (param.getBeginTime().equals("") && param.getEndTime().equals("")){
+            param.setBeginTime(null);
+            param.setEndTime(null);
+        }
+        if (fsStoreOrderService.isEntityNull(param)){
+            return AjaxResult.error("请筛选数据导出");
+        }
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
+            param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        param.setIsHealth("1");
+        List<FsStoreOrderExportVO> list = fsStoreOrderService.selectFsStoreOrderListVOByExport(param);
+        //对手机号脱敏
+        if (list != null) {
+            for (FsStoreOrderExportVO vo : list) {
+                if (vo.getPhone() != null) {
+                    vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+                if (vo.getUserPhone() != null) {
+                    vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+
+            }
+        }
+        ExcelUtil<FsStoreOrderExportVO> util = new ExcelUtil<FsStoreOrderExportVO>(FsStoreOrderExportVO.class);
+        return util.exportExcel(list, "订单数据");
+    }
+
+
+    @PreAuthorize("@ss.hasPermi('store:healthStoreOrder:exportItems')")
+    @Log(title = "健康商城订单明细导出", businessType = BusinessType.EXPORT)
+    @GetMapping("/healthExportItems")
+    public AjaxResult exportItems1(FsStoreOrderParam param) {
+        if (param.getBeginTime().equals("") && param.getEndTime().equals("")){
+            param.setBeginTime(null);
+            param.setEndTime(null);
+        }
+        if (fsStoreOrderService.isEntityNull(param)){
+            return AjaxResult.error("请筛选数据导出");
+        }
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
+            param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        param.setIsHealth("1");
+        List<FsStoreOrderItemExportVO> list = orderItemService.selectFsStoreOrderItemListExportVO(param);
+        //对手机号脱敏
+        if (list != null) {
+            for (FsStoreOrderItemExportVO vo : list) {
+                if (vo.getUserPhone() != null) {
+                    String phone = vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{1})", "$1****$2");
+                    vo.setUserPhone(phone);
+                }
+                if (!StringUtils.isEmpty(vo.getJsonInfo())) {
+                    try {
+                        StoreOrderProductDTO orderProductDTO = JSONObject.parseObject(vo.getJsonInfo(), StoreOrderProductDTO.class);
+                        BeanUtil.copyProperties(orderProductDTO, vo);
+                    } catch (Exception e) {
+                    }
+                }
+            }
+        }
+        ExcelUtil<FsStoreOrderItemExportVO> util = new ExcelUtil<FsStoreOrderItemExportVO>(FsStoreOrderItemExportVO.class);
+        return util.exportExcel(list, "订单明细数据");
+    }
+}

+ 41 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderAuditScrmController.java

@@ -0,0 +1,41 @@
+package com.fs.hisStore;
+
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.entity.SysUser;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.utils.SecurityUtils;
+import com.fs.hisStore.param.FsStoreOrderAuditParam;
+import com.fs.hisStore.param.FsStoreOrderAuditReviewParam;
+import com.fs.hisStore.service.IFsStoreOrderAuditScrmService;
+import com.fs.hisStore.vo.FsStoreOrderAuditVO;
+import lombok.AllArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+@RestController
+@RequestMapping("/store/store/storeOrderAudit")
+@AllArgsConstructor
+public class FsStoreOrderAuditScrmController extends BaseController {
+
+    private final IFsStoreOrderAuditScrmService fsStoreOrderAuditService;
+
+    @PreAuthorize("@ss.hasAnyPermi('store:storeOrderAudit:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreOrderAuditParam param) {
+        startPage();
+        List<FsStoreOrderAuditVO> list = fsStoreOrderAuditService.selectStoreOrderAuditVOList(param);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasAnyPermi('store:storeOrderAudit:audit')")
+    @PostMapping("/audit")
+    public AjaxResult audit(@Valid @RequestBody FsStoreOrderAuditReviewParam param) {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        fsStoreOrderAuditService.audit(param, user.getUserId(), true);
+        return AjaxResult.success();
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderItemScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreOrderItemScrm;
+import com.fs.hisStore.service.IFsStoreOrderItemScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 订单详情Controller
+ *
+ * @author fs
+ * @date 2022-03-21
+ */
+@RestController
+@RequestMapping("/store/store/storeOrderItem")
+public class FsStoreOrderItemScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreOrderItemScrmService fsStoreOrderItemService;
+
+    /**
+     * 查询订单详情列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderItem:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreOrderItemScrm fsStoreOrderItem)
+    {
+        startPage();
+        List<FsStoreOrderItemScrm> list = fsStoreOrderItemService.selectFsStoreOrderItemList(fsStoreOrderItem);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出订单详情列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderItem:export')")
+    @Log(title = "订单详情", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreOrderItemScrm fsStoreOrderItem)
+    {
+        List<FsStoreOrderItemScrm> list = fsStoreOrderItemService.selectFsStoreOrderItemList(fsStoreOrderItem);
+        ExcelUtil<FsStoreOrderItemScrm> util = new ExcelUtil<FsStoreOrderItemScrm>(FsStoreOrderItemScrm.class);
+        return util.exportExcel(list, "storeOrderItem");
+    }
+
+    /**
+     * 获取订单详情详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderItem:query')")
+    @GetMapping(value = "/{itemId}")
+    public AjaxResult getInfo(@PathVariable("itemId") Long itemId)
+    {
+        return AjaxResult.success(fsStoreOrderItemService.selectFsStoreOrderItemById(itemId));
+    }
+
+    /**
+     * 新增订单详情
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderItem:add')")
+    @Log(title = "订单详情", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreOrderItemScrm fsStoreOrderItem)
+    {
+        return toAjax(fsStoreOrderItemService.insertFsStoreOrderItem(fsStoreOrderItem));
+    }
+
+    /**
+     * 修改订单详情
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderItem:edit')")
+    @Log(title = "订单详情", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreOrderItemScrm fsStoreOrderItem)
+    {
+        return toAjax(fsStoreOrderItemService.updateFsStoreOrderItem(fsStoreOrderItem));
+    }
+
+    /**
+     * 删除订单详情
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderItem:remove')")
+    @Log(title = "订单详情", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{itemIds}")
+    public AjaxResult remove(@PathVariable Long[] itemIds)
+    {
+        return toAjax(fsStoreOrderItemService.deleteFsStoreOrderItemByIds(itemIds));
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderNoticeScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreOrderNoticeScrm;
+import com.fs.hisStore.service.IFsStoreOrderNoticeScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 订单通知用户 接收订单通知的用户Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeOrderNotice")
+public class FsStoreOrderNoticeScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreOrderNoticeScrmService fsStoreOrderNoticeService;
+
+    /**
+     * 查询订单通知用户 接收订单通知的用户列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderNotice:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreOrderNoticeScrm fsStoreOrderNotice)
+    {
+        startPage();
+        List<FsStoreOrderNoticeScrm> list = fsStoreOrderNoticeService.selectFsStoreOrderNoticeList(fsStoreOrderNotice);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出订单通知用户 接收订单通知的用户列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderNotice:export')")
+    @Log(title = "订单通知用户 接收订单通知的用户", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreOrderNoticeScrm fsStoreOrderNotice)
+    {
+        List<FsStoreOrderNoticeScrm> list = fsStoreOrderNoticeService.selectFsStoreOrderNoticeList(fsStoreOrderNotice);
+        ExcelUtil<FsStoreOrderNoticeScrm> util = new ExcelUtil<FsStoreOrderNoticeScrm>(FsStoreOrderNoticeScrm.class);
+        return util.exportExcel(list, "storeOrderNotice");
+    }
+
+    /**
+     * 获取订单通知用户 接收订单通知的用户详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderNotice:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreOrderNoticeService.selectFsStoreOrderNoticeById(id));
+    }
+
+    /**
+     * 新增订单通知用户 接收订单通知的用户
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderNotice:add')")
+    @Log(title = "订单通知用户 接收订单通知的用户", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreOrderNoticeScrm fsStoreOrderNotice)
+    {
+        return toAjax(fsStoreOrderNoticeService.insertFsStoreOrderNotice(fsStoreOrderNotice));
+    }
+
+    /**
+     * 修改订单通知用户 接收订单通知的用户
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderNotice:edit')")
+    @Log(title = "订单通知用户 接收订单通知的用户", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreOrderNoticeScrm fsStoreOrderNotice)
+    {
+        return toAjax(fsStoreOrderNoticeService.updateFsStoreOrderNotice(fsStoreOrderNotice));
+    }
+
+    /**
+     * 删除订单通知用户 接收订单通知的用户
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderNotice:remove')")
+    @Log(title = "订单通知用户 接收订单通知的用户", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreOrderNoticeService.deleteFsStoreOrderNoticeByIds(ids));
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderOfflineItemScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreOrderOfflineItemScrm;
+import com.fs.hisStore.service.IFsStoreOrderOfflineItemScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 线下订单详情Controller
+ *
+ * @author fs
+ * @date 2024-10-29
+ */
+@RestController
+@RequestMapping("/store/storeOrderOfflineItem/store")
+public class FsStoreOrderOfflineItemScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreOrderOfflineItemScrmService fsStoreOrderOfflineItemService;
+
+    /**
+     * 查询线下订单详情列表
+     */
+    @PreAuthorize("@ss.hasPermi('storeOrderOfflineItem:store:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreOrderOfflineItemScrm fsStoreOrderOfflineItem)
+    {
+        startPage();
+        List<FsStoreOrderOfflineItemScrm> list = fsStoreOrderOfflineItemService.selectFsStoreOrderOfflineItemList(fsStoreOrderOfflineItem);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出线下订单详情列表
+     */
+    @PreAuthorize("@ss.hasPermi('storeOrderOfflineItem:store:export')")
+    @Log(title = "线下订单详情", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreOrderOfflineItemScrm fsStoreOrderOfflineItem)
+    {
+        List<FsStoreOrderOfflineItemScrm> list = fsStoreOrderOfflineItemService.selectFsStoreOrderOfflineItemList(fsStoreOrderOfflineItem);
+        ExcelUtil<FsStoreOrderOfflineItemScrm> util = new ExcelUtil<FsStoreOrderOfflineItemScrm>(FsStoreOrderOfflineItemScrm.class);
+        return util.exportExcel(list, "store");
+    }
+
+    /**
+     * 获取线下订单详情详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('storeOrderOfflineItem:store:query')")
+    @GetMapping(value = "/{itemId}")
+    public AjaxResult getInfo(@PathVariable("itemId") Long itemId)
+    {
+        return AjaxResult.success(fsStoreOrderOfflineItemService.selectFsStoreOrderOfflineItemById(itemId));
+    }
+
+    /**
+     * 新增线下订单详情
+     */
+    @PreAuthorize("@ss.hasPermi('storeOrderOfflineItem:store:add')")
+    @Log(title = "线下订单详情", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreOrderOfflineItemScrm fsStoreOrderOfflineItem)
+    {
+        return toAjax(fsStoreOrderOfflineItemService.insertFsStoreOrderOfflineItem(fsStoreOrderOfflineItem));
+    }
+
+    /**
+     * 修改线下订单详情
+     */
+    @PreAuthorize("@ss.hasPermi('storeOrderOfflineItem:store:edit')")
+    @Log(title = "线下订单详情", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreOrderOfflineItemScrm fsStoreOrderOfflineItem)
+    {
+        return toAjax(fsStoreOrderOfflineItemService.updateFsStoreOrderOfflineItem(fsStoreOrderOfflineItem));
+    }
+
+    /**
+     * 删除线下订单详情
+     */
+    @PreAuthorize("@ss.hasPermi('storeOrderOfflineItem:store:remove')")
+    @Log(title = "线下订单详情", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{itemIds}")
+    public AjaxResult remove(@PathVariable Long[] itemIds)
+    {
+        return toAjax(fsStoreOrderOfflineItemService.deleteFsStoreOrderOfflineItemByIds(itemIds));
+    }
+}

+ 159 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderOfflineScrmController.java

@@ -0,0 +1,159 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.domain.model.LoginUser;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ParseUtils;
+import com.fs.common.utils.ServletUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.crm.domain.CrmCustomer;
+import com.fs.crm.service.ICrmCustomerService;
+import com.fs.framework.web.service.TokenService;
+import com.fs.hisStore.domain.FsStoreOrderOfflineScrm;
+import com.fs.hisStore.domain.FsStoreOrderOfflineItemScrm;
+import com.fs.hisStore.param.FsStoreOrderOfflineParam;
+import com.fs.hisStore.service.IFsStoreOrderOfflineItemScrmService;
+import com.fs.hisStore.service.IFsStoreOrderOfflineScrmService;
+import com.fs.hisStore.vo.FsStoreOrderOfflineListVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 线下订单Controller
+ *
+ * @author fs
+ * @date 2024-10-29
+ */
+@RestController
+@RequestMapping("/store/store/storeOrderOffline")
+public class FsStoreOrderOfflineScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreOrderOfflineScrmService fsStoreOrderOfflineService;
+    @Autowired
+    private IFsStoreOrderOfflineItemScrmService fsStoreOrderOfflineItemService;
+    @Autowired
+    private ICrmCustomerService crmCustomerService;
+    @Autowired
+    private TokenService tokenService;
+
+
+
+    /**
+     * 查询线下订单列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderOffline:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreOrderOfflineParam param)
+    {
+        startPage();
+        List<FsStoreOrderOfflineListVO> list = fsStoreOrderOfflineService.selectFsStoreOrderOfflineListVO(param);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出线下订单列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderOffline:export')")
+    @Log(title = "线下订单", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreOrderOfflineScrm fsStoreOrderOffline)
+    {
+        List<FsStoreOrderOfflineScrm> list = fsStoreOrderOfflineService.selectFsStoreOrderOfflineList(fsStoreOrderOffline);
+        ExcelUtil<FsStoreOrderOfflineScrm> util = new ExcelUtil<FsStoreOrderOfflineScrm>(FsStoreOrderOfflineScrm.class);
+        return util.exportExcel(list, "storeOrderOffline");
+    }
+
+    /**
+     * 获取线下订单详细信息
+     */
+    /**
+     * 获取线下订单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderOffline:query')")
+    @GetMapping(value = "/{orderId}")
+    public R getInfo(@PathVariable("orderId") Long orderId)
+    {
+
+        FsStoreOrderOfflineListVO order=fsStoreOrderOfflineService.selectFsStoreOrderOfflineVOById(orderId);
+        order.setMobile(ParseUtils.parsePhone(order.getMobile()));
+        CrmCustomer customer=null;
+        if(order.getCrmId()!=null&&order.getCrmId()>0){
+            customer=crmCustomerService.selectCrmCustomerById(order.getCrmId());
+            customer.setMobile(ParseUtils.parsePhone(customer.getMobile()));
+        }
+        FsStoreOrderOfflineItemScrm itemMap=new FsStoreOrderOfflineItemScrm();
+        itemMap.setOrderId(order.getOrderId());
+        List<FsStoreOrderOfflineItemScrm> items=fsStoreOrderOfflineItemService.selectFsStoreOrderOfflineItemList(itemMap);
+        return R.ok().put("order", order).put("items", items).put("customer",customer) ;
+    }
+
+    @GetMapping(value = "/queryPhone/{orderId}")
+    @Log(title = "查看电话", businessType = BusinessType.GRANT)
+    @PreAuthorize("@ss.hasPermi('store:storeOrderOffline:queryPhone')")
+    public R getPhone(@PathVariable("orderId") Long orderId)
+    {
+        FsStoreOrderOfflineListVO order=fsStoreOrderOfflineService.selectFsStoreOrderOfflineVOById(orderId);
+        String userPhone = order.getMobile();
+        return R.ok().put("userPhone",userPhone);
+    }
+
+    /**
+     * 新增线下订单
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderOffline:add')")
+    @Log(title = "线下订单", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreOrderOfflineScrm fsStoreOrderOffline)
+    {
+        return toAjax(fsStoreOrderOfflineService.insertFsStoreOrderOffline(fsStoreOrderOffline));
+    }
+
+    /**
+     * 修改线下订单
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderOffline:edit')")
+    @Log(title = "线下订单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreOrderOfflineScrm fsStoreOrderOffline)
+    {
+        return toAjax(fsStoreOrderOfflineService.updateFsStoreOrderOffline(fsStoreOrderOffline));
+    }
+
+    /**
+     * 删除线下订单
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderOffline:remove')")
+    @Log(title = "线下订单", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{orderIds}")
+    public AjaxResult remove(@PathVariable Long[] orderIds)
+    {
+        return toAjax(fsStoreOrderOfflineService.deleteFsStoreOrderOfflineByIds(orderIds));
+    }
+
+
+    @PreAuthorize("@ss.hasPermi('store:storeOrderOffline:audit')")
+    @Log(title = "审核订单", businessType = BusinessType.UPDATE)
+    @PostMapping("/auditOrder/{orderId}")
+    public R auditOrder(@PathVariable Long orderId)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        FsStoreOrderOfflineScrm fsStoreOrderOffline = new FsStoreOrderOfflineScrm();
+        fsStoreOrderOffline.setOrderId(orderId);
+        fsStoreOrderOffline.setStatus(3L);
+        fsStoreOrderOffline.setAuditBy(loginUser.getUser().getNickName());
+        fsStoreOrderOffline.setAuditTime(new Date());
+        if (fsStoreOrderOfflineService.updateFsStoreOrderOffline(fsStoreOrderOffline)>0){
+            return R.ok();
+        }
+        return R.error("审核失败");
+    }
+}

+ 162 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderPromotionScrmController.java

@@ -0,0 +1,162 @@
+package com.fs.hisStore;
+
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.StringUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.company.service.ICompanyMoneyLogsService;
+import com.fs.erp.service.IErpOrderService;
+import com.fs.his.service.IFsExpressService;
+import com.fs.his.service.IFsUserService;
+import com.fs.hisStore.dto.StoreOrderProductDTO;
+import com.fs.hisStore.param.FsStoreOrderParam;
+import com.fs.hisStore.service.IFsStoreOrderItemScrmService;
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
+import com.fs.hisStore.service.IFsStoreOrderStatusScrmService;
+import com.fs.hisStore.service.IFsStorePaymentScrmService;
+import com.fs.hisStore.vo.FsPromotionOrderVO;
+import com.fs.hisStore.vo.FsStoreOrderItemExportVO;
+import com.fs.hisStore.vo.FsStoreOrderPromotionExportVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/store/store/storeOrder")
+public class FsStoreOrderPromotionScrmController extends BaseController {
+    @Autowired
+    private IFsExpressService expressService;
+    @Autowired
+    private IFsStoreOrderScrmService fsStoreOrderService;
+    @Autowired
+    private IFsStoreOrderItemScrmService orderItemService;
+
+    @Autowired
+    private IFsUserService userService;
+
+    @Autowired
+    private IFsStoreOrderStatusScrmService orderStatusService;
+
+    @Autowired
+    IErpOrderService erpOrderService;
+    @Autowired
+    IFsStorePaymentScrmService paymentService;
+
+    @Autowired
+    private ICompanyMoneyLogsService moneyLogsService;
+
+    /**
+     * 查询推广订单列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:PromotionOrder:list')")
+    @GetMapping("/promotionList")
+    public TableDataInfo list(FsStoreOrderParam param) {
+        startPage();
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
+            param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
+        }
+
+        List<FsPromotionOrderVO> list = fsStoreOrderService.selectFsPromotionOrderListVO(param);
+        if (list != null) {
+            for (FsPromotionOrderVO vo : list) {
+                if(vo.getPhone()!=null){
+                    vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                    vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+
+            }
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出推广订单列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:promotionOrder:export')")
+    @Log(title = "导出推广订单", businessType = BusinessType.EXPORT)
+    @GetMapping("/promotionExport")
+    public AjaxResult export(FsStoreOrderParam param) {
+        if (param == null){
+            return AjaxResult.error("请筛选数据导出");
+        }
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        List<FsStoreOrderPromotionExportVO> list = fsStoreOrderService.selectFsPromotionOrderListVOByExport(param);
+        //对手机号脱敏
+        if (list != null) {
+            for (FsStoreOrderPromotionExportVO vo : list) {
+                if (vo.getPhone() != null) {
+                    vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+                if (vo.getUserPhone() != null) {
+                    vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+
+            }
+        }
+        ExcelUtil<FsStoreOrderPromotionExportVO> util = new ExcelUtil<FsStoreOrderPromotionExportVO>(FsStoreOrderPromotionExportVO.class);
+        return util.exportExcel(list, "订单数据");
+    }
+
+
+    @PreAuthorize("@ss.hasPermi('store:promotionOrder:exportItems')")
+    @Log(title = "推广订单明细导出", businessType = BusinessType.EXPORT)
+    @GetMapping("/promotionExportItems")
+    public AjaxResult exportItems(FsStoreOrderParam param) {
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        param.setIsHealth("1");
+        List<FsStoreOrderItemExportVO> list = orderItemService.selectFsStoreOrderItemListExportVO(param);
+        //对手机号脱敏
+        if (list != null) {
+            for (FsStoreOrderItemExportVO vo : list) {
+                if (vo.getUserPhone() != null) {
+                    String phone = vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{1})", "$1****$2");
+                    vo.setUserPhone(phone);
+                }
+                if (!StringUtils.isEmpty(vo.getJsonInfo())) {
+                    try {
+                        StoreOrderProductDTO orderProductDTO = JSONObject.parseObject(vo.getJsonInfo(), StoreOrderProductDTO.class);
+                        BeanUtil.copyProperties(orderProductDTO, vo);
+                    } catch (Exception e) {
+                    }
+                }
+            }
+        }
+        ExcelUtil<FsStoreOrderItemExportVO> util = new ExcelUtil<FsStoreOrderItemExportVO>(FsStoreOrderItemExportVO.class);
+        return util.exportExcel(list, "订单明细数据");
+    }
+}

+ 644 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderScrmController.java

@@ -0,0 +1,644 @@
+package com.fs.hisStore;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ParseUtils;
+import com.fs.common.utils.StringUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.company.param.CompanyStoreOrderMoneyLogsListParam;
+import com.fs.company.service.ICompanyMoneyLogsService;
+import com.fs.company.vo.CompanyStoreOrderMoneyLogsVO;
+import com.fs.erp.domain.ErpDeliverys;
+import com.fs.erp.domain.ErpOrderQuery;
+import com.fs.erp.dto.ErpOrderQueryRequert;
+import com.fs.erp.dto.ErpOrderQueryResponse;
+import com.fs.erp.service.IErpOrderService;
+import com.fs.his.domain.FsUser;
+import com.fs.his.service.IFsExpressService;
+import com.fs.his.service.IFsUserService;
+import com.fs.his.utils.ConfigUtil;
+import com.fs.hisStore.config.FsErpConfig;
+import com.fs.hisStore.domain.FsStoreOrderItemScrm;
+import com.fs.hisStore.domain.FsStoreOrderScrm;
+import com.fs.hisStore.domain.FsStoreOrderStatusScrm;
+import com.fs.hisStore.domain.FsStorePaymentScrm;
+import com.fs.his.dto.ExpressInfoDTO;
+import com.fs.hisStore.dto.StoreOrderExpressExportDTO;
+import com.fs.hisStore.dto.StoreOrderProductDTO;
+import com.fs.hisStore.enums.ShipperCodeEnum;
+import com.fs.hisStore.param.*;
+import com.fs.hisStore.service.*;
+import com.fs.hisStore.vo.*;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 订单Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeOrder")
+public class FsStoreOrderScrmController extends BaseController {
+    @Autowired
+    private IFsExpressService expressService;
+    @Autowired
+    private IFsStoreOrderScrmService fsStoreOrderService;
+    @Autowired
+    private IFsStoreOrderItemScrmService orderItemService;
+
+    @Autowired
+    private IFsUserService userService;
+
+    @Autowired
+    private IFsStoreOrderStatusScrmService orderStatusService;
+
+    @Autowired
+    IFsStorePaymentScrmService paymentService;
+
+    @Autowired
+    private ICompanyMoneyLogsService moneyLogsService;
+    @Autowired
+    @Qualifier("erpOrderServiceImpl")
+    private IErpOrderService gyOrderService;
+
+    @Autowired
+    @Qualifier("wdtErpOrderServiceImpl")
+    private IErpOrderService wdtOrderService;
+
+    @Autowired
+    @Qualifier("k9OrderScrmServiceImpl")
+    private IErpOrderService k9OrderService;
+    @Autowired
+    private ConfigUtil configUtil;
+    @Autowired
+    private IFsStoreOrderAuditLogScrmService orderAuditLogService;
+
+    private IErpOrderService getErpService(){
+        //判断是否开启erp
+        IErpOrderService erpOrderService = null;
+        FsErpConfig erpConfig = configUtil.getErpConfig();
+        Integer erpOpen = erpConfig.getErpOpen();
+        if (erpOpen != null && erpOpen == 1) {
+            //判断erp类型
+            Integer erpType = erpConfig.getErpType();
+            if (erpType != null) {
+                if (erpType == 1) {
+                    //管易
+                    erpOrderService = gyOrderService;
+                } else if (erpType == 2) {
+                    //旺店通
+                    erpOrderService = wdtOrderService;
+                } else if (erpType == 3) {
+                    //旺店通
+                    erpOrderService = k9OrderService;
+                }
+            }
+        }
+        return erpOrderService;
+    }
+
+    /**
+     * 查询订单列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreOrderParam param) {
+        startPage();
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
+            param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
+        }
+        param.setNotHealth(1);
+        List<FsStoreOrderVO> list = fsStoreOrderService.selectFsStoreOrderListVO(param);
+        if (list != null) {
+            for (FsStoreOrderVO vo : list) {
+                if(vo.getPhone()!=null){
+                    vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                    vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+            }
+        }
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:payRemainList')")
+    @GetMapping("/payRemainList")
+    public TableDataInfo payRemainList(FsStoreOrderParam param) {
+        startPage();
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        List<FsStoreOrderVO> list = fsStoreOrderService.selectPayRemainListVO(param);
+        if (list != null) {
+            for (FsStoreOrderVO vo : list) {
+                if(vo.getPhone()!=null){
+                    vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                    vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+
+            }
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出付尾款订单列表
+     */
+    @Log(title = "付尾款订单", businessType = BusinessType.EXPORT)
+    @GetMapping("/payRemainExport")
+    public AjaxResult payRemainExport(FsStoreOrderParam param) {
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        List<FsStorePayRemainOrderExportVO> list = fsStoreOrderService.selectFsStorePayRemainOrderListVOByExport(param);
+        //对手机号脱敏
+        if (list != null) {
+            for (FsStorePayRemainOrderExportVO vo : list) {
+                if (vo.getPhone() != null) {
+                    vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+                if (vo.getUserPhone() != null) {
+                    vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+                if (vo.getUserAddress()!=null){
+                    vo.setUserAddress(ParseUtils.parseAddress(vo.getUserAddress()));
+                }
+
+            }
+        }
+        ExcelUtil<FsStorePayRemainOrderExportVO> util = new ExcelUtil<FsStorePayRemainOrderExportVO>(FsStorePayRemainOrderExportVO.class);
+        return util.exportExcel(list, "付尾款订单数据");
+    }
+
+    /**
+     * 导出订单列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:export')")
+    @Log(title = "订单", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreOrderParam param) {
+        if (param.getBeginTime().equals("") && param.getEndTime().equals("")){
+            param.setBeginTime(null);
+            param.setEndTime(null);
+        }
+        if (fsStoreOrderService.isEntityNull(param)){
+            return AjaxResult.error("请筛选数据导出");
+        }
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
+            param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        param.setNotHealth(1);
+        List<FsStoreOrderExportVO> list = fsStoreOrderService.selectFsStoreOrderListVOByExport(param);
+        //对手机号脱敏
+        if (list != null) {
+            for (FsStoreOrderExportVO vo : list) {
+                if (vo.getPhone() != null) {
+                    vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+                if (vo.getUserPhone() != null) {
+                    vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                }
+                if (vo.getUserAddress()!=null){
+                    vo.setUserAddress(ParseUtils.parseAddress(vo.getUserAddress()));
+                }
+            }
+        }
+        ExcelUtil<FsStoreOrderExportVO> util = new ExcelUtil<FsStoreOrderExportVO>(FsStoreOrderExportVO.class);
+        return util.exportExcel(list, "订单数据");
+    }
+
+
+
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:exportItems')")
+    @Log(title = "订单明细导出", businessType = BusinessType.EXPORT)
+    @GetMapping("/exportItems")
+    public AjaxResult exportItems(FsStoreOrderParam param) {
+        if (param.getBeginTime().equals("") && param.getEndTime().equals("")){
+            param.setBeginTime(null);
+            param.setEndTime(null);
+        }
+        if (fsStoreOrderService.isEntityNull(param)){
+            return AjaxResult.error("请筛选数据导出");
+        }
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
+            param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
+        }
+        param.setNotHealth(1);
+        List<FsStoreOrderItemExportVO> list = orderItemService.selectFsStoreOrderItemListExportVO(param);
+        //对手机号脱敏
+        if (list != null) {
+            for (FsStoreOrderItemExportVO vo : list) {
+                if (vo.getUserPhone() != null) {
+                    String phone = vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{1})", "$1****$2");
+                    vo.setUserPhone(phone);
+                }
+                if (vo.getUserAddress()!=null){
+                    vo.setUserAddress(ParseUtils.parseAddress(vo.getUserAddress()));
+                }
+                if (!StringUtils.isEmpty(vo.getJsonInfo())) {
+                    try {
+                        StoreOrderProductDTO orderProductDTO = JSONObject.parseObject(vo.getJsonInfo(), StoreOrderProductDTO.class);
+                        BeanUtil.copyProperties(orderProductDTO, vo);
+                    } catch (Exception e) {
+                    }
+                }
+            }
+        }
+        ExcelUtil<FsStoreOrderItemExportVO> util = new ExcelUtil<FsStoreOrderItemExportVO>(FsStoreOrderItemExportVO.class);
+        return util.exportExcel(list, "订单明细数据");
+    }
+
+
+    @GetMapping("/orderItemsNum")
+    public R orderItemsNum(FsStoreOrderParam param) {
+
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
+            param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
+        }
+        param.setNotHealth(1);
+        Long orderItemsNum = orderItemService.countFsStoreOrderItemListExportVO(param);
+        return R.ok().put("orderItemsNum","订单明细数目:"+orderItemsNum);
+    }
+
+    /**
+     * 获取订单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:query')")
+    @GetMapping(value = "/{id}")
+    public R getInfo(@PathVariable("id") Long id) {
+        FsStoreOrderScrm order = fsStoreOrderService.selectFsStoreOrderById(id);
+        order.setUserPhone(ParseUtils.parsePhone(order.getUserPhone()));
+        order.setUserAddress(ParseUtils.parseAddress(order.getUserAddress()));
+        FsUser user = userService.selectFsUserById(order.getUserId());
+        if (user != null) {
+            user.setPhone(ParseUtils.parsePhone(user.getPhone()));
+        }
+        FsStoreOrderItemScrm itemMap = new FsStoreOrderItemScrm();
+        itemMap.setOrderId(order.getId());
+        List<FsStoreOrderItemScrm> items = orderItemService.selectFsStoreOrderItemList(itemMap);
+        FsStoreOrderStatusScrm statusMap = new FsStoreOrderStatusScrm();
+        statusMap.setOrderId(order.getId());
+        List<FsStoreOrderStatusScrm> logs = orderStatusService.selectFsStoreOrderStatusList(statusMap);
+        List<FsStorePaymentScrm> payments=paymentService.selectFsStorePaymentByOrderId(order.getId());
+        List<CompanyStoreOrderMoneyLogsVO> tuiMoneyLogs=new ArrayList<>();
+        if(order.getCompanyId()!=null){
+            CompanyStoreOrderMoneyLogsListParam moneyLogsMap=new CompanyStoreOrderMoneyLogsListParam();
+            moneyLogsMap.setCompanyId(order.getCompanyId());
+            moneyLogsMap.setBusinessId(order.getId().toString());
+            tuiMoneyLogs=moneyLogsService.selectCompanyStoreOrderMoneyLogsList(moneyLogsMap);
+        }
+
+        List<FsStoreOrderAuditLogVO> auditLogs = orderAuditLogService.selectStoreOrderAuditLogVOByOrderId(order.getId());
+        return R.ok().put("order", order).put("items", items).put("logs", logs).put("user", user).put("payments",payments).put("tuiMoneyLogs",tuiMoneyLogs)
+                .put("auditLogs",auditLogs);
+    }
+
+    @GetMapping(value = "/queryAddress/{id}")
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:queryAddress')")
+    public R getAddress(@PathVariable("id") Long id)
+    {
+        FsStoreOrderScrm order = fsStoreOrderService.selectFsStoreOrderById(id);
+        String address = order.getUserAddress();
+        return R.ok().put("address",address);
+    }
+
+    @GetMapping(value = "/queryPhone/{id}")
+    @Log(title = "查看电话", businessType = BusinessType.GRANT)
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:queryPhone')")
+    public R getPhone(@PathVariable("id") Long id)
+    {
+        FsStoreOrderScrm order = fsStoreOrderService.selectFsStoreOrderById(id);
+        String userPhone = order.getUserPhone();
+        return R.ok().put("userPhone",userPhone);
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:express')")
+    @GetMapping(value = "/getExpress/{id}")
+    public R getExpress(@PathVariable("id") Long id) {
+        FsStoreOrderScrm order = fsStoreOrderService.selectFsStoreOrderById(id);
+        ExpressInfoDTO expressInfoDTO = null;
+        if (StringUtils.isNotEmpty(order.getDeliveryId())) {
+            String lastFourNumber = "";
+            if (order.getDeliverySn().equals(ShipperCodeEnum.SF.getValue())) {
+                lastFourNumber = order.getUserPhone();
+                if (lastFourNumber.length() == 11) {
+                    lastFourNumber = StrUtil.sub(lastFourNumber, lastFourNumber.length(), -4);
+                }
+            }
+            expressInfoDTO = expressService.getExpressInfo(order.getOrderCode(), order.getDeliverySn(), order.getDeliveryId(), lastFourNumber);
+        }
+        return R.ok().put("data", expressInfoDTO);
+    }
+
+    /**
+     * 新增订单
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:add')")
+    @Log(title = "订单", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreOrderScrm fsStoreOrder) {
+        return toAjax(fsStoreOrderService.insertFsStoreOrder(fsStoreOrder));
+    }
+
+    /**
+     * 修改订单
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:edit')")
+    @Log(title = "订单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreOrderScrm fsStoreOrder) {
+        return toAjax(fsStoreOrderService.updateFsStoreOrder(fsStoreOrder));
+    }
+
+    /**
+     * 修改物流
+     * @param fsStoreOrder
+     * @return
+     */
+    @Log(title = "修改物流", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:editDeliveryId')")
+    @PutMapping("/editDeliveryId")
+    public AjaxResult editDeliveryId(@RequestBody FsStoreOrderScrm fsStoreOrder) {
+        return toAjax(fsStoreOrderService.updateFsStoreOrder(fsStoreOrder));
+    }
+
+    @Log(title = "同步管易物流单号", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:updateErpOrder')")
+    @PostMapping("/updateErpOrder")
+    public R updateErpOrder(@Validated @RequestBody FsStoreOrderExpressEditParam param) {
+        FsStoreOrderScrm order = fsStoreOrderService.selectFsStoreOrderById(param.getOrderId());
+        FsErpConfig erpConfig = configUtil.getErpConfig();
+        List<Long> noErpCompany = erpConfig.getNoErpCompany();
+        if (noErpCompany.contains(order.getCompanyId())) {
+            logger.info("订单:{},相关公司不推送erp", order.getOrderCode());
+            return R.ok("订单:"+ order.getOrderCode()+"相关公司不推送erp");
+        }
+        IErpOrderService erpOrderService = getErpService();
+        ErpOrderQueryRequert request = new ErpOrderQueryRequert();
+        request.setCode(order.getExtendOrderId());
+        ErpOrderQueryResponse response = erpOrderService.getOrder(request);
+        if(response.getOrders()!=null&&response.getOrders().size()>0){
+            for(ErpOrderQuery orderQuery : response.getOrders()){
+                if(orderQuery.getDeliverys()!=null&&orderQuery.getDeliverys().size()>0){
+                    for(ErpDeliverys delivery:orderQuery.getDeliverys()){
+                        if(delivery.getDelivery()&& StringUtils.isNotEmpty(delivery.getMail_no())){
+                            //更新商订单状态
+                            fsStoreOrderService.updateDeliveryOrder(param.getOrderId(), delivery.getMail_no(),delivery.getExpress_code(),delivery.getExpress_name());
+                            return R.ok();
+                        }
+                    }
+
+                }
+            }
+        }
+        return R.error("未查询到快递信息");
+    }
+
+    /**
+     * 删除订单
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:remove')")
+    @Log(title = "订单", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(fsStoreOrderService.deleteFsStoreOrderByIds(ids));
+    }
+
+
+    @PostMapping("/createUserOrder")
+    public R createUserOrder(@Validated @RequestBody FsStoreOrderCreateUserParam param, HttpServletRequest request) {
+        return fsStoreOrderService.createUserOrder(param);
+    }
+
+    @Log(title = "确认订单", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:finishOrder')")
+    @PostMapping("/finishOrder")
+    public R finishOrder(@Validated @RequestBody FsStoreOrderFinishParam param, HttpServletRequest request) {
+        return fsStoreOrderService.finishOrder(param.getOrderId());
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:auditPayRemain')")
+    @PostMapping("/auditPayRemain")
+    public R auditPayRemain(@Validated @RequestBody FsStoreOrderAuditPayRemainParam param, HttpServletRequest request) {
+        return fsStoreOrderService.auditPayRemain(param.getOrderId());
+    }
+
+
+    @Log(title = "导入", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:importExpress')")
+    @PostMapping("/importExpress")
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
+        ExcelUtil<StoreOrderExpressExportDTO> util = new ExcelUtil<StoreOrderExpressExportDTO>(StoreOrderExpressExportDTO.class);
+        List<StoreOrderExpressExportDTO> list = util.importExcel(file.getInputStream());
+        String message = fsStoreOrderService.importExpress(list, updateSupport);
+        return AjaxResult.success(message);
+    }
+
+    //下载模板
+    @GetMapping("/importTemplate")
+    public AjaxResult importTemplate() {
+        ExcelUtil<StoreOrderExpressExportDTO> util = new ExcelUtil<StoreOrderExpressExportDTO>(StoreOrderExpressExportDTO.class);
+        return util.importTemplateExcel("物流回单数据");
+    }
+
+
+    @GetMapping("/getStoreOrder")
+    public R getStoreOrder(@RequestParam("orderCode") String orderCode) {
+        FsStoreOrderVO vo = fsStoreOrderService.selectFsStoreOrderVOByOrderCode(orderCode);
+        return R.ok().put("data", vo);
+    }
+
+    @Log(title = "冻结、解冻佣金", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:editTuiMoney')")
+    @PostMapping("/editTuiMoney")
+    public R editTuiMoney(@Validated @RequestBody FsStoreOrderEditTuiMoneyParam param, HttpServletRequest request) {
+        return fsStoreOrderService.editTuiMoney(param);
+    }
+
+    @Log(title = "退款", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:refundOrderMoney')")
+    @PostMapping("/refundOrderMoney")
+    public synchronized R refundOrderMoney(@Validated @RequestBody FsStoreOrderRefundParam param, HttpServletRequest request) {
+        return fsStoreOrderService.refundOrderMoney(param.getOrderId());
+    }
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:getEroOrder')")
+    @GetMapping("/getEroOrder")
+    public R getEroOrder(@RequestParam("extendOrderId") String extendOrderId) {
+        IErpOrderService erpOrderService = getErpService();
+        ErpOrderQueryRequert request = new ErpOrderQueryRequert();
+        request.setCode(extendOrderId);
+        ErpOrderQueryResponse response = erpOrderService.getOrder(request);
+        return R.ok().put("data",response);
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:updateExpress')")
+    @PostMapping("/updateExpress")
+    public R updateExpress(@Validated @RequestBody FsStoreOrderExpressEditParam param, HttpServletRequest request) {
+        return fsStoreOrderService.updateExpress(param);
+    }
+
+    @Log(title = "同步物流", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:syncExpress')")
+    @PostMapping("/syncExpress")
+    public R syncExpress(@Validated @RequestBody FsStoreOrderExpressEditParam param, HttpServletRequest request) {
+        return fsStoreOrderService.syncExpress(param);
+    }
+
+
+    @Log(title = "分佣", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:addTuiMoney')")
+    @PostMapping("/addTuiMoney")
+    public R addTuiMoney(@Validated @RequestBody FsStoreOrderAddTuiMoneyParam param, HttpServletRequest request) {
+        return fsStoreOrderService.addTuiMoney(param);
+    }
+
+
+    @GetMapping("/getCustomerOrderList")
+    public TableDataInfo getCustomerOrderList(FsStoreOrderParam param) {
+        startPage();
+        List<FsStoreOrderVO> list = fsStoreOrderService.selectFsCustomerStoreOrderListVO(param);
+        if (list != null) {
+            for (FsStoreOrderVO vo : list) {
+                if(vo.getPhone()!=null){
+                    vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{1})", "$1****$2"));
+                    vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{1})", "$1****$2"));
+                }
+
+            }
+        }
+        return getDataTable(list);
+    }
+
+    @Log(title = "手动推管易", businessType = BusinessType.INSERT)
+    @ApiOperation("创建ERP订单")
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:createErpOrder')")
+    @GetMapping("/createErpOrder")
+    public R createErpOrder(@RequestParam("orderCode") String orderCode) throws Exception
+    {
+        logger.info("手动推管易订单号:{}",orderCode);
+        FsStoreOrderScrm order=fsStoreOrderService.selectFsStoreOrderByOrderCode(orderCode);
+        return fsStoreOrderService.createOmsOrder(order.getId());
+    }
+
+    /**
+     * 订单维度分页查询接口
+     * @param param 查询条件
+     * @return AjaxResult
+     * **/
+    @GetMapping("/orderDimensionStatisticsList")
+    public TableDataInfo orderDimensionStatisticsList(OrderStatisticsParam param){
+        return getDataTable(fsStoreOrderService.selectOrderDimensionStatisticsList(param));
+    }
+
+    /**
+     * 导出订单维度统计接口
+     * @param param 查询条件
+     * @return AjaxResult
+     * **/
+    @Log(title = "订单维度统计", businessType = BusinessType.EXPORT)
+    @GetMapping("/orderDimensionStatisticsExport")
+    public AjaxResult orderDimensionStatisticsExport(OrderStatisticsParam param){
+        List<OrderStatisticsVo> list = fsStoreOrderService.selectOrderDimensionStatisticsList(param);
+//        switch (param.getGroupType()){
+//            case 2:
+//                List<OrderCateStatisticsVo> cateStatisticsVoList = convertTo(list,OrderCateStatisticsVo.class);
+//                ExcelUtil<OrderCateStatisticsVo> cateUtil = new ExcelUtil<>(OrderCateStatisticsVo.class);
+//                return cateUtil.exportExcel(cateStatisticsVoList, "订单标签维度统计");
+//            case 3:
+//                List<OrderProductStatisticsVo> productStatisticsVoList =  convertTo(list,OrderProductStatisticsVo.class);
+//                ExcelUtil<OrderProductStatisticsVo> productUtil = new ExcelUtil<>(OrderProductStatisticsVo.class);
+//                return productUtil.exportExcel(productStatisticsVoList, "订单商品维度统计");
+//        }
+
+        ExcelUtil<OrderStatisticsVo> util = new ExcelUtil<>(OrderStatisticsVo.class);
+        return util.exportExcel(list, "订单员工维度统计");
+    }
+
+    /**
+     * 对象列表类型转换
+     */
+    public static <T> List<T> convertTo(List<?> sourceList, Class<T> targetClass) {
+        if (sourceList == null || sourceList.isEmpty()) {
+            return Collections.emptyList();
+        }
+
+        List<T> resultList = new ArrayList<>(sourceList.size());
+        try {
+            for (Object source : sourceList) {
+                T target = targetClass.getDeclaredConstructor().newInstance();
+                BeanUtils.copyProperties(source, target);
+                resultList.add(target);
+            }
+        } catch (Exception e) {
+            throw new RuntimeException("数据转换异常", e);
+        }
+        return resultList;
+    }
+}

+ 54 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderStatisticsScrmController.java

@@ -0,0 +1,54 @@
+package com.fs.hisStore;
+
+import com.baomidou.mybatisplus.extension.api.R;
+import com.fs.hisStore.param.FsStoreOrderStatisticsParam;
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
+import com.fs.hisStore.vo.StoreOrderStatisticsVo;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.math.BigDecimal;
+
+
+@RestController
+@RequestMapping("/store/store/storeOrder/statistics")
+public class FsStoreOrderStatisticsScrmController {
+
+    @Autowired
+    private IFsStoreOrderScrmService storeOrderService;
+
+    @ApiOperation("订单统计")
+    @GetMapping("/getStoreOrderStatistics")
+    public R getStoreOrderStatistics(FsStoreOrderStatisticsParam param)
+    {
+        Integer orderCount = storeOrderService.selectFsStoreOrderCount(param);
+        param.setPaid(1);
+        //实际支付金额
+        BigDecimal totalAmount = storeOrderService.selectFsStoreOrderByPayPriceCount(param);
+        //已支付的总订单数
+        Integer orderPayCount = storeOrderService.selectFsStoreOrderCount(param);
+        //已完成订单
+        param.setStatus(5);
+        Integer orderCompleteCount = storeOrderService.selectFsStoreOrderCount(param);
+        //退货成功订单
+        param.setStatus(-2);
+        Integer orderReturnCount = storeOrderService.selectFsStoreOrderCount(param);
+        //成交率
+        int successRate = 0;
+        //退货率
+        int returnRate = 0;
+        if (orderPayCount != null && orderPayCount != 0) {
+            successRate = (int) Math.round((orderCompleteCount != null ? orderCompleteCount : 0) * 100.0 / orderPayCount);
+            returnRate = (int) Math.round((orderReturnCount != null ? orderReturnCount : 0) * 100.0 / orderPayCount);
+        }
+        StoreOrderStatisticsVo storeOrderStatisticsVo = new StoreOrderStatisticsVo();
+        storeOrderStatisticsVo.setOrderCount(orderCount);
+        storeOrderStatisticsVo.setTotalAmount(totalAmount);
+        storeOrderStatisticsVo.setSuccessRate(successRate);
+        storeOrderStatisticsVo.setReturnRate(returnRate);
+        return R.ok(storeOrderStatisticsVo);
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreOrderStatusScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreOrderStatusScrm;
+import com.fs.hisStore.service.IFsStoreOrderStatusScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 订单操作记录Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeOrderStatus")
+public class FsStoreOrderStatusScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreOrderStatusScrmService fsStoreOrderStatusService;
+
+    /**
+     * 查询订单操作记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderStatus:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreOrderStatusScrm fsStoreOrderStatus)
+    {
+        startPage();
+        List<FsStoreOrderStatusScrm> list = fsStoreOrderStatusService.selectFsStoreOrderStatusList(fsStoreOrderStatus);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出订单操作记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderStatus:export')")
+    @Log(title = "订单操作记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreOrderStatusScrm fsStoreOrderStatus)
+    {
+        List<FsStoreOrderStatusScrm> list = fsStoreOrderStatusService.selectFsStoreOrderStatusList(fsStoreOrderStatus);
+        ExcelUtil<FsStoreOrderStatusScrm> util = new ExcelUtil<FsStoreOrderStatusScrm>(FsStoreOrderStatusScrm.class);
+        return util.exportExcel(list, "storeOrderStatus");
+    }
+
+    /**
+     * 获取订单操作记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderStatus:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreOrderStatusService.selectFsStoreOrderStatusById(id));
+    }
+
+    /**
+     * 新增订单操作记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderStatus:add')")
+    @Log(title = "订单操作记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreOrderStatusScrm fsStoreOrderStatus)
+    {
+        return toAjax(fsStoreOrderStatusService.insertFsStoreOrderStatus(fsStoreOrderStatus));
+    }
+
+    /**
+     * 修改订单操作记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderStatus:edit')")
+    @Log(title = "订单操作记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreOrderStatusScrm fsStoreOrderStatus)
+    {
+        return toAjax(fsStoreOrderStatusService.updateFsStoreOrderStatus(fsStoreOrderStatus));
+    }
+
+    /**
+     * 删除订单操作记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeOrderStatus:remove')")
+    @Log(title = "订单操作记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreOrderStatusService.deleteFsStoreOrderStatusByIds(ids));
+    }
+}

+ 298 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStorePaymentScrmController.java

@@ -0,0 +1,298 @@
+package com.fs.hisStore;
+
+import cn.hutool.json.JSONUtil;
+import com.alipay.api.AlipayApiException;
+import com.alipay.api.domain.AlipayTradeRefundModel;
+import com.fs.bean.AliPayBean;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ParseUtils;
+import com.fs.common.utils.StringUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.company.service.ICompanyService;
+import com.fs.huifuPay.domain.HuiFuQueryOrderResult;
+import com.fs.huifuPay.domain.HuiFuRefundResult;
+import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayQueryRequest;
+import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayRefundRequest;
+import com.fs.huifuPay.service.HuiFuService;
+import com.fs.hisStore.domain.FsStorePaymentScrm;
+import com.fs.hisStore.param.FsStorePaymentParam;
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
+import com.fs.hisStore.service.IFsStorePaymentScrmService;
+import com.fs.hisStore.vo.FsStorePaymentVO;
+import com.ijpay.alipay.AliPayApi;
+import com.ijpay.alipay.AliPayApiConfig;
+import com.ijpay.alipay.AliPayApiConfigKit;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 支付明细Controller
+ *
+ * @author fs
+ * @date 2022-06-25
+ */
+@RestController
+@RequestMapping("/store/store/storePayment")
+public class FsStorePaymentScrmController extends BaseController
+{
+    @Autowired
+    private IFsStorePaymentScrmService fsStorePaymentService;
+    @Autowired
+    private AliPayBean aliPayBean;
+
+    @Autowired
+    private ICompanyService companyService;
+
+    @Autowired
+    private IFsStoreOrderScrmService orderService;
+    @Autowired
+    HuiFuService huiFuService;
+    /**
+     * 查询支付明细列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storePayment:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStorePaymentParam fsStorePayment)
+    {
+        startPage();
+        if(!StringUtils.isEmpty(fsStorePayment.getCreateTimeRange())){
+            fsStorePayment.setCreateTimeList(fsStorePayment.getCreateTimeRange().split("--"));
+        }
+        List<FsStorePaymentVO> list = fsStorePaymentService.selectFsStorePaymentListQuery(fsStorePayment);
+        for (FsStorePaymentVO vo : list){
+            vo.setUserPhone(ParseUtils.parsePhone(vo.getUserPhone()));
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出支付明细列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storePayment:export')")
+    @Log(title = "导出支付明细", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStorePaymentParam fsStorePayment)
+    {
+        if(!StringUtils.isEmpty(fsStorePayment.getCreateTimeRange())){
+            fsStorePayment.setCreateTimeList(fsStorePayment.getCreateTimeRange().split("--"));
+        }
+        List<FsStorePaymentVO> list = fsStorePaymentService.exportFsStorePaymentList(fsStorePayment);
+        for (FsStorePaymentVO vo : list){
+            vo.setUserPhone(ParseUtils.parsePhone(vo.getUserPhone()));
+        }
+        ExcelUtil<FsStorePaymentVO> util = new ExcelUtil<FsStorePaymentVO>(FsStorePaymentVO.class);
+        return util.exportExcel(list, "storePayment");
+    }
+
+    /**
+     * 获取支付明细详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storePayment:query')")
+    @GetMapping(value = "/{paymentId}")
+    public AjaxResult getInfo(@PathVariable("paymentId") Long paymentId)
+    {
+        return AjaxResult.success(fsStorePaymentService.selectFsStorePaymentById(paymentId));
+    }
+
+
+    @ApiOperation("支付手动通知")
+    @PreAuthorize("@ss.hasPermi('store:storePayment:payNotify')")
+    @PostMapping("/returnPayStatus")
+    public R returnPayStatus(@RequestBody FsStorePaymentScrm fsStorePayment) throws Exception
+    {
+        FsStorePaymentScrm payment=  fsStorePaymentService.selectFsStorePaymentByTradeNo(fsStorePayment.getTradeNo());
+        String payMode = payment.getPayMode();
+        logger.info("手动查询"+payment);
+        if (payMode.equals("hf")){
+            V2TradePaymentScanpayQueryRequest request = new V2TradePaymentScanpayQueryRequest();
+            request.setOrgReqDate(new SimpleDateFormat("yyyyMMdd").format(payment.getCreateTime()));
+            request.setOrgHfSeqId(payment.getTradeNo());
+            HuiFuQueryOrderResult o = null;
+            try {
+                o = huiFuService.queryOrder(request);
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+            logger.info("汇付返回"+o);
+            if ("00000000".equals(o.getResp_code())) {
+                if (o.getTrans_stat().equals("S")) {
+                    String[] order=o.getOrg_req_seq_id().split("-");
+                    switch (order[0]) {
+                        case "store":
+                            orderService.payConfirm(1,null,order[1], o.getOrg_hf_seq_id(),o.getOut_trans_id(),o.getParty_order_id());
+                            break;
+                        case "store_remain":
+                            orderService.payRemainConfirm( order[1], o.getOrg_hf_seq_id(),o.getOut_trans_id(),o.getParty_order_id());
+                            break;
+                        case "payment":
+                            fsStorePaymentService.payConfirm(order[1],o.getOrg_hf_seq_id(),o.getOut_trans_id(),o.getParty_order_id());
+                            break;
+                    }
+                    return R.ok();
+                }
+            }
+        }
+        return R.error("请检查外部订单号");
+    }
+
+
+
+    /**
+     * 新增支付明细
+     */
+    @PreAuthorize("@ss.hasPermi('store:storePayment:add')")
+    @Log(title = "支付明细", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStorePaymentScrm fsStorePayment)
+    {
+        return toAjax(fsStorePaymentService.insertFsStorePayment(fsStorePayment));
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:storePayment:refund')")
+    @PostMapping("refundStorePayment")
+    @Transactional
+    public R refundStorePayment(@RequestBody FsStorePaymentScrm fsStorePayment)
+    {
+        FsStorePaymentScrm payment=fsStorePaymentService.selectFsStorePaymentById(fsStorePayment.getPaymentId());
+        if(payment.getStatus()!=1){
+            return R.error("非法操作");
+        }
+        if(fsStorePayment.getRefundMoney().compareTo(new BigDecimal(0))<1){
+            return R.error("退款金额必须大于0");
+        }
+        if(payment.getPayMoney().compareTo(fsStorePayment.getRefundMoney())==-1){
+            return R.error("退款金额必须小于等于付款金额");
+        }
+        if(payment.getPayTypeCode().equals("weixin")){
+
+            if (payment.getPayMode()!=null&&payment.getPayMode().equals("hf")){
+                V2TradePaymentScanpayRefundRequest request = new V2TradePaymentScanpayRefundRequest();
+                request.setOrdAmt(payment.getPayMoney().toString());
+                request.setOrgReqDate(new SimpleDateFormat("yyyyMMdd").format(payment.getCreateTime()));
+                request.setReqSeqId("refund-"+payment.getPayCode());
+                Map<String, Object> extendInfoMap = new HashMap<>();
+                extendInfoMap.put("org_party_order_id", payment.getBankSerialNo());
+                request.setExtendInfo(extendInfoMap);
+                HuiFuRefundResult refund = huiFuService.refund(request);
+                logger.info("退款:"+refund);
+                if((refund.getResp_code().equals("00000000")||refund.getResp_code().equals("00000100"))&&(refund.getTrans_stat().equals("S")||refund.getTrans_stat().equals("P"))){
+                    payment.setRefundMoney(fsStorePayment.getRefundMoney());
+                    payment.setStatus(-1);
+                    payment.setRefundTime(new Date());
+                    fsStorePaymentService.updateFsStorePayment(payment);
+                    //收款 减去所有
+                    if(payment.getCompanyId()!=null&&payment.getCompanyId()>0){
+                        companyService.subCompanyPaymentMoney(payment);
+                    }
+                    return R.ok();
+                }else {
+                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                    return R.error(refund.getResp_desc());
+                }
+
+            }else if (payment.getPayMode()!=null&&payment.getPayMode().equals("wx")){
+
+            }
+
+            //小雨点退款
+//            payment.setRefundMoney(fsStorePayment.getRefundMoney());
+//            fsStorePaymentService.updateFsStorePayment(payment);
+//
+//            RefundDTO refundDTO=new RefundDTO();
+//            refundDTO.setMerchOrderNo(Ids.oid());
+//            refundDTO.setAmount(fsStorePayment.getRefundMoney().toString());
+//            refundDTO.setOrigMerchOrderNo("payment-"+payment.getPayCode());
+//            return payService.refundOrder(refundDTO);
+        }
+        else if(payment.getPayTypeCode().equals("alipay")){
+            try {
+                AliPayApiConfig aliPayApiConfig;
+                try {
+                    aliPayApiConfig = AliPayApiConfigKit.getApiConfig(aliPayBean.getAppId());
+                } catch (Exception e) {
+                    aliPayApiConfig = AliPayApiConfig.builder()
+                            .setAppId(aliPayBean.getAppId())
+                            .setAliPayPublicKey(aliPayBean.getPublicKey())
+                            .setAppCertPath(aliPayBean.getAppCertPath())
+                            .setAliPayCertPath(aliPayBean.getAliPayCertPath())
+                            .setAliPayRootCertPath(aliPayBean.getAliPayRootCertPath())
+                            .setCharset("UTF-8")
+                            .setPrivateKey(aliPayBean.getPrivateKey())
+                            .setServiceUrl(aliPayBean.getServerUrl())
+                            .setSignType("RSA2")
+                            // 普通公钥方式
+                            .build();
+                    // 证书模式
+//					.buildByCert();
+                }
+                AliPayApiConfigKit.putApiConfig(aliPayApiConfig);
+                AlipayTradeRefundModel model = new AlipayTradeRefundModel();
+                model.setOutTradeNo("payment-"+payment.getPayCode());
+                model.setTradeNo(payment.getTradeNo());
+                model.setRefundAmount(fsStorePayment.getRefundMoney().toString());
+                model.setRefundReason("退款");
+                String result= AliPayApi.tradeRefundToResponse(model).getBody();
+                cn.hutool.json.JSONObject json= JSONUtil.parseObj(result);
+                cn.hutool.json.JSONObject jsonInfo= (cn.hutool.json.JSONObject) json.get("alipay_trade_refund_response");
+                String code=(String)jsonInfo.get("code");
+                String msg=(String)jsonInfo.get("sub_msg");
+                //{"alipay_trade_refund_response":{"code":"10000","msg":"Success","buyer_logon_id":"270***@qq.com","buyer_user_id":"2088402776950529","fund_change":"Y","gmt_refund_pay":"2022-04-27 18:27:28","out_trade_no":"goods-202204271826530001","refund_fee":"0.10","send_back_fee":"0.00","trade_no":"2022042722001450521456255417"},"sign":"hU+dy17/juMYQEQpO7Yy7jxkx9h5ebSbN3xdZr58msfOfJEUknqra6w4L37pgoZSx1Vj00jK3Ds06vrph6mSEliq3PQ37PwbZiRK3ZHaaKlz+9ndjoBTFYAxP60zLASfTq+W+dczDq4KOrvwhprFGt7YwKXGU42PgfOPb5EOgWyYUP6ivP0r06OzTo0f2lB28w6AQ4m4IQjdIL/tWbDaKl+ld8MPMLIgw5k9BmMcP8LV8ENC6+Gl1u5GwgAMjwHfk0RfB/kTFTHUTa7fgaO22w3pT8YKFMnOdKA0cVuJ2LE4SdxepqlprWJdCtLOeoQUX6PkEtoJGywPWAyjgdJ6Pg=="}
+                if(code.equals("10000")){
+                    payment.setRefundMoney(fsStorePayment.getRefundMoney());
+                    fsStorePaymentService.updateFsStorePayment(payment);
+                    fsStorePaymentService.refund(payment.getPayCode());
+                    return R.ok("退款成功");
+
+                }
+                else{
+                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                    return R.error("退款失败:"+msg);
+
+                }
+                //退款成功
+            } catch (AlipayApiException e) {
+                e.printStackTrace();
+            }
+        }
+        return R.error("非法操作");
+    }
+
+
+    /**
+     * 修改支付明细
+     */
+    @PreAuthorize("@ss.hasPermi('store:storePayment:edit')")
+    @Log(title = "支付明细", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStorePaymentScrm fsStorePayment)
+    {
+        return toAjax(fsStorePaymentService.updateFsStorePayment(fsStorePayment));
+    }
+
+    /**
+     * 删除支付明细
+     */
+    @PreAuthorize("@ss.hasPermi('store:storePayment:remove')")
+    @Log(title = "支付明细", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{paymentIds}")
+    public AjaxResult remove(@PathVariable Long[] paymentIds)
+    {
+        return toAjax(fsStorePaymentService.deleteFsStorePaymentByIds(paymentIds));
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductAttrScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreProductAttrScrm;
+import com.fs.hisStore.service.IFsStoreProductAttrScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商品属性Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeProductAttr")
+public class FsStoreProductAttrScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductAttrScrmService fsStoreProductAttrService;
+
+    /**
+     * 查询商品属性列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttr:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreProductAttrScrm fsStoreProductAttr)
+    {
+        startPage();
+        List<FsStoreProductAttrScrm> list = fsStoreProductAttrService.selectFsStoreProductAttrList(fsStoreProductAttr);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品属性列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttr:export')")
+    @Log(title = "商品属性", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductAttrScrm fsStoreProductAttr)
+    {
+        List<FsStoreProductAttrScrm> list = fsStoreProductAttrService.selectFsStoreProductAttrList(fsStoreProductAttr);
+        ExcelUtil<FsStoreProductAttrScrm> util = new ExcelUtil<FsStoreProductAttrScrm>(FsStoreProductAttrScrm.class);
+        return util.exportExcel(list, "storeProductAttr");
+    }
+
+    /**
+     * 获取商品属性详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttr:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreProductAttrService.selectFsStoreProductAttrById(id));
+    }
+
+    /**
+     * 新增商品属性
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttr:add')")
+    @Log(title = "商品属性", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreProductAttrScrm fsStoreProductAttr)
+    {
+        return toAjax(fsStoreProductAttrService.insertFsStoreProductAttr(fsStoreProductAttr));
+    }
+
+    /**
+     * 修改商品属性
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttr:edit')")
+    @Log(title = "商品属性", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreProductAttrScrm fsStoreProductAttr)
+    {
+        return toAjax(fsStoreProductAttrService.updateFsStoreProductAttr(fsStoreProductAttr));
+    }
+
+    /**
+     * 删除商品属性
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttr:remove')")
+    @Log(title = "商品属性", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreProductAttrService.deleteFsStoreProductAttrByIds(ids));
+    }
+}

+ 99 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductAttrValueScrmController.java

@@ -0,0 +1,99 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreProductAttrValueScrm;
+import com.fs.hisStore.service.IFsStoreProductAttrValueScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商品属性值Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeProductAttrValue")
+public class FsStoreProductAttrValueScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductAttrValueScrmService fsStoreProductAttrValueService;
+
+    /**
+     * 查询商品属性值列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttrValue:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreProductAttrValueScrm fsStoreProductAttrValue)
+    {
+        startPage();
+        List<FsStoreProductAttrValueScrm> list = fsStoreProductAttrValueService.selectFsStoreProductAttrValueList(fsStoreProductAttrValue);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品属性值列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttrValue:export')")
+    @Log(title = "商品属性值", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductAttrValueScrm fsStoreProductAttrValue)
+    {
+        List<FsStoreProductAttrValueScrm> list = fsStoreProductAttrValueService.selectFsStoreProductAttrValueList(fsStoreProductAttrValue);
+        ExcelUtil<FsStoreProductAttrValueScrm> util = new ExcelUtil<FsStoreProductAttrValueScrm>(FsStoreProductAttrValueScrm.class);
+        return util.exportExcel(list, "storeProductAttrValue");
+    }
+
+    /**
+     * 获取商品属性值详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttrValue:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreProductAttrValueService.selectFsStoreProductAttrValueById(id));
+    }
+
+    /**
+     * 新增商品属性值
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttrValue:add')")
+    @Log(title = "商品属性值", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreProductAttrValueScrm fsStoreProductAttrValue)
+    {
+        return toAjax(fsStoreProductAttrValueService.insertFsStoreProductAttrValue(fsStoreProductAttrValue));
+    }
+
+    /**
+     * 修改商品属性值
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttrValue:edit')")
+    @Log(title = "商品属性值", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreProductAttrValueScrm fsStoreProductAttrValue)
+    {
+        return toAjax(fsStoreProductAttrValueService.updateFsStoreProductAttrValue(fsStoreProductAttrValue));
+    }
+
+    /**
+     * 删除商品属性值
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductAttrValue:remove')")
+    @Log(title = "商品属性值", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreProductAttrValueService.deleteFsStoreProductAttrValueByIds(ids));
+    }
+
+
+}

+ 105 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductCategoryScrmController.java

@@ -0,0 +1,105 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreProductCategoryScrm;
+import com.fs.hisStore.service.IFsStoreProductCategoryScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商品分类Controller
+ *
+ * @author fs
+ * @date 2022-03-16
+ */
+@RestController
+@RequestMapping("/store/store/storeProductCategory")
+public class FsStoreProductCategoryScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductCategoryScrmService fsStoreProductCategoryService;
+
+    /**
+     * 查询商品分类列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductCategory:list')")
+    @GetMapping("/list")
+    public AjaxResult list(FsStoreProductCategoryScrm fsStoreProductCategory)
+    {
+        List<FsStoreProductCategoryScrm> list = fsStoreProductCategoryService.selectFsStoreProductCategoryList(fsStoreProductCategory);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 导出商品分类列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductCategory:export')")
+    @Log(title = "商品分类", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductCategoryScrm fsStoreProductCategory)
+    {
+        List<FsStoreProductCategoryScrm> list = fsStoreProductCategoryService.selectFsStoreProductCategoryList(fsStoreProductCategory);
+        ExcelUtil<FsStoreProductCategoryScrm> util = new ExcelUtil<FsStoreProductCategoryScrm>(FsStoreProductCategoryScrm.class);
+        return util.exportExcel(list, "storeProductCategory");
+    }
+
+    /**
+     * 获取商品分类详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductCategory:query')")
+    @GetMapping(value = "/{cateId}")
+    public AjaxResult getInfo(@PathVariable("cateId") Long cateId)
+    {
+        return AjaxResult.success(fsStoreProductCategoryService.selectFsStoreProductCategoryById(cateId));
+    }
+
+    /**
+     * 新增商品分类
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductCategory:add')")
+    @Log(title = "商品分类", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreProductCategoryScrm fsStoreProductCategory)
+    {
+        return toAjax(fsStoreProductCategoryService.insertFsStoreProductCategory(fsStoreProductCategory));
+    }
+
+    /**
+     * 修改商品分类
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductCategory:edit')")
+    @Log(title = "商品分类", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreProductCategoryScrm fsStoreProductCategory)
+    {
+        return toAjax(fsStoreProductCategoryService.updateFsStoreProductCategory(fsStoreProductCategory));
+    }
+
+    /**
+     * 删除商品分类
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductCategory:remove')")
+    @Log(title = "商品分类", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{cateIds}")
+    public AjaxResult remove(@PathVariable Long[] cateIds)
+    {
+        return toAjax(fsStoreProductCategoryService.deleteFsStoreProductCategoryByIds(cateIds));
+    }
+
+    @GetMapping("/getAllList")
+    public R getAllList(FsStoreProductCategoryScrm fsStoreProductCategory)
+    {
+        fsStoreProductCategory.setIsShow(1);
+        fsStoreProductCategory.setIsDel(0);
+        List<FsStoreProductCategoryScrm> list = fsStoreProductCategoryService.selectFsStoreProductCategoryList(fsStoreProductCategory);
+        return R.ok().put("data", list);
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductDetailsScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreProductDetailsScrm;
+import com.fs.hisStore.service.IFsStoreProductDetailsScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商品详情Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeProductDetails")
+public class FsStoreProductDetailsScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductDetailsScrmService fsStoreProductDetailsService;
+
+    /**
+     * 查询商品详情列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductDetails:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreProductDetailsScrm fsStoreProductDetails)
+    {
+        startPage();
+        List<FsStoreProductDetailsScrm> list = fsStoreProductDetailsService.selectFsStoreProductDetailsList(fsStoreProductDetails);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品详情列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductDetails:export')")
+    @Log(title = "商品详情", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductDetailsScrm fsStoreProductDetails)
+    {
+        List<FsStoreProductDetailsScrm> list = fsStoreProductDetailsService.selectFsStoreProductDetailsList(fsStoreProductDetails);
+        ExcelUtil<FsStoreProductDetailsScrm> util = new ExcelUtil<FsStoreProductDetailsScrm>(FsStoreProductDetailsScrm.class);
+        return util.exportExcel(list, "storeProductDetails");
+    }
+
+    /**
+     * 获取商品详情详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductDetails:query')")
+    @GetMapping(value = "/{detailsId}")
+    public AjaxResult getInfo(@PathVariable("detailsId") Long detailsId)
+    {
+        return AjaxResult.success(fsStoreProductDetailsService.selectFsStoreProductDetailsById(detailsId));
+    }
+
+    /**
+     * 新增商品详情
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductDetails:add')")
+    @Log(title = "商品详情", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreProductDetailsScrm fsStoreProductDetails)
+    {
+        return toAjax(fsStoreProductDetailsService.insertFsStoreProductDetails(fsStoreProductDetails));
+    }
+
+    /**
+     * 修改商品详情
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductDetails:edit')")
+    @Log(title = "商品详情", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreProductDetailsScrm fsStoreProductDetails)
+    {
+        return toAjax(fsStoreProductDetailsService.updateFsStoreProductDetails(fsStoreProductDetails));
+    }
+
+    /**
+     * 删除商品详情
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductDetails:remove')")
+    @Log(title = "商品详情", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{detailsIds}")
+    public AjaxResult remove(@PathVariable Long[] detailsIds)
+    {
+        return toAjax(fsStoreProductDetailsService.deleteFsStoreProductDetailsByIds(detailsIds));
+    }
+}

+ 133 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductGroupScrmController.java

@@ -0,0 +1,133 @@
+package com.fs.hisStore;
+
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreProductScrm;
+import com.fs.hisStore.domain.FsStoreProductAttrValueScrm;
+import com.fs.hisStore.domain.FsStoreProductGroupScrm;
+import com.fs.hisStore.dto.StoreProductGroupDTO;
+import com.fs.hisStore.service.IFsStoreProductAttrValueScrmService;
+import com.fs.hisStore.service.IFsStoreProductGroupScrmService;
+import com.fs.hisStore.service.IFsStoreProductScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商品组合Controller
+ *
+ * @author fs
+ * @date 2022-11-23
+ */
+@RestController
+@RequestMapping("/store/store/storeProductGroup")
+public class FsStoreProductGroupScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductGroupScrmService fsStoreProductGroupService;
+    @Autowired
+    private IFsStoreProductAttrValueScrmService attrValueService;
+    @Autowired
+    private IFsStoreProductScrmService storeProductService;
+    /**
+     * 查询商品组合列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductGroup:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreProductGroupScrm fsStoreProductGroup)
+    {
+        startPage();
+        List<FsStoreProductGroupScrm> list = fsStoreProductGroupService.selectFsStoreProductGroupList(fsStoreProductGroup);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品组合列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductGroup:export')")
+    @Log(title = "商品组合", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductGroupScrm fsStoreProductGroup)
+    {
+        List<FsStoreProductGroupScrm> list = fsStoreProductGroupService.selectFsStoreProductGroupList(fsStoreProductGroup);
+        ExcelUtil<FsStoreProductGroupScrm> util = new ExcelUtil<FsStoreProductGroupScrm>(FsStoreProductGroupScrm.class);
+        return util.exportExcel(list, "storeProductGroup");
+    }
+
+    /**
+     * 获取商品组合详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductGroup:query')")
+    @GetMapping(value = "/{groupId}")
+    public AjaxResult getInfo(@PathVariable("groupId") Long groupId)
+    {
+        FsStoreProductGroupScrm storeProductGroup=fsStoreProductGroupService.selectFsStoreProductGroupById(groupId);
+        JSONArray jsonArray=JSONUtil.parseArray(storeProductGroup.getProducts());
+        List<StoreProductGroupDTO> productGroupDTOS=JSONUtil.toList(jsonArray, StoreProductGroupDTO.class);
+        for(StoreProductGroupDTO dto:productGroupDTOS){
+            FsStoreProductAttrValueScrm attrValue=attrValueService.selectFsStoreProductAttrValueById(dto.getId());
+            if(attrValue!=null){
+                FsStoreProductScrm product=storeProductService.selectFsStoreProductById(attrValue.getProductId());
+                if(product!=null){
+                    dto.setProductId(attrValue.getProductId());
+                    dto.setId(dto.getId());
+                    dto.setBarCode(attrValue.getBarCode());
+                    dto.setPrice(attrValue.getPrice());
+                    dto.setCount(dto.getCount());
+                    dto.setSku(attrValue.getSku());
+                    dto.setImage(attrValue.getImage());
+                    dto.setProductName(product.getProductName());
+                }
+
+            }
+
+        }
+        storeProductGroup.setProductList(productGroupDTOS);
+        return AjaxResult.success(storeProductGroup);
+    }
+
+    /**
+     * 新增商品组合
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductGroup:add')")
+    @Log(title = "商品组合", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreProductGroupScrm fsStoreProductGroup)
+    {
+        String products=JSONUtil.toJsonStr(fsStoreProductGroup.getProductList());
+        fsStoreProductGroup.setProducts(products);
+        return toAjax(fsStoreProductGroupService.insertFsStoreProductGroup(fsStoreProductGroup));
+    }
+
+    /**
+     * 修改商品组合
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductGroup:edit')")
+    @Log(title = "商品组合", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreProductGroupScrm fsStoreProductGroup)
+    {
+        String products=JSONUtil.toJsonStr(fsStoreProductGroup.getProductList());
+        fsStoreProductGroup.setProducts(products);
+        return toAjax(fsStoreProductGroupService.updateFsStoreProductGroup(fsStoreProductGroup));
+    }
+
+    /**
+     * 删除商品组合
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductGroup:remove')")
+    @Log(title = "商品组合", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{groupIds}")
+    public AjaxResult remove(@PathVariable Long[] groupIds)
+    {
+        return toAjax(fsStoreProductGroupService.deleteFsStoreProductGroupByIds(groupIds));
+    }
+}

+ 200 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductPackageScrmController.java

@@ -0,0 +1,200 @@
+package com.fs.hisStore;
+
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreProductScrm;
+import com.fs.hisStore.domain.FsStoreProductAttrValueScrm;
+import com.fs.hisStore.domain.FsStoreProductPackageScrm;
+import com.fs.hisStore.dto.StoreOrderProductDTO;
+import com.fs.hisStore.dto.StorePackageProductDTO;
+import com.fs.hisStore.param.FsStoreProductPackageModifyParam;
+import com.fs.hisStore.service.IFsStoreProductAttrValueScrmService;
+import com.fs.hisStore.service.IFsStoreProductPackageScrmService;
+import com.fs.hisStore.service.IFsStoreProductScrmService;
+import com.fs.hisStore.vo.FsStoreProductPacketExportVO;
+import com.fs.hisStore.vo.FsStoreProductPacketVO;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 商品组合套餐Controller
+ *
+ * @author fs
+ * @date 2022-07-14
+ */
+@RestController
+@RequestMapping("/store/store/storeProductPackage")
+public class FsStoreProductPackageScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductPackageScrmService fsStoreProductPackageService;
+    @Autowired
+    private IFsStoreProductAttrValueScrmService attrValueService;
+    @Autowired
+    private IFsStoreProductScrmService storeProductService;
+    /**
+     * 查询商品组合套餐列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductPackage:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreProductPackageScrm fsStoreProductPackage)
+    {
+        startPage();
+        List<FsStoreProductPacketVO> list = fsStoreProductPackageService.selectFsStoreProductPackageListVO(fsStoreProductPackage);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品组合套餐列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductPackage:export')")
+    @Log(title = "商品组合套餐", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductPackageScrm fsStoreProductPackage)
+    {
+        List<FsStoreProductPacketVO> list = fsStoreProductPackageService.selectFsStoreProductPackageListVO(fsStoreProductPackage);
+        List<FsStoreProductPacketExportVO> sorList=new ArrayList<>();
+
+        for(FsStoreProductPacketVO productPackage:list){
+            //List<StoreOrderProductDTO> productList=new ArrayList<>();
+            JSONArray jsonArray=JSONUtil.parseArray(productPackage.getProducts());
+            List<StorePackageProductDTO> goodsList=JSONUtil.toList(jsonArray, StorePackageProductDTO.class);
+            for(StorePackageProductDTO dto:goodsList){
+                //StoreOrderProductDTO productDTO=new StoreOrderProductDTO();
+                FsStoreProductAttrValueScrm attrValue=attrValueService.selectFsStoreProductAttrValueById(dto.getId());
+                if(attrValue!=null){
+                    FsStoreProductScrm product=storeProductService.selectFsStoreProductById(attrValue.getProductId());
+                    if(product!=null){
+                        FsStoreProductPacketExportVO packetExportVO= new FsStoreProductPacketExportVO();
+                        BeanUtils.copyProperties(productPackage,packetExportVO);
+                        packetExportVO.setProductId(attrValue.getProductId());
+                        packetExportVO.setId(dto.getId());
+                        packetExportVO.setBarCode(attrValue.getBarCode());
+                        packetExportVO.setPrice(attrValue.getPrice());
+                        packetExportVO.setCount(dto.getCount());
+                        packetExportVO.setSku(attrValue.getSku());
+                        packetExportVO.setImage(attrValue.getImage());
+                        packetExportVO.setProductName(product.getProductName());
+                        sorList.add(packetExportVO);
+                        //productList.add(productDTO);
+
+                    }
+                }
+            }
+
+        }
+        ExcelUtil<FsStoreProductPacketExportVO> util = new ExcelUtil<FsStoreProductPacketExportVO>(FsStoreProductPacketExportVO.class);
+        return util.exportExcel(sorList, "storeProductPackage");
+    }
+
+    /**
+     * 获取商品组合套餐详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductPackage:query')")
+    @GetMapping(value = "/{packageId}")
+    public AjaxResult getInfo(@PathVariable("packageId") Long packageId)
+    {
+        FsStoreProductPackageScrm productPackage=fsStoreProductPackageService.selectFsStoreProductPackageById(packageId);
+        List<StoreOrderProductDTO> productList=new ArrayList<>();
+        JSONArray jsonArray=JSONUtil.parseArray(productPackage.getProducts());
+        List<StorePackageProductDTO> goodsList=JSONUtil.toList(jsonArray, StorePackageProductDTO.class);
+        for(StorePackageProductDTO dto:goodsList){
+            StoreOrderProductDTO productDTO=new StoreOrderProductDTO();
+            FsStoreProductAttrValueScrm attrValue=attrValueService.selectFsStoreProductAttrValueById(dto.getId());
+            if(attrValue!=null){
+                FsStoreProductScrm product=storeProductService.selectFsStoreProductById(attrValue.getProductId());
+                if(product!=null){
+                    productDTO.setProductId(attrValue.getProductId());
+                    productDTO.setId(dto.getId());
+                    productDTO.setBarCode(attrValue.getBarCode());
+                    productDTO.setPrice(attrValue.getPrice());
+                    productDTO.setCount(dto.getCount());
+                    productDTO.setSku(attrValue.getSku());
+                    productDTO.setImage(attrValue.getImage());
+                    productDTO.setProductName(product.getProductName());
+                    productList.add(productDTO);
+                }
+            }
+        }
+        productPackage.setProductList(productList);
+        return AjaxResult.success(productPackage);
+    }
+
+    /**
+     * 批量修改商品组合套餐
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductPackage:edit')")
+    @Log(title = "商品组合套餐", businessType = BusinessType.UPDATE)
+    @PostMapping("/modifyMore")
+    public AjaxResult modifyMore(@RequestBody FsStoreProductPackageModifyParam param) {
+        return toAjax(fsStoreProductPackageService.updateFsStoreProductPackages(param.getPackageIds(),param.getStatus(),param.getCompanyId()));
+    }
+
+    /**
+     * 新增商品组合套餐
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductPackage:add')")
+    @Log(title = "商品组合套餐", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreProductPackageScrm fsStoreProductPackage)
+    {
+        JSONArray jsonArray=JSONUtil.parseArray(fsStoreProductPackage.getProductList());
+        List<StorePackageProductDTO> goodsList=JSONUtil.toList(jsonArray, StorePackageProductDTO.class);
+        fsStoreProductPackage.setProducts(JSONUtil.toJsonStr(goodsList));
+        fsStoreProductPackage.setCompanyId(0l);
+        return toAjax(fsStoreProductPackageService.insertFsStoreProductPackage(fsStoreProductPackage));
+    }
+
+    /**
+     * 修改商品组合套餐
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductPackage:edit')")
+    @Log(title = "商品组合套餐", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreProductPackageScrm fsStoreProductPackage)
+    {
+        JSONArray jsonArray=JSONUtil.parseArray(fsStoreProductPackage.getProductList());
+        List<StorePackageProductDTO> goodsList=JSONUtil.toList(jsonArray, StorePackageProductDTO.class);
+        fsStoreProductPackage.setProducts(JSONUtil.toJsonStr(goodsList));
+        return toAjax(fsStoreProductPackageService.updateFsStoreProductPackage(fsStoreProductPackage));
+    }
+
+    /**
+     * 删除商品组合套餐
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductPackage:remove')")
+    @Log(title = "商品组合套餐", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{packageIds}")
+    public AjaxResult remove(@PathVariable Long[] packageIds)
+    {
+        return toAjax(fsStoreProductPackageService.deleteFsStoreProductPackageByIds(packageIds));
+    }
+
+
+    @GetMapping("/listBySearch")
+    public R listBySearCh(FsStoreProductPackageScrm productPackage)
+    {
+        List<FsStoreProductScrm> products = new ArrayList<>();
+        List<FsStoreProductPackageScrm> list = fsStoreProductPackageService.selectFsStoreProductPackageList(productPackage);
+
+        for (FsStoreProductPackageScrm fsStoreProductPackage : list){
+            FsStoreProductScrm product = new FsStoreProductScrm();
+            product.setProductId(fsStoreProductPackage.getPackageId());
+            product.setProductName(fsStoreProductPackage.getTitle());
+            products.add(product);
+        }
+        return R.ok().put("data",products);
+    }
+}

+ 58 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductRelationScrmController.java

@@ -0,0 +1,58 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ParseUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.param.FsStoreProductRelationParam;
+import com.fs.hisStore.service.IFsStoreProductRelationScrmService;
+import com.fs.hisStore.vo.FsStoreProductRelationQueryVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+@RestController
+@RequestMapping("/store/store/storeProductRelation")
+public class FsStoreProductRelationScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductRelationScrmService fsStoreProductRelationService;
+
+    @PreAuthorize("@ss.hasPermi('store:storeProductRelation:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreProductRelationParam param)
+    {
+        startPage();
+        List<FsStoreProductRelationQueryVO> list = fsStoreProductRelationService.selectFsStoreProductRelationListVO(param);
+        for (FsStoreProductRelationQueryVO vo : list){
+            vo.setPhone(ParseUtils.parsePhone(vo.getPhone()));
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品点赞和收藏列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductRelation:export')")
+    @Log(title = "商品浏览记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductRelationParam param)
+    {
+        List<FsStoreProductRelationQueryVO> list = fsStoreProductRelationService.selectFsStoreProductRelationListVO(param);
+        for (FsStoreProductRelationQueryVO vo : list){
+            vo.setPhone(ParseUtils.parsePhone(vo.getPhone()));
+        }
+        ExcelUtil<FsStoreProductRelationQueryVO> util = new ExcelUtil<FsStoreProductRelationQueryVO>(FsStoreProductRelationQueryVO.class);
+        return util.exportExcel(list, "商品浏览记录");
+    }
+
+
+}

+ 110 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductReplyScrmController.java

@@ -0,0 +1,110 @@
+package com.fs.hisStore;
+
+import cn.hutool.core.date.DateTime;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreProductReplyScrm;
+import com.fs.hisStore.service.IFsStoreProductReplyScrmService;
+import com.fs.hisStore.vo.FsStoreProductReplyVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 评论Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeProductReply")
+public class FsStoreProductReplyScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductReplyScrmService fsStoreProductReplyService;
+
+    /**
+     * 查询评论列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductReply:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreProductReplyScrm fsStoreProductReply)
+    {
+        startPage();
+        fsStoreProductReply.setIsDel(0);
+        List<FsStoreProductReplyVO> list = fsStoreProductReplyService.selectFsStoreProductReplyListVO(fsStoreProductReply);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出评论列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductReply:export')")
+    @Log(title = "评论", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductReplyScrm fsStoreProductReply)
+    {
+        List<FsStoreProductReplyScrm> list = fsStoreProductReplyService.selectFsStoreProductReplyList(fsStoreProductReply);
+        ExcelUtil<FsStoreProductReplyScrm> util = new ExcelUtil<FsStoreProductReplyScrm>(FsStoreProductReplyScrm.class);
+        return util.exportExcel(list, "storeProductReply");
+    }
+
+    /**
+     * 获取评论详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductReply:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreProductReplyService.selectFsStoreProductReplyById(id));
+    }
+
+    /**
+     * 新增评论
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductReply:add')")
+    @Log(title = "评论", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreProductReplyScrm fsStoreProductReply)
+    {
+        return toAjax(fsStoreProductReplyService.insertFsStoreProductReply(fsStoreProductReply));
+    }
+
+    /**
+     * 修改评论
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductReply:edit')")
+    @Log(title = "评论", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreProductReplyScrm fsStoreProductReply)
+    {
+        return toAjax(fsStoreProductReplyService.updateFsStoreProductReply(fsStoreProductReply));
+    }
+
+    /**
+     * 删除评论
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductReply:remove')")
+    @Log(title = "评论", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreProductReplyService.deleteFsStoreProductReplyByIds(ids));
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:storeProductReply:reply')")
+    @Log(title = "评论回复", businessType = BusinessType.INSERT)
+    @PostMapping("/reply")
+    public AjaxResult reply(@RequestBody FsStoreProductReplyScrm fsStoreProductReply)
+    {
+        fsStoreProductReply.setIsReply(1);
+        fsStoreProductReply.setReplyTime(new DateTime());
+        return toAjax(fsStoreProductReplyService.updateFsStoreProductReply(fsStoreProductReply));
+    }
+}

+ 119 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductRuleScrmController.java

@@ -0,0 +1,119 @@
+package com.fs.hisStore;
+
+import cn.hutool.json.JSONUtil;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreProductRuleScrm;
+import com.fs.hisStore.param.FsStoreProductRuleParam;
+import com.fs.hisStore.service.IFsStoreProductRuleScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商品规则值(规格)Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeProductRule")
+public class FsStoreProductRuleScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductRuleScrmService fsStoreProductRuleService;
+
+    /**
+     * 查询商品规则值(规格)列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductRule:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreProductRuleScrm fsStoreProductRule)
+    {
+        startPage();
+        fsStoreProductRule.setIsDel(0);
+        List<FsStoreProductRuleScrm> list = fsStoreProductRuleService.selectFsStoreProductRuleList(fsStoreProductRule);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品规则值(规格)列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductRule:export')")
+    @Log(title = "商品规则值(规格)", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductRuleScrm fsStoreProductRule)
+    {
+        List<FsStoreProductRuleScrm> list = fsStoreProductRuleService.selectFsStoreProductRuleList(fsStoreProductRule);
+        ExcelUtil<FsStoreProductRuleScrm> util = new ExcelUtil<FsStoreProductRuleScrm>(FsStoreProductRuleScrm.class);
+        return util.exportExcel(list, "storeProductRule");
+    }
+
+    /**
+     * 获取商品规则值(规格)详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductRule:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Integer id)
+    {
+        return AjaxResult.success(fsStoreProductRuleService.selectFsStoreProductRuleById(id));
+    }
+
+    /**
+     * 新增商品规则值(规格)
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductRule:add')")
+    @Log(title = "商品规则值(规格)", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreProductRuleParam fsStoreProductRule)
+    {
+        FsStoreProductRuleScrm rule=new FsStoreProductRuleScrm();
+        rule.setRuleName(fsStoreProductRule.getRuleName());
+        rule.setRuleValue(JSONUtil.toJsonStr(fsStoreProductRule.getRuleValue()));
+        rule.setIsDel(0);
+        return toAjax(fsStoreProductRuleService.insertFsStoreProductRule(rule));
+    }
+
+    /**
+     * 修改商品规则值(规格)
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductRule:edit')")
+    @Log(title = "商品规则值(规格)", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreProductRuleParam fsStoreProductRule)
+    {FsStoreProductRuleScrm rule=new FsStoreProductRuleScrm();
+        rule
+        .setId(fsStoreProductRule.getId());
+        rule.setRuleName(fsStoreProductRule.getRuleName());
+        rule.setRuleValue(JSONUtil.toJsonStr(fsStoreProductRule.getRuleValue()));
+        rule.setIsDel(0);
+        return toAjax(fsStoreProductRuleService.updateFsStoreProductRule(rule));
+    }
+
+    /**
+     * 删除商品规则值(规格)
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductRule:remove')")
+    @Log(title = "商品规则值(规格)", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Integer[] ids)
+    {
+        return toAjax(fsStoreProductRuleService.deleteFsStoreProductRuleByIds(ids));
+    }
+
+
+    @GetMapping("/getAllList")
+    public R getAllList(FsStoreProductRuleScrm fsStoreProductRule)
+    {
+        fsStoreProductRule.setIsDel(0);
+        List<FsStoreProductRuleScrm> list = fsStoreProductRuleService.selectFsStoreProductRuleList(fsStoreProductRule);
+        return R.ok().put("data",list);
+    }
+}

+ 189 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductScrmController.java

@@ -0,0 +1,189 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.vo.FsStoreProductAttrValueVO;
+import com.fs.hisStore.vo.FsStoreProductExportVO;
+import com.fs.hisStore.vo.FsStoreProductListVO;
+import com.fs.hisStore.vo.FsStoreTuiProductAttrValueVO;
+import com.fs.statis.dto.ModifyMoreDTO;
+import com.fs.hisStore.domain.FsStoreProductScrm;
+import com.fs.hisStore.domain.FsStoreProductAttrScrm;
+import com.fs.hisStore.param.FsProductAttrValueParam;
+import com.fs.hisStore.param.FsStoreProductAddEditParam;
+import com.fs.hisStore.param.FsStoreTuiProductAttrValueParam;
+import com.fs.hisStore.service.IFsStoreProductAttrScrmService;
+import com.fs.hisStore.service.IFsStoreProductAttrValueScrmService;
+import com.fs.hisStore.service.IFsStoreProductScrmService;
+import com.mysql.cj.util.StringUtils;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 商品Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeProduct")
+public class FsStoreProductScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductScrmService fsStoreProductService;
+
+    @Autowired
+    private IFsStoreProductAttrScrmService attrService;
+
+    @Autowired
+    private IFsStoreProductAttrValueScrmService attrValueService;
+
+
+    /**
+     * 批量修改商品
+     * @param modifyMoreDTO
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:list')")
+    @PostMapping("/batchModify")
+    public R batchModify(@RequestBody ModifyMoreDTO modifyMoreDTO){
+        fsStoreProductService.batchModify(modifyMoreDTO);
+        return R.ok();
+    }
+
+    /**
+     * 查询商品列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreProductScrm fsStoreProduct)
+    {
+        startPage();
+        List<FsStoreProductListVO> list;
+        if(StringUtils.isNullOrEmpty(fsStoreProduct.getBarCode())){
+            list = fsStoreProductService.selectFsStoreProductListVO(fsStoreProduct);
+        }else{
+            list = fsStoreProductService.selectFsStoreProductBarCodeListVO(fsStoreProduct);
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:export')")
+    @Log(title = "商品", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductScrm fsStoreProduct)
+    {
+        List<FsStoreProductExportVO> list = fsStoreProductService.selectFsStoreProductExportList(fsStoreProduct);
+        ExcelUtil<FsStoreProductExportVO> util = new ExcelUtil<FsStoreProductExportVO>(FsStoreProductExportVO.class);
+        return util.exportExcel(list, "storeProduct");
+    }
+
+
+    @Log(title = "商品导入", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:import')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
+    {
+        ExcelUtil<FsStoreProductExportVO> util = new ExcelUtil<>(FsStoreProductExportVO.class);
+        List<FsStoreProductExportVO> list = util.importExcel(file.getInputStream());
+        String message = fsStoreProductService.importStoreProduct(list, updateSupport);
+        return AjaxResult.success(message);
+    }
+
+
+    @GetMapping("/importTemplate")
+    public AjaxResult importTemplate()
+    {
+        ExcelUtil<FsStoreProductExportVO> util = new ExcelUtil<>(FsStoreProductExportVO.class);
+        return util.importTemplateExcel("商品数据");
+    }
+
+    /**
+     * 获取商品详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:query')")
+    @GetMapping(value = "/{productId}")
+    public R getInfo(@PathVariable("productId") Long productId)
+    {
+        FsStoreProductScrm product=fsStoreProductService.selectFsStoreProductById(productId);
+        List<FsStoreProductAttrScrm> attrs=attrService.selectFsStoreProductAttrByProductId(productId);
+        return R.ok().put("data",product).put("attrs", attrs);
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:add')")
+    @Log(title = "商品", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/addOrEdit")
+    public R addOrEdit(@RequestBody FsStoreProductAddEditParam fsStoreProduct)
+    {
+        if (fsStoreProduct.getIsShow() ==1){
+            logger.info("商品上架:{}",fsStoreProduct.getProductName()+new Date());
+        }
+
+        if (fsStoreProduct.getIsDisplay() ==1){
+            logger.info("商品前端展示:{}",fsStoreProduct.getProductName()+new Date());
+        }
+        return fsStoreProductService.addOrEdit(fsStoreProduct);
+    }
+
+
+
+
+    /**
+     * 删除商品
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProduct:remove')")
+    @Log(title = "商品", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{productIds}")
+    public AjaxResult remove(@PathVariable Long[] productIds)
+    {
+        return toAjax(fsStoreProductService.deleteFsStoreProductByIds(productIds));
+    }
+
+    @ApiOperation(value = "生成属性")
+    @PostMapping(value = "/genFormatAttr/{productId}")
+    public ResponseEntity genFormatAttr(@PathVariable Long productId, @RequestBody String jsonStr){
+        return new ResponseEntity<>(fsStoreProductService.getFormatAttr(productId,jsonStr), HttpStatus.OK);
+    }
+
+
+    @GetMapping("/getStoreProductAttrValueList")
+    public TableDataInfo getStoreProductAttrValueList(FsProductAttrValueParam param)
+    {
+        startPage();
+        List<FsStoreProductAttrValueVO> list=attrValueService.selectFsStoreProductAttrValueListVO(param);
+        return getDataTable(list);
+    }
+
+    @ApiOperation("获取推广商品列表")
+    @GetMapping("/getStoreTuiProductAttrValueList")
+    public TableDataInfo getStoreTuiProductAttrValueList(FsStoreTuiProductAttrValueParam param, HttpServletRequest request){
+        startPage();
+        List<FsStoreTuiProductAttrValueVO> list=attrValueService.selectStoreTuiProductAttrValueVOList(param);
+        return getDataTable(list);
+    }
+
+    @GetMapping("/listBySearch")
+    public R listBySearCh(FsStoreProductScrm product)
+    {
+        List<FsStoreProductScrm> list = fsStoreProductService.selectFsStoreProductList(product);
+        return R.ok().put("data",list);
+    }
+
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductTemplateScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreProductTemplateScrm;
+import com.fs.hisStore.service.IFsStoreProductTemplateScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商品模板Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeProductTemplate")
+public class FsStoreProductTemplateScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreProductTemplateScrmService fsStoreProductTemplateService;
+
+    /**
+     * 查询商品模板列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductTemplate:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreProductTemplateScrm fsStoreProductTemplate)
+    {
+        startPage();
+        List<FsStoreProductTemplateScrm> list = fsStoreProductTemplateService.selectFsStoreProductTemplateList(fsStoreProductTemplate);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商品模板列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductTemplate:export')")
+    @Log(title = "商品模板", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreProductTemplateScrm fsStoreProductTemplate)
+    {
+        List<FsStoreProductTemplateScrm> list = fsStoreProductTemplateService.selectFsStoreProductTemplateList(fsStoreProductTemplate);
+        ExcelUtil<FsStoreProductTemplateScrm> util = new ExcelUtil<FsStoreProductTemplateScrm>(FsStoreProductTemplateScrm.class);
+        return util.exportExcel(list, "storeProductTemplate");
+    }
+
+    /**
+     * 获取商品模板详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductTemplate:query')")
+    @GetMapping(value = "/{tempId}")
+    public AjaxResult getInfo(@PathVariable("tempId") Long tempId)
+    {
+        return AjaxResult.success(fsStoreProductTemplateService.selectFsStoreProductTemplateById(tempId));
+    }
+
+    /**
+     * 新增商品模板
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductTemplate:add')")
+    @Log(title = "商品模板", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreProductTemplateScrm fsStoreProductTemplate)
+    {
+        return toAjax(fsStoreProductTemplateService.insertFsStoreProductTemplate(fsStoreProductTemplate));
+    }
+
+    /**
+     * 修改商品模板
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductTemplate:edit')")
+    @Log(title = "商品模板", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreProductTemplateScrm fsStoreProductTemplate)
+    {
+        return toAjax(fsStoreProductTemplateService.updateFsStoreProductTemplate(fsStoreProductTemplate));
+    }
+
+    /**
+     * 删除商品模板
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeProductTemplate:remove')")
+    @Log(title = "商品模板", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{tempIds}")
+    public AjaxResult remove(@PathVariable Long[] tempIds)
+    {
+        return toAjax(fsStoreProductTemplateService.deleteFsStoreProductTemplateByIds(tempIds));
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreShopScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreShopScrm;
+import com.fs.hisStore.service.IFsStoreShopScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 门店自提Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeShop")
+public class FsStoreShopScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreShopScrmService fsStoreShopService;
+
+    /**
+     * 查询门店自提列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShop:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreShopScrm fsStoreShop)
+    {
+        startPage();
+        List<FsStoreShopScrm> list = fsStoreShopService.selectFsStoreShopList(fsStoreShop);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出门店自提列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShop:export')")
+    @Log(title = "门店自提", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreShopScrm fsStoreShop)
+    {
+        List<FsStoreShopScrm> list = fsStoreShopService.selectFsStoreShopList(fsStoreShop);
+        ExcelUtil<FsStoreShopScrm> util = new ExcelUtil<FsStoreShopScrm>(FsStoreShopScrm.class);
+        return util.exportExcel(list, "storeShop");
+    }
+
+    /**
+     * 获取门店自提详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShop:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreShopService.selectFsStoreShopById(id));
+    }
+
+    /**
+     * 新增门店自提
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShop:add')")
+    @Log(title = "门店自提", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreShopScrm fsStoreShop)
+    {
+        return toAjax(fsStoreShopService.insertFsStoreShop(fsStoreShop));
+    }
+
+    /**
+     * 修改门店自提
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShop:edit')")
+    @Log(title = "门店自提", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreShopScrm fsStoreShop)
+    {
+        return toAjax(fsStoreShopService.updateFsStoreShop(fsStoreShop));
+    }
+
+    /**
+     * 删除门店自提
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShop:remove')")
+    @Log(title = "门店自提", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreShopService.deleteFsStoreShopByIds(ids));
+    }
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreShopStaffScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreShopStaffScrm;
+import com.fs.hisStore.service.IFsStoreShopStaffScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 门店店员Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeShopStaff")
+public class FsStoreShopStaffScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreShopStaffScrmService fsStoreShopStaffService;
+
+    /**
+     * 查询门店店员列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShopStaff:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreShopStaffScrm fsStoreShopStaff)
+    {
+        startPage();
+        List<FsStoreShopStaffScrm> list = fsStoreShopStaffService.selectFsStoreShopStaffList(fsStoreShopStaff);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出门店店员列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShopStaff:export')")
+    @Log(title = "门店店员", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreShopStaffScrm fsStoreShopStaff)
+    {
+        List<FsStoreShopStaffScrm> list = fsStoreShopStaffService.selectFsStoreShopStaffList(fsStoreShopStaff);
+        ExcelUtil<FsStoreShopStaffScrm> util = new ExcelUtil<FsStoreShopStaffScrm>(FsStoreShopStaffScrm.class);
+        return util.exportExcel(list, "storeShopStaff");
+    }
+
+    /**
+     * 获取门店店员详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShopStaff:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreShopStaffService.selectFsStoreShopStaffById(id));
+    }
+
+    /**
+     * 新增门店店员
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShopStaff:add')")
+    @Log(title = "门店店员", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreShopStaffScrm fsStoreShopStaff)
+    {
+        return toAjax(fsStoreShopStaffService.insertFsStoreShopStaff(fsStoreShopStaff));
+    }
+
+    /**
+     * 修改门店店员
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShopStaff:edit')")
+    @Log(title = "门店店员", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreShopStaffScrm fsStoreShopStaff)
+    {
+        return toAjax(fsStoreShopStaffService.updateFsStoreShopStaff(fsStoreShopStaff));
+    }
+
+    /**
+     * 删除门店店员
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeShopStaff:remove')")
+    @Log(title = "门店店员", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreShopStaffService.deleteFsStoreShopStaffByIds(ids));
+    }
+}

+ 174 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreStatisticsScrmController.java

@@ -0,0 +1,174 @@
+package com.fs.hisStore;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.R;
+import com.fs.common.utils.StringUtils;
+import com.fs.common.utils.TimeUtils;
+import com.fs.company.domain.CompanyUser;
+import com.fs.company.service.ICompanyUserService;
+import com.fs.framework.web.service.TokenService;
+import com.fs.hisStore.param.FsStoreStatisticsParam;
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
+import com.fs.hisStore.service.IFsStorePaymentScrmService;
+import com.fs.hisStore.vo.FsStoreOrderCountsVO;
+import com.fs.hisStore.vo.FsStoreProductCountsVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 统计
+ *
+ * @author fs
+ * @date 2021-03-22
+ */
+@RestController
+@RequestMapping("/store/store/statistics")
+public class FsStoreStatisticsScrmController extends BaseController
+{
+
+
+    @Autowired
+    private ICompanyUserService userService;
+    @Autowired
+    private IFsStoreOrderScrmService storeOrderService;
+    @Autowired
+    private IFsStorePaymentScrmService paymentService;
+    @Autowired
+    private TokenService tokenService;
+    @PreAuthorize("@ss.hasPermi('store:statistics:storeOrder')")
+    @GetMapping("/storeOrder")
+    public R storeOrder(FsStoreStatisticsParam param)
+    {
+        if(StringUtils.isNotEmpty(param.getUserIds())){
+            String[] userIds=param.getUserIds().split(",");
+            Long[] ids=new Long[userIds.length];
+            for(int i=0;i<ids.length; i++){
+                ids[i]=Long.parseLong(userIds[i]);
+            }
+            param.setUsers(ids);
+        }
+        else{
+            //获取部门下的所有用户
+            CompanyUser usermap=new CompanyUser();
+            usermap.setDeptId(param.getDeptId());
+            List<CompanyUser> users = userService.getUserListByDeptId(usermap);
+            List<Long> userIds = users.stream().map(element -> element.getUserId()).collect(Collectors.toList());
+            param.setUsers(userIds.toArray(new Long[userIds.size()]));
+        }
+        if(param.getUsers()!=null&&param.getUsers().length>0){
+            TimeUtils.TimeEntity timeEntity=TimeUtils.parseTime(param.getType()==null?null:param.getType().toString(),param.getStartTime(),param.getEndTime());
+            timeEntity.setUserIds(param.getUsers());
+            Integer cycleNum = timeEntity.getCycleNum();
+            Integer beginTime = timeEntity.getBeginTime();
+            List<Integer> timeList = new ArrayList<>();
+            for (int i = 1; i <= cycleNum; i++) {
+                timeList.add(beginTime);
+                beginTime = TimeUtils.formatTime(beginTime);
+            }
+            List<JSONObject> jsonObjectList = storeOrderService.selectFsStoreOrderCounts(timeEntity.toMap());
+            List<String> dates = jsonObjectList.stream().map(jsonObject -> jsonObject.getString("type")).collect(Collectors.toList());
+            List<Integer> orderCount = jsonObjectList.stream().map(jsonObject -> jsonObject.getInteger("orderCount")).collect(Collectors.toList());
+            List<Integer> payPrice = jsonObjectList.stream().map(jsonObject -> jsonObject.getInteger("payPrice")).collect(Collectors.toList());
+            //表格数据
+            List<FsStoreOrderCountsVO> tableData = storeOrderService.selectFsStoreOrderCountsByDept(timeEntity.toMap(),param.getDeptId());
+            return R.ok().put("dates",dates).put("orderCount",orderCount).put("payPrice",payPrice).put("tableData",tableData);
+        }
+        else {
+            return R.ok("未查找到数据");
+        }
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:statistics:storeProduct')")
+    @GetMapping("/storeProduct")
+    public R storeProduct(FsStoreStatisticsParam param)
+    {
+        if(StringUtils.isNotEmpty(param.getUserIds())){
+            String[] userIds=param.getUserIds().split(",");
+            Long[] ids=new Long[userIds.length];
+            for(int i=0;i<ids.length; i++){
+                ids[i]=Long.parseLong(userIds[i]);
+            }
+            param.setUsers(ids);
+        }
+        else{
+            //获取部门下的所有用户
+            CompanyUser usermap=new CompanyUser();
+            usermap.setDeptId(param.getDeptId());
+            List<CompanyUser> users = userService.getUserListByDeptId(usermap);
+            List<Long> userIds = users.stream().map(element -> element.getUserId()).collect(Collectors.toList());
+            param.setUsers(userIds.toArray(new Long[userIds.size()]));
+        }
+        if(param.getUsers()!=null&&param.getUsers().length>0){
+            TimeUtils.TimeEntity timeEntity=TimeUtils.parseTime(param.getType()==null?null:param.getType().toString(),param.getStartTime(),param.getEndTime());
+            timeEntity.setUserIds(param.getUsers());
+            Integer cycleNum = timeEntity.getCycleNum();
+            Integer beginTime = timeEntity.getBeginTime();
+            List<Integer> timeList = new ArrayList<>();
+            for (int i = 1; i <= cycleNum; i++) {
+                timeList.add(beginTime);
+                beginTime = TimeUtils.formatTime(beginTime);
+            }
+            List<JSONObject> jsonObjectList = storeOrderService.selectFsStoreOrderCounts(timeEntity.toMap());
+            List<String> dates = jsonObjectList.stream().map(jsonObject -> jsonObject.getString("type")).collect(Collectors.toList());
+            List<Integer> orderCount = jsonObjectList.stream().map(jsonObject -> jsonObject.getInteger("orderCount")).collect(Collectors.toList());
+            List<Integer> payPrice = jsonObjectList.stream().map(jsonObject -> jsonObject.getInteger("payPrice")).collect(Collectors.toList());
+            //表格数据
+            List<FsStoreProductCountsVO> tableData = storeOrderService.selectFsStoreProductCountsByDept(timeEntity.toMap(),param.getDeptId());
+            return R.ok().put("dates",dates).put("orderCount",orderCount).put("payPrice",payPrice).put("tableData",tableData);
+        }
+        else {
+            return R.ok("未查找到数据");
+        }
+    }
+
+    @PreAuthorize("@ss.hasPermi('store:statistics:storePayment')")
+    @GetMapping("/storePayment")
+    public R storePayment(FsStoreStatisticsParam param)
+    {
+        if(StringUtils.isNotEmpty(param.getUserIds())){
+            String[] userIds=param.getUserIds().split(",");
+            Long[] ids=new Long[userIds.length];
+            for(int i=0;i<ids.length; i++){
+                ids[i]=Long.parseLong(userIds[i]);
+            }
+            param.setUsers(ids);
+        }
+        else{
+            //获取部门下的所有用户
+            CompanyUser usermap=new CompanyUser();
+            usermap.setDeptId(param.getDeptId());
+            List<CompanyUser> users = userService.getUserListByDeptId(usermap);
+            List<Long> userIds = users.stream().map(element -> element.getUserId()).collect(Collectors.toList());
+            param.setUsers(userIds.toArray(new Long[userIds.size()]));
+        }
+        if(param.getUsers()!=null&&param.getUsers().length>0){
+
+            TimeUtils.TimeEntity timeEntity=TimeUtils.parseTime(param.getType().toString(),param.getStartTime(),param.getEndTime());
+            timeEntity.setUserIds(param.getUsers());
+            Integer cycleNum = timeEntity.getCycleNum();
+            Integer beginTime = timeEntity.getBeginTime();
+            List<Integer> timeList = new ArrayList<>();
+            for (int i = 1; i <= cycleNum; i++) {
+                timeList.add(beginTime);
+                beginTime = TimeUtils.formatTime(beginTime);
+            }
+            List<JSONObject> jsonObjectList = paymentService.selectFsStorePaymentCounts(timeEntity.toMap());
+            List<String> dates = jsonObjectList.stream().map(jsonObject -> jsonObject.getString("type")).collect(Collectors.toList());
+            List<Integer> orderCount = jsonObjectList.stream().map(jsonObject -> jsonObject.getInteger("orderCount")).collect(Collectors.toList());
+            List<Integer> payMoney = jsonObjectList.stream().map(jsonObject -> jsonObject.getInteger("payMoney")).collect(Collectors.toList());
+            return R.ok().put("dates",dates).put("orderCount",orderCount).put("payMoney",payMoney);
+        }
+        else {
+            return R.ok("未查找到数据");
+        }
+    }
+
+}

+ 97 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreVisitScrmController.java

@@ -0,0 +1,97 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreVisitScrm;
+import com.fs.hisStore.service.IFsStoreVisitScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 产品浏览分析Controller
+ *
+ * @author fs
+ * @date 2022-03-15
+ */
+@RestController
+@RequestMapping("/store/store/storeVisit")
+public class FsStoreVisitScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreVisitScrmService fsStoreVisitService;
+
+    /**
+     * 查询产品浏览分析列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeVisit:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreVisitScrm fsStoreVisit)
+    {
+        startPage();
+        List<FsStoreVisitScrm> list = fsStoreVisitService.selectFsStoreVisitList(fsStoreVisit);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出产品浏览分析列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeVisit:export')")
+    @Log(title = "产品浏览分析", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreVisitScrm fsStoreVisit)
+    {
+        List<FsStoreVisitScrm> list = fsStoreVisitService.selectFsStoreVisitList(fsStoreVisit);
+        ExcelUtil<FsStoreVisitScrm> util = new ExcelUtil<FsStoreVisitScrm>(FsStoreVisitScrm.class);
+        return util.exportExcel(list, "storeVisit");
+    }
+
+    /**
+     * 获取产品浏览分析详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeVisit:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreVisitService.selectFsStoreVisitById(id));
+    }
+
+    /**
+     * 新增产品浏览分析
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeVisit:add')")
+    @Log(title = "产品浏览分析", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreVisitScrm fsStoreVisit)
+    {
+        return toAjax(fsStoreVisitService.insertFsStoreVisit(fsStoreVisit));
+    }
+
+    /**
+     * 修改产品浏览分析
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeVisit:edit')")
+    @Log(title = "产品浏览分析", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreVisitScrm fsStoreVisit)
+    {
+        return toAjax(fsStoreVisitService.updateFsStoreVisit(fsStoreVisit));
+    }
+
+    /**
+     * 删除产品浏览分析
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeVisit:remove')")
+    @Log(title = "产品浏览分析", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreVisitService.deleteFsStoreVisitByIds(ids));
+    }
+}

+ 10 - 0
fs-admin/src/main/resources/pay/alipay.properties

@@ -0,0 +1,10 @@
+alipay.appId=2021003175603885
+alipay.privateKey=MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCQ6KdwrikzvXJOVJGqqD1wqNmnbatbkjguDhzkPYIVYX4A8lDEhcz0mQfJsnTAjebZMgSny8KqvK+8JnePwk+U25ZKxY/78dBmB1m4hxoDYuixULOpBlIU76H2e77KYV2ZUIbUKNrkcZ/fEh10+/u5msVE/67u389dQApIMAWPAjcRALWuJleUpfBSe6RwP/JtRY6C8mhnIXPpd2viEu8Lkxjs37HnWN/9KWfZIvdxrx/PjDu3DKi1kiSS+FWwGeQUwrYOk6yclWseI+A3dohwsvVzd/7X3OmmGph6S1Sv8Luoq7KlZ25uvlFiAYxV2fTyJ1gTRomuqzBG+4l/n9BjAgMBAAECggEAAdt5ifAxhwA+ntJmq5FMeE0xvPui3qGZJr33kNVY/X0qaEiy0FIGtnvfpa4r4OvwsYf6l0v9SsLwXbEAh08uRfIqkvrFRa1rxmMBu2O/6Zsy8FLgeqIiGzKXGNmtMFrfID/v+ngrlhH+wpUw23b/Wvmo3aGJVHZ56fAQMayr5ZFUw0F6FktB0lGQjLw2yS6nwy6GvsCA3KeclP3AQGPxVZC3uuw2oVDkqHBBeHk0L5XA3x8DgeJ73zsWlWRD7dPOrhjiLzFl9WdGQobP2TTNzVH3uolUtxkC4o9I8B6BdARqLDn2yqalF6MzzlOlKTo8/I+htQ8qxcudQzZ+2CjiQQKBgQDDYzrwnk0DPWDp2lThZ8gy/c4dX/RgIH+YndW9DYhDkTH6Bhb+bGKFWL4zods3RIEWZgQWzKTXzm7UhoN6QOu/0xl3l4OIyd9OjTaX9BTm2mT3IB7mHq+7trJgHldZiP325uZr1pH4hJ9FW/tOYKP5sA2fy1ka2+t/tKbjHVJzPQKBgQC93KICFYjWTHw6L/6t4jzyE1co0sOivfRf/ObKNzmv5Qe8RKr4f/vZBHHvuh9SOMd/ZLDKbqzEMJkB4iP/XjGk5SWARTWUVzY21hYBjYthjJ9ZmbrZM8Ys2M2N38edvFJn6fUeZFbCBNm7GbJIqdAgMhB+xnEkKwMGQyqTSgEMHwKBgQCoWxpwNpa5Uevt1LkKuDgi59rwKLwTEC2hvW5sRfrB7ZwYiaLKe22w5LSPHModJyPrvt+LHa50XWXWLkmfz8zTLvxkteMavIdz0e3WpPRVrp0M61p0gsB9iIDOnZY6ifX7Bx5IkUyZzPzH8Ofrsw3XmcFDjR4sLI8RLQIX9C4VKQKBgQCzNCbuVKkdrH+s5FQ8h8gCrWKdM6JYX3bjiu/DejDG5yRP/XhqqVJrWhi4rzKVBua2RbHgwGntm/kvn+VeSegNvgOReMHDzDVtuNB4ksM2Rea6SbHlBUtOVSxfdxMQvQoC7v7futFwu+dPBEgU8cNyQA71uhRckQR/yrHK6BTo/QKBgGyYgL97kQX1CR4LDXVMn2ebhIcadjVCKlZe2v1gtd9HkYh5zqJhtNsFO5HgBB+tW1/EFD+wHeZ+5LcYgNc6fU6gJEvnYG0ezUGfnrNg2oKW22oDE9h2tPap6BYIJboohiY0gq6pgu3wEAwCEwtRjYYNwr4ZDRM9Wq/RlgBalY5S
+alipay.publicKey=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxq6z6GPljO9YCrOptYhWSXO5ts4phovkcVXHc2NBLBq8p1jS/pyQj5k3Oay0lRI3cE7Apl6b/nqMCa1sxg5P/muqNAr6S1wy4X/uvWZwMKK2Woe6OJqfY7DLiRqjpQ4Tp5GIgY5AI7D91hHbQHTRVzKz4SwCwNTHriVuzfXgqnoq6kaQn/EtP0edf1qqb5gdBcK4Z9SgZLLxXMXqiCfUcvkfgjEwDq0HIbX/DdrPvJ9WmoT0uIWTMWk3fx549wnmG0rCxwERldFVJ5Rvn4Q3PzHkt1YITmxigryPMyDfk+U5CHysJ8O2cBtlpNGBRYZyh0Ul+eCcA1zI0fWimZORfQIDAQAB
+alipay.appCertPath=C:/App/cert/alipay/appCertPublicKey_2021002106618710.crt
+alipay.aliPayCertPath=C:/App/cert/alipay/alipayCertPublicKey_RSA2.crt
+alipay.aliPayRootCertPath=C:/App/cert/alipay/alipayRootCert.crt
+alipay.serverUrl=https://openapi.alipay.com/gateway.do
+alipay.domain=https://api.yjf.runtzh.com
+alipay.returnDomain=http://alipay.yjf.runtzh.com
+

+ 8 - 0
fs-admin/src/main/resources/pay/alipay1.properties

@@ -0,0 +1,8 @@
+alipay.appId=2021001183651266
+alipay.privateKey=MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDHxLTvAARsNy8Vx3UAD+N1xc0bME315mB+p7tuhGxqoGgOhFDQ4ozKs/HQ+lRXzzLSkKvZMQqK3GRP4mx4ziihZ8qLSzyxKC6yRVujMd4igq26/POERUlzbAl50SBWGDiVxMJBidtvq0EmoFYGzalix8gD3QhitQGeUl93k1omNDDFP7qQEGhUMA3BHVj4JTwMHT7s5EzZ/189d00OC3atYzF5mcswTYCEJY7WIPDCB9+1Hr63jYufTSlDYkZBwvObxQU7sLlj64gd2u/n/QydunXp1PwZN5aUnTE3MW0Gzx+MeIf7myB3DFfOqTP6mC/sXSVGnbO1Agnfohl6gEQpAgMBAAECggEBAIkV7oe3/lD4iYIrjpmNTazrIPYQbt9YyU0A83lCvFdrXhzgJclCPhV36HBc6HYdhKXEi3kO00o5NUkwevlnl7AzVmXCKpLznR/OwrS5qtMJ1AhmPwG8vkvLjrEelk8ebe4wyJFK9d+qqJnGG2KtzRgxOouUKYX66nJn2oVnA80EeVNJQ3PqMbT2Q6p/sm+BJVb54t9KoPyuXe6MqHr9fWiUoJ47bE/JgqQg9pSs9lHRvqWcCIBnUY+Y4ZuE1HsFWg+mtLt+qFktFO+3xbj0jhrbzqsVR/pjHq6wxumidA9yaSMEvRqECi7x6VTH7OquOYMNCZW5Fdw+KMg9mvrx+lECgYEA/IcvtH62bQxHg9uOuuNFFPGeyuhYJk950PDdWmBKXOIfLNm1PL6UcY8vSP4rWpk4VrXdt0bt9suME+zmXWwymFwESKl0Kmcy1c3hsFBKnJApfxbULzDUFXGbMd/0WqPBibx98iLxpdlHxREg/vcuOB+ZUIPI7px5dNkgL5JfR70CgYEAyoPS+ahUmr/57kaxt3TpsDDIotvVT+k3hD3MSmBZu2AXPcPFapqydWdBHHfhq1GnEN7QvfYQOgBRF3+l9WRuKBefmu8sLsPzHbLoVBBK594yBmBQmy6C+g83/zOqTxK57YLk9abtc9Y6ssXQGkR2/DRCYm1CtqQmB/fElKlPDt0CgYBnJYzNy+gVuKtJZ5fwLD6eZGb4+FhxJYtbVdcEQEp/j/kt56sIqcuWaubkiLUKp4UEnfp3DyjJ4rBPvzcFN9metA8n4tdJLqfr/tFNpC4lrxjUCW4X7HjkXWgHwjNcBoFaEjzbd3x+wrZ2/x0cJ7igQf/sjDe5hv5xRPLJm58BfQKBgF+iky4tDQ8rW7bnkaNmRblbwFQQZpLfOsVrfZ8eEyIGhdM4MXFfbqk8wqXUAzEpVTEFWCRtIEqTvbfQIypYbCDozwmWqxHGnXfH9ilErGsFJjCWqVovQ9EdAL+2wVWoLT95kfBkDTynzX6BJf5RmLMPZs4edOPVbtRScHYX4mrNAoGBAMVkGQuSIM4Mf/bMvEqPMc9GpYJ6tA6BqBsLY9yyXnArHaR9dGvKmN59+JmxM9sYCXunhtyLu83bkB2XtfIUGj8TYJxWUxvAwcx8JAE5qb6E5oStKbxb0hKh5CG59gqFlAVpcqMIwpeCDQhBin5AlMTgrmV8S6gTBp0efHTn9G4N
+alipay.publicKey=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArqkO4WGHLHufhdMMOsckp964jUWNncwY9r4XB2HVEeHIDOcThp61/TJXGKxmQctAQ9CDNK1aP4SPWHd3rItN8HIX1Fo+oXsDkHrlRqh5p2DOdvmsaGbceyCT/OF4nX+km/WJ9TXBQ3SaI5h8xqESeX0srs0j7QjXafGQrprO2wlih84Ri2FbaDIJvlReZcJZLpxlYBKGXfepp1wvBEMmHH66JArWZ2w03zaFODW7vbEZZplKOZMijPE0V2SUsqwqqbPajKaO3cXf/pE9bzIGi9VLcpr0cWSkzdEUF0yQ1w/dxkdfMdgyurSb7CpuYU7/QEHWNJp5w5euGySDS1U4xQIDAQAB
+alipay.appCertPath=
+alipay.aliPayCertPath=
+alipay.aliPayRootCertPath=
+alipay.serverUrl=https://openapi.alipay.com/gateway.do
+alipay.domain=http://http://api.qinpeilian.com/

BIN
fs-admin/src/main/resources/pay/cert/apiclient_cert.p12


+ 26 - 0
fs-admin/src/main/resources/pay/cert/apiclient_cert.pem

@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE-----
+MIIEazCCA9SgAwIBAgIDPfFVMA0GCSqGSIb3DQEBBQUAMIGKMQswCQYDVQQGEwJD
+TjESMBAGA1UECBMJR3Vhbmdkb25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4GA1UE
+ChMHVGVuY2VudDEMMAoGA1UECxMDV1hHMRMwEQYDVQQDEwpNbXBheW1jaENBMR8w
+HQYJKoZIhvcNAQkBFhBtbXBheW1jaEB0ZW5jZW50MB4XDTE2MDgyMjEwMDAyN1oX
+DTI2MDgyMDEwMDAyN1owgZsxCzAJBgNVBAYTAkNOMRIwEAYDVQQIEwlHdWFuZ2Rv
+bmcxETAPBgNVBAcTCFNoZW56aGVuMRAwDgYDVQQKEwdUZW5jZW50MQ4wDAYDVQQL
+EwVNTVBheTEwMC4GA1UEAxQn5YyX5Lqs5b+r5a6i5pyN56eR5oqA5Y+R5bGV5pyJ
+6ZmQ5YWs5Y+4MREwDwYDVQQEEwgxMzk5MzgzMjCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBAMRbFxBzC0GQ14Hxh4Uspdt3B7mQSAsa2hLvqWYsPYXbQ9Rh
+Jb/pdUOF9zwh4i9CTrWLqSazgs7Rqf7EEyhdT08KDQbF9uDRHW3m/XSGb8XyQKX0
+yu8yEUDH6SvUGQQ3U4DOOsHooa9jTIZeohAtwe9+GQX2WjRzjr3RlW2DIyTGwjYi
+QB5CU1uivt+tfEDW+wP4gjnWecShYPfeK1uIybinFzmy4tUGGuNl7N9H4IrMi2TT
+BpqMGbEukoDjzYv4h23MPuh6f1AHGpsI39BJJs8TjYeccMIrOqzXSv1bcRVsH+FZ
+4AkYhgeCt6MudedjGy5J9IEU957esxmXtSuDt10CAwEAAaOCAUYwggFCMAkGA1Ud
+EwQCMAAwLAYJYIZIAYb4QgENBB8WHSJDRVMtQ0EgR2VuZXJhdGUgQ2VydGlmaWNh
+dGUiMB0GA1UdDgQWBBTOrb+vqp/rqP6DZntwZEmzL+ickTCBvwYDVR0jBIG3MIG0
+gBQ+BSb2ImK0FVuIzWR+sNRip+WGdKGBkKSBjTCBijELMAkGA1UEBhMCQ04xEjAQ
+BgNVBAgTCUd1YW5nZG9uZzERMA8GA1UEBxMIU2hlbnpoZW4xEDAOBgNVBAoTB1Rl
+bmNlbnQxDDAKBgNVBAsTA1dYRzETMBEGA1UEAxMKTW1wYXltY2hDQTEfMB0GCSqG
+SIb3DQEJARYQbW1wYXltY2hAdGVuY2VudIIJALtUlyu8AOhXMA4GA1UdDwEB/wQE
+AwIGwDAWBgNVHSUBAf8EDDAKBggrBgEFBQcDAjANBgkqhkiG9w0BAQUFAAOBgQBC
+n8MEDVIVlyC2jkRfy4UezLlbnGTkYb+Nb4oMZRvIjNTFzqQ+6SOPKEqlU0FOZwuI
+pr+pDG+H484PQjt6b8ftUOBuKKeaMDMauRz2jqXJkKWcDa4U/CJ+/CboolU4T0xO
+Lp+zNqa7epBvU3HQtX4MEzZEnI5auPVde9nsJbo2QA==
+-----END CERTIFICATE-----

+ 28 - 0
fs-admin/src/main/resources/pay/cert/apiclient_key.pem

@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDEWxcQcwtBkNeB
+8YeFLKXbdwe5kEgLGtoS76lmLD2F20PUYSW/6XVDhfc8IeIvQk61i6kms4LO0an+
+xBMoXU9PCg0Gxfbg0R1t5v10hm/F8kCl9MrvMhFAx+kr1BkEN1OAzjrB6KGvY0yG
+XqIQLcHvfhkF9lo0c4690ZVtgyMkxsI2IkAeQlNbor7frXxA1vsD+II51nnEoWD3
+3itbiMm4pxc5suLVBhrjZezfR+CKzItk0waajBmxLpKA482L+IdtzD7oen9QBxqb
+CN/QSSbPE42HnHDCKzqs10r9W3EVbB/hWeAJGIYHgrejLnXnYxsuSfSBFPee3rMZ
+l7Urg7ddAgMBAAECggEAZt2FhrOOOQoFLGj44xaRyRhhbqAcbdziU7tEFmekz2Qf
+87n1CcXnDbm33MOvd6yYCVmiAslWBL0n/nR/yMyhSLnuOxcoj3xdm37AVvQ6yAty
+PL6yNX8YNMTF7ZUOifvl/fuMIpuZYIV3yIj5A9rE149K0qnNdd73749FZfqmRZQD
+rwh4Xh8M+mj8CulpGsjwKVfUrCWsXaVh9pL7XNMYXBRnGdrCFOs7uPjAUcOZlXjx
+LboQqjmVbveeGJ2lptRjDu5y934T7msQPugss/aCZAbaNN1RklBGJ3FtxgRAQ8z5
+zKCaWzDFyXGWENY/+ZHai9pHK2QS0IPhb+qV/qiYzQKBgQDgaWNOqb14QwbwshFr
+C3Ib5s2XqhTFBTxrtJceWUZZiHDL3Z5ecSPSeBREpxLn/miVIXBc/zyGGF5E2SPB
+zPuj9xrtI8HlxETZG4NuUbgqfFdPUKwroAPMvhqM7ZaanYqRiVTkvmVHtuL4aFk3
+LCKuhjHiSkW2ZaKlgqAkdcGGAwKBgQDf/renwmIC7Lh6sJewsRKe3h3UhzG0XW8t
+HIbx7b5cqKRTrdkPeBLN4w64D37kEK9mmoLsYkZuHA2YJndDGyu6+R2tI69s3vyr
+8hfJBDK0WaVEps2BUQ5KXDrbquYVbBGA6Q7anpVhekXILKBQRxUd7UaRqTvCL04R
+bH7NZzN/HwKBgE5j4gG/f2T8HPeFbFo1NFYUyKp7CihMjO+etM8wJkfuRmCgeMrK
+wNWrhoD4z7zkfMnjVWnW6uB4sK1iIIB5R0nebrR5sii958LjPoUR3MBSkPku2AWh
+LtKdcY7bC6nU8GuoSlRhQeXMN/rIEKoaK79FNzWx9ioh1K/2MlSqIcDbAoGADBQi
+NyumOV4mfIc1RtPlmyeDGEjKB13aduZI6JbXYwu9AL4pLEpfSTbrPkWnpAi6TKAc
+Wz7ZaWqd2QyJ9dZrP0Pbs9Buz0IfAe6mFbLiQRNsdA1Cm6yRRrU+f0Xx7knLj9YB
+dQyEJaOAS9EMPAf5PYnj+krT7B686Peexti/0CUCgYB9uACIaTlN0XQvoXuFktv4
+4xqyOLCfTZW38e1UJ4bqyOJUP0EKfo/03j8Lp/vsZmCK2bIdudG+4rZbuiQXOe31
+cfGo7dQhCorOlrUig0CWwq8oXPbKmvOO7K+UGnK5e46BUbopxU1dTwhxAUA6hbcb
+mFh3iSvhn4JJG2ddomXY3A==
+-----END PRIVATE KEY-----

+ 18 - 0
fs-admin/src/main/resources/pay/cert/证书使用说明.txt

@@ -0,0 +1,18 @@
+欢迎使用微信支付!
+附件中的三份文件(证书pkcs12格式、证书pem格式、证书密钥pem格式),为接口中强制要求时需携带的证书文件。
+证书属于敏感信息,请妥善保管不要泄露和被他人复制。
+不同开发语言下的证书格式不同,以下为说明指引:
+    证书pkcs12格式(apiclient_cert.p12)
+        包含了私钥信息的证书文件,为p12(pfx)格式,由微信支付签发给您用来标识和界定您的身份
+        部分安全性要求较高的API需要使用该证书来确认您的调用身份
+        windows上可以直接双击导入系统,导入过程中会提示输入证书密码,证书密码默认为您的商户ID(如:10010000)
+    证书pem格式(apiclient_cert.pem)
+        从apiclient_cert.p12中导出证书部分的文件,为pem格式,请妥善保管不要泄漏和被他人复制
+        部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供
+        您也可以使用openssl命令来自己导出:openssl pkcs12 -clcerts -nokeys -in apiclient_cert.p12 -out apiclient_cert.pem
+    证书密钥pem格式(apiclient_key.pem)
+        从apiclient_cert.p12中导出密钥部分的文件,为pem格式
+        部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供
+        您也可以使用openssl命令来自己导出:openssl pkcs12 -nocerts -in apiclient_cert.p12 -out apiclient_key.pem
+备注说明:  
+        由于绝大部分操作系统已内置了微信支付服务器证书的根CA证书,  2018年3月6日后, 不再提供CA证书文件(rootca.pem)下载 

+ 8 - 0
fs-admin/src/main/resources/pay/wxpay.properties

@@ -0,0 +1,8 @@
+wxpay.appId=wxbe53e91d9ad11ca6
+wxpay.appSecret=58d70c9be43047ef3275339a3f4b5ee0
+wxpay.mchId=1581878681
+wxpay.partnerKey=8cab128997a3547c1363b0898b877f38
+wxpay.certPath=pay/cert/apiclient_cert.p12
+wxpay.domain= https://api.hospital.ifeiyu100.com
+
+

+ 9 - 0
fs-admin/src/main/resources/pay/wxpay_v3.properties

@@ -0,0 +1,9 @@
+v3.appId=\u5E94\u7528\u7F16\u53F7
+v3.keyPath=key.pem
+v3.certPath=cert.pem
+v3.certP12Path=cert.p12
+v3.platformCertPath=wx_cert.pem
+v3.mchId=\u5FAE\u4FE1\u5546\u6237\u53F7
+v3.apiKey3= Api-v3 \u5BC6\u94A5
+v3.apiKey= Api \u5BC6\u94A5
+v3.domain=  http://qbhdat.natappfree.cc

+ 22 - 19
fs-service/src/main/java/com/fs/hisStore/domain/FsPatientScrm.java

@@ -2,6 +2,7 @@ package com.fs.hisStore.domain;
 
 import java.util.Date;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fs.common.annotation.Excel;
@@ -11,7 +12,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 
 /**
  * 病人对象 fs_patient
- * 
+ *
  * @author fs
  * @date 2022-03-23
  */
@@ -42,6 +43,7 @@ public class FsPatientScrm extends BaseEntity
 
     /** 性别 */
     @Excel(name = "性别")
+    @TableField("sex")
     private Integer gender;
 
     /** 状态 1正常 2禁用 */
@@ -54,86 +56,87 @@ public class FsPatientScrm extends BaseEntity
 
     /** 病人关系 1自己 2父母 3子女 4爱人 5其他 */
     @Excel(name = "病人关系 1自己 2父母 3子女 4爱人 5其他")
+    @TableField("relation")
     private Integer patientRelation;
 
-    public void setPatientId(Long patientId) 
+    public void setPatientId(Long patientId)
     {
         this.patientId = patientId;
     }
 
-    public Long getPatientId() 
+    public Long getPatientId()
     {
         return patientId;
     }
-    public void setPatientName(String patientName) 
+    public void setPatientName(String patientName)
     {
         this.patientName = patientName;
     }
 
-    public String getPatientName() 
+    public String getPatientName()
     {
         return patientName;
     }
-    public void setUserId(Long userId) 
+    public void setUserId(Long userId)
     {
         this.userId = userId;
     }
 
-    public Long getUserId() 
+    public Long getUserId()
     {
         return userId;
     }
-    public void setIdCard(String idCard) 
+    public void setIdCard(String idCard)
     {
         this.idCard = idCard;
     }
 
-    public String getIdCard() 
+    public String getIdCard()
     {
         return idCard;
     }
-    public void setBirthday(Date birthday) 
+    public void setBirthday(Date birthday)
     {
         this.birthday = birthday;
     }
 
-    public Date getBirthday() 
+    public Date getBirthday()
     {
         return birthday;
     }
-    public void setGender(Integer gender) 
+    public void setGender(Integer gender)
     {
         this.gender = gender;
     }
 
-    public Integer getGender() 
+    public Integer getGender()
     {
         return gender;
     }
-    public void setStatus(Integer status) 
+    public void setStatus(Integer status)
     {
         this.status = status;
     }
 
-    public Integer getStatus() 
+    public Integer getStatus()
     {
         return status;
     }
-    public void setIsDel(Integer isDel) 
+    public void setIsDel(Integer isDel)
     {
         this.isDel = isDel;
     }
 
-    public Integer getIsDel() 
+    public Integer getIsDel()
     {
         return isDel;
     }
-    public void setPatientRelation(Integer patientRelation) 
+    public void setPatientRelation(Integer patientRelation)
     {
         this.patientRelation = patientRelation;
     }
 
-    public Integer getPatientRelation() 
+    public Integer getPatientRelation()
     {
         return patientRelation;
     }

+ 34 - 29
fs-service/src/main/java/com/fs/hisStore/domain/FsPrescribeDrugScrm.java

@@ -1,5 +1,6 @@
 package com.fs.hisStore.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.BaseEntity;
@@ -8,7 +9,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 
 /**
  * 处方药品对象 fs_prescribe_drug
- * 
+ *
  * @author fs
  * @date 2022-03-15
  */
@@ -26,10 +27,12 @@ public class FsPrescribeDrugScrm extends BaseEntity
 
     /** 药品名称 */
     @Excel(name = "药品名称")
+    @TableField("drug_name")
     private String drugCommonName;
 
     /** 规格 */
     @Excel(name = "规格")
+    @TableField("drug_spec")
     private String drugSpecification;
 
     /** 使⽤⽅法 */
@@ -54,10 +57,12 @@ public class FsPrescribeDrugScrm extends BaseEntity
 
     /** 药品数量 */
     @Excel(name = "药品数量")
+    @TableField("drug_num")
     private String saleAmount;
 
     /** 药品数量单位 */
     @Excel(name = "药品数量单位")
+    @TableField("drug_unit")
     private String saleUnit;
 
     /** 药品说明书 */
@@ -72,129 +77,129 @@ public class FsPrescribeDrugScrm extends BaseEntity
     @Excel(name = "产品ID")
     private Integer productId;
 
-    public void setDrugId(Long drugId) 
+    public void setDrugId(Long drugId)
     {
         this.drugId = drugId;
     }
 
-    public Long getDrugId() 
+    public Long getDrugId()
     {
         return drugId;
     }
-    public void setPrescribeId(Long prescribeId) 
+    public void setPrescribeId(Long prescribeId)
     {
         this.prescribeId = prescribeId;
     }
 
-    public Long getPrescribeId() 
+    public Long getPrescribeId()
     {
         return prescribeId;
     }
-    public void setDrugCommonName(String drugCommonName) 
+    public void setDrugCommonName(String drugCommonName)
     {
         this.drugCommonName = drugCommonName;
     }
 
-    public String getDrugCommonName() 
+    public String getDrugCommonName()
     {
         return drugCommonName;
     }
-    public void setDrugSpecification(String drugSpecification) 
+    public void setDrugSpecification(String drugSpecification)
     {
         this.drugSpecification = drugSpecification;
     }
 
-    public String getDrugSpecification() 
+    public String getDrugSpecification()
     {
         return drugSpecification;
     }
-    public void setUsageMethod(String usageMethod) 
+    public void setUsageMethod(String usageMethod)
     {
         this.usageMethod = usageMethod;
     }
 
-    public String getUsageMethod() 
+    public String getUsageMethod()
     {
         return usageMethod;
     }
-    public void setUsageFrequencyUnit(String usageFrequencyUnit) 
+    public void setUsageFrequencyUnit(String usageFrequencyUnit)
     {
         this.usageFrequencyUnit = usageFrequencyUnit;
     }
 
-    public String getUsageFrequencyUnit() 
+    public String getUsageFrequencyUnit()
     {
         return usageFrequencyUnit;
     }
-    public void setUsagePerUseCount(String usagePerUseCount) 
+    public void setUsagePerUseCount(String usagePerUseCount)
     {
         this.usagePerUseCount = usagePerUseCount;
     }
 
-    public String getUsagePerUseCount() 
+    public String getUsagePerUseCount()
     {
         return usagePerUseCount;
     }
-    public void setUsagePerUseUnit(String usagePerUseUnit) 
+    public void setUsagePerUseUnit(String usagePerUseUnit)
     {
         this.usagePerUseUnit = usagePerUseUnit;
     }
 
-    public String getUsagePerUseUnit() 
+    public String getUsagePerUseUnit()
     {
         return usagePerUseUnit;
     }
-    public void setUsageDays(String usageDays) 
+    public void setUsageDays(String usageDays)
     {
         this.usageDays = usageDays;
     }
 
-    public String getUsageDays() 
+    public String getUsageDays()
     {
         return usageDays;
     }
-    public void setSaleAmount(String saleAmount) 
+    public void setSaleAmount(String saleAmount)
     {
         this.saleAmount = saleAmount;
     }
 
-    public String getSaleAmount() 
+    public String getSaleAmount()
     {
         return saleAmount;
     }
-    public void setSaleUnit(String saleUnit) 
+    public void setSaleUnit(String saleUnit)
     {
         this.saleUnit = saleUnit;
     }
 
-    public String getSaleUnit() 
+    public String getSaleUnit()
     {
         return saleUnit;
     }
-    public void setInstructions(String instructions) 
+    public void setInstructions(String instructions)
     {
         this.instructions = instructions;
     }
 
-    public String getInstructions() 
+    public String getInstructions()
     {
         return instructions;
     }
-    public void setApprovalNumber(String approvalNumber) 
+    public void setApprovalNumber(String approvalNumber)
     {
         this.approvalNumber = approvalNumber;
     }
 
-    public String getApprovalNumber() 
+    public String getApprovalNumber()
     {
         return approvalNumber;
     }
-    public void setProductId(Integer productId) 
+    public void setProductId(Integer productId)
     {
         this.productId = productId;
     }
 
-    public Integer getProductId() 
+    public Integer getProductId()
     {
         return productId;
     }

+ 3 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsUserAddressScrm.java

@@ -1,5 +1,6 @@
 package com.fs.hisStore.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.BaseEntity;
@@ -18,6 +19,7 @@ public class FsUserAddressScrm extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 用户地址id */
+    @TableField("address_id")
     private Long id;
 
     /** 用户id */
@@ -42,6 +44,7 @@ public class FsUserAddressScrm extends BaseEntity
 
     /** $column.columnComment */
     @Excel(name = "收货人所在市")
+    @TableField("city_ids")
     private String cityId;
 
     /** 收货人所在区 */

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreOrderScrmMapper.java

@@ -1055,4 +1055,6 @@ public interface FsStoreOrderScrmMapper
     List<FsStoreOrderScrm> computePayMoney(@Param("customerIds")List<Long> customerIds);
 
     FsStoreOrderScrm selectLastByCustomerId(@Param("customerId")Long customerId);
+
+    List<Map<String, Object>> selectFsStoreProductCountsByDept(Map<String, Object> map);
 }

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/service/IFsStoreOrderScrmService.java

@@ -237,4 +237,6 @@ public interface IFsStoreOrderScrmService
     List<FsStoreOrderCountsVO> selectFsStoreOrderCountsByDept(Map<String, Object> map,Long deptId);
 
     R updateSalesOrderMoneyByProduct(FsStoreOrderMoneyByProductParam param);
+
+    List<FsStoreProductCountsVO> selectFsStoreProductCountsByDept(Map<String, Object> map, Long deptId);
 }

+ 32 - 4
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -39,6 +39,7 @@ import com.fs.erp.service.IErpOrderService;
 import com.fs.his.utils.ConfigUtil;
 import com.fs.hisStore.config.FsErpConfig;
 import com.fs.hisStore.dto.*;
+import com.fs.hisStore.mapper.*;
 import com.fs.hisStore.param.*;
 import com.fs.hisStore.vo.*;
 import com.fs.huifuPay.domain.HuiFuRefundResult;
@@ -50,10 +51,6 @@ import com.fs.hisStore.config.StoreIntegralConfig;
 import com.fs.hisStore.constants.StoreConstants;
 import com.fs.hisStore.domain.*;
 import com.fs.hisStore.enums.*;
-import com.fs.hisStore.mapper.FsStoreCartScrmMapper;
-import com.fs.hisStore.mapper.FsStoreOrderItemScrmMapper;
-import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
-import com.fs.hisStore.mapper.FsUserAddressScrmMapper;
 import com.fs.hisStore.service.*;
 import com.fs.system.service.ISysConfigService;
 import com.fs.ybPay.domain.RefundResult;
@@ -221,6 +218,9 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService
     @Autowired
     private CompanyDeptMapper companyDeptMapper;
 
+    @Autowired
+    private FsStoreProductScrmMapper fsStoreProductMapper;
+
     /**
      * 查询订单
      *
@@ -2875,4 +2875,32 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService
         vo.setGroupName(companyDept.getDeptName());
         return vo;
     }
+
+    @Override
+    public List<FsStoreProductCountsVO> selectFsStoreProductCountsByDept(Map<String, Object> map, Long deptId) {
+        //查询所有产品
+        List<FsStoreProductScrm> products = fsStoreProductMapper.selectFsStoreProductList(null);
+        List<FsStoreProductCountsVO> vos = new ArrayList<>();
+        if (!products.isEmpty()) {
+            for (FsStoreProductScrm product : products) {
+                FsStoreProductCountsVO vo = new FsStoreProductCountsVO();
+                vo.setName(product.getProductName());
+                map.put("productId",product.getProductId());
+                //查询该产品销售数量 和金额
+                List<Map<String,Object>> temp = fsStoreOrderMapper.selectFsStoreProductCountsByDept(map);
+                HashMap<String, Object> productMap = new HashMap<>();
+                if (!temp.isEmpty()){
+                    for (Map<String, Object> stringMap : temp) {
+                        String orderType = stringMap.get("orderType").toString();
+                        stringMap.remove("orderType");
+                        productMap.put(orderType,stringMap);
+                    }
+                }
+                vo.setProductCounts(productMap);
+                vos.add(vo);
+            }
+        }
+
+        return vos;
+    }
 }

+ 19 - 0
fs-service/src/main/java/com/fs/hisStore/vo/CityVO.java

@@ -0,0 +1,19 @@
+package com.fs.hisStore.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Getter
+@Setter
+@ToString
+public class CityVO implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long value;
+    private String label;
+    private Long pid;
+    private List<CityVO> children; //子集
+}

+ 13 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreProductCountsVO.java

@@ -0,0 +1,13 @@
+package com.fs.hisStore.vo;
+
+import lombok.Data;
+
+import java.util.HashMap;
+
+@Data
+public class FsStoreProductCountsVO {
+    private String name;
+    private Boolean isGroup=false;
+    private HashMap<String,Object> productCounts;
+
+}

+ 28 - 0
fs-service/src/main/java/com/fs/hisStore/vo/StoreOrderStatisticsVo.java

@@ -0,0 +1,28 @@
+package com.fs.hisStore.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class StoreOrderStatisticsVo {
+    /**
+     * 订单总量
+     */
+    Integer orderCount;
+
+    /**
+     * 总金额
+     */
+    BigDecimal totalAmount;
+
+    /**
+     * 成交率
+     */
+    Integer successRate;
+
+    /**
+     * 退货率
+     */
+    Integer returnRate;
+}

+ 0 - 16
fs-service/src/main/java/com/fs/store/dto/ProductArrtScrmDTO.java

@@ -1,16 +0,0 @@
-package com.fs.store.dto;
-
-import lombok.*;
-
-import java.util.List;
-
-@Getter
-@Setter
-@NoArgsConstructor
-@AllArgsConstructor
-@Builder
-public class ProductArrtScrmDTO {
-    private List<String> detail;
-    private String value;
-
-}

+ 0 - 22
fs-service/src/main/java/com/fs/store/dto/ProductAttrScrmCountDto.java

@@ -1,22 +0,0 @@
-package com.fs.store.dto;
-
-import lombok.Builder;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.math.BigDecimal;
-
-@Getter
-@Setter
-@Builder
-public class ProductAttrScrmCountDto {
-    private BigDecimal minPrice;
-
-    private BigDecimal minOtPrice;
-
-    private BigDecimal minCost;
-
-    private Integer stock;
-
-    private Integer minIntegral;
-}

+ 0 - 10
fs-service/src/main/java/com/fs/store/param/ExpressScrmParam.java

@@ -1,10 +0,0 @@
-package com.fs.store.param;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class ExpressScrmParam implements Serializable {
-    private String packageno;
-}

+ 0 - 18
fs-service/src/main/java/com/fs/store/param/FsCustomerStoreOrderScrmListQueryParam.java

@@ -1,18 +0,0 @@
-package com.fs.store.param;
-
-import com.fs.common.param.BaseQueryParam;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class FsCustomerStoreOrderScrmListQueryParam extends BaseQueryParam implements Serializable
-{
-
-    private Long companyId;
-
-    private Long customerId;
-
-    private Long userId;
-
-}

+ 0 - 16
fs-service/src/main/java/com/fs/store/param/FsMyStoreOrderScrmQueryParam.java

@@ -1,16 +0,0 @@
-package com.fs.store.param;
-
-import com.fs.common.param.BaseQueryParam;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class FsMyStoreOrderScrmQueryParam extends BaseQueryParam implements Serializable
-{
-    private String status;
-    private Long userId;
-    private Long companyId;
-    private Long companyUserId;
-    private Integer deliveryStatus;
-}

+ 0 - 16
fs-service/src/main/java/com/fs/store/param/FsProductAttrValueScrmParam.java

@@ -1,16 +0,0 @@
-package com.fs.store.param;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class FsProductAttrValueScrmParam implements Serializable
-{
-    private String productName;
-    private Long cateId;
-    private Integer productType;
-    private Integer isShow;
-    Integer tuiCateId;
-    private Long companyId;
-}

+ 0 - 13
fs-service/src/main/java/com/fs/store/param/FsStoreCartScrmCountParam.java

@@ -1,13 +0,0 @@
-package com.fs.store.param;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class FsStoreCartScrmCountParam implements Serializable
-{
-    Long userId;
-    Long productId;
-
-}

+ 0 - 90
fs-service/src/main/java/com/fs/store/param/FsStoreOrderScrmParam.java

@@ -1,90 +0,0 @@
-package com.fs.store.param;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fs.common.core.domain.BaseEntity;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class FsStoreOrderScrmParam extends BaseEntity implements Serializable
-{
-    private String orderCode;
-
-    private String nickname;
-
-    private String phone;
-
-    private String userPhone;
-
-    private Integer status;
-
-    private Long companyId;
-
-    private String isHealth;
-
-    private Integer notHealth;
-
-    private Long companyUserId;
-
-    private String createTimeRange;
-
-    private String[] createTimeList;
-
-    private String payTimeRange;
-
-    private String[] payTimeList;
-
-    private String deliverySendTimeRange;
-
-    private String[] deliverySendTimeList;
-
-    private String deliveryImportTimeRange;
-
-    private String[] deliveryImportTimeList;
-
-    private Integer orderType;
-
-
-    private String companyUserNickName;
-
-    private String deliveryId;
-
-    private Integer deliveryStatus;
-
-    private Integer deliveryPayStatus;
-
-    private Long deptId;
-
-    private Long userId;
-
-    private Long customerId;
-
-    private String realName;
-
-    private Integer isPayRemain;
-
-    private Integer payType;
-
-    private String productName;
-
-    private Integer isUpload;
-
-    /** 开始时间 */
-    @JsonIgnore
-    private String beginTime;
-
-    /** 结束时间 */
-    @JsonIgnore
-    private String endTime;
-
-    private Long scheduleId;
-
-    private String orderVisit;
-
-    /**
-     * 支付状态 待支付 1已支付
-     */
-    private int paidStatus;
-
-}

+ 0 - 26
fs-service/src/main/java/com/fs/store/param/FsStoreOrderScrmStatisticsParam.java

@@ -1,26 +0,0 @@
-package com.fs.store.param;
-
-import lombok.Data;
-
-@Data
-public class FsStoreOrderScrmStatisticsParam {
-
-    /**
-     * 开始时间
-     */
-    String startTime;
-    /**
-     * 结束时间
-     */
-    String endTime;
-
-    /**
-     * 是否已经支付
-     */
-    Integer paid;
-
-    /**
-     * 订单状态(-1 : 申请退款 -2 : 退货成功 1:待支付 2:待发货;3:待收货;4:待评价;5:已完成)
-     */
-    private Integer status;
-}

+ 0 - 18
fs-service/src/main/java/com/fs/store/param/FsStoreProductAttrValueScrmQueryParam.java

@@ -1,18 +0,0 @@
-package com.fs.store.param;
-
-import com.fs.common.param.BaseQueryParam;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class FsStoreProductAttrValueScrmQueryParam extends BaseQueryParam implements Serializable
-{
-
-    @ApiModelProperty(value = "商品名")
-    String productName;
-    @ApiModelProperty(value = "推广分类")
-    Integer tuiCateId;
-
-}

+ 0 - 148
fs-service/src/main/java/com/fs/store/param/FsStoreProductScrmAddEditParam.java

@@ -1,148 +0,0 @@
-package com.fs.store.param;
-
-import com.fs.hisStore.domain.FsStoreProductAttrValueScrm;
-import com.fs.store.dto.ProductArrtScrmDTO;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
- * 商品对象 fs_store_product
- *
- * @author fs
- * @date 2022-03-15
- */
-@Data
-public class FsStoreProductScrmAddEditParam implements Serializable
-{
-
-    /** 商品id */
-    private Long productId;
-
-    /** 商品图片 */
-    private String image;
-
-    private String video;
-
-    /** 轮播图 */
-    private String sliderImage;
-
-    /** 商品名称 */
-    private String productName;
-
-    /** 商品简介 */
-    private String productInfo;
-
-    /** 关键字 */
-    private String keyword;
-
-    /** 产品条码(一维码) */
-    private String barCode;
-
-    /** 分类id */
-    private Long cateId;
-
-    /** 商品价格 */
-    private BigDecimal price;
-
-    /** 会员价格 */
-    private BigDecimal vipPrice;
-
-    /** 市场价 */
-    private BigDecimal otPrice;
-
-    /** 邮费 */
-    private BigDecimal postage;
-
-    /** 单位名 */
-    private String unitName;
-
-    /** 排序 */
-    private Long sort;
-
-    /** 销量 */
-    private Long sales;
-
-    /** 库存 */
-    private Long stock;
-
-    /** 状态(0:未上架,1:上架) */
-    private Integer isShow;
-
-    /** 是否热卖 */
-    private Integer isHot;
-
-    /** 是否优惠 */
-    private Integer isBenefit;
-
-    /** 是否精品 */
-    private Integer isBest;
-
-    /** 是否新品 */
-    private Integer isNew;
-
-    private Integer isDisplay;
-
-    /** 产品描述 */
-    private String description;
-
-    /** 是否包邮 */
-    private Integer isPostage;
-
-    /** 是否删除 */
-    private Integer isDel;
-
-    /** 获得积分 */
-    private BigDecimal giveIntegral;
-
-    /** 成本价 */
-    private BigDecimal cost;
-
-    /** 是否优品推荐 */
-    private Integer isGood;
-
-    /** 浏览量 */
-    private Long browse;
-
-    /** 产品二维码地址(用户小程序海报) */
-    private String codePath;
-
-    /** 运费模板ID */
-    private Integer tempId;
-
-    /** 规格 0单 1多 */
-    private Integer specType;
-
-    /** 是开启积分兑换 */
-    private Integer isIntegral;
-
-    /** 需要多少积分兑换 只在开启积分兑换时生效 */
-    private Long integral;
-
-    /** 商品类型:1非处方 2处方 */
-    private Integer productType;
-
-    /** 国药准字 */
-    private String prescribeCode;
-
-    /** 规格 */
-    private String prescribeSpec;
-
-    /** 生产厂家 */
-    private String prescribeFactory;
-
-    /** 处方名 */
-    private String prescribeName;
-
-    private Integer tuiCateId;
-
-    //属性项目
-    private List<ProductArrtScrmDTO> items;
-    //sku结果集
-    private List<FsStoreProductAttrValueScrm> values;
-    // 指定企业
-    private String companyIds;
-
-}

+ 0 - 31
fs-service/src/main/java/com/fs/store/param/FsStoreProductScrmQueryParam.java

@@ -1,31 +0,0 @@
-package com.fs.store.param;
-
-import com.fs.common.param.BaseQueryParam;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class FsStoreProductScrmQueryParam extends BaseQueryParam implements Serializable
-{
-    @ApiModelProperty(value = "分类ID")
-    Long cateId;
-    @ApiModelProperty(value = "商品名")
-    String productName;
-    @ApiModelProperty(value = "默认")
-    private String defaultOrder;
-    @ApiModelProperty(value = "是否新品")
-    private String newOrder;
-    @ApiModelProperty(value = "价格排序")
-    private String priceOrder;
-    @ApiModelProperty(value = "销量排序")
-    private String salesOrder;
-    @ApiModelProperty(value = "1 只显示商城展示的商品 0展示所有")
-    private Integer isDisplay=1;
-
-    // token 需用户端传入
-    private String token;
-    // 用户企业ID
-    private Long companyId;
-}

+ 0 - 19
fs-service/src/main/java/com/fs/store/param/FsStoreScrmStatisticsParam.java

@@ -1,19 +0,0 @@
-package com.fs.store.param;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-
-@Data
-public class FsStoreScrmStatisticsParam implements Serializable
-{
-    Integer type;//"类型 1今天 2昨天 3 本周 4 上周 5本月 6上月 7本季度 8上季度 9本年 10去年
-    String userIds;//员工IDS 多个用,分割
-    Long[] users;
-    String startTime;
-    String endTime;
-    Long deptId;
-
-
-}

+ 0 - 17
fs-service/src/main/java/com/fs/store/param/FsStoreTuiProductAttrValueScrmParam.java

@@ -1,17 +0,0 @@
-package com.fs.store.param;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class FsStoreTuiProductAttrValueScrmParam implements Serializable
-{
-
-    @ApiModelProperty(value = "商品名")
-    String productName;
-    @ApiModelProperty(value = "推广分类")
-    Integer tuiCateId;
-
-}

+ 0 - 13
fs-service/src/main/java/com/fs/store/param/OrderScrmListParam.java

@@ -1,13 +0,0 @@
-package com.fs.store.param;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class OrderScrmListParam implements Serializable
-{
-    private String startTime;
-    private String endTime;
-    private Long companyId;
-}

+ 1 - 1
fs-service/src/main/resources/mapper/hisStore/FsAdvScrmMapper.xml

@@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectFsAdvVo">
-        select adv_id, adv_title,url_type, image_url, adv_url, content, create_time, update_time, status, sort, adv_type, show_type from fs_adv
+        select adv_id, adv_title, image_url, adv_url, content, create_time, update_time, status, sort, adv_type, show_type from fs_adv
     </sql>
 
     <select id="selectFsAdvList" parameterType="FsAdvScrm" resultMap="FsAdvResult">

+ 8 - 8
fs-service/src/main/resources/mapper/hisStore/FsCityScrmMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fs.hisStore.mapper.FsCityScrmMapper">
-    
+
     <resultMap type="FsCityScrm" id="FsCityResult">
         <result property="id"    column="id"    />
         <result property="cityId"    column="city_id"    />
@@ -18,12 +18,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectFsCityVo">
-        select id, city_id, level, parent_id, area_code, name, merger_name, lng, lat, is_show from fs_city
+        select id, city_id, level, parent_id, lng, lat from fs_city
     </sql>
 
     <select id="selectFsCityList" parameterType="FsCityScrm" resultMap="FsCityResult">
         <include refid="selectFsCityVo"/>
-        <where>  
+        <where>
             <if test="cityId != null "> and city_id = #{cityId}</if>
             <if test="level != null "> and level = #{level}</if>
             <if test="parentId != null "> and parent_id = #{parentId}</if>
@@ -35,12 +35,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isShow != null "> and is_show = #{isShow}</if>
         </where>
     </select>
-    
+
     <select id="selectFsCityById" parameterType="Long" resultMap="FsCityResult">
         <include refid="selectFsCityVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertFsCity" parameterType="FsCityScrm" useGeneratedKeys="true" keyProperty="id">
         insert into fs_city
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -88,10 +88,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteFsCityByIds" parameterType="String">
-        delete from fs_city where id in 
+        delete from fs_city where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 15 - 15
fs-service/src/main/resources/mapper/hisStore/FsPatientScrmMapper.xml

@@ -3,43 +3,43 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fs.hisStore.mapper.FsPatientScrmMapper">
-    
+
     <resultMap type="FsPatientScrm" id="FsPatientResult">
         <result property="patientId"    column="patient_id"    />
         <result property="patientName"    column="patient_name"    />
         <result property="userId"    column="user_id"    />
         <result property="idCard"    column="id_card"    />
         <result property="birthday"    column="birthday"    />
-        <result property="gender"    column="gender"    />
+        <result property="gender"    column="sex"    />
         <result property="status"    column="status"    />
         <result property="isDel"    column="is_del"    />
-        <result property="patientRelation"    column="patient_relation"    />
+        <result property="patientRelation"    column="relation"    />
     </resultMap>
 
     <sql id="selectFsPatientVo">
-        select patient_id, patient_name, user_id, id_card, birthday, gender, status, is_del, patient_relation from fs_patient
+        select patient_id, patient_name, user_id, id_card, birthday, sex, status, is_del, relation from fs_patient
     </sql>
 
     <select id="selectFsPatientList" parameterType="FsPatientScrm" resultMap="FsPatientResult">
         <include refid="selectFsPatientVo"/>
-        <where>  
+        <where>
             <if test="patientName != null  and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
             <if test="userId != null "> and user_id = #{userId}</if>
             <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
             <if test="birthday != null "> and birthday = #{birthday}</if>
-            <if test="gender != null "> and gender = #{gender}</if>
+            <if test="gender != null "> and sex = #{gender}</if>
             <if test="status != null "> and status = #{status}</if>
             <if test="isDel != null "> and is_del = #{isDel}</if>
-            <if test="patientRelation != null "> and patient_relation = #{patientRelation}</if>
+            <if test="patientRelation != null "> and relation = #{patientRelation}</if>
         </where>
         order by patient_id desc
     </select>
-    
+
     <select id="selectFsPatientById" parameterType="Long" resultMap="FsPatientResult">
         <include refid="selectFsPatientVo"/>
         where patient_id = #{patientId}
     </select>
-        
+
     <insert id="insertFsPatient" parameterType="FsPatientScrm" useGeneratedKeys="true" keyProperty="patientId">
         insert into fs_patient
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -47,10 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userId != null">user_id,</if>
             <if test="idCard != null">id_card,</if>
             <if test="birthday != null">birthday,</if>
-            <if test="gender != null">gender,</if>
+            <if test="gender != null">sex,</if>
             <if test="status != null">status,</if>
             <if test="isDel != null">is_del,</if>
-            <if test="patientRelation != null">patient_relation,</if>
+            <if test="patientRelation != null">relation,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="patientName != null">#{patientName},</if>
@@ -71,10 +71,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userId != null">user_id = #{userId},</if>
             <if test="idCard != null">id_card = #{idCard},</if>
             <if test="birthday != null">birthday = #{birthday},</if>
-            <if test="gender != null">gender = #{gender},</if>
+            <if test="gender != null">sex = #{gender},</if>
             <if test="status != null">status = #{status},</if>
             <if test="isDel != null">is_del = #{isDel},</if>
-            <if test="patientRelation != null">patient_relation = #{patientRelation},</if>
+            <if test="patientRelation != null">relation = #{patientRelation},</if>
         </trim>
         where patient_id = #{patientId}
     </update>
@@ -89,5 +89,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{patientId}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 13 - 13
fs-service/src/main/resources/mapper/hisStore/FsPrescribeDrugScrmMapper.xml

@@ -3,31 +3,31 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fs.hisStore.mapper.FsPrescribeDrugScrmMapper">
-    
+
     <resultMap type="FsPrescribeDrugScrm" id="FsPrescribeDrugResult">
         <result property="drugId"    column="drug_id"    />
         <result property="prescribeId"    column="prescribe_id"    />
-        <result property="drugCommonName"    column="drug_common_name"    />
-        <result property="drugSpecification"    column="drug_specification"    />
+        <result property="drugCommonName"    column="drug_name"    />
+        <result property="drugSpecification"    column="drug_spec"    />
         <result property="usageMethod"    column="usage_method"    />
         <result property="usageFrequencyUnit"    column="usage_frequency_unit"    />
         <result property="usagePerUseCount"    column="usage_per_use_count"    />
         <result property="usagePerUseUnit"    column="usage_per_use_unit"    />
         <result property="usageDays"    column="usage_days"    />
-        <result property="saleAmount"    column="sale_amount"    />
-        <result property="saleUnit"    column="sale_unit"    />
+        <result property="saleAmount"    column="drug_num"    />
+        <result property="saleUnit"    column="drug_unit"    />
         <result property="instructions"    column="instructions"    />
-        <result property="approvalNumber"    column="approval_number"    />
+        <!--<result property="approvalNumber"    column="approval_number"    />-->
         <result property="productId"    column="product_id"    />
     </resultMap>
 
     <sql id="selectFsPrescribeDrugVo">
-        select drug_id, prescribe_id, drug_common_name, drug_specification, usage_method, usage_frequency_unit, usage_per_use_count, usage_per_use_unit, usage_days, sale_amount, sale_unit, instructions, approval_number, product_id from fs_prescribe_drug
+        select drug_id, prescribe_id, drug_name, drug_spec, usage_method, usage_frequency_unit, usage_per_use_count, usage_per_use_unit, usage_days, drug_num, drug_unit, instructions,  product_id from fs_prescribe_drug
     </sql>
 
     <select id="selectFsPrescribeDrugList" parameterType="FsPrescribeDrugScrm" resultMap="FsPrescribeDrugResult">
         <include refid="selectFsPrescribeDrugVo"/>
-        <where>  
+        <where>
             <if test="prescribeId != null "> and prescribe_id = #{prescribeId}</if>
             <if test="drugCommonName != null  and drugCommonName != ''"> and drug_common_name like concat('%', #{drugCommonName}, '%')</if>
             <if test="drugSpecification != null  and drugSpecification != ''"> and drug_specification = #{drugSpecification}</if>
@@ -43,12 +43,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="productId != null "> and product_id = #{productId}</if>
         </where>
     </select>
-    
+
     <select id="selectFsPrescribeDrugById" parameterType="Long" resultMap="FsPrescribeDrugResult">
         <include refid="selectFsPrescribeDrugVo"/>
         where drug_id = #{drugId}
     </select>
-        
+
     <insert id="insertFsPrescribeDrug" parameterType="FsPrescribeDrugScrm" useGeneratedKeys="true" keyProperty="drugId">
         insert into fs_prescribe_drug
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -108,10 +108,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteFsPrescribeDrugByIds" parameterType="String">
-        delete from fs_prescribe_drug where drug_id in 
+        delete from fs_prescribe_drug where drug_id in
         <foreach item="drugId" collection="array" open="(" separator="," close=")">
             #{drugId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 35 - 2
fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml

@@ -88,11 +88,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="scheduleId"    column="schedule_id"    />
         <result property="orderVisit"    column="order_visit"    />
         <result property="serviceFee"    column="service_fee"    />
-        <result property="orderMedium"    column="order_medium"    />
+        <!--<result property="orderMedium"    column="order_medium"    />-->
     </resultMap>
 
     <sql id="selectFsStoreOrderVo">
-        select id, order_code,service_fee, extend_order_id,pay_order_id,bank_order_id, user_id,order_visit, real_name, user_phone, user_address, cart_id, freight_price, total_num, total_price, total_postage, pay_price, pay_postage,pay_delivery,pay_money, deduction_price, coupon_id, coupon_price, paid, pay_time, pay_type, create_time, update_time, status, refund_status, refund_reason_wap_img, refund_reason_wap_explain, refund_reason_time, refund_reason_wap, refund_reason, refund_price, delivery_sn, delivery_name, delivery_type, delivery_id, gain_integral, use_integral, pay_integral, back_integral, mark, is_del, remark, cost, verify_code, store_id, shipping_type, is_channel, is_remind, is_sys_del,is_prescribe,prescribe_id ,company_id,company_user_id,is_package,package_json,item_json,order_type,package_id,finish_time,delivery_status,delivery_pay_status,delivery_time,delivery_pay_time,delivery_pay_money,tui_money,tui_money_status,delivery_import_time,tui_user_id,tui_user_money_status,order_create_type,store_house_code,dept_id,is_edit_money,customer_id,is_pay_remain,delivery_send_time,certificates,schedule_id,order_medium from fs_store_order_scrm
+        select id, order_code,service_fee, extend_order_id,pay_order_id,bank_order_id, user_id,order_visit, real_name, user_phone, user_address, cart_id, freight_price, total_num, total_price, total_postage, pay_price, pay_postage,pay_delivery,pay_money, deduction_price, coupon_id, coupon_price, paid, pay_time, pay_type, create_time, update_time, status, refund_status, refund_reason_wap_img, refund_reason_wap_explain, refund_reason_time, refund_reason_wap, refund_reason, refund_price, delivery_sn, delivery_name, delivery_type, delivery_id, gain_integral, use_integral, pay_integral, back_integral, mark, is_del, remark, cost, verify_code, store_id, shipping_type, is_channel, is_remind, is_sys_del,is_prescribe,prescribe_id ,company_id,company_user_id,is_package,package_json,item_json,order_type,package_id,finish_time,delivery_status,delivery_pay_status,delivery_time,delivery_pay_time,delivery_pay_money,tui_money,tui_money_status,delivery_import_time,tui_user_id,tui_user_money_status,order_create_type,store_house_code,dept_id,is_edit_money,customer_id,is_pay_remain,delivery_send_time,certificates,schedule_id from fs_store_order_scrm
     </sql>
 
     <select id="selectFsStoreOrderList" parameterType="FsStoreOrderScrm" resultMap="FsStoreOrderResult">
@@ -834,4 +834,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         and o.customer_id = #{customerId}
         order by o.create_time desc limit 1
     </select>
+
+    <select id="selectFsStoreProductCountsByDept" resultType="java.util.HashMap">
+        SELECT
+        t.order_type as orderType,
+        COUNT(t.item_id) AS `count`,
+        SUM(
+        (t.json_info->>'$.price' + 0) *
+        (t.json_info->>'$.num' + 0)
+        ) AS amount
+        FROM
+        (
+        SELECT o.id, o.order_type,i.json_info,i.item_id
+        FROM
+        fs_store_order_item i
+        LEFT JOIN fs_store_order o ON o.id = i.order_id
+        LEFT JOIN company_user u ON o.company_user_id = u.user_id
+        where i.product_id = #{productId}
+        and o.`status` = 3
+        and
+        (DATE_FORMAT(o.create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime})
+        <if test="userIds != null and userIds.length>0">AND o.company_user_id IN
+            <foreach item="item" collection="userIds" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="companyId != null  ">
+            AND o.company_id = #{companyId}
+        </if>
+
+        ) t
+        GROUP BY t.order_type
+        HAVING t.order_type > 0
+    </select>
 </mapper>

+ 17 - 17
fs-service/src/main/resources/mapper/hisStore/FsUserAddressScrmMapper.xml

@@ -3,15 +3,15 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fs.hisStore.mapper.FsUserAddressScrmMapper">
-    
+
     <resultMap type="FsUserAddressScrm" id="FsUserAddressResult">
-        <result property="id"    column="id"    />
+        <result property="id"    column="address_id"    />
         <result property="userId"    column="user_id"    />
         <result property="realName"    column="real_name"    />
         <result property="phone"    column="phone"    />
         <result property="province"    column="province"    />
         <result property="city"    column="city"    />
-        <result property="cityId"    column="city_id"    />
+        <result property="cityId"    column="city_ids"    />
         <result property="district"    column="district"    />
         <result property="detail"    column="detail"    />
         <result property="postCode"    column="post_code"    />
@@ -24,18 +24,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectFsUserAddressVo">
-        select id, user_id, real_name, phone, province, city, city_id, district, detail, post_code, longitude, latitude, is_default, is_del, create_time, update_time from fs_user_address
+        select address_id, user_id, real_name, phone, province, city, city_ids, district, detail, post_code, longitude, latitude, is_default, is_del, create_time, update_time from fs_user_address
     </sql>
 
     <select id="selectFsUserAddressList" parameterType="FsUserAddressScrm" resultMap="FsUserAddressResult">
         <include refid="selectFsUserAddressVo"/>
-        <where>  
+        <where>
             <if test="userId != null "> and user_id = #{userId}</if>
             <if test="realName != null  and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
             <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
             <if test="province != null  and province != ''"> and province = #{province}</if>
             <if test="city != null  and city != ''"> and city = #{city}</if>
-            <if test="cityId != null "> and city_id = #{cityId}</if>
+            <if test="cityId != null "> and city_ids = #{cityId}</if>
             <if test="district != null  and district != ''"> and district = #{district}</if>
             <if test="detail != null  and detail != ''"> and detail = #{detail}</if>
             <if test="postCode != null  and postCode != ''"> and post_code = #{postCode}</if>
@@ -44,14 +44,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDefault != null "> and is_default = #{isDefault}</if>
             <if test="isDel != null "> and is_del = #{isDel}</if>
         </where>
-        order by id desc
+        order by address_id desc
     </select>
-    
+
     <select id="selectFsUserAddressById" parameterType="Long" resultMap="FsUserAddressResult">
         <include refid="selectFsUserAddressVo"/>
-        where id = #{id}
+        where address_id = #{id}
     </select>
-        
+
     <insert id="insertFsUserAddress" parameterType="FsUserAddressScrm" useGeneratedKeys="true" keyProperty="id">
         insert into fs_user_address
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="phone != null and phone != ''">phone,</if>
             <if test="province != null and province != ''">province,</if>
             <if test="city != null and city != ''">city,</if>
-            <if test="cityId != null">city_id,</if>
+            <if test="cityId != null">city_ids,</if>
             <if test="district != null and district != ''">district,</if>
             <if test="detail != null and detail != ''">detail,</if>
             <if test="postCode != null and postCode != ''">post_code,</if>
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="phone != null and phone != ''">phone = #{phone},</if>
             <if test="province != null and province != ''">province = #{province},</if>
             <if test="city != null and city != ''">city = #{city},</if>
-            <if test="cityId != null">city_id = #{cityId},</if>
+            <if test="cityId != null">city_ids = #{cityId},</if>
             <if test="district != null and district != ''">district = #{district},</if>
             <if test="detail != null and detail != ''">detail = #{detail},</if>
             <if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
@@ -109,18 +109,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
         </trim>
-        where id = #{id}
+        where address_id = #{id}
     </update>
 
     <update id="deleteFsUserAddressById" parameterType="Long">
-        update fs_user_address set is_del=1 where id = #{id}
+        update fs_user_address set is_del=1 where address_id = #{id}
     </update>
 
     <update id="deleteFsUserAddressByIds" parameterType="String">
-        update fs_user_address set is_del=1 where id in
+        update fs_user_address set is_del=1 where address_id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 3 - 0
fs-user-app/src/main/java/com/fs/app/controller/store/AddressScrmController.java

@@ -24,6 +24,8 @@ import javax.servlet.http.HttpServletRequest;
 import javax.validation.Valid;
 import java.util.List;
 
+import static com.fs.framework.datasource.DynamicDataSourceContextHolder.log;
+
 
 @Api("地址接口")
 @RestController
@@ -76,6 +78,7 @@ public class AddressScrmController extends AppBaseController {
             List<FsUserAddressScrm> list=addressService.selectFsUserAddressList(map);
             return R.ok().put("data",list);
         } catch (Exception e){
+            log.error(e.getMessage(), e);
             return R.error("操作异常");
         }
     }

+ 1 - 1
fs-user-app/src/main/java/com/fs/app/controller/store/UserScrmController.java

@@ -82,7 +82,7 @@ public class UserScrmController extends AppBaseController {
     public R getUserInfo(HttpServletRequest request){
         try {
             FsUserScrm user=userService.selectFsUserById(Long.parseLong(getUserId()));
-            if (0 == user.getIsShow()){
+            if (user.getIsShow() !=null && user.getIsShow() == 0){
                 FsStoreOrderScrm order = orderService.selectOrderByUserIdLimit1(user.getUserId());
                 if (order!=null){
                     user.setIsShow(1);

+ 7 - 0
pom.xml

@@ -32,6 +32,7 @@
         <jwt.version>0.9.1</jwt.version>
         <org.mapstruct.version>1.5.5.Final</org.mapstruct.version>
         <gson-version>2.10</gson-version>
+        <ijpay-version>2.7.8</ijpay-version>
     </properties>
 
     <!-- 依赖声明 -->
@@ -241,6 +242,12 @@
                 <artifactId>fs-websocket</artifactId>
                 <version>${fs.version}</version>
             </dependency>
+
+            <dependency>
+                <groupId>com.github.javen205</groupId>
+                <artifactId>IJPay-All</artifactId>
+                <version>${ijpay-version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>