Browse Source

Merge branch 'ScrmStores' of E:\ylrz_his_scrm_java_NEW with conflicts.

lmx 3 ngày trước cách đây
mục cha
commit
42752a1047
23 tập tin đã thay đổi với 1001 bổ sung7 xóa
  1. 104 0
      fs-admin/src/main/java/com/fs/his/controller/FsStoreOrderScrmCommentController.java
  2. 15 0
      fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java
  3. 2 2
      fs-company/src/main/resources/application.yml
  4. 84 0
      fs-service/src/main/java/com/fs/his/domain/FsStoreOrderScrmComment.java
  5. 8 0
      fs-service/src/main/java/com/fs/his/mapper/FsStoreOrderMapper.java
  6. 84 0
      fs-service/src/main/java/com/fs/his/mapper/FsStoreOrderScrmCommentMapper.java
  7. 92 0
      fs-service/src/main/java/com/fs/his/param/OrderCommentParam.java
  8. 81 0
      fs-service/src/main/java/com/fs/his/service/IFsStoreOrderScrmCommentService.java
  9. 155 0
      fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderScrmCommentServiceImpl.java
  10. 17 0
      fs-service/src/main/java/com/fs/his/vo/ProductAndStroreVO.java
  11. 10 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreOrderItemScrm.java
  12. 32 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreOrderScrm.java
  13. 6 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java
  14. 10 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java
  15. 2 0
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderItemScrmServiceImpl.java
  16. 3 0
      fs-service/src/main/java/com/fs/user/domain/FsUserComplaint.java
  17. 4 0
      fs-service/src/main/java/com/fs/user/service/IFsUserComplaintService.java
  18. 40 0
      fs-service/src/main/java/com/fs/user/service/impl/FsUserComplaintServiceImpl.java
  19. 5 0
      fs-service/src/main/resources/application-druid-xzt.yml
  20. 199 0
      fs-service/src/main/resources/mapper/his/FsStoreOrderScrmCommentMapper.xml
  21. 8 1
      fs-service/src/main/resources/mapper/user/FsUserComplaintMapper.xml
  22. 4 0
      fs-user-app/src/main/java/com/fs/app/controller/store/FsStoreUserComplaintController.java
  23. 36 4
      fs-user-app/src/main/java/com/fs/app/controller/store/StoreOrderScrmController.java

+ 104 - 0
fs-admin/src/main/java/com/fs/his/controller/FsStoreOrderScrmCommentController.java

