Browse Source

feat:需求调整后的自提商品相关接口

caoliqin 3 weeks ago
parent
commit
e274713958
18 changed files with 972 additions and 97 deletions
  1. 19 0
      fs-company/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java
  2. 1 0
      fs-service/src/main/java/com/fs/his/enums/BusinessTypeEnum.java
  3. 35 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreOrderScrm.java
  4. 8 2
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java
  5. 1 1
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java
  6. 3 0
      fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderParam.java
  7. 25 0
      fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderPickComputeParam.java
  8. 25 0
      fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderPickPayParam.java
  9. 24 0
      fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderPickPaymentParam.java
  10. 18 0
      fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductAddEditParam.java
  11. 44 1
      fs-service/src/main/java/com/fs/hisStore/service/IFsStoreOrderPickService.java
  12. 542 71
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderPickServiceImpl.java
  13. 6 0
      fs-service/src/main/java/com/fs/hisStore/vo/FsStoreProductListVO.java
  14. 35 1
      fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml
  15. 19 9
      fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml
  16. 12 0
      fs-user-app/src/main/java/com/fs/app/controller/HuifuPayController.java
  17. 58 12
      fs-user-app/src/main/java/com/fs/app/controller/store/FsStoreOrderPickController.java
  18. 97 0
      fs-user-app/src/main/java/com/fs/app/controller/store/FsStoreRedeemedRecordController.java

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

@@ -163,6 +163,25 @@ public class FsStoreOrderScrmController extends BaseController
         return getDataTable(list);
     }
 
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:pickList')")
+    @GetMapping("/pickList")
+    public TableDataInfo pickList(FsStoreOrderParam param)
+    {
+        startPage();
+        if(!StringUtils.isEmpty(param.getCreateTimeRange())){
+            param.setCreateTimeList(param.getCreateTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getPayTimeRange())){
+            param.setPayTimeList(param.getPayTimeRange().split("--"));
+        }
+        if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
+            param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
+        }
+        param.setIsPickup(1);
+        List<FsStoreOrderVO> list = fsStoreOrderService.selectFsStoreOrderAllListVO(param);
+        return getDataTable(list);
+    }
+
     @PreAuthorize("@ss.hasPermi('store:storeOrder:myList')")
     @GetMapping("/myList")
     public TableDataInfo myList(FsStoreOrderParam param)

+ 1 - 0
fs-service/src/main/java/com/fs/his/enums/BusinessTypeEnum.java

@@ -8,6 +8,7 @@ import lombok.Getter;
 public enum BusinessTypeEnum {
     INTEGRAL_ORDER("integral", 6, "积分商城订单支付"),
     ORDER_ORDER("store", 8, "商城订单支付"),
+    STORE_PICK_ORDER("storePick", 8, "商城自提订单支付"),
     LIVE_ORDER("live", 9, "直播订单支付"),
     ;
 

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

@@ -437,4 +437,39 @@ public class FsStoreOrderScrm extends BaseEntity
 
     //直播间id
     private Long liveId;
+
+    /******************************** 以下是新增字段 ************************************/
+    /** 是否自提商品 0否 1是 */
+    private Integer isPickup;
+
+    /** 核销码 */
+    @Excel(name = "核销码")
+    private String redeemedCode;
+
+    /** 核销状态,1-待核销,2-已核销,3-已取消 */
+    @Excel(name = "核销状态,1-待核销,2-已核销,3-已取消")
+    private Integer redeemedStatus;
+
+    /** 核销时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "核销时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date redeemedTime;
+
+    /** 核销记录id */
+    @Excel(name = "核销记录id")
+    private Long redeemedId;
+
+    /** 取消订单说明 */
+    @Excel(name = "取消订单说明")
+    private String cancelExplain;
+
+    /** 取消时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "取消时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date cancelTime;
+
+    /** 信息采集记录id */
+    @Excel(name = "信息采集记录id")
+    private Long userRecordId;
+
 }

+ 8 - 2
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java

@@ -397,17 +397,23 @@ public class FsStoreProductScrm extends BaseEntity
     /** 是否自提商品 0否 1是 */
     private Integer isPickup;
 
+    /** 配送方式(1-自提;2-物流) */
+    private Integer shippingType;
+
+    /** 是否允许销售退款(1-是;0-否) */
+    private Integer isAllowSalesRefund;
+
     /**
      * 信息采集模板id,关联商品信息采集模板表
      */
     @Excel(name = "信息采集模板id")
-    private Long user_temp_id;
+    private Long userTempId;
 
     /**
      * 用户信息采集记录id,关联商品信息采集记录表
      */
     @Excel(name = "用户信息采集记录id")
-    private Long user_record_id;
+    private Long userRecordId;
 
     /** 商品类型多选查询(用于IN查询) */
     private List<Integer> productTypes;

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

@@ -171,7 +171,7 @@ public interface FsStoreProductScrmMapper
     @Select({"<script> " +
             "  select p.*,pc.cate_name from (SELECT ave.bar_code as bar_code,p.product_id, p.image, p.slider_image,p.product_name, p.product_info,p.keyword, p.cate_id, p.price, p.vip_price, " +
             " p.ot_price,p.agent_price, p.postage,p.unit_name,p.sort,p.sales,p.stock,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.shipping_type,p.is_allow_sales_refund " +
             " 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" +
             "<if test = 'maps.isPickup != null '> and p.is_pickup = #{maps.isPickup} </if>" +
             ") p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id   " +

+ 3 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderParam.java

@@ -146,6 +146,9 @@ public class FsStoreOrderParam extends BaseEntity implements Serializable
     // 是否公司订单,1-是,0-否
     private Integer isCompanyOrder;
 
+    /** 是否自提商品 0否 1是 */
+    private Integer isPickup;
+
     private String userPhoneMk;
 
     /** ID */

+ 25 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderPickComputeParam.java

@@ -0,0 +1,25 @@
+package com.fs.hisStore.param;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * 自提订单金额计算入参
+ */
+@Data
+public class FsStoreOrderPickComputeParam implements Serializable {
+//    private Long storeId;
+    @NotNull
+    private Long orderId;
+
+    @NotNull
+    private Long companyId;
+
+    @NotNull
+    private Long companyUserId;
+
+    @NotNull
+    Integer payType;
+}

+ 25 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderPickPayParam.java

@@ -0,0 +1,25 @@
+package com.fs.hisStore.param;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * 自提订单确认支付入参
+ */
+@Data
+public class FsStoreOrderPickPayParam implements Serializable {
+    @NotNull(message = "订单号不能为空")
+    private Long orderId;
+
+    /**
+     * 地址id
+     */
+    private Long addressId;
+
+    private String remark;
+
+    @NotNull(message = "支付类型不能为空")
+    private Integer payType;
+}

+ 24 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderPickPaymentParam.java

@@ -0,0 +1,24 @@
+package com.fs.hisStore.param;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+@Data
+public class FsStoreOrderPickPaymentParam implements Serializable
+{
+    @ApiModelProperty(value = "orderId")
+    @NotNull(message = "订单号不能为空")
+    private Long orderId;
+
+    @ApiModelProperty(value = "payType")
+    @NotNull(message = "支付类型不能为空")
+    private String payType;
+
+    private Long userId;
+
+    @ApiModelProperty(value = "小程序或者app的id")
+    private String appId;
+}

+ 18 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductAddEditParam.java

@@ -318,4 +318,22 @@ public class FsStoreProductAddEditParam implements Serializable
 
     /** 是否自提商品 0否 1是 */
     private Integer isPickup;
+
+    /**
+     * 信息采集模板id,关联商品信息采集模板表
+     */
+    @Excel(name = "信息采集模板id")
+    private Long userTempId;
+
+    /**
+     * 用户信息采集记录id,关联商品信息采集记录表
+     */
+    @Excel(name = "用户信息采集记录id")
+    private Long userRecordId;
+
+    /** 配送方式(1-自提;2-物流) */
+    private Integer shippingType;
+
+    /** 是否允许销售退单(1-是;0-否) */
+    private Integer isAllowSalesRefund;
 }

+ 44 - 1
fs-service/src/main/java/com/fs/hisStore/service/IFsStoreOrderPickService.java

@@ -2,8 +2,15 @@ package com.fs.hisStore.service;
 
 import java.util.List;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.common.core.domain.R;
+import com.fs.his.param.FsIntegralOrderDoPayParam;
 import com.fs.hisStore.domain.FsStoreOrderPick;
 import com.fs.hisStore.param.FsStoreOrderPickAddParam;
+import com.fs.hisStore.param.FsStoreOrderPickComputeParam;
+import com.fs.hisStore.param.FsStoreOrderPickPayParam;
+import com.fs.hisStore.param.FsStoreOrderPickPaymentParam;
+
+import javax.servlet.http.HttpServletRequest;
 
 /**
  * 自提商品订单Service接口
@@ -66,5 +73,41 @@ public interface IFsStoreOrderPickService extends IService<FsStoreOrderPick>{
      * @param fsStoreOrderPickAddParam 自提商品订单入参
      * @return 结果
      */
-    int createFsStoreOrderPick(FsStoreOrderPickAddParam fsStoreOrderPickAddParam);
+    R createFsStoreOrderPick(FsStoreOrderPickAddParam fsStoreOrderPickAddParam);
+
+    /**
+     * 自提订单确认页
+     * @param param 入参
+     * @return
+     */
+    R confirmFsStoreOrderPick(FsStoreOrderPickAddParam param);
+
+    /**
+     * 自提订单金额计算
+     * @param userId 用户id
+     * @param param 入参
+     * @return
+     */
+    R computeFsStoreOrderPick(Long userId, FsStoreOrderPickComputeParam param);
+
+    /**
+     * 自提订单支付确认
+     * @param userId 用户id
+     * @param param 入参
+     * @return
+     */
+    R payFsStoreOrderPick(Long userId, FsStoreOrderPickPayParam param);
+
+    /**
+     * 自提订单实际支付
+     * @param param 入参
+     * @param request header参数
+     * @return
+     */
+    R paymentFsStoreOrderPick(FsStoreOrderPickPaymentParam param, HttpServletRequest request);
+
+    /**
+     * 自提订单详情
+     */
+    R getFsStoreOrderPickDetail(Long userId, Long orderId);
 }

