yjwang il y a 2 jours
Parent
commit
208a2a0f7f
26 fichiers modifiés avec 698 ajouts et 134 suppressions
  1. 1 1
      fs-admin/src/main/java/com/fs/FSApplication.java
  2. 14 19
      fs-admin/src/main/java/com/fs/his/controller/FsStoreOrderScrmCommentController.java
  3. 43 0
      fs-admin/src/main/java/com/fs/hisStore/controller/FsPlatformProductScrmController.java
  4. 16 2
      fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreHealthOrderScrmController.java
  5. 21 3
      fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java
  6. 2 2
      fs-admin/src/main/resources/application.yml
  7. 16 0
      fs-company/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java
  8. 2 2
      fs-quartz/src/main/java/com/fs/quartz/config/ScheduleConfig.java
  9. 25 1
      fs-service/src/main/java/com/fs/his/domain/FsStoreOrderScrmComment.java
  10. 49 37
      fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderScrmCommentServiceImpl.java
  11. 5 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java
  12. 7 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreOrderItemScrmMapper.java
  13. 4 1
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java
  14. 21 0
      fs-service/src/main/java/com/fs/hisStore/mapper/IFsPlatformProductScrmMapper.java
  15. 14 0
      fs-service/src/main/java/com/fs/hisStore/service/IFsPlatformProductScrmService.java
  16. 255 30
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsPlatformProductScrmServiceImpl.java
  17. 23 1
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java
  18. 3 0
      fs-service/src/main/java/com/fs/hisStore/vo/FsStoreOrderErpExportVO.java
  19. 6 1
      fs-service/src/main/java/com/fs/hisStore/vo/FsStoreOrderExportVO.java
  20. 5 0
      fs-service/src/main/java/com/fs/hisStore/vo/FsStoreProductListVO.java
  21. 81 28
      fs-service/src/main/resources/mapper/his/FsStoreOrderScrmCommentMapper.xml
  22. 61 2
      fs-service/src/main/resources/mapper/hisStore/FsPlatformProductScrmMapper.xml
  23. 8 0
      fs-service/src/main/resources/mapper/hisStore/FsStoreOrderItemScrmMapper.xml
  24. 8 2
      fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml
  25. 6 0
      fs-store/src/main/java/com/fs/hisStore/controller/store/FsPlatformProductScrmController.java
  26. 2 2
      fs-user-app/src/main/resources/application.yml

+ 1 - 1
fs-admin/src/main/java/com/fs/FSApplication.java

@@ -13,7 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
 @Transactional
 @EnableAsync