@@ -0,0 +1,104 @@
+package com.fs.his.controller;
+
+import java.util.List;
+
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.his.domain.FsStoreOrderScrmComment;
+import com.fs.his.service.IFsStoreOrderScrmCommentService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+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.common.core.page.TableDataInfo;
+
+/**
+ * 订单评价Controller
+ * 
+ * @author fs
+ * @date 2025-10-15
+ */
+@RestController
+@RequestMapping("/his/comment")
+public class FsStoreOrderScrmCommentController extends BaseController
+{
+    @Autowired
+    private IFsStoreOrderScrmCommentService fsStoreOrderScrmCommentService;
+
+    /**
+     * 查询订单评价列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:comment:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreOrderScrmComment fsStoreOrderScrmComment)
+    {
+        startPage();
+        List<FsStoreOrderScrmComment> list = fsStoreOrderScrmCommentService.selectFsStoreOrderScrmCommentList(fsStoreOrderScrmComment);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出订单评价列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:comment:export')")
+    @Log(title = "订单评价", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    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)
+    {
+        return AjaxResult.success(fsStoreOrderScrmCommentService.selectFsStoreOrderScrmCommentByCommentId(commentId));
+    }
+
+    /**
+     * 新增订单评价
+     */
+    @PreAuthorize("@ss.hasPermi('his:comment:add')")
+    @Log(title = "订单评价", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreOrderScrmComment fsStoreOrderScrmComment)
+    {
+        return toAjax(fsStoreOrderScrmCommentService.insertFsStoreOrderScrmComment(fsStoreOrderScrmComment));
+    }
+
+    /**
+     * 修改订单评价
+     */
+    @PreAuthorize("@ss.hasPermi('his:comment:edit')")
+    @Log(title = "订单评价", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreOrderScrmComment fsStoreOrderScrmComment)
+    {
+        return toAjax(fsStoreOrderScrmCommentService.updateFsStoreOrderScrmComment(fsStoreOrderScrmComment));
+    }
+
+    /**
+     * 删除订单评价
+     */
+    @PreAuthorize("@ss.hasPermi('his:comment:remove')")
+    @Log(title = "订单评价", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{commentIds}")
+    public AjaxResult remove(@PathVariable Long[] commentIds)
+    {
+        return toAjax(fsStoreOrderScrmCommentService.deleteFsStoreOrderScrmCommentByCommentIds(commentIds));
+    }
+}

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

@@ -23,8 +23,10 @@ import com.fs.erp.dto.ErpOrderQueryRequert;
 import com.fs.erp.dto.ErpOrderQueryResponse;
 import com.fs.erp.service.IErpOrderService;
 import com.fs.framework.web.service.TokenService;
+import com.fs.his.domain.FsStoreOrderScrmComment;
 import com.fs.his.domain.FsUser;
 import com.fs.his.service.IFsExpressService;
+import com.fs.his.service.IFsStoreOrderScrmCommentService;
 import com.fs.his.service.IFsUserService;
 import com.fs.his.utils.ConfigUtil;
 import com.fs.hisStore.config.FsErpConfig;
@@ -425,6 +427,9 @@ public class FsStoreOrderScrmController extends BaseController {
         return R.ok().put("orderItemsNum","订单明细数目:"+orderItemsNum);
     }
 
+    @Autowired
+    IFsStoreOrderScrmCommentService fsStoreOrderScrmCommentService;
+
     /**
      * 获取订单详细信息
      */
@@ -434,6 +439,16 @@ public class FsStoreOrderScrmController extends BaseController {
         FsStoreOrderScrm order = fsStoreOrderService.selectFsStoreOrderById(id);
         order.setUserPhone(ParseUtils.parsePhone(order.getUserPhone()));
         order.setUserAddress(ParseUtils.parseAddress(order.getUserAddress()));
+        //填充用户评论内容
+        FsStoreOrderScrmComment comment = fsStoreOrderScrmCommentService.getCommentByOrderId(order.getId());
+        if(null != comment){
+            order.setCommentContent(comment.getContent());
+            order.setCommentImageUrl(comment.getImageUrl());
+            order.setRating(comment.getRating());
+            order.setMerchantReply(comment.getMerchantReply());
+            order.setCommentTime(comment.getCreateTime());
+            order.setCommentId(comment.getCommentId());
+        }
         FsUser user = userService.selectFsUserById(order.getUserId());
         if (user != null) {
             user.setPhone(ParseUtils.parsePhone(user.getPhone()));

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

@@ -4,11 +4,11 @@ server:
 spring:
   profiles:
 #    active: druid-fcky-test
-    active: dev-yjb
+#    active: druid-jnmy-test
 #    active: druid-jzzx-test
 #    active: druid-hdt
 #    active: druid-sxjz
 #    active: druid-yzt
 #    active: druid-myhk
 #    active: druid-sft
-#    active: dev-yjb
+    active: dev-yjb

+ 84 - 0
fs-service/src/main/java/com/fs/his/domain/FsStoreOrderScrmComment.java

@@ -0,0 +1,84 @@
+package com.fs.his.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * 订单评价对象 fs_store_order_scrm_comment
+ *
+ * @author fs
+ * @date 2025-10-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsStoreOrderScrmComment extends BaseEntity{
+
+    /** 评论id */
+    private Long commentId;
+
+    /** 订单id */
+    @Excel(name = "订单id")
+    private Long orderId;
+
+    /** 评价内容 */
+    @Excel(name = "评价内容")
+    private String content;
+
+    /** 用户昵称 */
+    @Excel(name = "用户昵称")
+    private String nickName;
+
+    /** 用户id */
+    @Excel(name = "用户id")
+    private Long userId;
+
+    /** 是否匿名 */
+    @Excel(name = "是否匿名")
+    private Long isAnonymous;
+
+    /** 是否所有人可见 */
+    @Excel(name = "是否所有人可见")
+    private Long isShow;
+
+    /** 评分 */
+    @Excel(name = "评分")
+    private BigDecimal rating;
+
+    /** 商家回复 */
+    @Excel(name = "商家回复")
+    private String merchantReply;
+
+    /** 上传图片 */
+    @Excel(name = "上传图片")
+    private String imageUrl;
+
+    /** 上传视频 */
+    @Excel(name = "上传视频")
+    private String videoUrl;
+
+    /** 评价包含商品ids(使用逗号分隔存储) */
+    @Excel(name = "评价包含商品ids", readConverterExp = "使=用逗号分隔存储")
+    private String productIds;
+
+    /** 是否删除 */
+    @Excel(name = "是否删除")
+    private Long isDel;
+
+    /** 评价订单店铺id */
+    @Excel(name = "评价订单店铺id")
+    private Long storeId;
+
+    /** 店铺名称 */
+    @Excel(name = "店铺名称")
+    private String storeName;
+
+    /**
+     * 查看自己的评价
+     */
+    private Integer showSelf;
+}

+ 8 - 0
fs-service/src/main/java/com/fs/his/mapper/FsStoreOrderMapper.java

@@ -1177,4 +1177,12 @@ public interface FsStoreOrderMapper
 
 
     List<Report> selectOrderByCustomerIds(@Param("map") ReportParam param);
+
+    @Select("select \n" +
+            "t1.store_id as storeId,\n" +
+            "t2.store_name as storeName,\n" +
+            "t1.item_json as itemJson from fs_store_order_scrm t1\n" +
+            "left join fs_store_scrm t2 on t1.store_id = t2.store_id\n" +
+            "where t1.id = #{orderId}")
+    ProductAndStroreVO getProductAndStroreInfoByOrderId(@Param("orderId") Long orderId);
 }

+ 84 - 0
fs-service/src/main/java/com/fs/his/mapper/FsStoreOrderScrmCommentMapper.java

@@ -0,0 +1,84 @@
+package com.fs.his.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.his.domain.FsStoreOrderScrmComment;
+
+import java.util.List;
+
+/**
+ * 订单评价Mapper接口
+ * 
+ * @author fs
+ * @date 2025-10-15
+ */
+public interface FsStoreOrderScrmCommentMapper extends BaseMapper<FsStoreOrderScrmComment> {
+    /**
+     * 查询订单评价
+     * 
+     * @param commentId 订单评价主键
+     * @return 订单评价
+     */
+    FsStoreOrderScrmComment selectFsStoreOrderScrmCommentByCommentId(Long commentId);
+
+    /**
+     * 查询订单评价列表
+     * 
+     * @param fsStoreOrderScrmComment 订单评价
+     * @return 订单评价集合
+     */
+    List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentList(FsStoreOrderScrmComment fsStoreOrderScrmComment);
+
+    /**
+     * 新增订单评价
+     * 
+     * @param fsStoreOrderScrmComment 订单评价
+     * @return 结果
+     */
+    int insertFsStoreOrderScrmComment(FsStoreOrderScrmComment fsStoreOrderScrmComment);
+
+    /**
+     * 修改订单评价
+     * 
+     * @param fsStoreOrderScrmComment 订单评价
+     * @return 结果
+     */
+    int updateFsStoreOrderScrmComment(FsStoreOrderScrmComment fsStoreOrderScrmComment);
+
+    /**
+     * 删除订单评价
+     * 
+     * @param commentId 订单评价主键
+     * @return 结果
+     */
+    int deleteFsStoreOrderScrmCommentByCommentId(Long commentId);
+
+    /**
+     * 批量删除订单评价
+     * 
+     * @param commentIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsStoreOrderScrmCommentByCommentIds(Long[] commentIds);
+
+    /**
+     * 用户端查询订单评价
+     * @param fsStoreOrderScrmComment
+     * @return
+     */
+    List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentByUser(FsStoreOrderScrmComment fsStoreOrderScrmComment);
+
+    /**
+     * 管理端查询订单评价
+     * @param fsStoreOrderScrmComment
+     * @return
+     */
+    List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentByManager(FsStoreOrderScrmComment fsStoreOrderScrmComment);
+
+    /**
+     * 根据订单ID查询订单评价
+     * @param orderId
+     * @return
+     */
+    FsStoreOrderScrmComment getCommentByOrderId(Long orderId);
+}

+ 92 - 0
fs-service/src/main/java/com/fs/his/param/OrderCommentParam.java

@@ -0,0 +1,92 @@
+package com.fs.his.param;
+
+import com.fs.common.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+
+/**
+ * @author MixLiu
+ * @date 2025/10/15 下午6:32)
+ */
+
+@Data
+public class OrderCommentParam  extends BaseEntity {
+
+    /**
+     * 评价id
+     */
+    private Long commentId;
+
+    /**
+     * 订单id
+     */
+    private Long orderId;
+
+    /**
+     * 评价内容
+     */
+    private String content;
+
+    /**
+     * 用户昵称
+     */
+    private String nickName;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 是否匿名
+     */
+    private Integer isAnonymous;
+
+    /**
+     * 是否所有人可见
+     */
+    private Integer isShow;
+
+    /**
+     * 评分
+     */
+    private BigDecimal rating;
+
+    /**
+     * 商家回复
+     */
+    private String merchantReply;
+
+    /**
+     * 图片
+     */
+    private String imageUrl;
+
+    /**
+     * 视频
+     */
+    private String videoUrl;
+
+    /**
+     * 评价包含的商品ids
+     */
+    private String productIds;
+
+    /**
+     * 是否删除
+     */
+    private Integer isDel;
+
+    /**
+     * 店铺id
+     */
+    private Long storeId;
+
+    /**
+     * 店铺名称
+     */
+    private String storeName;
+
+}

+ 81 - 0
fs-service/src/main/java/com/fs/his/service/IFsStoreOrderScrmCommentService.java

@@ -0,0 +1,81 @@
+package com.fs.his.service;
+
+
+import com.fs.his.domain.FsStoreOrderScrmComment;
+
+import java.util.List;
+
+/**
+ * 订单评价Service接口
+ * 
+ * @author fs
+ * @date 2025-10-15
+ */
+public interface IFsStoreOrderScrmCommentService {
+    /**
+     * 查询订单评价
+     * 
+     * @param commentId 订单评价主键
+     * @return 订单评价
+     */
+    FsStoreOrderScrmComment selectFsStoreOrderScrmCommentByCommentId(Long commentId);
+
+    /**
+     * 查询订单评价列表
+     * 
+     * @param fsStoreOrderScrmComment 订单评价
+     * @return 订单评价集合
+     */
+    List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentList(FsStoreOrderScrmComment fsStoreOrderScrmComment);
+
+    /**
+     * 新增订单评价
+     * 
+     * @param fsStoreOrderScrmComment 订单评价
+     * @return 结果
+     */
+    int insertFsStoreOrderScrmComment(FsStoreOrderScrmComment fsStoreOrderScrmComment);
+
+    /**
+     * 修改订单评价
+     * 
+     * @param fsStoreOrderScrmComment 订单评价
+     * @return 结果
+     */
+    int updateFsStoreOrderScrmComment(FsStoreOrderScrmComment fsStoreOrderScrmComment);
+
+    /**
+     * 批量删除订单评价
+     * 
+     * @param commentIds 需要删除的订单评价主键集合
+     * @return 结果
+     */
+    int deleteFsStoreOrderScrmCommentByCommentIds(Long[] commentIds);
+
+    /**
+     * 删除订单评价信息
+     * 
+     * @param commentId 订单评价主键
+     * @return 结果
+     */
+    int deleteFsStoreOrderScrmCommentByCommentId(Long commentId);
+
+    /**
+     * 用户端查询评价数据
+     * @return
+     */
+    List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentByUser(FsStoreOrderScrmComment fsStoreOrderScrmComment);
+
+    /**
+     * 管理端评价数据查询
+     * @return
+     */
+    List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentByManager(FsStoreOrderScrmComment fsStoreOrderScrmComment);
+
+    /**
+     * 通过订单id获取评价信息
+     * @param orderId
+     * @return
+     */
+    FsStoreOrderScrmComment getCommentByOrderId(Long orderId);
+}

+ 155 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderScrmCommentServiceImpl.java

@@ -0,0 +1,155 @@
+package com.fs.his.service.impl;
+
+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.his.domain.FsStoreOrderScrmComment;
+import com.fs.his.mapper.FsStoreOrderMapper;
+import com.fs.his.mapper.FsStoreOrderScrmCommentMapper;
+import com.fs.his.service.IFsStoreOrderScrmCommentService;
+import com.fs.his.vo.ProductAndStroreVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 订单评价Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-10-15
+ */
+@Service
+public class FsStoreOrderScrmCommentServiceImpl implements IFsStoreOrderScrmCommentService {
+
+    @Autowired
+    FsStoreOrderScrmCommentMapper fsStoreOrderScrmCommentMapper;
+
+    @Autowired
+    FsStoreOrderMapper fsStoreOrderMapper;
+    /**
+     * 查询订单评价
+     * 
+     * @param commentId 订单评价主键
+     * @return 订单评价
+     */
+    @Override
+    public FsStoreOrderScrmComment selectFsStoreOrderScrmCommentByCommentId(Long commentId)
+    {
+        return fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentByCommentId(commentId);
+    }
+
+    /**
+     * 查询订单评价列表
+     * 
+     * @param fsStoreOrderScrmComment 订单评价
+     * @return 订单评价
+     */
+    @Override
+    public List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentList(FsStoreOrderScrmComment fsStoreOrderScrmComment)
+    {
+        return fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentList(fsStoreOrderScrmComment);
+    }
+
+    /**
+     * 新增订单评价
+     * 
+     * @param fsStoreOrderScrmComment 订单评价
+     * @return 结果
+     */
+    @Override
+    public int insertFsStoreOrderScrmComment(FsStoreOrderScrmComment fsStoreOrderScrmComment)
+    {
+        fsStoreOrderScrmComment.setCreateTime(DateUtils.getNowDate());
+        //根据订单处理评价包含商品、店铺信息
+        ProductAndStroreVO poductAndStroreVO = fsStoreOrderMapper.getProductAndStroreInfoByOrderId(fsStoreOrderScrmComment.getOrderId());
+        if(null != poductAndStroreVO){
+            fsStoreOrderScrmComment.setStoreId(poductAndStroreVO.getStoreId());
+            fsStoreOrderScrmComment.setStoreName(poductAndStroreVO.getStoreName());
+            String itemJson = poductAndStroreVO.getItemJson();
+            JSONArray objects = JSONArray.parseArray(itemJson);
+            StringBuilder ids = new StringBuilder();
+            for (int i = 0; i < objects.size(); i++) {
+                JSONObject jsonObject = objects.getJSONObject(i);
+                ids.append(jsonObject.getString("productId")).append(",");
+            }
+            ids.deleteCharAt(ids.length()-1);
+            fsStoreOrderScrmComment.setProductIds(ids.toString());
+        }
+        return fsStoreOrderScrmCommentMapper.insertFsStoreOrderScrmComment(fsStoreOrderScrmComment);
+    }
+
+    /**
+     * 修改订单评价
+     * 
+     * @param fsStoreOrderScrmComment 订单评价
+     * @return 结果
+     */
+    @Override
+    public int updateFsStoreOrderScrmComment(FsStoreOrderScrmComment fsStoreOrderScrmComment)
+    {
+        fsStoreOrderScrmComment.setUpdateTime(DateUtils.getNowDate());
+        return fsStoreOrderScrmCommentMapper.updateFsStoreOrderScrmComment(fsStoreOrderScrmComment);
+    }
+
+    /**
+     * 批量删除订单评价
+     * 
+     * @param commentIds 需要删除的订单评价主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsStoreOrderScrmCommentByCommentIds(Long[] commentIds)
+    {
+        return fsStoreOrderScrmCommentMapper.deleteFsStoreOrderScrmCommentByCommentIds(commentIds);
+    }
+
+    /**
+     * 删除订单评价信息
+     * 
+     * @param commentId 订单评价主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsStoreOrderScrmCommentByCommentId(Long commentId)
+    {
+        return fsStoreOrderScrmCommentMapper.deleteFsStoreOrderScrmCommentByCommentId(commentId);
+    }
+
+    /**
+     * 用户端查询评价数据
+     * @param fsStoreOrderScrmComment
+     * @return
+     */
+    @Override
+    public  List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentByUser(FsStoreOrderScrmComment fsStoreOrderScrmComment){
+        return fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentByUser(fsStoreOrderScrmComment);
+    }
+
+    /**
+     * 评价管理端查询评价数据
+     * @param fsStoreOrderScrmComment
+     * @return
+     */
+    @Override
+    public  List<FsStoreOrderScrmComment> selectFsStoreOrderScrmCommentByManager(FsStoreOrderScrmComment fsStoreOrderScrmComment){
+        return fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentByManager(fsStoreOrderScrmComment);
+    }
+
+    /**
+     * 根据订单查询评价
+     * @param orderId
+     * @return
+     */
+    @Override
+    public FsStoreOrderScrmComment getCommentByOrderId(Long orderId){
+        FsStoreOrderScrmComment fsStoreOrderScrmComment = new FsStoreOrderScrmComment();
+        fsStoreOrderScrmComment.setOrderId(orderId);
+        List<FsStoreOrderScrmComment> datas = fsStoreOrderScrmCommentMapper.selectFsStoreOrderScrmCommentByManager(fsStoreOrderScrmComment);
+        if(null != datas && datas.size() > 0){
+            return datas.get(0);
+        }
+        return null;
+    }
+}

+ 17 - 0
fs-service/src/main/java/com/fs/his/vo/ProductAndStroreVO.java

@@ -0,0 +1,17 @@
+package com.fs.his.vo;
+
+import lombok.Data;
+
+/**
+ * @author MixLiu
+ * @date 2025/10/15 下午7:55)
+ */
+@Data
+public class ProductAndStroreVO {
+
+    private Long storeId;
+
+    private String storeName;
+
+    private String itemJson;
+}

+ 10 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreOrderItemScrm.java

@@ -72,4 +72,14 @@ public class FsStoreOrderItemScrm extends BaseEntity
      * 批次号
      */
     private String batchNumber;
+
+    /**
+     * 剂型
+     */
+    private String dosageForm;
+
+    /**
+     * 通用名称
+     */
+    private String commonName;
 }

+ 32 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreOrderScrm.java

@@ -3,6 +3,7 @@ package com.fs.hisStore.domain;
 import java.math.BigDecimal;
 import java.util.Date;
 
+import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fs.common.annotation.Excel;
@@ -351,6 +352,37 @@ public class FsStoreOrderScrm extends BaseEntity
     private BigDecimal billPrice;
     private String erpPhone;
 
+    /**
+     * 评论id
+     */
+    private Long commentId;
+
+    /**
+     * 评价内容
+     */
+    private String commentContent;
+
+    /**
+     * 评价图片
+     */
+    private String commentImageUrl;
+
+    /**
+     * 评价星级
+     */
+    private BigDecimal rating;
+
+    /**
+     * 商家回复
+     */
+    private String merchantReply;
+
+    /**
+     * 评价时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date commentTime;
+
     //组合订单标识
     private String combinationOrderId;
 

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

@@ -1,6 +1,7 @@
 package com.fs.hisStore.domain;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 import com.baomidou.mybatisplus.annotation.FieldStrategy;
 import com.baomidou.mybatisplus.annotation.TableField;
@@ -310,4 +311,9 @@ public class FsStoreProductScrm extends BaseEntity
     @Excel(name = "是否药品")
     private String isDrug;
 
+    /**
+     * 评价内容
+     */
+    private String commentContent;
+
 }