+ 542 - 71
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderPickServiceImpl.java

@@ -1,33 +1,85 @@
 package com.fs.hisStore.service.impl;
 
 import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSON;
+import com.alipay.api.AlipayClient;
+import com.alipay.api.DefaultAlipayClient;
+import com.alipay.api.diagnosis.DiagnosisUtils;
+import com.alipay.api.domain.AlipayTradeAppPayModel;
+import com.alipay.api.request.AlipayTradeAppPayRequest;
+import com.alipay.api.response.AlipayTradeAppPayResponse;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.common.core.domain.R;
 import com.fs.common.exception.ServiceException;
-import com.fs.common.utils.SnowflakeUtil;
+import com.fs.common.utils.DateUtils;
 import com.fs.common.utils.StringUtils;
+import com.fs.common.utils.ServletUtils;
+import com.fs.common.utils.ip.IpUtils;
+import com.fs.core.config.WxPayProperties;
+import com.fs.core.utils.OrderCodeUtils;
+import com.fs.his.domain.FsPayConfig;
+import com.fs.his.domain.FsUser;
+import com.fs.his.domain.MerchantAppConfig;
+import com.fs.his.domain.FsUserWx;
+import com.fs.his.param.FsIntegralOrderDoPayParam;
+import com.fs.his.mapper.FsUserWxMapper;
+import com.fs.his.mapper.MerchantAppConfigMapper;
+import com.fs.his.service.IFsUserService;
+import com.fs.his.utils.PhoneUtil;
 import com.fs.his.utils.qrcode.QRCodeUtils;
-import com.fs.hisStore.domain.FsStoreOrderPickItem;
+import com.fs.hisStore.domain.FsStoreOrderItemScrm;
+import com.fs.hisStore.domain.FsStoreOrderPick;
+import com.fs.hisStore.domain.FsStoreOrderScrm;
+import com.fs.hisStore.domain.FsStorePaymentScrm;
 import com.fs.hisStore.domain.FsStoreProductScrm;
+import com.fs.hisStore.domain.FsUserAddressScrm;
 import com.fs.hisStore.domain.FsUserScrm;
-import com.fs.hisStore.mapper.FsStoreOrderPickItemMapper;
+import com.fs.hisStore.mapper.FsStorePaymentScrmMapper;
+import com.fs.hisStore.mapper.FsStoreOrderItemScrmMapper;
+import com.fs.hisStore.mapper.FsStoreOrderPickMapper;
+import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
+import com.fs.hisStore.mapper.FsUserAddressScrmMapper;
+import com.fs.hisStore.param.FsStoreOrderPickAddParam;
+import com.fs.hisStore.param.FsStoreOrderPickComputeParam;
+import com.fs.hisStore.param.FsStoreOrderPickPayParam;
+import com.fs.hisStore.param.FsStoreOrderPickPaymentParam;
+import com.fs.hisStore.service.IFsStoreOrderPickService;
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
 import com.fs.hisStore.service.IFsStoreProductScrmService;
 import com.fs.hisStore.service.IFsUserScrmService;
+import com.fs.hisStore.vo.FSUserVO;
+import com.fs.hisStore.vo.FsStoreOrderItemVO;
+import com.fs.course.domain.FsCoursePlaySourceConfig;
+import com.fs.course.mapper.FsCoursePlaySourceConfigMapper;
+import com.fs.huifuPay.domain.HuiFuCreateOrder;
+import com.fs.huifuPay.domain.HuifuCreateOrderResult;
+import com.fs.huifuPay.service.HuiFuService;
 import com.fs.system.oss.CloudStorageService;
 import com.fs.system.oss.OSSFactory;
-import java.util.List;
-import com.fs.common.utils.DateUtils;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.fs.hisStore.param.FsStoreOrderPickAddParam;
+import com.fs.tzBankPay.TzBankService.TzBankService;
+import com.fs.tzBankPay.doman.PayCreateOrder;
+import com.fs.tzBankPay.doman.PayCreateOrderResult;
+import com.fs.tzBankPay.doman.TzBankResult;
+import com.fs.ybPay.domain.CreateWxOrderResult;
+import com.fs.ybPay.dto.WxJspayDTO;
+import com.fs.ybPay.service.IPayService;
+import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
+import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest;
+import com.github.binarywang.wxpay.config.WxPayConfig;
+import com.github.binarywang.wxpay.exception.WxPayException;
+import com.github.binarywang.wxpay.service.WxPayService;
 import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import com.fs.hisStore.mapper.FsStoreOrderPickMapper;
-import com.fs.hisStore.domain.FsStoreOrderPick;
-import com.fs.hisStore.service.IFsStoreOrderPickService;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 
+import javax.servlet.http.HttpServletRequest;
 import java.io.ByteArrayInputStream;
 import java.math.BigDecimal;
-import java.util.ArrayList;
+import java.util.*;
 
 /**
  * 自提商品订单Service业务层处理
@@ -35,6 +87,7 @@ import java.util.ArrayList;
  * @author fs
  * @date 2026-06-24
  */