-@EnableScheduling
+//@EnableScheduling
 public class FSApplication
 {
     public static void main(String[] args)

+ 14 - 19
fs-admin/src/main/java/com/fs/his/controller/FsStoreOrderScrmCommentController.java

@@ -22,25 +22,25 @@ import com.fs.common.enums.BusinessType;
 import com.fs.common.core.page.TableDataInfo;
 
 /**
- * 订单评价Controller
- * 
+ * 订单评价Controller(管理端:列表筛选 / 详情 / 删除)
+ *
  * @author fs
  * @date 2025-10-15
  */
 @RestController
 @RequestMapping("/his/comment")
-public class FsStoreOrderScrmCommentController extends BaseController
-{
+public class FsStoreOrderScrmCommentController extends BaseController {
+
     @Autowired
     private IFsStoreOrderScrmCommentService fsStoreOrderScrmCommentService;
 
     /**
      * 查询订单评价列表
+     * 支持订单id、订单编码、商品名称/id、评价内容、评分、用户、店铺等筛选
      */
     @PreAuthorize("@ss.hasPermi('his:comment:list')")
     @GetMapping("/list")
-    public TableDataInfo list(FsStoreOrderScrmComment fsStoreOrderScrmComment)
-    {
+    public TableDataInfo list(FsStoreOrderScrmComment fsStoreOrderScrmComment) {
         startPage();
         List<FsStoreOrderScrmComment> list = fsStoreOrderScrmCommentService.selectFsStoreOrderScrmCommentList(fsStoreOrderScrmComment);
         return getDataTable(list);
@@ -52,20 +52,18 @@ public class FsStoreOrderScrmCommentController extends BaseController
     @PreAuthorize("@ss.hasPermi('his:comment:export')")
     @Log(title = "订单评价", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(FsStoreOrderScrmComment fsStoreOrderScrmComment)
-    {
+    public AjaxResult export(FsStoreOrderScrmComment fsStoreOrderScrmComment) {
         List<FsStoreOrderScrmComment> list = fsStoreOrderScrmCommentService.selectFsStoreOrderScrmCommentList(fsStoreOrderScrmComment);
         ExcelUtil<FsStoreOrderScrmComment> util = new ExcelUtil<FsStoreOrderScrmComment>(FsStoreOrderScrmComment.class);
         return util.exportExcel(list, "订单评价数据");
     }
 
     /**
-     * 获取订单评价详细信息
+     * 获取订单评价详细信息(含关联商品)
      */
     @PreAuthorize("@ss.hasPermi('his:comment:query')")
     @GetMapping(value = "/{commentId}")
-    public AjaxResult getInfo(@PathVariable("commentId") Long commentId)
-    {
+    public AjaxResult getInfo(@PathVariable("commentId") Long commentId) {
         return AjaxResult.success(fsStoreOrderScrmCommentService.selectFsStoreOrderScrmCommentByCommentId(commentId));
     }
 
@@ -75,8 +73,7 @@ public class FsStoreOrderScrmCommentController extends BaseController
     @PreAuthorize("@ss.hasPermi('his:comment:add')")
     @Log(title = "订单评价", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody FsStoreOrderScrmComment fsStoreOrderScrmComment)
-    {
+    public AjaxResult add(@RequestBody FsStoreOrderScrmComment fsStoreOrderScrmComment) {
         return toAjax(fsStoreOrderScrmCommentService.insertFsStoreOrderScrmComment(fsStoreOrderScrmComment));
     }
 
@@ -86,19 +83,17 @@ public class FsStoreOrderScrmCommentController extends BaseController
     @PreAuthorize("@ss.hasPermi('his:comment:edit')")
     @Log(title = "订单评价", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody FsStoreOrderScrmComment fsStoreOrderScrmComment)
-    {
+    public AjaxResult edit(@RequestBody FsStoreOrderScrmComment fsStoreOrderScrmComment) {
         return toAjax(fsStoreOrderScrmCommentService.updateFsStoreOrderScrmComment(fsStoreOrderScrmComment));
     }
 
     /**
-     * 删除订单评价
+     * 删除订单评价(逻辑删除 is_del=1)
      */
     @PreAuthorize("@ss.hasPermi('his:comment:remove')")
     @Log(title = "订单评价", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{commentIds}")
-    public AjaxResult remove(@PathVariable Long[] commentIds)
-    {
+    @DeleteMapping("/{commentIds}")
+    public AjaxResult remove(@PathVariable Long[] commentIds) {
         return toAjax(fsStoreOrderScrmCommentService.deleteFsStoreOrderScrmCommentByCommentIds(commentIds));
     }
 }

+ 43 - 0
fs-admin/src/main/java/com/fs/hisStore/controller/FsPlatformProductScrmController.java

@@ -12,10 +12,13 @@ import com.fs.hisStore.domain.FsStoreProductAttrScrm;
 import com.fs.hisStore.param.FsPlatFormProductAddEditParam;
 import com.fs.hisStore.service.IFsPlatformProductScrmService;
 import com.fs.hisStore.service.IFsStoreProductAttrScrmService;
+import com.fs.hisStore.utils.StoreAuditLogUtil;
 import com.fs.hisStore.vo.FsPlatformProductListVO;
+import com.fs.statis.dto.ProductAuditDTO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.util.Assert;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
@@ -37,6 +40,9 @@ public class FsPlatformProductScrmController extends BaseController {
     @Autowired
     private IFsStoreProductAttrScrmService attrService;
 
+    @Autowired
+    private StoreAuditLogUtil storeAuditLogUtil;
+
     /**
      * 总后台商品总库协议过期提醒
      * @return
@@ -62,6 +68,43 @@ public class FsPlatformProductScrmController extends BaseController {
         return getDataTable(list);
     }
 
+    /**
+     * 总库商品提交审核
+     */
+    @PreAuthorize("@ss.hasPermi('store:platformProduct:submitAudit')")
+    @Log(title = "总库商品提交审核", businessType = BusinessType.UPDATE, isStoreLog = true,
+            logParam = {"商品", "提交审核"})
+    @PostMapping("/submitAudit")
+    public R submitAudit(@RequestBody ProductAuditDTO auditDTO) {
+        Assert.notNull(auditDTO, "请选择商品!");
+        Assert.notNull(auditDTO.getProductIds(), "请选择商品!");
+        return fsPlatformProductService.submitAudit(auditDTO);
+    }
+
+    /**
+     * 总库商品批量审核
+     */
+    @PreAuthorize("@ss.hasPermi('store:platformProduct:audit')")
+    @Log(title = "总库商品审核", businessType = BusinessType.AUDIT, isStoreLog = true, logParam = {"商品", "批量审核商品信息"},
+            logParamExpression = "#p0.getProductIds().size()>1?"
+                    + "(#p0.isAudit==1?new String[]{'商品','总库商品批量审核通过'}: new String[]{'商品','总库商品批量审核退回'}):"
+                    + "(#p0.isAudit==1?new String[]{'商品','总库商品审核通过'}: new String[]{'商品','总库商品审核退回'})")
+    @PostMapping("/batchAudit")
+    public R batchAudit(@RequestBody ProductAuditDTO auditDTO) {
+        Assert.notNull(auditDTO.getProductIds(), "请选择商品!");
+        Assert.notNull(auditDTO.getIsAudit(), "通过或退回不能为空!");
+        return fsPlatformProductService.batchAudit(auditDTO);
+    }
+
+    /**
+     * 总库商品审核记录
+     */
+    @PreAuthorize("@ss.hasPermi('his:platformProduct:auditLog')")
+    @GetMapping("/auditLog/{productId}")
+    public R auditLog(@PathVariable Long productId) {
+        return R.ok().put("auditLog", storeAuditLogUtil.selectOperLogByMainId(productId, "商品"));
+    }
+
     /**
      * 获取商品详细信息
      * @param productId

+ 16 - 2
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreHealthOrderScrmController.java

@@ -2,6 +2,7 @@ package com.fs.hisStore.controller;
 
 
 import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
@@ -23,6 +24,7 @@ import com.fs.his.service.IFsUserService;
 import com.fs.his.vo.FsStoreOrderListAndStatisticsVo;
 import com.fs.hisStore.domain.*;
 import com.fs.hisStore.dto.StoreOrderProductDTO;
+import com.fs.hisStore.mapper.FsStoreOrderItemScrmMapper;
 import com.fs.hisStore.param.FsStoreOrderParam;
 import com.fs.hisStore.service.*;
 import com.fs.hisStore.vo.*;
@@ -47,6 +49,7 @@ import java.math.BigInteger;
 import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.stream.Collectors;
 
 @RestController
 @RequestMapping("/store/store/storeOrder")
@@ -79,6 +82,8 @@ public class FsStoreHealthOrderScrmController extends BaseController {
     @Autowired
     private IFsStoreOrderService iFsStoreOrderService;
     @Autowired
+    private FsStoreOrderItemScrmMapper fsStoreOrderItemMapper;
+    @Autowired
     private IFsStoreProductScrmService fsStoreProductService;
     @Autowired
     private IFsStorePaymentScrmService fsStorePaymentService;
@@ -96,7 +101,7 @@ public class FsStoreHealthOrderScrmController extends BaseController {
     /**
      * 查询健康商城订单列表
      */
-//    @PreAuthorize("@ss.hasPermi('store:healthStoreOrder:list')")
+    @PreAuthorize("@ss.hasPermi('store:healthStoreOrder:list')")
       @PostMapping("/healthList")
       public TableDataInfo healthStoreList(@RequestBody FsStoreOrderParam param) {
         startPage();
@@ -190,6 +195,13 @@ public class FsStoreHealthOrderScrmController extends BaseController {
         List<FsStoreOrderErpExportVO> list = fsStoreOrderService.selectFsStoreOrderListVOByExport(param);
         //对手机号脱敏
         if (list != null) {
+            List<Long> orderIds = list.stream().map(FsStoreOrderExportVO::getId).collect(Collectors.toList());
+            Map<Long, String> itemMap = fsStoreOrderItemMapper.selectJsonInfo(orderIds).stream().collect(Collectors.toMap(FsStoreOrderItemScrm::getOrderId, item -> {
+                return JSONArray.parseArray(item.getJsonInfo()).stream().map(j->{
+                    JSONObject js = (JSONObject) j;
+                    return  js.get("productName") + "x" + js.get("num");
+                }).collect(Collectors.joining(","));
+            }));
             for (FsStoreOrderExportVO vo : list) {
                 if (vo.getPhone() != null) {
                     vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
@@ -197,7 +209,9 @@ public class FsStoreHealthOrderScrmController extends BaseController {
                 if (vo.getUserPhone() != null) {
                     vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
                 }
-
+                if(itemMap.containsKey(vo.getId())){
+                    vo.setOrderProduct(itemMap.get(vo.getId()));
+                }
             }
         }
         String filter = param.getFilter();

+ 21 - 3
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java

@@ -3,6 +3,7 @@ package com.fs.hisStore.controller;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fs.common.annotation.Log;
@@ -49,6 +50,7 @@ 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.mapper.FsStoreOrderItemScrmMapper;
 import com.fs.hisStore.mapper.FsStoreVerifyCodeScrmMapper;
 import com.fs.hisStore.param.*;
 import com.fs.hisStore.service.*;
@@ -147,6 +149,9 @@ public class FsStoreOrderScrmController extends BaseController {
     @Autowired
     private  IFsStoreScrmService iFsStoreScrmService;
 
+    @Autowired
+    private FsStoreOrderItemScrmMapper fsStoreOrderItemMapper;
+
     @Autowired
     private FsStoreVerifyCodeScrmMapper fsStoreVerifyCodeService;
 
@@ -342,8 +347,17 @@ public class FsStoreOrderScrmController extends BaseController {
         List<FsStoreOrderErpExportVO> list = fsStoreOrderService.selectFsStoreOrderListVOByExport(param);
         //对手机号脱敏
         if (list != null) {
-            //获取当前账号角色权限
-            LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+//            //获取当前账号角色权限
+//            LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+            //获取
+            List<Long> orderIds = list.stream().map(FsStoreOrderExportVO::getId).collect(Collectors.toList());
+
+            Map<Long, String> itemMap = fsStoreOrderItemMapper.selectJsonInfo(orderIds).stream().collect(Collectors.toMap(FsStoreOrderItemScrm::getOrderId, item -> {
+                 return JSONArray.parseArray(item.getJsonInfo()).stream().map(j->{
+                    JSONObject js = (JSONObject) j;
+                    return  js.get("productName") + "x" + js.get("num");
+                }).collect(Collectors.joining(","));
+            }));
 
             for (FsStoreOrderErpExportVO vo : list) {
                 if (vo.getPhone() != null) {
@@ -355,6 +369,10 @@ public class FsStoreOrderScrmController extends BaseController {
                 if (vo.getUserAddress()!=null){
                     vo.setUserAddress(ParseUtils.parseAddress(vo.getUserAddress()));
                 }
+
+                if(itemMap.containsKey(vo.getId())){
+                    vo.setOrderProduct(itemMap.get(vo.getId()));
+                }
             }
         }
         String filter = param.getFilter();
@@ -730,7 +748,7 @@ public class FsStoreOrderScrmController extends BaseController {
     /**
      * 删除订单
      */
-    @PreAuthorize("@ss.hasPermi('store:storeOrder:remove')")
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:remove,store:healthStore:remove')")
     @Log(title = "订单", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {

+ 2 - 2
fs-admin/src/main/resources/application.yml

@@ -4,8 +4,8 @@ server:
 # Spring配置
 spring:
   profiles:
-#    active: dev-yjb
-    active: druid-yjb-test #医健宝测试库
+    active: dev-yjb
+#    active: druid-yjb-test #医健宝测试库
 #    active: druid-hdt
 #    active: druid-yzt
 #    active: druid-sxjz

+ 16 - 0
fs-company/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java

@@ -3,6 +3,7 @@ package com.fs.hisStore.controller;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
@@ -41,6 +42,7 @@ import com.fs.hisStore.domain.*;
 import com.fs.hisStore.dto.StoreOrderExpressExportDTO;
 import com.fs.hisStore.dto.StoreOrderProductDTO;
 import com.fs.hisStore.enums.ShipperCodeEnum;
+import com.fs.hisStore.mapper.FsStoreOrderItemScrmMapper;
 import com.fs.hisStore.mapper.FsStoreVerifyCodeScrmMapper;
 import com.fs.hisStore.param.*;
 import com.fs.hisStore.service.*;
@@ -145,6 +147,9 @@ public class FsStoreOrderScrmController extends BaseController {
     @Autowired
     private  IFsStoreScrmService iFsStoreScrmService;
 
+    @Autowired
+    private FsStoreOrderItemScrmMapper fsStoreOrderItemMapper;
+
     @Autowired
     private IFsStoreProductScrmService fsStoreProductService;
 
@@ -349,6 +354,14 @@ public class FsStoreOrderScrmController extends BaseController {
         List<FsStoreOrderErpExportVO> list = fsStoreOrderService.selectFsStoreOrderListVOByExport(param);
         //对手机号脱敏
         if (list != null) {
+            List<Long> orderIds = list.stream().map(FsStoreOrderExportVO::getId).collect(Collectors.toList());
+
+            Map<Long, String> itemMap = fsStoreOrderItemMapper.selectJsonInfo(orderIds).stream().collect(Collectors.toMap(FsStoreOrderItemScrm::getOrderId, item -> {
+                return JSONArray.parseArray(item.getJsonInfo()).stream().map(j->{
+                    JSONObject js = (JSONObject) j;
+                    return  js.get("productName") + "x" + js.get("num");
+                }).collect(Collectors.joining(","));
+            }));
             for (FsStoreOrderErpExportVO vo : list) {
                 if (vo.getPhone() != null) {
                     vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
@@ -359,6 +372,9 @@ public class FsStoreOrderScrmController extends BaseController {
                 if (vo.getUserAddress()!=null){
                     vo.setUserAddress(ParseUtils.parseAddress(vo.getUserAddress()));
                 }
+                if(itemMap.containsKey(vo.getId())){
+                    vo.setOrderProduct(itemMap.get(vo.getId()));
+                }
             }
         }
         String filter = param.getFilter();

+ 2 - 2
fs-quartz/src/main/java/com/fs/quartz/config/ScheduleConfig.java

@@ -50,8 +50,8 @@ public class ScheduleConfig
         // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了
         factory.setOverwriteExistingJobs(true);
         // 设置自动启动,默认为true
-        factory.setAutoStartup(true);
-//        factory.setAutoStartup(false);
+//        factory.setAutoStartup(true);
+        factory.setAutoStartup(false);
 
         return factory;
     }

+ 25 - 1
fs-service/src/main/java/com/fs/his/domain/FsStoreOrderScrmComment.java

@@ -1,13 +1,15 @@
 package com.fs.his.domain;
 
-import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fs.common.annotation.Excel;
+import com.fs.hisStore.vo.FsStoreProductActivityListVO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import com.fs.common.core.domain.BaseEntity;
 import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * 订单评价对象 fs_store_order_scrm_comment
@@ -85,6 +87,28 @@ public class FsStoreOrderScrmComment extends BaseEntity{
 
     private String userAvatar;
 
+    /** 订单编码(联表查询字段,非本表字段) */
+    @TableField(exist = false)
+    @Excel(name = "订单编码")
+    private String orderCode;
+
+    /** 商品名称筛选(联商品表) */
+    @TableField(exist = false)
+    private String productName;
+
+    /** 商品ID筛选(联商品表) */
+    @TableField(exist = false)
+    private Long productId;
+
+    /** 评价关联商品名称汇总(展示用) */
+    @TableField(exist = false)
+    @Excel(name = "商品信息")
+    private String productNames;
+
+    /** 详情页商品列表 */
+    @TableField(exist = false)
+    private List<FsStoreProductActivityListVO> productList;
+
     @ApiModelProperty(value = "页码,默认为1")
     private Integer pageNum =1;
     @ApiModelProperty(value = "页码,默认为1")

+ 49 - 37
fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderScrmCommentServiceImpl.java

@@ -1,11 +1,12 @@
 package com.fs.his.service.impl;
 
+import java.util.Collections;
 import java.util.List;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.fs.common.utils.DateUtils;
-import com.fs.his.domain.FsStoreOrder;
+import com.fs.common.utils.StringUtils;
 import com.fs.his.domain.FsStoreOrderScrmComment;
 import com.fs.his.mapper.FsStoreOrderMapper;
 import com.fs.his.mapper.FsStoreOrderScrmCommentMapper;
@@ -14,12 +15,14 @@ import com.fs.his.vo.ProductAndStroreVO;
 import com.fs.hisStore.domain.FsStoreOrderScrm;
 import com.fs.hisStore.enums.OrderInfoEnum;
 import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
+import com.fs.hisStore.mapper.FsStoreProductScrmMapper;
+import com.fs.hisStore.vo.FsStoreProductActivityListVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 /**
  * 订单评价Service业务层处理
- * 
+ *
  * @author fs
  * @date 2025-10-15
  */
@@ -34,43 +37,46 @@ public class FsStoreOrderScrmCommentServiceImpl implements IFsStoreOrderScrmComm
 
     @Autowired
     FsStoreOrderScrmMapper fsStoreOrderScrmMapper;
+
+    @Autowired
+    FsStoreProductScrmMapper fsStoreProductScrmMapper;
+
     /**
      * 查询订单评价
-     * 
+     *
      * @param commentId 订单评价主键
      * @return 订单评价
      */
     @Override
-    public FsStoreOrderScrmComment selectFsStoreOrderScrmCommentByCommentId(Long commentId)
-    {
-        return fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentByCommentId(commentId);
+    public FsStoreOrderScrmComment selectFsStoreOrderScrmCommentByCommentId(Long commentId) {
+        FsStoreOrderScrmComment comment = fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentByCommentId(commentId);
+        fillProductList(comment);
+        return comment;
     }
 
     /**
      * 查询订单评价列表
-     * 
+     *
      * @param fsStoreOrderScrmComment 订单评价
      * @return 订单评价
      */
     @Override
-    public List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentList(FsStoreOrderScrmComment fsStoreOrderScrmComment)
-    {
+    public List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentList(FsStoreOrderScrmComment fsStoreOrderScrmComment) {
         return fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentList(fsStoreOrderScrmComment);
     }
 
     /**
      * 新增订单评价
-     * 
+     *
      * @param fsStoreOrderScrmComment 订单评价
      * @return 结果
      */
     @Override
-    public int insertFsStoreOrderScrmComment(FsStoreOrderScrmComment fsStoreOrderScrmComment)
-    {
+    public int insertFsStoreOrderScrmComment(FsStoreOrderScrmComment fsStoreOrderScrmComment) {
         fsStoreOrderScrmComment.setCreateTime(DateUtils.getNowDate());
-        //根据订单处理评价包含商品、店铺信息
+        // 根据订单处理评价包含商品、店铺信息
         ProductAndStroreVO poductAndStroreVO = fsStoreOrderMapper.getProductAndStroreInfoByOrderId(fsStoreOrderScrmComment.getOrderId());
-        if(null != poductAndStroreVO){
+        if (null != poductAndStroreVO) {
             fsStoreOrderScrmComment.setStoreId(poductAndStroreVO.getStoreId());
             fsStoreOrderScrmComment.setStoreName(poductAndStroreVO.getStoreName());
             String itemJson = poductAndStroreVO.getItemJson();
@@ -80,10 +86,10 @@ public class FsStoreOrderScrmCommentServiceImpl implements IFsStoreOrderScrmComm
                 JSONObject jsonObject = objects.getJSONObject(i);
                 ids.append(jsonObject.getString("productId")).append(",");
             }
-            ids.deleteCharAt(ids.length()-1);
+            ids.deleteCharAt(ids.length() - 1);
             fsStoreOrderScrmComment.setProductIds(ids.toString());
             fsStoreOrderScrmCommentMapper.insertFsStoreOrderScrmComment(fsStoreOrderScrmComment);
-            FsStoreOrderScrm fsStoreOrderScrm = new FsStoreOrderScrm();;
+            FsStoreOrderScrm fsStoreOrderScrm = new FsStoreOrderScrm();
             fsStoreOrderScrm.setId(fsStoreOrderScrmComment.getOrderId());
             fsStoreOrderScrm.setStatus(OrderInfoEnum.STATUS_4.getValue());
             return fsStoreOrderScrmMapper.updateFsStoreOrder(fsStoreOrderScrm);
@@ -93,74 +99,80 @@ public class FsStoreOrderScrmCommentServiceImpl implements IFsStoreOrderScrmComm
 
     /**
      * 修改订单评价
-     * 
+     *
      * @param fsStoreOrderScrmComment 订单评价
      * @return 结果
      */
     @Override
-    public int updateFsStoreOrderScrmComment(FsStoreOrderScrmComment fsStoreOrderScrmComment)
-    {
+    public int updateFsStoreOrderScrmComment(FsStoreOrderScrmComment fsStoreOrderScrmComment) {
         fsStoreOrderScrmComment.setUpdateTime(DateUtils.getNowDate());
         return fsStoreOrderScrmCommentMapper.updateFsStoreOrderScrmComment(fsStoreOrderScrmComment);
     }
 
     /**
-     * 批量删除订单评价
-     * 
+     * 批量删除订单评价(逻辑删除)
+     *
      * @param commentIds 需要删除的订单评价主键
      * @return 结果
      */
     @Override
-    public int deleteFsStoreOrderScrmCommentByCommentIds(Long[] commentIds)
-    {
+    public int deleteFsStoreOrderScrmCommentByCommentIds(Long[] commentIds) {
         return fsStoreOrderScrmCommentMapper.deleteFsStoreOrderScrmCommentByCommentIds(commentIds);
     }
 
     /**
-     * 删除订单评价信息
-     * 
+     * 删除订单评价信息(逻辑删除)
+     *
      * @param commentId 订单评价主键
      * @return 结果
      */
     @Override
-    public int deleteFsStoreOrderScrmCommentByCommentId(Long commentId)
-    {
+    public int deleteFsStoreOrderScrmCommentByCommentId(Long commentId) {
         return fsStoreOrderScrmCommentMapper.deleteFsStoreOrderScrmCommentByCommentId(commentId);
     }
 
     /**
      * 用户端查询评价数据
-     * @param fsStoreOrderScrmComment
-     * @return
      */
     @Override
-    public  List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentByUser(FsStoreOrderScrmComment fsStoreOrderScrmComment){
+    public List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentByUser(FsStoreOrderScrmComment fsStoreOrderScrmComment) {
         return fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentByUser(fsStoreOrderScrmComment);
     }
 
     /**
      * 评价管理端查询评价数据
-     * @param fsStoreOrderScrmComment
-     * @return
      */
     @Override
-    public  List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentByManager(FsStoreOrderScrmComment fsStoreOrderScrmComment){
+    public List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentByManager(FsStoreOrderScrmComment fsStoreOrderScrmComment) {
         return fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentByManager(fsStoreOrderScrmComment);
     }
 
     /**
      * 根据订单查询评价
-     * @param orderId
-     * @return
      */
     @Override
-    public FsStoreOrderScrmComment getCommentByOrderId(Long orderId){
+    public FsStoreOrderScrmComment getCommentByOrderId(Long orderId) {
         FsStoreOrderScrmComment fsStoreOrderScrmComment = new FsStoreOrderScrmComment();
         fsStoreOrderScrmComment.setOrderId(orderId);
         List<FsStoreOrderScrmComment> datas = fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentByManager(fsStoreOrderScrmComment);
-        if(null != datas && datas.size() > 0){
+        if (null != datas && datas.size() > 0) {
             return datas.get(0);
         }
         return null;
     }
+
+    /**
+     * 详情补充关联商品信息
+     */
+    private void fillProductList(FsStoreOrderScrmComment comment) {
+        if (comment == null) {
+            return;
+        }
+        if (StringUtils.isEmpty(comment.getProductIds())) {
+            comment.setProductList(Collections.<FsStoreProductActivityListVO>emptyList());
+            return;
+        }
+        List<FsStoreProductActivityListVO> productList = fsStoreProductScrmMapper.selectFsStoreProductByIds(comment.getProductIds());
+        comment.setProductList(productList == null ? Collections.<FsStoreProductActivityListVO>emptyList() : productList);
+    }
 }

+ 5 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java

@@ -579,6 +579,11 @@ public class FsStoreProductScrm extends BaseEntity {
      * **/
     private Long platformProductId;
 
+    /**
+     * 来源标识。从总库一键入库时写入,例如:库调 - 123456
+     **/
+    private String sourceMark;
+
     /**
      * 医疗器械注册证编号/备案凭证编号
      */

+ 7 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreOrderItemScrmMapper.java

@@ -285,4 +285,11 @@ public interface FsStoreOrderItemScrmMapper
      * @return List<FsStoreOrderItemVO>
      * **/
     List<FsStoreOrderItemScrm> selectOrderItemSpliceByOrderIds(@Param("orderIds") List<Long> orderIds);
+
+    /**
+     * 获取订单商品信息
+     * @param orderIds
+     *@return List<FsStoreOrderItemVO>
+     * **/
+    List<FsStoreOrderItemScrm> selectJsonInfo(@Param("orderIds") List<Long> orderIds);
 }

+ 4 - 1
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -349,7 +349,7 @@ public interface FsStoreProductScrmMapper
             "\tELSE\n" +
             "\t\t( SELECT COUNT(*) FROM fs_store_verify_code_scrm vc WHERE vc.product_id = p.product_id AND vc.outbound_status = 1 AND is_del = 0)\n" +
             "END AS sales,p.is_show,p.is_hot,p.is_benefit,p.is_best,p.is_new,p.description,p.create_time,p.update_time,p.is_postage,p.is_del,p.give_integral," +
-            " p.cost,p.is_good,p.browse,p.code_path,p.temp_id,p.spec_type,p.is_integral,p.integral,p.product_type,p.prescribe_code, p.prescribe_spec,p.prescribe_factory,p.prescribe_name,p.is_display,p.tui_cate_id" +
+            " p.cost,p.is_good,p.browse,p.code_path,p.temp_id,p.spec_type,p.is_integral,p.integral,p.product_type,p.prescribe_code, p.prescribe_spec,p.prescribe_factory,p.prescribe_name,p.is_display,p.tui_cate_id,p.source_mark" +
             " FROM fs_store_product_scrm p LEFT JOIN fs_store_product_attr_value_scrm ave on p.product_id=ave.product_id  WHERE ave.bar_code != '' and p.product_id is not null" +
             ") p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id   " +
             "left join (select product_id, push_status from fs_store_hospital580_product_push_scrm h1 where h1.id = (select max(h2.id) from fs_store_hospital580_product_push_scrm h2 where h2.product_id = h1.product_id)) hs on hs.product_id = p.product_id " +
@@ -360,6 +360,9 @@ public interface FsStoreProductScrmMapper
             "<if test = 'maps.barCode != null and  maps.barCode !=\"\"    '> " +
             "and p.bar_code like CONCAT('%',#{maps.barCode},'%') " +
             "</if>" +
+            "<if test = 'maps.sourceMark != null and maps.sourceMark.trim() != \"\"'> " +
+            "and p.source_mark like CONCAT('%',#{maps.sourceMark},'%') " +
+            "</if>" +
             "<if test = 'maps.cateId != null    '> " +
             "and (pc.cate_id =#{maps.cateId} or pc.pid=#{maps.cateId} )" +
             "</if>" +

+ 21 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/IFsPlatformProductScrmMapper.java

@@ -2,6 +2,7 @@ package com.fs.hisStore.mapper;
 
 import com.fs.hisStore.domain.FsPlatformProductScrm;
 import com.fs.hisStore.vo.FsPlatformProductListVO;
+import com.fs.statis.dto.ProductAuditDTO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -77,4 +78,24 @@ public interface IFsPlatformProductScrmMapper {
      * @return
      */
     Boolean productNameExist(@Param("productName") String productName, @Param("commonName") String commonName);
+
+    /**
+     * 统计指定审核状态的商品数量
+     */
+    int countByProductIdsAndAudit(@Param("productIds") List<Long> productIds, @Param("isAudit") String isAudit);
+
+    /**
+     * 统计可提交审核的商品数量(未提交或已退回)
+     */
+    int countSubmittable(@Param("productIds") List<Long> productIds);
+
+    /**
+     * 提交审核:未提交或退回 -> 待审核,并保持下线
+     */
+    int submitAudit(@Param("productIds") List<Long> productIds);
+
+    /**
+     * 总库商品批量审核
+     */
+    int batchAudit(ProductAuditDTO auditDTO);
 }

+ 14 - 0
fs-service/src/main/java/com/fs/hisStore/service/IFsPlatformProductScrmService.java

@@ -60,4 +60,18 @@ public interface IFsPlatformProductScrmService {
      * @return  R
      */
     R oneClickStorage(FsPlatFormProductAddEditParam fsStoreProduct);
+
+    /**
+     * 总库商品提交审核
+     * @param auditDTO 商品ID列表
+     * @return R
+     */
+    R submitAudit(com.fs.statis.dto.ProductAuditDTO auditDTO);
+
+    /**
+     * 总库商品批量审核
+     * @param auditDTO 审核入参
+     * @return R
+     */
+    R batchAudit(com.fs.statis.dto.ProductAuditDTO auditDTO);
 }

+ 255 - 30
fs-service/src/main/java/com/fs/hisStore/service/impl/FsPlatformProductScrmServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.ListUtil;
 import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.fs.common.core.domain.R;
 import com.fs.company.cache.ICompanyCacheService;
@@ -17,6 +18,7 @@ import com.fs.hisStore.param.FsStoreProductAddEditParam;
 import com.fs.hisStore.service.IFsPlatformProductScrmService;
 import com.fs.hisStore.utils.StoreAuditLogUtil;
 import com.fs.hisStore.vo.FsPlatformProductListVO;
+import com.fs.statis.dto.ProductAuditDTO;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -152,8 +154,13 @@ public class FsPlatformProductScrmServiceImpl implements IFsPlatformProductScrmS
         copyProductInfo.setProductId(null);
         copyProductInfo.setCreateTime(new Date());
         copyProductInfo.setUpdateTime(new Date());
-        copyProductInfo.setIsAudit("1");
-        copyProductInfo.setIsShow(1);
+        // 复制商品统一为草稿,不进待审核;保存后再按审核规则流转
+        copyProductInfo.setIsShow(9);
+        copyProductInfo.setIsAudit(null);
+        if (!isPlatformProductAuditEnabled()) {
+            // 审核开关关闭时保持现网:复制后仍视为已通过,待运营编辑保存后上架
+            copyProductInfo.setIsAudit("1");
+        }
 
         //插入复制商品
         copyProductInfo.setProductId(FsProductUtils.createId());
@@ -210,38 +217,21 @@ public class FsPlatformProductScrmServiceImpl implements IFsPlatformProductScrmS
         //这里是更新
         if(param.getProductId() != null && param.getProductId() > 0){
             FsPlatformProductScrm oldFsStoreProduct = fsPlatformProductScrmMapper.selectFsPlatformProductById(product.getProductId());
-            Boolean isAudit = configUtil.generateConfigByKey("medicalMall.func.switch").getBoolean("isAudit");
-            try {
-                if (isAudit != null && isAudit && param.getIsDrug() != 1) {
-                    if (oldFsStoreProduct.getIsAudit() != null && "1".equals(oldFsStoreProduct.getIsAudit())) {
-                        Map<String, Object> diff = getDiff(oldFsStoreProduct, product);
-                        Set<String> diff_columns = diff.keySet();
-                        JSONArray productColumns = configUtil.generateConfigByKey("medicalMall.func.switch").getJSONArray("productColumns");
-                        if(com.fs.common.utils.StringUtils.isNotEmpty(productColumns)){
-                            //判断diff_columns是否在productColumns中,不是则将isAudit设置为0
-                            for (String column : diff_columns) {
-                                if (!productColumns.contains(column)) {
-                                    product.setIsAudit("0");
-                                    break;
-                                }
-                            }
-                        }else{
-                            product.setIsAudit("0");
-                        }
-                    }
-                }
-            } catch (IllegalAccessException e) {
-                log.error("获取diff出错", e);
+            if (oldFsStoreProduct == null) {
+                return R.error("商品数据不存在!");
             }
-            //只要是编辑,都待审核,通过审核sql 去处理audit和show字段。
-            if(oldFsStoreProduct.getIsAudit() != null){
-                product.setIsAudit("1");
+            if (isPendingAuditLocked(oldFsStoreProduct)) {
+                return R.error("审核中的商品无法修改");
+            }
+            R auditResult = applyAuditStatusForUpdate(oldFsStoreProduct, product);
+            if (auditResult != null) {
+                return auditResult;
             }
             fsPlatformProductScrmMapper.updateFsPlatformProduct(product);
         } else{
-            //总后台商品如果是上架就默认通过审核
-            if(product.getIsShow() == 1){
-                product.setIsAudit("1");
+            R auditResult = applyAuditStatusForInsert(product);
+            if (auditResult != null) {
+                return auditResult;
             }
             //复制新的id
             product.setProductId(FsProductUtils.createId());
@@ -250,6 +240,9 @@ public class FsPlatformProductScrmServiceImpl implements IFsPlatformProductScrmS
         storeAuditLogUtil.addOperLog(product.getProductId());
         //处理多规格
         handleProductAttributes(param, product, null);
+        if (isPlatformProductAuditEnabled() && "0".equals(product.getIsAudit())) {
+            return R.ok("保存成功,已提交审核");
+        }
         return R.ok();
     }
 
@@ -265,6 +258,16 @@ public class FsPlatformProductScrmServiceImpl implements IFsPlatformProductScrmS
         if(copyProductInfo==null){
             return R.error("复制,商品数据不存在!");
         }
+        if (isPlatformProductAuditEnabled()) {
+            if (!"1".equals(copyProductInfo.getIsAudit())
+                    || copyProductInfo.getIsShow() == null
+                    || copyProductInfo.getIsShow() != 1) {
+                return R.error("总库商品未审核通过或未上线,无法入库");
+            }
+        }
+        if (copyProductInfo.getIsShow() != null && copyProductInfo.getIsShow() == 9) {
+            return R.error("草稿商品无法入库,请先完善并保存商品");
+        }
         //存在,这个商品是否已经在我店铺存在了
         boolean existFlag = fsStoreProductMapper.productNameExist(fsStoreProduct.getProductName(), copyProductInfo.getCommonName(),fsStoreProduct.getStoreId());
         if(existFlag){
@@ -284,6 +287,8 @@ public class FsPlatformProductScrmServiceImpl implements IFsPlatformProductScrmS
         fsStoreProductScrm.setUpdateTime(new Date());
         fsStoreProductScrm.setPlatformProductId(platformProductId);
         fsStoreProductScrm.setStoreId(fsStoreProduct.getStoreId());
+        // 打上来源标识,方便以后分清哪些是从总库调过来的
+        fsStoreProductScrm.setSourceMark(buildStorageSourceMark(platformProductId));
         int insertRowNum = fsStoreProductMapper.insertFsStoreProduct(fsStoreProductScrm);
         boolean flag = insertRowNum > 0;
         if(flag){
@@ -306,6 +311,13 @@ public class FsPlatformProductScrmServiceImpl implements IFsPlatformProductScrmS
         return flag?R.ok():R.error("添加失败!");
     }
 
+    /**
+     * 一键入库的来源标识:库调 - 总库商品ID
+     */
+    private String buildStorageSourceMark(Long platformProductId) {
+        return "库调 - " + platformProductId;
+    }
+
     private void handleProductAttributes(FsPlatFormProductAddEditParam param, FsPlatformProductScrm product, Long storeId) {
         if (param.getSpecType().equals(0)) {
             ProductArrtDTO fromatDetailDto = ProductArrtDTO.builder()
@@ -508,6 +520,219 @@ public class FsPlatformProductScrmServiceImpl implements IFsPlatformProductScrmS
         return diff;
     }
 
+    /**
+     * 总库商品是否开启审核。读失败默认关闭,保证现网行为不变。
+     */
+    private boolean isPlatformProductAuditEnabled() {
+        try {
+            JSONObject switchConfig = configUtil.generateConfigByKey("medicalMall.func.switch");
+            if (switchConfig == null) {
+                return false;
+            }
+            return Boolean.TRUE.equals(switchConfig.getBoolean("isPlatformProductAudit"));
+        } catch (Exception e) {
+            log.warn("读取总库审核开关 isPlatformProductAudit 失败,按关闭处理", e);
+            return false;
+        }
+    }
+
+    /**
+     * 待审核商品锁定:草稿仍可编辑,审核中不可改。
+     */
+    private boolean isPendingAuditLocked(FsPlatformProductScrm product) {
+        if (!isPlatformProductAuditEnabled() || product == null) {
+            return false;
+        }
+        if (product.getIsShow() != null && product.getIsShow() == 9) {
+            return false;
+        }
+        return "0".equals(product.getIsAudit());
+    }
+
+    /**
+     * 新增时的审核状态:开关关闭走现网;打开则保存即待审核,商品上下架以用户选择为准。
+     */
+    private R applyAuditStatusForInsert(FsPlatformProductScrm product) {
+        if (!isPlatformProductAuditEnabled()) {
+            if (product.getIsShow() != null && product.getIsShow() == 1) {
+                product.setIsAudit("1");
+            }
+            return null;
+        }
+        product.setIsAudit("0");
+        normalizeShowStatus(product);
+        return null;
+    }
+
+    /**
+     * 编辑时的审核状态。
+     * 上架商品再改、或改了关键字段:进入待审核,但保留用户选择的上下架。
+     */
+    private R applyAuditStatusForUpdate(FsPlatformProductScrm oldProduct, FsPlatformProductScrm product) {
+        if (!isPlatformProductAuditEnabled()) {
+            if (oldProduct.getIsAudit() != null) {
+                product.setIsAudit("1");
+            }
+            return null;
+        }
+        boolean oldOnline = oldProduct.getIsShow() != null && oldProduct.getIsShow() == 1;
+        boolean passed = "1".equals(oldProduct.getIsAudit());
+        boolean needReAudit = oldOnline || !passed || hasSensitiveChange(oldProduct, product);
+        if (needReAudit) {
+            product.setIsAudit("0");
+            normalizeShowStatus(product);
+            return null;
+        }
+        product.setIsAudit("1");
+        normalizeShowStatus(product);
+        return null;
+    }
+
+    /**
+     * 保留上架/下架选择,仅把草稿统一成下架。
+     */
+    private void normalizeShowStatus(FsPlatformProductScrm product) {
+        if (product.getIsShow() == null || product.getIsShow() == 9) {
+            product.setIsShow(0);
+        }
+    }
+
+    /**
+     * 是否存在需要重新审核的字段变更。药品与非药品同一套规则。
+     */
+    private boolean hasSensitiveChange(FsPlatformProductScrm oldProduct, FsPlatformProductScrm product) {
+        Set<String> ignoreFields = new HashSet<String>(Arrays.asList(
+                "isAudit", "isShow", "reviewAudit", "serialVersionUID",
+                "updateTime", "createTime", "params", "searchValue",
+                "beginTime", "endTime", "createBy", "updateBy", "remark",
+                "productId", "storeId", "storeProductId", "browse", "sales"
+        ));
+        Set<String> exemptFields = resolvePlatformExemptAuditFields();
+        try {
+            Field[] fields = oldProduct.getClass().getDeclaredFields();
+            for (int i = 0; i < fields.length; i++) {
+                Field field = fields[i];
+                String column = field.getName();
+                if (ignoreFields.contains(column) || exemptFields.contains(column)) {
+                    continue;
+                }
+                field.setAccessible(true);
+                Object oldVal = field.get(oldProduct);
+                Object newVal = field.get(product);
+                if (isPlatformAuditValueEqual(oldVal, newVal)) {
+                    continue;
+                }
+                log.info("总库商品触发重新审核, productId={}, field={}", oldProduct.getProductId(), column);
+                return true;
+            }
+        } catch (IllegalAccessException e) {
+            log.error("获取总库商品diff出错", e);
+            return false;
+        }
+        return false;
+    }
+
+    private boolean isPlatformAuditValueEqual(Object oldVal, Object newVal) {
+        if (Objects.equals(oldVal, newVal)) {
+            return true;
+        }
+        if (newVal == null) {
+            return true;
+        }
+        if (isBlankAuditValue(oldVal) && isBlankAuditValue(newVal)) {
+            return true;
+        }
+        if (oldVal instanceof Number || newVal instanceof Number || oldVal instanceof BigDecimal || newVal instanceof BigDecimal) {
+            try {
+                BigDecimal oldBd = oldVal == null ? null : new BigDecimal(String.valueOf(oldVal));
+                BigDecimal newBd = new BigDecimal(String.valueOf(newVal));
+                if (oldBd != null) {
+                    return oldBd.compareTo(newBd) == 0;
+                }
+            } catch (Exception ignore) {
+                return false;
+            }
+        }
+        return false;
+    }
+
+    private boolean isBlankAuditValue(Object val) {
+        return val == null || (val instanceof String && StringUtils.isBlank((String) val));
+    }
+
+    private Set<String> resolvePlatformExemptAuditFields() {
+        Set<String> exempt = new HashSet<String>();
+        try {
+            JSONObject switchConfig = configUtil.generateConfigByKey("medicalMall.func.switch");
+            if (switchConfig == null) {
+                return exempt;
+            }
+            JSONArray columns = switchConfig.getJSONArray("platformProductColumns");
+            if (columns == null || columns.isEmpty()) {
+                return exempt;
+            }
+            for (int i = 0; i < columns.size(); i++) {
+                String column = columns.getString(i);
+                if (com.fs.common.utils.StringUtils.isNotEmpty(column)) {
+                    exempt.add(column.trim());
+                }
+            }
+        } catch (Exception e) {
+            log.warn("读取 platformProductColumns 失败", e);
+        }
+        return exempt;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public R submitAudit(ProductAuditDTO auditDTO) {
+        if (!isPlatformProductAuditEnabled()) {
+            return R.error("未开启总商品库审核");
+        }
+        List<Long> productIds = auditDTO.getProductIds();
+        if (productIds == null || productIds.isEmpty()) {
+            return R.error("请选择商品!");
+        }
+        int submittable = fsPlatformProductScrmMapper.countSubmittable(productIds);
+        if (submittable != productIds.size()) {
+            return R.error("仅未提交或已退回的商品可以提交审核");
+        }
+        int rows = fsPlatformProductScrmMapper.submitAudit(productIds);
+        if (rows < 1) {
+            return R.error("提交审核失败");
+        }
+        storeAuditLogUtil.addBatchAuditList(productIds, "提交审核", null);
+        return R.ok();
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public R batchAudit(ProductAuditDTO auditDTO) {
+        if (!isPlatformProductAuditEnabled()) {
+            return R.error("未开启总商品库审核");
+        }
+        List<Long> productIds = auditDTO.getProductIds();
+        Integer isAudit = auditDTO.getIsAudit();
+        if (productIds == null || productIds.isEmpty()) {
+            return R.error("请选择商品!");
+        }
+        if (isAudit == null || (isAudit != 1 && isAudit != 2)) {
+            return R.error("通过或退回不能为空!");
+        }
+        if (isAudit == 2 && StringUtils.isBlank(auditDTO.getReason())) {
+            return R.error("退回必须填写理由");
+        }
+        int pendingCount = fsPlatformProductScrmMapper.countByProductIdsAndAudit(productIds, "0");
+        if (pendingCount != productIds.size()) {
+            return R.error("仅允许审核待审核商品,请重新选择");
+        }
+        int rows = fsPlatformProductScrmMapper.batchAudit(auditDTO);
+        if (rows < 1) {
+            return R.error("审核失败");
+        }
+        storeAuditLogUtil.addBatchAuditList(productIds, auditDTO.getReason(), auditDTO.getAttachImage());
+        return R.ok();
+    }
 
 
 

+ 23 - 1
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java

@@ -430,6 +430,22 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
         }
     }
 
+    /**
+     * 总库商品审核开关,与店铺 isAudit 互不影响。
+     */
+    private boolean isPlatformProductAuditEnabled() {
+        try {
+            JSONObject switchConfig = configUtil.generateConfigByKey("medicalMall.func.switch");
+            if (switchConfig == null) {
+                return false;
+            }
+            return Boolean.TRUE.equals(switchConfig.getBoolean("isPlatformProductAudit"));
+        } catch (Exception e) {
+            log.warn("读取总库审核开关 isPlatformProductAudit 失败,按关闭处理", e);
+            return false;
+        }
+    }
+
     private Set<String> resolveProductExemptAuditFields() {
         Set<String> exempt = new HashSet<>(DEFAULT_PRODUCT_EXEMPT_AUDIT_FIELDS);
         try {
@@ -1629,8 +1645,14 @@ private void addProductAttr(Long productId, List<ProductArrtDTO> items, List<FsS
                 Long id = FsProductUtils.createId();//平台总库商品id
                 fsPlatformProductScrm.setStoreProductId(storeProductId);
                 fsPlatformProductScrm.setProductId(id);
-                fsPlatformProductScrm.setIsShow(9);//对比字典store_product_is_show,草稿
                 fsPlatformProductScrm.setStoreId(null);
+                // 店铺灌入总库不走草稿,草稿仅用于总库内复制商品
+                fsPlatformProductScrm.setIsShow(0);
+                if (isPlatformProductAuditEnabled()) {
+                    fsPlatformProductScrm.setIsAudit("0");
+                } else {
+                    fsPlatformProductScrm.setIsAudit("1");
+                }
                 iFsPlatformProductScrmMapper.insertFsPlatformProduct(fsPlatformProductScrm);
                 //复制规格
                 List<FsStoreProductAttrScrm> fsStoreProductAttrScrms = fsStoreProductAttrMapper.selectFsStoreProductAttrByProductId(storeProductId);

+ 3 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreOrderErpExportVO.java

@@ -21,4 +21,7 @@ public class FsStoreOrderErpExportVO extends FsStoreOrderExportVO
     private String erpPhone;
     @Excel(name = "ERP账户",sort = 2)
     private String erpAccount;
+
+    @Excel(name = "订单产品")
+    private String orderProduct;
 }

+ 6 - 1
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreOrderExportVO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 订单对象 fs_store_order
@@ -209,6 +210,10 @@ public class FsStoreOrderExportVO implements Serializable
 //
 //    private String nickname;
 //
+
+    @Excel(name = "订单产品")
+    private String orderProduct;
+
     private String phone;
 //
 //
@@ -216,7 +221,7 @@ public class FsStoreOrderExportVO implements Serializable
 //
 //    private Integer isPackage;
 //
-//    private List<FsStoreOrderItemVO> items;
+    private List<FsStoreOrderItemVO> items;
 
 
     @Excel(name = "物流代收结算状态", dictType = "store_delivery_pay_status")

+ 5 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreProductListVO.java

@@ -172,4 +172,9 @@ public class FsStoreProductListVO  implements Serializable
      * 下架备注
      */
     private String offlineRemark;
+
+    /**
+     * 来源标识,一键入库时为:库调 - 总库商品ID
+     */
+    private String sourceMark;
 }

+ 81 - 28
fs-service/src/main/resources/mapper/his/FsStoreOrderScrmCommentMapper.xml

@@ -22,31 +22,78 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="storeName"    column="store_name"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
+        <result property="orderCode"    column="order_code"    />
+        <result property="productNames"    column="product_names"    />
+        <result property="userAvatar"    column="user_avatar"    />
     </resultMap>
 
     <sql id="selectFsStoreOrderScrmCommentVo">
         select comment_id, order_id, content, nick_name, user_id, is_anonymous, is_show, rating, merchant_reply, image_url, video_url, product_ids, is_del, store_id, store_name, create_time, update_time from fs_store_order_scrm_comment
     </sql>
 
+    <!-- 管理端列表:联订单表取编码,联商品表汇总名称 -->
+    <sql id="selectAdminCommentColumns">
+        select
+            c.comment_id,
+            c.order_id,
+            c.content,
+            c.nick_name,
+            c.user_id,
+            c.is_anonymous,
+            c.is_show,
+            c.rating,
+            c.merchant_reply,
+            c.image_url,
+            c.video_url,
+            c.product_ids,
+            c.is_del,
+            c.store_id,
+            c.store_name,
+            c.create_time,
+            c.update_time,
+            o.order_code,
+            (
+                select group_concat(p.product_name separator '、')
+                from fs_store_product_scrm p
+                where c.product_ids is not null
+                  and c.product_ids != ''
+                  and find_in_set(p.product_id, c.product_ids)
+            ) as product_names
+        from fs_store_order_scrm_comment c
+        left join fs_store_order_scrm o on c.order_id = o.id
+    </sql>
+
     <select id="selectFsStoreOrderScrmCommentList" parameterType="FsStoreOrderScrmComment" resultMap="FsStoreOrderScrmCommentResult">
-        <include refid="selectFsStoreOrderScrmCommentVo"/>
-        <where>  
-            <if test="orderId != null "> and order_id = #{orderId}</if>
-            <if test="content != null  and content != ''"> and content = #{content}</if>
-            <if test="nickName != null  and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
-            <if test="userId != null "> and user_id = #{userId}</if>
-            <if test="isAnonymous != null "> and is_anonymous = #{isAnonymous}</if>
-            <if test="isShow != null "> and is_show = #{isShow}</if>
-            <if test="rating != null  and rating != ''"> and rating = #{rating}</if>
-            <if test="merchantReply != null  and merchantReply != ''"> and merchant_reply = #{merchantReply}</if>
-            <if test="imageUrl != null  and imageUrl != ''"> and image_url = #{imageUrl}</if>
-            <if test="videoUrl != null  and videoUrl != ''"> and video_url = #{videoUrl}</if>
-            <if test="productIds != null  and productIds != ''"> and product_ids = #{productIds}</if>
-            <if test="isDel != null "> and is_del = #{isDel}</if>
-            <if test="storeId != null "> and store_id = #{storeId}</if>
-            <if test="storeName != null  and storeName != ''"> and store_name like concat('%', #{storeName}, '%')</if>
+        <include refid="selectAdminCommentColumns"/>
+        <where>
+            and (c.is_del is null or c.is_del != 1)
+            <if test="orderId != null "> and c.order_id = #{orderId}</if>
+            <if test="orderCode != null and orderCode != ''"> and o.order_code like concat('%', #{orderCode}, '%')</if>
+            <if test="content != null and content != ''"> and c.content like concat('%', #{content}, '%')</if>
+            <if test="nickName != null and nickName != ''"> and c.nick_name like concat('%', #{nickName}, '%')</if>
+            <if test="userId != null "> and c.user_id = #{userId}</if>
+            <if test="isAnonymous != null "> and c.is_anonymous = #{isAnonymous}</if>
+            <if test="isShow != null "> and c.is_show = #{isShow}</if>
+            <if test="rating != null"> and c.rating = #{rating}</if>
+            <if test="merchantReply != null and merchantReply != ''"> and c.merchant_reply like concat('%', #{merchantReply}, '%')</if>
+            <if test="storeId != null "> and c.store_id = #{storeId}</if>
+            <if test="storeName != null and storeName != ''"> and c.store_name like concat('%', #{storeName}, '%')</if>
+            <if test="productId != null">
+                and c.product_ids is not null
+                and find_in_set(#{productId}, c.product_ids)
+            </if>
+            <if test="productName != null and productName != ''">
+                and exists (
+                    select 1
+                    from fs_store_product_scrm p
+                    where find_in_set(p.product_id, c.product_ids)
+                      and p.product_name like concat('%', #{productName}, '%')
+                )
+            </if>
         </where>
+        order by c.create_time desc
     </select>
+
     <select id="selectFsStoreOrderScrmCommentByUser" parameterType="FsStoreOrderScrmComment" resultMap="FsStoreOrderScrmCommentResult">
         select
         t1.comment_id,
@@ -104,7 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             create_time,
             update_time
         from fs_store_order_scrm_comment
-        where  1=1
+        where (is_del is null or is_del != 1)
         <if test="orderId != null "> and order_id = #{orderId}</if>
         <if test="content != null  and content != ''"> and content = #{content}</if>
         <if test="nickName != null  and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
@@ -119,11 +166,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by create_time desc
     </select>
 
-
-
     <select id="selectFsStoreOrderScrmCommentByCommentId" parameterType="Long" resultMap="FsStoreOrderScrmCommentResult">
-        <include refid="selectFsStoreOrderScrmCommentVo"/>
-        where comment_id = #{commentId}
+        <include refid="selectAdminCommentColumns"/>
+        where c.comment_id = #{commentId}
+          and (c.is_del is null or c.is_del != 1)
     </select>
         
     <insert id="insertFsStoreOrderScrmComment" parameterType="FsStoreOrderScrmComment" useGeneratedKeys="true" keyProperty="commentId">
@@ -189,14 +235,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where comment_id = #{commentId}
     </update>
 
-    <delete id="deleteFsStoreOrderScrmCommentByCommentId" parameterType="Long">
-        delete from fs_store_order_scrm_comment where comment_id = #{commentId}
-    </delete>
+    <!-- 逻辑删除:置 is_del=1,保留数据 -->
+    <update id="deleteFsStoreOrderScrmCommentByCommentId" parameterType="Long">
+        update fs_store_order_scrm_comment
+        set is_del = 1,
+            update_time = now()
+        where comment_id = #{commentId}
+    </update>
 
-    <delete id="deleteFsStoreOrderScrmCommentByCommentIds" parameterType="String">
-        delete from fs_store_order_scrm_comment where comment_id in 
+    <update id="deleteFsStoreOrderScrmCommentByCommentIds" parameterType="String">
+        update fs_store_order_scrm_comment
+        set is_del = 1,
+            update_time = now()
+        where comment_id in
         <foreach item="commentId" collection="array" open="(" separator="," close=")">
             #{commentId}
         </foreach>
-    </delete>
-</mapper>
+    </update>
+</mapper>

+ 61 - 2
fs-service/src/main/resources/mapper/hisStore/FsPlatformProductScrmMapper.xml

@@ -143,7 +143,7 @@
         fs_store_product_category_scrm pc ON p.cate_id = pc.cate_id
         WHERE 1=1
         and p.is_del = 0 and p.is_drug = 1
-        <if test="maps.isAudit == null and maps.isShow != null">
+        <if test="maps.isShow != null">
             <if test="maps.isShow == -1">
             </if>
             <if test="maps.isShow == 1">
@@ -156,8 +156,9 @@
                 AND p.is_show = 0
             </if>
         </if>
-        <if test="maps.isAudit != null">
+        <if test="maps.isAudit != null and maps.isAudit != ''">
             AND p.is_audit = #{maps.isAudit}
+            AND (p.is_show IS NULL OR p.is_show != 9)
         </if>
         <if test="maps.productName != null and maps.productName.trim() != ''">
             AND p.product_name LIKE CONCAT('%', #{maps.productName}, '%')
@@ -635,4 +636,62 @@
         where product_id = #{productId}
     </update>
 
+    <select id="countByProductIdsAndAudit" resultType="int">
+        SELECT COUNT(1)
+        FROM fs_platform_product_scrm
+        WHERE is_del = 0
+          AND is_audit = #{isAudit}
+          AND product_id IN
+        <foreach item="productId" collection="productIds" open="(" separator="," close=")">
+            #{productId}
+        </foreach>
+    </select>
+
+    <select id="countSubmittable" resultType="int">
+        SELECT COUNT(1)
+        FROM fs_platform_product_scrm
+        WHERE is_del = 0
+          AND (is_audit IS NULL OR is_audit = '' OR is_audit = '2')
+          AND product_id IN
+        <foreach item="productId" collection="productIds" open="(" separator="," close=")">
+            #{productId}
+        </foreach>
+    </select>
+
+    <update id="submitAudit">
+        UPDATE fs_platform_product_scrm
+        SET is_audit = '0',
+            is_show = 0,
+            update_time = NOW()
+        WHERE is_del = 0
+          AND (is_audit IS NULL OR is_audit = '' OR is_audit = '2')
+          AND product_id IN
+        <foreach item="productId" collection="productIds" open="(" separator="," close=")">
+            #{productId}
+        </foreach>
+    </update>
+
+    <update id="batchAudit" parameterType="com.fs.statis.dto.ProductAuditDTO">
+        UPDATE fs_platform_product_scrm
+        <set>
+            is_audit = #{isAudit},
+            <choose>
+                <when test="isAudit == 1">
+                    is_show = 1,
+                    update_time = NOW()
+                </when>
+                <otherwise>
+                    is_show = 0,
+                    update_time = NOW()
+                </otherwise>
+            </choose>
+        </set>
+        WHERE is_del = 0
+          AND is_audit = '0'
+          AND product_id IN
+        <foreach item="productId" collection="productIds" open="(" separator="," close=")">
+            #{productId}
+        </foreach>
+    </update>
+
 </mapper>

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

@@ -135,4 +135,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
         GROUP BY order_id
     </select>
+
+    <select id="selectJsonInfo" resultType="FsStoreOrderItemScrm">
+        SELECT order_id,CONCAT('[',GROUP_CONCAT(json_info),']') AS jsonInfo FROM fs_store_order_item_scrm WHERE  order_id IN
+        <foreach collection="orderIds" item="orderId" open="(" separator="," close=")">
+            #{orderId}
+        </foreach>
+         GROUP BY order_id
+    </select>
 </mapper>

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

@@ -92,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isCertificatePermanent" column="is_certificate_permanent"/>
         <result property="isGmpAuthPermanent" column="is_gmp_auth_permanent"/>
         <result property="platformProductId" column="platform_product_id"/>
+        <result property="sourceMark" column="source_mark"/>
         <result property="medicalRegCertNo" column="medical_reg_cert_no"/>
         <result property="registrantInfo" column="registrant_info"/>
         <result property="prodLicenseNo" column="prod_license_no"/>
@@ -116,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                certificate, certificate_start, certificate_end,
                voucher, voucher_start, voucher_end,
                gmp_auth, gmp_auth_start, gmp_auth_end,business_link,medical_device_code,
-               is_business_permanent,is_license_permanent,is_certificate_permanent,is_gmp_auth_permanent,platform_product_id,
+               is_business_permanent,is_license_permanent,is_certificate_permanent,is_gmp_auth_permanent,platform_product_id,source_mark,
                medical_reg_cert_no, registrant_info,prod_license_no,prod_tech_req_no,product_structure,storage_conditions,specification,offline_remark
                from fs_store_product_scrm
     </sql>
@@ -332,6 +333,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isCertificatePermanent != null">is_certificate_permanent ,</if>
             <if test="isGmpAuthPermanent != null">is_gmp_auth_permanent ,</if>
             <if test="platformProductId != null">platform_product_id ,</if>
+            <if test="sourceMark != null and sourceMark != ''">source_mark ,</if>
             <if test="medicalRegCertNo != null">medical_reg_cert_no ,</if>
             <if test="registrantInfo != null">registrant_info ,</if>
             <if test="prodLicenseNo != null">prod_license_no ,</if>
@@ -431,6 +433,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isCertificatePermanent != null">#{isCertificatePermanent} ,</if>
             <if test="isGmpAuthPermanent != null">#{isGmpAuthPermanent} ,</if>
             <if test="platformProductId != null">#{platformProductId} ,</if>
+            <if test="sourceMark != null and sourceMark != ''">#{sourceMark} ,</if>
             <if test="medicalRegCertNo != null">#{medicalRegCertNo} ,</if>
             <if test="registrantInfo != null">#{registrantInfo} ,</if>
             <if test="prodLicenseNo != null"> #{prodLicenseNo} ,</if>
@@ -1077,7 +1080,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        p.unit_price,p.batch_number,p.mah,p.mah_address,p.manufacturer,p.manufacturer_address,p.indications,p.ingredient,p.dosage,
        p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,
        p.is_business_permanent,p.is_license_permanent,p.is_certificate_permanent,p.is_gmp_auth_permanent,
-       p.offline_remark
+       p.offline_remark,p.source_mark
     </sql>
 
 
@@ -1157,6 +1160,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="maps.productName != null and maps.productName.trim() != ''">
                 AND p.product_name LIKE CONCAT('%', #{maps.productName}, '%')
             </if>
+            <if test="maps.sourceMark != null and maps.sourceMark.trim() != ''">
+                AND p.source_mark LIKE CONCAT('%', #{maps.sourceMark}, '%')
+            </if>
             <if test="maps.cateId != null">
                 AND (pc.cate_id = #{maps.cateId} OR pc.pid = #{maps.cateId})
             </if>

+ 6 - 0
fs-store/src/main/java/com/fs/hisStore/controller/store/FsPlatformProductScrmController.java

@@ -67,11 +67,17 @@ public class FsPlatformProductScrmController extends BaseController {
 
     /**
      * 查询商品列表
+     * 店铺端只展示已上架且审核通过的总库商品
      * @param vo
      * @return TableDataInfo
      */
     @GetMapping("/list")
     public TableDataInfo list(FsPlatformProductScrm vo) {
+        if (vo == null) {
+            vo = new FsPlatformProductScrm();
+        }
+        vo.setIsShow(1);
+        vo.setIsAudit("1");
         startPage();
         List<FsPlatformProductListVO> list = fsPlatformProductService.selectList(vo);
         return getDataTable(list);

+ 2 - 2
fs-user-app/src/main/resources/application.yml

@@ -13,5 +13,5 @@ spring:
 #    active: druid-sxjz
 #    active: druid-qdtst
 #    active: druid-yzt
-    active: dev-yjb
-#    active: druid-yjb-test #医健宝测试库
+#    active: dev-yjb
+    active: druid-yjb-test #医健宝测试库