+ 10 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -76,7 +76,13 @@ public interface FsStoreProductScrmMapper
             "select p.*,pc.cate_name, fs_store.store_name,hs.push_status from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id  " +
             "left join fs_store on fs_store.store_id = p.store_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 " +
+            "<if test = 'maps.commentContent != null and  maps.commentContent !=\"\"    '> " +
+                " inner join fs_store_order_scrm_comment fsosc on FIND_IN_SET(p.product_id,fsosc.product_ids) and fsosc.is_del != 1" +
+            "</if>" +
             "where 1=1 " +
+            "<if test = 'maps.commentContent != null and  maps.commentContent !=\"\"    '> " +
+                "and fsosc.comment_content like CONCAT('%',#{maps.commentContent},'%') " +
+            "</if>" +
             "<if test = 'maps.productName != null and  maps.productName !=\"\"    '> " +
             "and p.product_name like CONCAT('%',#{maps.productName},'%') " +
             "</if>" +
@@ -144,7 +150,11 @@ public interface FsStoreProductScrmMapper
             " <if test='maps.precautions != null and maps.precautions != \"\"'>" +
             "     AND precautions LIKE CONCAT('%', #{maps.precautions}, '%')" +
             " </if>"+
+            " <if test='maps.prescribeSpec != null and maps.prescribeSpec != \"\"'>" +
+            "     AND p.prescribe_spec LIKE CONCAT('%', #{maps.prescribeSpec}, '%')" +
+            " </if>"+
             " order by p.product_id desc "+