+@Slf4j
 @Service
 public class FsStoreOrderPickServiceImpl extends ServiceImpl<FsStoreOrderPickMapper, FsStoreOrderPick> implements IFsStoreOrderPickService {
     @Autowired
@@ -42,7 +95,33 @@ public class FsStoreOrderPickServiceImpl extends ServiceImpl<FsStoreOrderPickMap
     @Autowired
     private IFsStoreProductScrmService fsStoreProductScrmService;
     @Autowired
-    private FsStoreOrderPickItemMapper fsStoreOrderPickItemMapper;
+    private IFsStoreOrderScrmService fsStoreOrderScrmService;
+    @Autowired
+    private FsStoreOrderScrmMapper fsStoreOrderScrmMapper;
+    @Autowired
+    private FsStoreOrderItemScrmMapper fsStoreOrderItemScrmMapper;
+    @Autowired
+    private FsUserAddressScrmMapper fsUserAddressScrmMapper;
+    @Autowired
+    private FsCoursePlaySourceConfigMapper fsCoursePlaySourceConfigMapper;
+    @Autowired
+    private MerchantAppConfigMapper merchantAppConfigMapper;
+    @Autowired
+    private FsStorePaymentScrmMapper fsStorePaymentScrmMapper;
+    @Autowired
+    private FsUserWxMapper fsUserWxMapper;
+    @Autowired
+    private WxPayService wxPayService;
+    @Autowired
+    private IPayService payService;
+    @Autowired
+    private TzBankService tzBankService;
+    @Autowired
+    private HuiFuService huiFuService;
+    @Autowired
+    private IFsUserService userService;
+    @Autowired
+    private WxPayProperties wxPayProperties;
 
     /**
      * 查询自提商品订单
@@ -51,8 +130,7 @@ public class FsStoreOrderPickServiceImpl extends ServiceImpl<FsStoreOrderPickMap
      * @return 自提商品订单
      */
     @Override
-    public FsStoreOrderPick selectFsStoreOrderPickById(Long id)
-    {
+    public FsStoreOrderPick selectFsStoreOrderPickById(Long id) {
         return baseMapper.selectFsStoreOrderPickById(id);
     }
 
@@ -63,8 +141,7 @@ public class FsStoreOrderPickServiceImpl extends ServiceImpl<FsStoreOrderPickMap
      * @return 自提商品订单
      */
     @Override
-    public List<FsStoreOrderPick> selectFsStoreOrderPickList(FsStoreOrderPick fsStoreOrderPick)
-    {
+    public List<FsStoreOrderPick> selectFsStoreOrderPickList(FsStoreOrderPick fsStoreOrderPick) {
         return baseMapper.selectFsStoreOrderPickList(fsStoreOrderPick);
     }
 
@@ -75,8 +152,7 @@ public class FsStoreOrderPickServiceImpl extends ServiceImpl<FsStoreOrderPickMap
      * @return 结果
      */
     @Override
-    public int insertFsStoreOrderPick(FsStoreOrderPick fsStoreOrderPick)
-    {
+    public int insertFsStoreOrderPick(FsStoreOrderPick fsStoreOrderPick) {
         fsStoreOrderPick.setCreateTime(DateUtils.getNowDate());
         return baseMapper.insertFsStoreOrderPick(fsStoreOrderPick);
     }
@@ -88,8 +164,7 @@ public class FsStoreOrderPickServiceImpl extends ServiceImpl<FsStoreOrderPickMap
      * @return 结果
      */
     @Override
-    public int updateFsStoreOrderPick(FsStoreOrderPick fsStoreOrderPick)
-    {
+    public int updateFsStoreOrderPick(FsStoreOrderPick fsStoreOrderPick) {
         fsStoreOrderPick.setUpdateTime(DateUtils.getNowDate());
         return baseMapper.updateFsStoreOrderPick(fsStoreOrderPick);
     }
@@ -101,8 +176,7 @@ public class FsStoreOrderPickServiceImpl extends ServiceImpl<FsStoreOrderPickMap
      * @return 结果
      */
     @Override
-    public int deleteFsStoreOrderPickByIds(Long[] ids)
-    {
+    public int deleteFsStoreOrderPickByIds(Long[] ids) {
         return baseMapper.deleteFsStoreOrderPickByIds(ids);
     }
 
@@ -113,74 +187,471 @@ public class FsStoreOrderPickServiceImpl extends ServiceImpl<FsStoreOrderPickMap
      * @return 结果
      */
     @Override
-    public int deleteFsStoreOrderPickById(Long id)
-    {
+    public int deleteFsStoreOrderPickById(Long id) {
         return baseMapper.deleteFsStoreOrderPickById(id);
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int createFsStoreOrderPick(FsStoreOrderPickAddParam fsStoreOrderPickAddParam) {
-        if (fsStoreOrderPickAddParam == null || fsStoreOrderPickAddParam.getUserId() == null || fsStoreOrderPickAddParam.getProductId() == null) {
-            throw new RuntimeException("参数错误");
+    public R createFsStoreOrderPick(FsStoreOrderPickAddParam param) {
+        if (param == null || param.getUserId() == null || param.getProductId() == null) {
+            return R.error("参数错误");
         }
-
-        FsUserScrm user = fsUserScrmService.selectFsUserById(fsStoreOrderPickAddParam.getUserId());
-        if (user == null || Integer.valueOf(1).equals(user.getIsDel())) {
-            throw new RuntimeException("用户不存在");
+        FsUserScrm user = fsUserScrmService.selectFsUserById(param.getUserId());
+        if (user == null) {
+            return R.error("用户不存在");
         }
-        FsStoreProductScrm product = fsStoreProductScrmService.selectFsStoreProductById(fsStoreOrderPickAddParam.getProductId());
+        FsStoreProductScrm product = fsStoreProductScrmService.selectFsStoreProductById(param.getProductId());
         if (product == null || Integer.valueOf(1).equals(product.getIsDel())) {
-            throw new RuntimeException("商品不存在");
+            return R.error("商品不存在");
+        }
+        String orderCode = OrderCodeUtils.getOrderSn();
+        if (StringUtils.isEmpty(orderCode)) {
+            return R.error("订单生成失败,请重试");
         }
-        String orderCode = SnowflakeUtil.nextIdStr();
-        // 生成核销码
-        String redeemQrUrl = generateRedeemedQrUrl(orderCode);
-        FsStoreOrderPick orderPick = new FsStoreOrderPick();
-        orderPick.setOrderCode(orderCode);
-        orderPick.setUserId(user.getUserId());
-        String nickName = StringUtils.isNotEmpty(user.getNickName()) ? user.getNickName() : user.getNickname();
-        orderPick.setNickName(nickName);
-        orderPick.setPhone(user.getPhone());
-        orderPick.setTotalNum(1);
         BigDecimal price = product.getPrice() == null ? BigDecimal.ZERO : product.getPrice();
-        orderPick.setTotalPrice(price);
-        orderPick.setRedeemedCode(redeemQrUrl);
-        orderPick.setRedeemedStatus(1);
-        orderPick.setIsDel(0);
-        orderPick.setCompanyId(fsStoreOrderPickAddParam.getCompanyId());
-        orderPick.setCompanyUserId(fsStoreOrderPickAddParam.getCompanyUserId());
-        orderPick.setDeptId(fsStoreOrderPickAddParam.getDeptId());
-        orderPick.setUserRecordId(fsStoreOrderPickAddParam.getUserRecordId());
-        orderPick.setCreateTime(DateUtils.getNowDate());
-        int rows = baseMapper.insertFsStoreOrderPick(orderPick);
-        if (rows <= 0 || orderPick.getId() == null) {
-            throw new RuntimeException("创建自提订单失败");
-        }
-
-        FsStoreOrderPickItem orderPickItem = new FsStoreOrderPickItem();
-        orderPickItem.setOrderId(orderPick.getId());
-        orderPickItem.setOrderCode(orderCode);
-        orderPickItem.setProductId(product.getProductId());
-        orderPickItem.setNum(1);
+        String redeemQrUrl = generateRedeemedQrUrl(orderCode);
+        FsStoreOrderScrm order = new FsStoreOrderScrm();
+        order.setOrderCode(orderCode);
+        order.setUserId(user.getUserId());
+        String realName = StringUtils.isNotEmpty(user.getNickName()) ? user.getNickName() : user.getNickname();
+        order.setRealName(realName);
+        order.setUserPhone(user.getPhone());
+        order.setUserAddress(param.getPickupAddress());
+        order.setTotalNum(1L);
+        order.setTotalPrice(price);
+        order.setPayPrice(price);
+        order.setPayMoney(BigDecimal.ZERO);
+        order.setPaid(0);
+        order.setIsPay(0);
+        order.setPayType("1");
+        order.setStatus(0);
+        order.setIsDel(0);
+        order.setIsSysDel(0);
+        Integer productShippingType = product.getShippingType();
+        if (Integer.valueOf(1).equals(productShippingType)) {
+            order.setShippingType(2);
+        } else if (Integer.valueOf(2).equals(productShippingType)) {
+            order.setShippingType(1);
+        } else {
+            order.setShippingType(2);
+        }
+        order.setOrderType(8);
+        order.setIsPickup(1);
+        order.setRedeemedCode(redeemQrUrl);
+        order.setRedeemedStatus(1);
+        order.setCompanyId(param.getCompanyId());
+        order.setCompanyUserId(param.getCompanyUserId());
+        order.setDeptId(param.getDeptId());
+        order.setUserRecordId(param.getUserRecordId());
+        order.setCreateTime(DateUtils.getNowDate());
+        int rows = fsStoreOrderScrmMapper.insertFsStoreOrder(order);
+        if (rows <= 0 || order.getId() == null) {
+            return R.error("创建自提订单失败");
+        }
+        FsStoreOrderItemScrm orderItem = new FsStoreOrderItemScrm();
+        orderItem.setOrderId(order.getId());
+        orderItem.setOrderCode(orderCode);
+        orderItem.setProductId(product.getProductId());
+        orderItem.setNum(1);
         PickItemJsonInfo jsonInfo = new PickItemJsonInfo();
         jsonInfo.setImage(product.getImage());
         jsonInfo.setProductId(product.getProductId());
         jsonInfo.setNum(1);
         jsonInfo.setProductName(product.getProductName());
         jsonInfo.setPrice(price);
-        orderPickItem.setJsonInfo(JSONUtil.toJsonStr(jsonInfo));
-        fsStoreOrderPickItemMapper.insertFsStoreOrderPickItem(orderPickItem);
-
-        List<FsStoreOrderPickItem> itemList = new ArrayList<>();
-        itemList.add(orderPickItem);
-        FsStoreOrderPick updateOrder = new FsStoreOrderPick();
-        updateOrder.setId(orderPick.getId());
+        orderItem.setJsonInfo(JSONUtil.toJsonStr(jsonInfo));
+        fsStoreOrderItemScrmMapper.insertFsStoreOrderItem(orderItem);
+        List<FsStoreOrderItemScrm> itemList = new ArrayList<>();
+        itemList.add(orderItem);
+        FsStoreOrderScrm updateOrder = new FsStoreOrderScrm();
+        updateOrder.setId(order.getId());
         updateOrder.setItemJson(JSONUtil.toJsonStr(itemList));
-        baseMapper.updateFsStoreOrderPick(updateOrder);
-        return rows;
+        updateOrder.setUpdateTime(DateUtils.getNowDate());
+        fsStoreOrderScrmMapper.updateFsStoreOrder(updateOrder);
+        return R.ok().put("order", order);
+    }
+
+    @Override
+    public R confirmFsStoreOrderPick(FsStoreOrderPickAddParam param) {
+        return buildPickOrderPreview(param);
+    }
+
+    @Override
+    public R computeFsStoreOrderPick(Long userId, FsStoreOrderPickComputeParam param) {
+        if (param == null || param.getOrderId() == null) {
+            return R.error("订单号不能为空");
+        }
+        FsStoreOrderScrm order = fsStoreOrderScrmService.selectFsStoreOrderById(param.getOrderId());
+        if (order == null || !userId.equals(order.getUserId()) || !Integer.valueOf(1).equals(order.getIsPickup())) {
+            return R.error("订单不存在");
+        }
+        Map<String, Object> moneys = computeOrderMoney(order.getTotalPrice(), param);
+        return R.ok().put("moneys", moneys);
+    }
+
+    /**
+     * 自提订单金额计算(对齐套餐包返回结构)
+     */
+    private Map<String, Object> computeOrderMoney(BigDecimal orderPrice, FsStoreOrderPickComputeParam param) {
+        Map<String, Object> moneys = new HashMap<>();
+        BigDecimal safeOrderPrice = orderPrice == null ? BigDecimal.ZERO : orderPrice;
+        BigDecimal payPrice = safeOrderPrice;
+        BigDecimal payMoney = safeOrderPrice;
+        BigDecimal payRemain = BigDecimal.ZERO;
+        BigDecimal payDelivery = BigDecimal.ZERO;
+        BigDecimal discountMoney = BigDecimal.ZERO;
+
+        // 暂时没有优惠券
+
+        if (payPrice.compareTo(new BigDecimal(0)) > 0) {
+            if (param.getPayType().equals(1)) {
+                //全款支付
+                payMoney = payPrice;
+                payRemain = new BigDecimal(0);
+                payDelivery = new BigDecimal(0);
+            }
+            //
+        }
+        moneys.put("payPrice", payPrice);
+        moneys.put("payMoney", payMoney);
+        moneys.put("payRemain", payRemain);
+        moneys.put("payDelivery", payDelivery);
+        moneys.put("discountMoney", discountMoney);
+        return moneys;
+    }
+
+    @Override
+    public R payFsStoreOrderPick(Long userId, FsStoreOrderPickPayParam param) {
+        if (param == null || param.getOrderId() == null) {
+            return R.error("订单号不能为空");
+        }
+        if (param.getPayType() == null) {
+            return R.error("非法操作");
+        }
+        FsStoreOrderScrm order = fsStoreOrderScrmService.selectFsStoreOrderById(param.getOrderId());
+        if (order == null || !userId.equals(order.getUserId()) || !Integer.valueOf(1).equals(order.getIsPickup())) {
+            return R.error("订单不存在");
+        }
+        // 状态必须要是待支付
+        if (!Integer.valueOf(0).equals(order.getStatus())) {
+            return R.error("非法操作");
+        }
+        FsStoreOrderPickComputeParam computeParam = new FsStoreOrderPickComputeParam();
+        computeParam.setOrderId(order.getId());
+        computeParam.setCompanyId(order.getCompanyId());
+        computeParam.setCompanyUserId(order.getCompanyUserId());
+        computeParam.setPayType(param.getPayType());
+        Map<String, Object> moneys = computeOrderMoney(order.getTotalPrice(), computeParam);
+        FsStoreOrderScrm updateOrder = new FsStoreOrderScrm();
+        updateOrder.setId(order.getId());
+        updateOrder.setPayMoney((BigDecimal) moneys.get("payMoney"));
+        updateOrder.setPayPrice((BigDecimal) moneys.get("payPrice"));
+        updateOrder.setPayDelivery((BigDecimal) moneys.get("payDelivery"));
+        updateOrder.setDiscountMoney((BigDecimal) moneys.get("discountMoney"));
+        updateOrder.setPayType(String.valueOf(param.getPayType()));
+        updateOrder.setRemark(param.getRemark());
+
+        if (param.getAddressId() == null) {
+            return R.error("收货地址不能为空");
+        }
+        FsUserAddressScrm address = fsUserAddressScrmMapper.selectFsUserAddressById(param.getAddressId());
+        if (address == null || !userId.equals(address.getUserId())) {
+            return R.error("收货地址不存在");
+        }
+        updateOrder.setRealName(address.getRealName());
+        updateOrder.setUserPhone(address.getPhone());
+        updateOrder.setUserAddress(address.getProvince() + " " + address.getCity() + " " + address.getDistrict() + " " + address.getDetail());
+
+        updateOrder.setUpdateTime(DateUtils.getNowDate());
+        fsStoreOrderScrmMapper.updateFsStoreOrder(updateOrder);
+        return R.ok();
     }
 
+    @Override
+    public R paymentFsStoreOrderPick(FsStoreOrderPickPaymentParam param, HttpServletRequest request) {
+        if (param == null || param.getOrderId() == null || param.getUserId() == null) {
+            return R.error("参数错误");
+        }
+        FsStoreOrderScrm order = fsStoreOrderScrmService.selectFsStoreOrderById(param.getOrderId());
+        if (order == null || !param.getUserId().equals(order.getUserId()) || !Integer.valueOf(1).equals(order.getIsPickup())) {
+            return R.error("订单不存在");
+        }
+        if (!Integer.valueOf(0).equals(order.getStatus())) {
+            return R.error("非法操作");
+        }
+        if (order.getPayMoney() == null || order.getPayMoney().compareTo(BigDecimal.ZERO) <= 0) {
+            return R.error("支付金额须大于0");
+        }
+//        FsUserScrm user = fsUserScrmService.selectFsUserById(param.getUserId());
+        FsUser user= userService.selectFsUserByUserId(param.getUserId());
+        if (user == null) {
+            return R.error("用户不存在");
+        }
+        if (StringUtils.isBlank(param.getAppId())) {
+            throw new IllegalArgumentException("appId不能为空");
+        }
+        FsCoursePlaySourceConfig sourceConfig = fsCoursePlaySourceConfigMapper.selectCoursePlaySourceConfigByAppId(param.getAppId());
+        if (sourceConfig == null) {
+            throw new ServiceException("未找到appId对应的小程序配置: " + param.getAppId());
+        }
+        Long merchantConfigId = sourceConfig.getMerchantConfigId();
+        if (merchantConfigId == null || merchantConfigId <= 0) {
+            throw new ServiceException("小程序没有配置商户信息");
+        }
+        MerchantAppConfig merchantAppConfig = merchantAppConfigMapper.selectMerchantAppConfigById(merchantConfigId);
+        FsPayConfig fsPayConfig = JSON.parseObject(merchantAppConfig.getDataJson(), FsPayConfig.class);
+
+        String openId = null;
+        String appId = param.getAppId();
+        if (request.getHeader("sourcetype") != null && "APP".equals(request.getHeader("sourcetype"))) {
+//            FsUser fsUser = fsUserService.selectFsUserByUserId(param.getUserId().longValue());
+            openId = user.getAppOpenId();
+        } else {
+            if (StringUtils.isNotBlank(appId)) {
+                Wrapper<FsUserWx> queryWrapper = Wrappers.<FsUserWx>lambdaQuery()
+                        .eq(FsUserWx::getFsUserId, param.getUserId())
+                        .eq(FsUserWx::getAppId, appId);
+                FsUserWx fsUserWx = fsUserWxMapper.selectOne(queryWrapper);
+                if (fsUserWx != null) {
+                    openId = fsUserWx.getOpenId();
+                }
+            } else {
+                appId = sourceConfig.getAppid();
+                openId = Objects.isNull(user) ? "" : user.getMaOpenId();
+                if (StringUtils.isBlank(openId)){
+                    Wrapper<FsUserWx> queryWrapper = Wrappers.<FsUserWx>lambdaQuery()
+                            .eq(FsUserWx::getFsUserId, param.getUserId())
+                            .eq(FsUserWx::getAppId, appId);
+                    FsUserWx fsUserWx = fsUserWxMapper.selectOne(queryWrapper);
+                    if (Objects.nonNull(fsUserWx)){
+                        openId = fsUserWx.getOpenId();
+                    }
+                }
+            }
+        }
+        if (user != null
+                && (
+                StringUtils.isNotEmpty(openId)
+                        || "appPay".equals(merchantAppConfig.getMerchantType())
+                        || ("hf".equals(merchantAppConfig.getMerchantType()) && "ali".equals(param.getPayType()))
+        )) {
+
+        }
+        String payCode = OrderCodeUtils.getOrderSn();
+        if (StringUtils.isEmpty(payCode)) {
+            return R.error("订单生成失败,请重试");
+        }
+        String payType = normalizePayType(param.getPayType());
+        FsStorePaymentScrm storePayment = new FsStorePaymentScrm();
+        storePayment.setStatus(0);
+        storePayment.setPayMode(merchantAppConfig.getMerchantType());
+        storePayment.setBusinessCode(order.getOrderCode());
+        storePayment.setPayCode(payCode);
+        storePayment.setPayMoney(order.getPayMoney());
+        storePayment.setCreateTime(new Date());
+        storePayment.setPayTypeCode(!"appPay".equals(merchantAppConfig.getMerchantType()) ? "weixin" : param.getPayType());
+        storePayment.setBusinessType(8);
+        storePayment.setCompanyId(order.getCompanyId());
+        storePayment.setCompanyUserId(order.getCompanyUserId());
+        storePayment.setRemark("商城自提订单支付");
+        storePayment.setOpenId(openId);
+        storePayment.setUserId(user.getUserId());
+        storePayment.setStoreId(order.getStoreId());
+        storePayment.setBusinessOrderId(order.getId().toString());
+        storePayment.setOrderId(order.getId());
+        storePayment.setAppId(param.getAppId());
+        storePayment.setMerConfigId(merchantAppConfig.getId());
+        if (fsStorePaymentScrmMapper.insertFsStorePayment(storePayment) <= 0) {
+            return R.error("支付失败");
+        }
+        if ("wx".equals(merchantAppConfig.getMerchantType())) {
+            WxPayConfig payConfig = new WxPayConfig();
+            payConfig.setAppId(param.getAppId());
+            payConfig.setMchId(fsPayConfig.getWxMchId());
+            payConfig.setMchKey(fsPayConfig.getWxMchKey());
+            payConfig.setSubAppId(org.apache.commons.lang3.StringUtils.trimToNull(null));
+            payConfig.setSubMchId(org.apache.commons.lang3.StringUtils.trimToNull(null));
+            payConfig.setKeyPath(null);
+            payConfig.setNotifyUrl(wxPayProperties.getNotifyUrl());
+            wxPayService.setConfig(payConfig);
+            WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest();
+            orderRequest.setOpenid(openId);
+            orderRequest.setBody("商城自提订单支付");
+            orderRequest.setOutTradeNo("storePick-" + storePayment.getPayCode());
+            orderRequest.setTotalFee(WxPayUnifiedOrderRequest.yuanToFen(storePayment.getPayMoney().toString()));
+            orderRequest.setTradeType("JSAPI");
+            orderRequest.setSpbillCreateIp(IpUtils.getIpAddr(ServletUtils.getRequest()));
+            try {
+                WxPayMpOrderResult orderResult = wxPayService.createOrder(orderRequest);
+                return R.ok().put("data", orderResult).put("type", "wx").put("isPay", 0);
+            } catch (WxPayException e) {
+                throw new ServiceException("支付失败" + e.getMessage());
+            }
+        } else if ("yb".equals(merchantAppConfig.getMerchantType())) {
+            WxJspayDTO p = new WxJspayDTO();
+            p.setPayMoney(storePayment.getPayMoney().toString());
+            p.setLowOrderId("storePick-" + storePayment.getPayCode());
+            p.setBody("商城自提订单支付");
+            p.setIsMinipg("1");
+            p.setOpenId(openId);
+            p.setAttach("");
+            p.setStoreid("0");
+            CreateWxOrderResult wxOrder = payService.createWxOrder(p);
+            log.info("易宝返回{}", wxOrder);
+            if ("100".equals(wxOrder.getStatus())) {
+                FsStorePaymentScrm mt = new FsStorePaymentScrm();
+                mt.setPaymentId(storePayment.getPaymentId());
+                mt.setTradeNo(wxOrder.getUpOrderId());
+                fsStorePaymentScrmMapper.updateFsStorePayment(mt);
+                return R.ok().put("isPay", 0).put("data", wxOrder).put("type", "yb");
+            }
+            throw new ServiceException("支付失败");
+        } else if ("tz".equals(merchantAppConfig.getMerchantType())) {
+            PayCreateOrder o = new PayCreateOrder();
+            o.setOrderNo("storePick" + storePayment.getPayCode());// 业务系统订单号
+            o.setTrxAmt(storePayment.getPayMoney().doubleValue());// 交易金额
+            o.setBusinessCstNo(order.getUserId().toString());// 业务平台客户号
+            String phone = "";
+            if (user.getPhone()!=null&&user.getPhone().length()>4){
+                phone=user.getPhone().substring(user.getPhone().length()-4);
+                if (user.getPhone().length()>11){
+                    o.setPayerMobileNo(PhoneUtil.decryptPhone(user.getPhone()));
+                }else {
+                    o.setPayerMobileNo(user.getPhone());
+                }
+            }
+            o.setPayerName("微信用户"+phone);
+            o.setGoodsInfo("商城自提订单支付");
+            o.setOpenId(openId);
+            o.setOrderType(8);
+            o.setOrderId(order.getId().toString());
+            TzBankResult<PayCreateOrderResult> result = tzBankService.createOrder(o);
+            FsStorePaymentScrm mt = new FsStorePaymentScrm();
+            mt.setPaymentId(storePayment.getPaymentId());
+            mt.setTradeNo(result.getBody().getOrderFlowNo());
+            fsStorePaymentScrmMapper.updateFsStorePayment(mt);
+            return R.ok().put("isPay", 0).put("data", result).put("type", "tz");
+        } else if ("hf".equals(merchantAppConfig.getMerchantType())) {
+            boolean shareAmount = false;
+            log.info("创建汇付订单.....");
+            HuiFuCreateOrder o = new HuiFuCreateOrder();
+            o.setTradeType(StringUtils.isEmpty(param.getPayType()) || param.getPayType().equals("wx") ? "T_MINIAPP" : "A_NATIVE");
+            o.setOpenid(openId);
+            o.setReqSeqId("storePick-" + storePayment.getPayCode());
+            o.setTransAmt(storePayment.getPayMoney().toString());
+            o.setGoodsDesc("商城自提订单支付");
+            o.setAppId(appId);
+
+            HuifuCreateOrderResult result = huiFuService.createOrder(o);
+            log.info("创建汇付支付{}:", result);
+            FsStorePaymentScrm mt = new FsStorePaymentScrm();
+            mt.setPaymentId(storePayment.getPaymentId());
+            mt.setTradeNo(result.getHf_seq_id());
+            mt.setAppId(param.getAppId());
+            fsStorePaymentScrmMapper.updateFsStorePayment(mt);
+            return R.ok().put("isPay", 0).put("data", result).put("type", "hf");
+        } else if ("appPay".equals(merchantAppConfig.getMerchantType()) && "wx".equals(payType)) {
+            WxPayConfig payConfig = new WxPayConfig();
+            payConfig.setAppId(param.getAppId());
+            payConfig.setMchId(fsPayConfig.getWxAppMchId());
+            payConfig.setMchKey(fsPayConfig.getWxAppMchKey());
+            payConfig.setSubAppId(org.apache.commons.lang3.StringUtils.trimToNull(null));
+            payConfig.setSubMchId(org.apache.commons.lang3.StringUtils.trimToNull(null));
+            payConfig.setKeyPath(null);
+            payConfig.setNotifyUrl(fsPayConfig.getWxAppNotifyUrl());
+            wxPayService.setConfig(payConfig);
+            WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest();
+            orderRequest.setBody("商城自提订单支付");
+            orderRequest.setOutTradeNo("storePick-" + storePayment.getPayCode());
+            orderRequest.setTotalFee(WxPayUnifiedOrderRequest.yuanToFen(storePayment.getPayMoney().toString()));
+            orderRequest.setTradeType("APP");
+            orderRequest.setSpbillCreateIp(IpUtils.getIpAddr(ServletUtils.getRequest()));
+            orderRequest.setNotifyUrl(fsPayConfig.getNotifyUrlScrm());
+            try {
+                Object result = wxPayService.createOrder(orderRequest);
+                return R.ok().put("data", result).put("type", "wxApp").put("isPay", 0);
+            } catch (WxPayException e) {
+                throw new ServiceException("支付失败" + e.getMessage());
+            }
+        } else if ("appPay".equals(merchantAppConfig.getMerchantType()) && "ali".equals(payType)) {
+            AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do", fsPayConfig.getAliAppId(), fsPayConfig.getAliPrivateKey(), "json", "utf-8", fsPayConfig.getAliPublicKey(), "RSA2");
+            AlipayTradeAppPayRequest aliRequest = new AlipayTradeAppPayRequest();
+            AlipayTradeAppPayModel model = new AlipayTradeAppPayModel();
+            model.setOutTradeNo("storePick-" + storePayment.getPayCode());
+            model.setTotalAmount(storePayment.getPayMoney().toString());
+            model.setSubject("商城自提订单支付");
+            aliRequest.setBizModel(model);
+            aliRequest.setNotifyUrl(fsPayConfig.getAliNotifyUrl());
+            try {
+                AlipayTradeAppPayResponse result = alipayClient.sdkExecute(aliRequest);
+                if (!result.isSuccess()) {
+                    String diagnosisUrl = DiagnosisUtils.getDiagnosisUrl(result);
+                    log.error("支付宝支付调用失败 诊断链接:{}", diagnosisUrl);
+                    throw new ServiceException(result.getSubMsg() + " " + diagnosisUrl);
+                }
+                return R.ok().put("isPay", 0).put("data", result).put("type", "aliPay");
+            } catch (Exception e) {
+                log.error("支付宝支付异常: {}", e);
+                throw new ServiceException("支付失败");
+            }
+        }
+        return R.error("无支付类型");
+    }
+
+    private String normalizePayType(String rawType) {
+        if (StringUtils.isBlank(rawType)) {
+            return "wx";
+        }
+        String type = rawType.toLowerCase();
+        if (type.contains("ali")) {
+            return "ali";
+        }
+        return "wx";
+    }
+
+    @Override
+    public R getFsStoreOrderPickDetail(Long userId, Long orderId) {
+        FsStoreOrderScrm order = fsStoreOrderScrmService.selectFsStoreOrderById(orderId);
+        if (order == null || !userId.equals(order.getUserId()) || !Integer.valueOf(1).equals(order.getIsPickup())) {
+            return R.error("订单不存在");
+        }
+        List<FsStoreOrderItemVO> items = fsStoreOrderItemScrmMapper.selectFsStoreOrderItemListByOrderId(orderId);
+        return R.ok().put("order", order).put("items", items);
+    }
+
+    private R buildPickOrderPreview(FsStoreOrderPickAddParam param) {
+        if (param == null || param.getUserId() == null || param.getProductId() == null) {
+            return R.error("参数错误");
+        }
+        FsStoreProductScrm product = fsStoreProductScrmService.selectFsStoreProductById(param.getProductId());
+        if (product == null || Integer.valueOf(1).equals(product.getIsDel())) {
+            return R.error("商品不存在");
+        }
+        BigDecimal price = product.getPrice() == null ? BigDecimal.ZERO : product.getPrice();
+        FsStoreOrderPick preview = new FsStoreOrderPick();
+        preview.setUserId(param.getUserId());
+        preview.setCompanyId(param.getCompanyId());
+        preview.setCompanyUserId(param.getCompanyUserId());
+        preview.setDeptId(param.getDeptId());
+        preview.setUserRecordId(param.getUserRecordId());
+        preview.setTotalNum(1);
+        preview.setTotalPrice(price);
+        PickItemJsonInfo jsonInfo = new PickItemJsonInfo();
+        jsonInfo.setImage(product.getImage());
+        jsonInfo.setProductId(product.getProductId());
+        jsonInfo.setNum(1);
+        jsonInfo.setProductName(product.getProductName());
+        jsonInfo.setPrice(price);
+        preview.setItemJson(JSONUtil.toJsonStr(jsonInfo));
+        return R.ok().put("data", preview);
+    }
+
+    /**
+     * 生成核销二维码
+     * @param orderCode 订单号
+     * @return
+     */
     private String generateRedeemedQrUrl(String orderCode) {
         try {
             String qrContent = "pickOrderCode=" + orderCode;

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

@@ -131,4 +131,10 @@ public class FsStoreProductListVO  implements Serializable
 
     /** 标签信息(JSON格式,存储标签类型及预售发货时间) */
     private String tagInfo;
+
+    /** 配送方式(1-自提;2-物流) */
+    private Integer shippingType;
+
+    /** 是否允许销售退单(1-是;0-否) */
+    private Integer isAllowSalesRefund;
 }

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

@@ -98,10 +98,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="groupBuyId"    column="group_buy_id"    />
         <result property="shoppingPointsClaimed"    column="shopping_points_claimed"    />
         <result property="liveId"    column="live_id"    />
+        <result property="isPickup"    column="is_pickup"    />
+        <result property="redeemedCode"    column="redeemed_code"    />
+        <result property="redeemedStatus"    column="redeemed_status"    />
+        <result property="redeemedTime"    column="redeemed_time"    />
+        <result property="redeemedId"    column="redeemed_id"    />
+        <result property="cancelExplain"    column="cancel_explain"    />
+        <result property="cancelTime"    column="cancel_time"    />
+        <result property="userRecordId"    column="user_record_id"    />
     </resultMap>
 
     <sql id="selectFsStoreOrderVo">
-        select id, order_code,outer_oi_id,service_fee, extend_order_id,pay_order_id,bank_order_id, user_id,order_visit, real_name, user_phone, user_address, cart_id, freight_price, total_num, total_price, total_postage, pay_price, pay_postage,pay_delivery,pay_money, deduction_price, coupon_id, coupon_price, paid, pay_time, pay_type, create_time, update_time, status, refund_status, refund_reason_wap_img, refund_reason_wap_explain, refund_reason_time, refund_reason_wap, refund_reason, refund_price, delivery_sn, delivery_name, delivery_type, delivery_id, gain_integral, use_integral, pay_integral, back_integral, mark, is_del, remark, cost, verify_code, store_id, shipping_type, is_channel, is_remind, is_sys_del,is_prescribe,prescribe_id ,company_id,company_user_id,is_package,package_json,item_json,order_type,package_id,finish_time,delivery_status,delivery_exception_remark,delivery_exception_status,delivery_pay_status,delivery_time,delivery_pay_time,delivery_pay_money,tui_money,tui_money_status,delivery_import_time,tui_user_id,tui_user_money_status,order_create_type,store_house_code,dept_id,is_edit_money,customer_id,is_pay_remain,delivery_send_time,certificates,schedule_id,backend_edit_product_type,video_id,course_id,project_id,period_id,virtual_phone,group_buy_id,live_id from fs_store_order_scrm
+        select id, order_code,outer_oi_id,service_fee, extend_order_id,pay_order_id,bank_order_id, user_id,order_visit, real_name, user_phone, user_address, cart_id, freight_price, total_num, total_price, total_postage, pay_price, pay_postage,pay_delivery,pay_money, deduction_price, coupon_id, coupon_price, paid, pay_time, pay_type, create_time, update_time, status, refund_status, refund_reason_wap_img, refund_reason_wap_explain, refund_reason_time, refund_reason_wap, refund_reason, refund_price, delivery_sn, delivery_name, delivery_type, delivery_id, gain_integral, use_integral, pay_integral, back_integral, mark, is_del, remark, cost, verify_code, store_id, shipping_type, is_channel, is_remind, is_sys_del,is_prescribe,prescribe_id ,company_id,company_user_id,is_package,package_json,item_json,order_type,package_id,finish_time,delivery_status,delivery_exception_remark,delivery_exception_status,delivery_pay_status,delivery_time,delivery_pay_time,delivery_pay_money,tui_money,tui_money_status,delivery_import_time,tui_user_id,tui_user_money_status,order_create_type,store_house_code,dept_id,is_edit_money,customer_id,is_pay_remain,delivery_send_time,certificates,schedule_id,backend_edit_product_type,video_id,course_id,project_id,period_id,virtual_phone,group_buy_id,live_id,is_pickup,redeemed_code,redeemed_status,redeemed_time,redeemed_id,cancel_explain,cancel_time,user_record_id from fs_store_order_scrm
     </sql>
 
     <select id="selectFsStoreOrderList" parameterType="FsStoreOrderScrm" resultMap="FsStoreOrderResult">
@@ -162,6 +170,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deliveryTime != null "> and delivery_time = #{deliveryTime}</if>
             <if test="deliveryImportTime != null "> and delivery_import_time = #{deliveryImportTime}</if>
             <if test="backendEditProductType != null "> and backend_edit_product_type = #{backendEditProductType}</if>
+            <if test="isPickup != null "> and is_pickup = #{isPickup}</if>
+            <if test="redeemedStatus != null "> and redeemed_status = #{redeemedStatus}</if>
             <if test="remark != null and remark != ''"> and remark = #{remark}</if>
             <if test="videoId != null and videoId != ''"> and video_id = #{videoId}</if>
             <if test="courseId != null and courseId != ''"> and course_id = #{courseId}</if>
@@ -296,6 +306,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="periodId != null" >period_id,</if>
             <if test="groupBuyId != null" >group_buy_id,</if>
             <if test="liveId != null" >live_id,</if>
+            <if test="isPickup != null">is_pickup,</if>
+            <if test="redeemedCode != null and redeemedCode != ''">redeemed_code,</if>
+            <if test="redeemedStatus != null">redeemed_status,</if>
+            <if test="redeemedTime != null">redeemed_time,</if>
+            <if test="redeemedId != null">redeemed_id,</if>
+            <if test="cancelExplain != null and cancelExplain != ''">cancel_explain,</if>
+            <if test="cancelTime != null">cancel_time,</if>
+            <if test="userRecordId != null">user_record_id,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderCode != null and orderCode != ''">#{orderCode},</if>
@@ -390,6 +408,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="periodId != null" >#{periodId},</if>
             <if test="groupBuyId != null" >#{groupBuyId},</if>
             <if test="liveId != null" >#{liveId},</if>
+            <if test="isPickup != null">#{isPickup},</if>
+            <if test="redeemedCode != null and redeemedCode != ''">#{redeemedCode},</if>
+            <if test="redeemedStatus != null">#{redeemedStatus},</if>
+            <if test="redeemedTime != null">#{redeemedTime},</if>
+            <if test="redeemedId != null">#{redeemedId},</if>
+            <if test="cancelExplain != null and cancelExplain != ''">#{cancelExplain},</if>
+            <if test="cancelTime != null">#{cancelTime},</if>
+            <if test="userRecordId != null">#{userRecordId},</if>
          </trim>
     </insert>
 
@@ -492,6 +518,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="virtualPhone != null">virtual_phone = #{virtualPhone},</if>
             <if test="groupBuyId != null">group_buy_id = #{groupBuyId},</if>
             <if test="shoppingPointsClaimed != null">shopping_points_claimed = #{shoppingPointsClaimed},</if>
+            <if test="isPickup != null">is_pickup = #{isPickup},</if>
+            <if test="redeemedCode != null and redeemedCode != ''">redeemed_code = #{redeemedCode},</if>
+            <if test="redeemedStatus != null">redeemed_status = #{redeemedStatus},</if>
+            <if test="redeemedTime != null">redeemed_time = #{redeemedTime},</if>
+            <if test="redeemedId != null">redeemed_id = #{redeemedId},</if>
+            <if test="cancelExplain != null and cancelExplain != ''">cancel_explain = #{cancelExplain},</if>
+            <if test="cancelTime != null">cancel_time = #{cancelTime},</if>
+            <if test="userRecordId != null">user_record_id = #{userRecordId},</if>
         </trim>
         where id = #{id}
     </update>

+ 19 - 9
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -84,8 +84,10 @@
         <result property="activityEndTime"    column="activity_end_time"    />
         <result property="tagInfo"    column="tag_info"    />
         <result property="isPickup"    column="is_pickup"    />
-        <result property="user_temp_id"    column="user_temp_id"    />
-        <result property="user_record_id"    column="user_record_id"    />
+        <result property="shippingType"    column="shipping_type"    />
+        <result property="isAllowSalesRefund"    column="is_allow_sales_refund"    />
+        <result property="userTempId"    column="user_temp_id"    />
+        <result property="userRecordId"    column="user_record_id"    />
     </resultMap>
 
     <sql id="selectFsStoreProductVo">
@@ -98,6 +100,7 @@
                unit_price,batch_number,mah,mah_address,manufacturer,manufacturer_address,indications,dosage,
                adverse_reactions,contraindications,precautions,is_audit,store_id,return_address,sender_phones,brand,food_production_license_code,
                origin_place,net_content,shelf_life,domestic_imported,app_ids,purchase_limit,single_purchase_limit,activity_type,activity_start_time,activity_end_time,tag_info,is_pickup,
+               shipping_type,is_allow_sales_refund,
                user_temp_id,user_record_id
         from fs_store_product_scrm
     </sql>
@@ -111,7 +114,8 @@
                p.is_display,p.tui_cate_id,p.company_ids,p.is_drug,p.drug_image,p.drug_reg_cert_no,p.common_name,p.dosage_form,
                p.unit_price,p.batch_number,p.mah,p.mah_address,p.manufacturer,p.manufacturer_address,p.indications,p.dosage,
                p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,p.return_address,p.sender_phones,p.brand,p.food_production_license_code,
-               p.origin_place,p.net_content,p.shelf_life,p.domestic_imported,app_ids,p.purchase_limit,p.single_purchase_limit,p.activity_type,p.tag_info
+               p.origin_place,p.net_content,p.shelf_life,p.domestic_imported,app_ids,p.purchase_limit,p.single_purchase_limit,p.activity_type,p.tag_info,
+               p.shipping_type,p.is_allow_sales_refund
         from fs_store_product_scrm p
     </sql>
 
@@ -302,8 +306,10 @@
             <if test="activityType != null">activity_type,</if>
             <if test="tagInfo != null and tagInfo != ''">tag_info,</if>
             <if test="isPickup != null">is_pickup,</if>
-            <if test="user_temp_id != null">user_temp_id,</if>
-            <if test="user_record_id != null">user_record_id,</if>
+            <if test="shippingType != null">shipping_type,</if>
+            <if test="isAllowSalesRefund != null">is_allow_sales_refund,</if>
+            <if test="userTempId != null">user_temp_id,</if>
+            <if test="userRecordId != null">user_record_id,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="image != null and image != ''">#{image},</if>
@@ -382,8 +388,10 @@
             <if test="activityType != null">#{activityType},</if>
             <if test="tagInfo != null and tagInfo != ''">#{tagInfo},</if>
             <if test="isPickup != null">#{isPickup},</if>
-            <if test="user_temp_id != null">#{user_temp_id},</if>
-            <if test="user_record_id != null">#{user_record_id},</if>
+            <if test="shippingType != null">#{shippingType},</if>
+            <if test="isAllowSalesRefund != null">#{isAllowSalesRefund},</if>
+            <if test="userTempId != null">#{user_temp_id},</if>
+            <if test="userRecordId != null">#{user_record_id},</if>
         </trim>
     </insert>
 
@@ -467,8 +475,10 @@
             <if test="tagInfo != null and tagInfo != ''">tag_info = #{tagInfo},</if>
             <if test="tagInfo == null or tagInfo == ''">tag_info = #{tagInfo},</if>
             <if test="isPickup != null">is_pickup = #{isPickup},</if>
-            <if test="user_temp_id != null">user_temp_id = #{user_temp_id},</if>
-            <if test="user_record_id != null">user_record_id = #{user_record_id},</if>
+            <if test="shippingType != null">shipping_type = #{shippingType},</if>
+            <if test="isAllowSalesRefund != null">is_allow_sales_refund = #{isAllowSalesRefund},</if>
+            <if test="userTempId != null">user_temp_id = #{userTempId},</if>
+            <if test="userRecordId != null">user_record_id = #{userRecordId},</if>
         </trim>
         where product_id = #{productId}
     </update>

+ 12 - 0
fs-user-app/src/main/java/com/fs/app/controller/HuifuPayController.java

@@ -7,6 +7,7 @@ import com.fs.course.service.IFsCourseProductOrderService;
 import com.fs.course.service.IFsUserCourseOrderService;
 import com.fs.course.service.IFsUserVipOrderService;
 import com.fs.his.service.*;
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
 import com.fs.huifuPay.domain.HuiFuOnlinePay;
 import com.fs.huifuPay.domain.HuiFuOnlineRefund;
 import com.fs.huifuPay.domain.HuiFuResult;
@@ -39,6 +40,8 @@ public class HuifuPayController {
     private IFsStorePaymentService storePaymentService;
     @Autowired
     private ILiveOrderService liveOrderService;
+    @Autowired
+    private IFsStoreOrderScrmService storeOrderScrmService;
 
     org.slf4j.Logger logger= LoggerFactory.getLogger(getClass());
     @Autowired
@@ -116,6 +119,15 @@ public class HuifuPayController {
                         logger.error("-------分账明细回调错误{}", e.getMessage());
                     }
                     break;
+                case "storePick":
+                    // 走商城的回调
+                    storeOrderScrmService.payConfirm(1,null, orderId[1], huiFuResult.getHf_seq_id(), huiFuResult.getOut_trans_id(), huiFuResult.getParty_order_id());
+                    try {
+                        HuiFuUtils.updateDivItem(orderId[1]);
+                    } catch (Exception e) {
+                        logger.error("-------分账明细回调错误{}", e.getMessage());
+                    }
+                    break;
             }
         }
 

+ 58 - 12
fs-user-app/src/main/java/com/fs/app/controller/store/FsStoreOrderPickController.java

@@ -2,14 +2,18 @@ package com.fs.app.controller.store;
 
 import com.fs.app.annotation.Login;
 import com.fs.app.controller.AppBaseController;
+import com.fs.common.annotation.RepeatSubmit;
 import com.fs.common.core.domain.R;
 import com.fs.hisStore.domain.FsStoreOrderPick;
-import com.fs.hisStore.param.FsStoreOrderPickAddParam;
-import com.fs.hisStore.param.FsStoreOrderPickListParam;
+import com.fs.hisStore.domain.FsStoreOrderScrm;
+import com.fs.hisStore.param.*;
 import com.fs.hisStore.service.IFsStoreOrderPickService;
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 
 /**
@@ -24,6 +28,8 @@ public class FsStoreOrderPickController extends AppBaseController
 {
     @Autowired
     private IFsStoreOrderPickService fsStoreOrderPickService;
+    @Autowired
+    private IFsStoreOrderScrmService fsStoreOrderScrmService;
 
     /**
      * 查询自提商品订单列表
@@ -33,18 +39,20 @@ public class FsStoreOrderPickController extends AppBaseController
     public R list(FsStoreOrderPickListParam param)
     {
         String userId = getUserId();
-        FsStoreOrderPick fsStoreOrderPick = new FsStoreOrderPick();
-        fsStoreOrderPick.setUserId(Long.valueOf(userId));
-        fsStoreOrderPick.setOrderCode(param.getOrderCode());
-        fsStoreOrderPick.setRedeemedStatus(param.getRedeemedStatus());
+        FsStoreOrderScrm fsStoreOrder = new FsStoreOrderScrm();
+        fsStoreOrder.setUserId(Long.valueOf(userId));
+        fsStoreOrder.setOrderCode(param.getOrderCode());
+        fsStoreOrder.setRedeemedStatus(param.getRedeemedStatus());
+        fsStoreOrder.setIsPickup(1);
         startPage();
-        List<FsStoreOrderPick> list = fsStoreOrderPickService.selectFsStoreOrderPickList(fsStoreOrderPick);
+        List<FsStoreOrderScrm> list = fsStoreOrderScrmService.selectFsStoreOrderList(fsStoreOrder);
         return R.ok().put("data", list);
     }
 
     /**
      * 获取自提商品订单详细信息
      */
+    @Login
     @GetMapping
     public R getInfo(@RequestParam("id") Long id)
     {
@@ -59,12 +67,50 @@ public class FsStoreOrderPickController extends AppBaseController
     @PostMapping
     public R add(@RequestBody FsStoreOrderPickAddParam fsStoreOrderPick)
     {
-        int rows = fsStoreOrderPickService.createFsStoreOrderPick(fsStoreOrderPick);
-        if (rows <= 0) {
-            return R.error("新增自提商品订单失败");
-        }
-        return R.ok();
+        fsStoreOrderPick.setUserId(Long.parseLong(getUserId()));
+        return fsStoreOrderPickService.createFsStoreOrderPick(fsStoreOrderPick);
     }
 
+    /**
+     * 自提订单金额计算
+     */
+    @Login
+    @PostMapping("/compute")
+    public R compute(@Validated @RequestBody FsStoreOrderPickComputeParam param, HttpServletRequest request)
+    {
+        return fsStoreOrderPickService.computeFsStoreOrderPick(Long.parseLong(getUserId()), param);
+    }
+
+    /**
+     * 自提订单支付确认
+     */
+    @Login
+    @PostMapping("/pay")
+    public R pay(@Validated @RequestBody FsStoreOrderPickPayParam param)
+    {
+        return fsStoreOrderPickService.payFsStoreOrderPick(Long.parseLong(getUserId()), param);
+    }
+
+    /**
+     * 自提订单实际支付
+     */
+    @Login
+    @RepeatSubmit
+    @PostMapping("/payment")
+    public R payment(@RequestBody FsStoreOrderPickPaymentParam param, HttpServletRequest request)
+    {
+        param.setUserId(Long.parseLong(getUserId()));
+        return fsStoreOrderPickService.paymentFsStoreOrderPick(param, request);
+    }
+
+    /**
+     * 获取自提订单详情
+     */
+    @Login
+    @GetMapping("/detail")
+    public R getOrderDetail(@RequestParam("orderId") Long orderId)
+    {
+        return fsStoreOrderPickService.getFsStoreOrderPickDetail(Long.parseLong(getUserId()), orderId);
+    }
 
 }

+ 97 - 0
fs-user-app/src/main/java/com/fs/app/controller/store/FsStoreRedeemedRecordController.java

@@ -0,0 +1,97 @@
+package com.fs.app.controller.store;
+
+import com.fs.app.controller.AppBaseController;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreRedeemedRecord;
+import com.fs.hisStore.service.IFsStoreRedeemedRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 自提商品核销记录Controller
+ *
+ * @author caolq
+ * @date 2026-06-24
+ */
+@RestController
+@RequestMapping("/hisStore/storeRedeemedRecord")
+public class FsStoreRedeemedRecordController extends AppBaseController
+{
+    @Autowired
+    private IFsStoreRedeemedRecordService fsStoreRedeemedRecordService;
+
+    /**
+     * 查询自提商品核销记录列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreRedeemedRecord fsStoreRedeemedRecord)
+    {
+        startPage();
+        List<FsStoreRedeemedRecord> list = fsStoreRedeemedRecordService.selectFsStoreRedeemedRecordList(fsStoreRedeemedRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出自提商品核销记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('hisStore:storeRedeemedRecord:export')")
+    @Log(title = "自提商品核销记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreRedeemedRecord fsStoreRedeemedRecord)
+    {
+        List<FsStoreRedeemedRecord> list = fsStoreRedeemedRecordService.selectFsStoreRedeemedRecordList(fsStoreRedeemedRecord);
+        ExcelUtil<FsStoreRedeemedRecord> util = new ExcelUtil<FsStoreRedeemedRecord>(FsStoreRedeemedRecord.class);
+        return util.exportExcel(list, "自提商品核销记录数据");
+    }
+
+    /**
+     * 获取自提商品核销记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('hisStore:storeRedeemedRecord:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsStoreRedeemedRecordService.selectFsStoreRedeemedRecordById(id));
+    }
+
+    /**
+     * 新增自提商品核销记录
+     */
+    @PreAuthorize("@ss.hasPermi('hisStore:storeRedeemedRecord:add')")
+    @Log(title = "自提商品核销记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreRedeemedRecord fsStoreRedeemedRecord)
+    {
+        return toAjax(fsStoreRedeemedRecordService.insertFsStoreRedeemedRecord(fsStoreRedeemedRecord));
+    }
+
+    /**
+     * 修改自提商品核销记录
+     */
+    @PreAuthorize("@ss.hasPermi('hisStore:storeRedeemedRecord:edit')")
+    @Log(title = "自提商品核销记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreRedeemedRecord fsStoreRedeemedRecord)
+    {
+        return toAjax(fsStoreRedeemedRecordService.updateFsStoreRedeemedRecord(fsStoreRedeemedRecord));
+    }
+
+    /**
+     * 删除自提商品核销记录
+     */
+    @PreAuthorize("@ss.hasPermi('hisStore:storeRedeemedRecord:remove')")
+    @Log(title = "自提商品核销记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsStoreRedeemedRecordService.deleteFsStoreRedeemedRecordByIds(ids));
+    }
+}