+
             "</script>"})
     List<FsStoreProductListVO> selectFsStoreProductListVO(@Param("maps") FsStoreProductScrm fsStoreProduct);
 

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

@@ -67,6 +67,8 @@ public class FsStoreOrderItemScrmServiceImpl implements IFsStoreOrderItemScrmSer
                 item.setMah(activity.getMah());
                 item.setDrugRegCertNo(activity.getDrugRegCertNo());
                 item.setBatchNumber(activity.getBatchNumber());
+                item.setDosageForm(activity.getDosageForm());
+                item.setCommonName(activity.getCommonName());
             }
         }
         return resList;

+ 3 - 0
fs-service/src/main/java/com/fs/user/domain/FsUserComplaint.java

@@ -70,5 +70,8 @@ public class FsUserComplaint extends BaseEntity{
     @Excel(name = "店铺id")
     private Long storeId;
 
+    private Long orderId;
+
+    private String productIds;
 
 }

+ 4 - 0
fs-service/src/main/java/com/fs/user/service/IFsUserComplaintService.java

@@ -2,6 +2,7 @@ package com.fs.user.service;
 
 import java.util.List;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.store.vo.ProductScrmListVO;
 import com.fs.user.domain.FsUserComplaint;
 import com.fs.user.domain.param.FsUserComplaintParam;
 import com.fs.user.domain.vo.FsUserComplaintVo;
@@ -64,4 +65,7 @@ public interface IFsUserComplaintService extends IService<FsUserComplaint>{
      */
     int deleteFsUserComplaintById(Long id);
 
+
+    List<ProductScrmListVO> getProductListByOrderId(Long orderId);
+
 }

+ 40 - 0
fs-service/src/main/java/com/fs/user/service/impl/FsUserComplaintServiceImpl.java

@@ -1,10 +1,19 @@
 package com.fs.user.service.impl;
 
+import java.util.ArrayList;
 import java.util.List;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.fs.common.utils.DateUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.common.utils.StringUtils;
+import com.fs.hisStore.domain.FsStoreOrderScrm;
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
+import com.fs.store.vo.ProductScrmListVO;
 import com.fs.user.domain.param.FsUserComplaintParam;
 import com.fs.user.domain.vo.FsUserComplaintVo;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.fs.user.mapper.FsUserComplaintMapper;
 import com.fs.user.domain.FsUserComplaint;
@@ -19,6 +28,9 @@ import com.fs.user.service.IFsUserComplaintService;
 @Service
 public class FsUserComplaintServiceImpl extends ServiceImpl<FsUserComplaintMapper, FsUserComplaint> implements IFsUserComplaintService {
 
+    @Autowired
+    IFsStoreOrderScrmService fsStoreOrderScrmService;
+
     /**
      * 查询用户投诉
      *
@@ -109,4 +121,32 @@ public class FsUserComplaintServiceImpl extends ServiceImpl<FsUserComplaintMappe
     {
         return baseMapper.deleteFsUserComplaintById(id);
     }
+
+    /**
+     * 根据订单获取订单中的药品列表
+     * @param orderId
+     * @return
+     */
+    @Override
+    public List<ProductScrmListVO> getProductListByOrderId(Long orderId){
+        List<ProductScrmListVO> result = new ArrayList<>();
+        FsStoreOrderScrm fsStoreOrderScrm = fsStoreOrderScrmService.selectFsStoreOrderById(orderId);
+        if(null != fsStoreOrderScrm) {
+            String itemJson = fsStoreOrderScrm.getItemJson();
+            if (StringUtils.isNotBlank(itemJson)) {
+                JSONArray objects = JSONArray.parseArray(itemJson);
+                for (Object item : objects) {
+                    JSONObject data =  (JSONObject) item;
+                    JSONObject itemObj = data.getJSONObject("jsonInfo");
+                    ProductScrmListVO addItem = new ProductScrmListVO();
+                    addItem.setProductid(itemObj.getLong("productId"));
+                    addItem.setProductname(itemObj.getString("productName"));
+                    result.add(addItem);
+                }
+            }
+        }
+
+        return result;
+    }
 }
+

+ 5 - 0
fs-service/src/main/resources/application-druid-xzt.yml

@@ -6,6 +6,7 @@ spring:
     redis:
         # 地址
         host: 10.206.0.12
+#        host: 127.0.0.1
         # 端口,默认为6379
         port: 6379
         # 数据库索引
@@ -13,6 +14,7 @@ spring:
         # 密码
 #        password: Ylrz_1q2w3e4r5t6y
         password: ylrz147..
+#        password:
         # 连接超时时间
         timeout: 20s
         lettuce:
@@ -35,6 +37,9 @@ spring:
                     url: jdbc:mysql://10.206.0.14:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                     username: root
                     password: Ylrz_1q2w3e4r5t6y
+#                    url: jdbc:mysql://nj-cdb-c20xiduz.sql.tencentcdb.com:27803/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                    username: root
+#                    password: Ylrz_1q2w3e4r5t6y
                 # 从库数据源
                 slave:
                     # 从数据源开关/默认关闭

+ 199 - 0
fs-service/src/main/resources/mapper/his/FsStoreOrderScrmCommentMapper.xml

@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fs.his.mapper.FsStoreOrderScrmCommentMapper">
+    
+    <resultMap type="FsStoreOrderScrmComment" id="FsStoreOrderScrmCommentResult">
+        <result property="commentId"    column="comment_id"    />
+        <result property="orderId"    column="order_id"    />
+        <result property="content"    column="content"    />
+        <result property="nickName"    column="nick_name"    />
+        <result property="userId"    column="user_id"    />
+        <result property="isAnonymous"    column="is_anonymous"    />
+        <result property="isShow"    column="is_show"    />
+        <result property="rating"    column="rating"    />
+        <result property="merchantReply"    column="merchant_reply"    />
+        <result property="imageUrl"    column="image_url"    />
+        <result property="videoUrl"    column="video_url"    />
+        <result property="productIds"    column="product_ids"    />
+        <result property="isDel"    column="is_del"    />
+        <result property="storeId"    column="store_id"    />
+        <result property="storeName"    column="store_name"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </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>
+
+    <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>
+        </where>
+    </select>
+    <select id="selectFsStoreOrderScrmCommentByUser" parameterType="FsStoreOrderScrmComment" resultMap="FsStoreOrderScrmCommentResult">
+        select comment_id,
+               order_id,
+               content,
+               case when  is_anonymous != 1 then nick_name else '匿名用户' end as 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
+        where  is_del != 1 and (isShow = 1 or user_id = #{userId})
+            <if test="orderId != null "> and order_id = #{orderId}</if>
+            <if test="showSelf != null and showSelf = 1"> and user_id = #{userId}</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="isAnonymous != null "> and is_anonymous = #{isAnonymous}</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 find_in_set(#{productIds}, product_ids) > 0</if>
+            <if test="storeId != null "> and store_id = #{storeId}</if>
+            <if test="storeName != null  and storeName != ''"> and store_name like concat('%', #{storeName}, '%')</if>
+            order by create_time desc
+    </select>
+
+    <select id="selectFsStoreOrderScrmCommentByManager"  parameterType="FsStoreOrderScrmComment" resultMap="FsStoreOrderScrmCommentResult">
+        select comment_id,
+            order_id,
+            content,
+            case when  is_anonymous != 1 then nick_name else '匿名用户' end as 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
+        where  1=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>
+        <if test="isAnonymous != null "> and is_anonymous = #{isAnonymous}</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 find_in_set(#{productId}, product_ids) > 0</if>
+        <if test="storeId != null "> and store_id = #{storeId}</if>
+        <if test="storeName != null  and storeName != ''"> and store_name like concat('%', #{storeName}, '%')</if>
+        order by create_time desc
+    </select>
+
+
+
+    <select id="selectFsStoreOrderScrmCommentByCommentId" parameterType="Long" resultMap="FsStoreOrderScrmCommentResult">
+        <include refid="selectFsStoreOrderScrmCommentVo"/>
+        where comment_id = #{commentId}
+    </select>
+        
+    <insert id="insertFsStoreOrderScrmComment" parameterType="FsStoreOrderScrmComment" useGeneratedKeys="true" keyProperty="commentId">
+        insert into fs_store_order_scrm_comment
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderId != null">order_id,</if>
+            <if test="content != null">content,</if>
+            <if test="nickName != null">nick_name,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="isAnonymous != null">is_anonymous,</if>
+            <if test="isShow != null">is_show,</if>
+            <if test="rating != null">rating,</if>
+            <if test="merchantReply != null">merchant_reply,</if>
+            <if test="imageUrl != null">image_url,</if>
+            <if test="videoUrl != null">video_url,</if>
+            <if test="productIds != null">product_ids,</if>
+            <if test="isDel != null">is_del,</if>
+            <if test="storeId != null">store_id,</if>
+            <if test="storeName != null">store_name,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="orderId != null">#{orderId},</if>
+            <if test="content != null">#{content},</if>
+            <if test="nickName != null">#{nickName},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="isAnonymous != null">#{isAnonymous},</if>
+            <if test="isShow != null">#{isShow},</if>
+            <if test="rating != null">#{rating},</if>
+            <if test="merchantReply != null">#{merchantReply},</if>
+            <if test="imageUrl != null">#{imageUrl},</if>
+            <if test="videoUrl != null">#{videoUrl},</if>
+            <if test="productIds != null">#{productIds},</if>
+            <if test="isDel != null">#{isDel},</if>
+            <if test="storeId != null">#{storeId},</if>
+            <if test="storeName != null">#{storeName},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsStoreOrderScrmComment" parameterType="FsStoreOrderScrmComment">
+        update fs_store_order_scrm_comment
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="orderId != null">order_id = #{orderId},</if>
+            <if test="content != null">content = #{content},</if>
+            <if test="nickName != null">nick_name = #{nickName},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="isAnonymous != null">is_anonymous = #{isAnonymous},</if>
+            <if test="isShow != null">is_show = #{isShow},</if>
+            <if test="rating != null">rating = #{rating},</if>
+            <if test="merchantReply != null">merchant_reply = #{merchantReply},</if>
+            <if test="imageUrl != null">image_url = #{imageUrl},</if>
+            <if test="videoUrl != null">video_url = #{videoUrl},</if>
+            <if test="productIds != null">product_ids = #{productIds},</if>
+            <if test="isDel != null">is_del = #{isDel},</if>
+            <if test="storeId != null">store_id = #{storeId},</if>
+            <if test="storeName != null">store_name = #{storeName},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where comment_id = #{commentId}
+    </update>
+
+    <delete id="deleteFsStoreOrderScrmCommentByCommentId" parameterType="Long">
+        delete from fs_store_order_scrm_comment where comment_id = #{commentId}
+    </delete>
+
+    <delete id="deleteFsStoreOrderScrmCommentByCommentIds" parameterType="String">
+        delete from fs_store_order_scrm_comment where comment_id in 
+        <foreach item="commentId" collection="array" open="(" separator="," close=")">
+            #{commentId}
+        </foreach>
+    </delete>
+</mapper>

+ 8 - 1
fs-service/src/main/resources/mapper/user/FsUserComplaintMapper.xml

@@ -24,11 +24,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isReadStore"    column="is_read_store"    />
         <result property="isReadPlatform"    column="is_read_platform"    />
         <result property="storeId"    column="store_id"    />
+        <result property="orderId"    column="order_id"    />
     </resultMap>
 
     <sql id="selectFsUserComplaintVo">
         select id, fs_user_id, title, content, images, type, link_id, create_time, create_by, update_time, update_by,
-               remark,complaint_type,is_handle_store,is_handle_platform,is_read_user,is_read_store,is_read_platform,store_id
+               remark,complaint_type,is_handle_store,is_handle_platform,is_read_user,is_read_store,is_read_platform,store_id,order_id
         from fs_user_complaint
     </sql>
 
@@ -111,6 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isReadStore != null">is_read_store,</if>
             <if test="isReadPlatform != null">is_read_platform,</if>
             <if test="storeId != null">store_id,</if>
+            <if test="orderId != null">orderId,</if>
+            <if test="productIds != null">product_ids,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fsUserId != null">#{fsUserId},</if>
@@ -131,6 +134,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isReadStore != null">#{isReadStore},</if>
             <if test="isReadPlatform != null">#{isReadPlatform},</if>
             <if test="storeId != null">#{storeId},</if>
+            <if test="orderId != null">#{orderId},</if>
+            <if test="productIds != null">#{productIds},</if>
          </trim>
     </insert>
 
@@ -155,6 +160,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isReadStore != null">is_read_store = #{isReadStore},</if>
             <if test="isReadPlatform != null">is_read_platform = #{isReadPlatform},</if>
             <if test="storeId != null">store_id = #{storeId},</if>
+            <if test="orderId != null">order_id = #{orderId},</if>
+            <if test="productIds != null">product_ids = #{productIds},</if>
         </trim>
         where id = #{id}
     </update>

+ 4 - 0
fs-user-app/src/main/java/com/fs/app/controller/store/FsStoreUserComplaintController.java

@@ -142,4 +142,8 @@ public class FsStoreUserComplaintController extends AppBaseController
         return toAjax(fsUserComplaintMsgService.updateFsUserComplaintMsg(fsUserComplaintMsg));
     }
 
+    @GetMapping("/getProductListByOrderId/{orderId}")
+    public AjaxResult getProductListByOrderId(@PathVariable("orderId") Long orderId){
+        return AjaxResult.success(fsUserComplaintService.getProductListByOrderId(orderId));
+    }
 }

+ 36 - 4
fs-user-app/src/main/java/com/fs/app/controller/store/StoreOrderScrmController.java

@@ -13,14 +13,15 @@ import com.fs.app.annotation.Login;
 import com.fs.app.controller.AppBaseController;
 import com.fs.common.config.FSSysConfig;
 import com.fs.common.core.domain.R;
+import com.fs.common.core.domain.entity.SysUser;
+import com.fs.common.core.domain.model.LoginUser;
 import com.fs.common.exception.CustomException;
-import com.fs.common.utils.IpUtil;
-import com.fs.common.utils.ParseUtils;
-import com.fs.common.utils.ServletUtils;
-import com.fs.common.utils.StringUtils;
+import com.fs.common.utils.*;
 import com.fs.common.utils.ip.IpUtils;
 import com.fs.core.config.WxMaConfiguration;
 import com.fs.erp.service.IErpOrderService;
+import com.fs.his.domain.FsStoreOrderScrmComment;
+import com.fs.his.service.IFsStoreOrderScrmCommentService;
 import com.fs.his.utils.ConfigUtil;
 import com.fs.hisStore.config.FsErpConfig;
 import com.fs.hisStore.domain.*;
@@ -129,6 +130,8 @@ public class StoreOrderScrmController extends AppBaseController {
     private Hospital580PrescriptionScrmService orderScrmService;
     @Autowired
     private ConfigUtil configUtil;
+    @Autowired
+    private IFsStoreOrderScrmCommentService orderScrmCommentService;
     //TODO 应该没用到
     private IErpOrderService getErpService(){
         //判断是否开启erp
@@ -1156,6 +1159,35 @@ public class StoreOrderScrmController extends AppBaseController {
         return R.ok().put("count0",count0).put("count1",count1).put("count2",count2).put("afterSalesCount",afterSalesCount);
     }
 
+    /**
+     * 新增订单评价
+     */
+    @Login
+    @ApiOperation("新增订单评价")
+    @PostMapping("/addOrderComment")
+    public R addOrderComment(@RequestBody FsStoreOrderScrmComment param){
+        String userId = getUserId();
+        param.setUserId(Long.parseLong(userId));
+        orderScrmCommentService.insertFsStoreOrderScrmComment(param);
+        return R.ok();
+    }
+
+    /**
+     * 用户端获取订单评价 支持通过订单id、店铺id、商品id、用户id获取
+     * @param fsStoreOrderScrmComment
+     * @return
+     */
+
+    @Login
+    @ApiOperation("用户端获取订单评价")
+    @PostMapping("/selectFsStoreOrderScrmCommentByUser")
+    public R selectFsStoreOrderScrmCommentByUser(@RequestBody FsStoreOrderScrmComment fsStoreOrderScrmComment){
+        if(null == fsStoreOrderScrmComment.getOrderId() && null == fsStoreOrderScrmComment.getUserId()){
+            return R.error("查询参数错误,请检查");
+        }
+        List<FsStoreOrderScrmComment> fsStoreOrderScrmComments = orderScrmCommentService.selectFsStoreOrderScrmCommentByUser(fsStoreOrderScrmComment);
+        return R.ok().put("data",fsStoreOrderScrmComments);
+    }
 
     @Login
     @ApiOperation("根据组合标识获取订单")