Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

yh 1 месяц назад
Родитель
Сommit
35dbefca51
37 измененных файлов с 950 добавлено и 58 удалено
  1. 24 0
      fs-admin/src/main/java/com/fs/course/controller/FsCoursePlaySourceConfigController.java
  2. 96 17
      fs-admin/src/main/java/com/fs/his/controller/FsIntegralOrderController.java
  3. 107 0
      fs-admin/src/main/java/com/fs/his/controller/MerchantAppConfigController.java
  4. 9 0
      fs-admin/src/main/java/com/fs/hisStore/task/LiveTask.java
  5. 4 4
      fs-admin/src/main/java/com/fs/live/controller/LiveController.java
  6. 10 4
      fs-company/src/main/java/com/fs/company/controller/live/LiveController.java
  7. 4 4
      fs-company/src/main/java/com/fs/framework/service/CompanyLoginService.java
  8. 4 4
      fs-framework/src/main/java/com/fs/framework/web/service/SysLoginService.java
  9. 5 0
      fs-service/src/main/java/com/fs/course/domain/FsCoursePlaySourceConfig.java
  10. 2 0
      fs-service/src/main/java/com/fs/course/mapper/FsCoursePlaySourceConfigMapper.java
  11. 3 0
      fs-service/src/main/java/com/fs/course/param/FsCoursePlaySourceConfigEditParam.java
  12. 7 0
      fs-service/src/main/java/com/fs/course/service/IFsCoursePlaySourceConfigService.java
  13. 5 0
      fs-service/src/main/java/com/fs/course/service/impl/FsCoursePlaySourceConfigServiceImpl.java
  14. 5 0
      fs-service/src/main/java/com/fs/course/vo/newfs/FsUserCourseVideoDetailsVO.java
  15. 75 10
      fs-service/src/main/java/com/fs/erp/service/impl/FsJstAftersalePushScrmServiceImpl.java
  16. 3 0
      fs-service/src/main/java/com/fs/his/domain/FsPayConfig.java
  17. 66 0
      fs-service/src/main/java/com/fs/his/domain/MerchantAppConfig.java
  18. 74 0
      fs-service/src/main/java/com/fs/his/mapper/MerchantAppConfigMapper.java
  19. 3 0
      fs-service/src/main/java/com/fs/his/param/FsIntegralOrderParam.java
  20. 61 0
      fs-service/src/main/java/com/fs/his/service/IMerchantAppConfigService.java
  21. 200 0
      fs-service/src/main/java/com/fs/his/service/impl/MerchantAppConfigServiceImpl.java
  22. 1 0
      fs-service/src/main/java/com/fs/his/vo/FsIntegralOrderListVO.java
  23. 2 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsPayConfigScrm.java
  24. 1 0
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreAfterSalesScrmServiceImpl.java
  25. 1 0
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java
  26. 8 2
      fs-service/src/main/java/com/fs/live/mapper/LiveMapper.java
  27. 1 0
      fs-service/src/main/java/com/fs/live/service/impl/LiveAfterSalesServiceImpl.java
  28. 3 2
      fs-service/src/main/java/com/fs/live/service/impl/LiveOrderServiceImpl.java
  29. 0 9
      fs-service/src/main/resources/application-common.yml
  30. 10 0
      fs-service/src/main/resources/application-druid-jnmy-test.yml
  31. 11 0
      fs-service/src/main/resources/application-druid-jnmy.yml
  32. 125 0
      fs-service/src/main/resources/mapper/MerchantAppConfigMapper.xml
  33. 8 0
      fs-service/src/main/resources/mapper/course/FsCoursePlaySourceConfigMapper.xml
  34. 6 0
      fs-service/src/main/resources/mapper/his/FsIntegralOrderMapper.xml
  35. 2 2
      fs-service/src/main/resources/mapper/his/FsStoreOrderMapper.xml
  36. 3 0
      fs-service/src/main/resources/mapper/live/LiveOrderMapper.xml
  37. 1 0
      fs-user-app/src/main/java/com/fs/app/controller/live/LiveAfterSalesController.java

+ 24 - 0
fs-admin/src/main/java/com/fs/course/controller/FsCoursePlaySourceConfigController.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
@@ -134,6 +135,29 @@ public class FsCoursePlaySourceConfigController extends BaseController {
         return AjaxResult.success();
     }
 
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:bind')")
+    @Log(title = "绑定支付配置", businessType = BusinessType.UPDATE)
+    @PutMapping("/updateBindConfig")
+    public AjaxResult updateBindConfig(@RequestBody FsCoursePlaySourceConfigEditParam param) {
+
+        FsCoursePlaySourceConfig update =new FsCoursePlaySourceConfig();
+        update.setId(param.getId());
+        update.setMerchantConfigId(param.getMerchantConfigId());
+        fsCoursePlaySourceConfigService.updateById(update);
+        return AjaxResult.success();
+    }
+
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:unbind')")
+    @Log(title = "解绑支付配置", businessType = BusinessType.UPDATE)
+    @PutMapping("/updateUnbindConfig")
+    public AjaxResult updateUnbindConfig(@RequestBody FsCoursePlaySourceConfigEditParam param) {
+        LambdaUpdateWrapper<FsCoursePlaySourceConfig> updateWrapper = Wrappers.lambdaUpdate();
+        updateWrapper.eq(FsCoursePlaySourceConfig::getId, param.getId())
+                .set(FsCoursePlaySourceConfig::getMerchantConfigId, null);
+        fsCoursePlaySourceConfigService.update(updateWrapper);
+        return AjaxResult.success();
+    }
+
     @PreAuthorize("@ss.hasPermi('course:playSourceConfig:remove')")
     @Log(title = "点播播放源配置", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")

+ 96 - 17
fs-admin/src/main/java/com/fs/his/controller/FsIntegralOrderController.java

@@ -7,6 +7,8 @@ import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.domain.R;
+import com.fs.common.core.domain.entity.SysRole;
+import com.fs.common.core.domain.entity.SysUser;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.enums.BusinessType;
 import com.fs.common.utils.CloudHostUtils;
@@ -22,6 +24,7 @@ import com.fs.his.param.BatchSetErpOrderParam;
 import com.fs.his.vo.*;
 import com.fs.his.param.FsIntegralOrderParam;
 import com.fs.his.service.*;
+import com.fs.system.service.ISysRoleService;
 import com.fs.utils.OrderContextHolder;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,6 +32,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
+import lombok.extern.slf4j.Slf4j;
 
 import java.text.ParseException;
 import java.time.LocalDateTime;
@@ -45,6 +49,7 @@ import static com.fs.his.utils.PhoneUtil.decryptPhone;
  * @author fs
  * @date 2023-11-02
  */
+@Slf4j
 @RestController
 @RequestMapping("/his/integralOrder")
 public class FsIntegralOrderController extends BaseController
@@ -78,44 +83,118 @@ public class FsIntegralOrderController extends BaseController
     public TableDataInfo list(FsIntegralOrderParam fsIntegralOrder)
     {
         startPage();
+        List<FsIntegralOrderListVO> list = new ArrayList<>();
         if (CloudHostUtils.hasCloudHostName("金牛明医")){
             /*目前只有金牛有状态为6的查询,其他项目避免使用6状态码*/
             if (fsIntegralOrder.getStatus() != null && fsIntegralOrder.getStatus().equals("6")) {
                 fsIntegralOrder.setStatus("1");
                 fsIntegralOrder.setIsPush(0);
             }
-            List<FsIntegralOrderListVO> list = fsIntegralOrderService.selectFsIntegralOrderListByJn(fsIntegralOrder);
+
+            // 金牛明医项目:支持多个订单ID查询
+//            if (fsIntegralOrder.getOrderCodes() != null && !fsIntegralOrder.getOrderCodes().isEmpty()) {
+//                // 如果传了orderIds参数,使用新的查询逻辑
+//                List<FsIntegralOrder> orders = fsIntegralOrderService.selectFsIntegralOrderByOrderIdsv2(fsIntegralOrder.getOrderCodes());
+//                List<FsIntegralOrderListVO> list = orders.stream()
+//                    .map(this::convertOrderToListVO)
+//                    .collect(Collectors.toList());
+//                for (FsIntegralOrderListVO vo : list) {
+//                    vo.setUserPhone(decryptAutoPhoneMk(vo.getUserPhone()));
+//                }
+//                return getDataTable(list);
+//            } else {
+//                // 原有逻辑:单个orderId或其他条件查询
+//                List<FsIntegralOrderListVO> list = fsIntegralOrderService.selectFsIntegralOrderListByJn(fsIntegralOrder);
+//                for (FsIntegralOrderListVO vo : list) {
+//                    vo.setUserPhone(decryptAutoPhoneMk(vo.getUserPhone()));
+//                }
+//                return getDataTable(list);
+//            }
+            list = fsIntegralOrderService.selectFsIntegralOrderListByJn(fsIntegralOrder);
+        } else {
+            list = fsIntegralOrderService.selectFsIntegralOrderListVO(fsIntegralOrder);
+        }
+        SysRole sysRole = isCheckPermission();
+        if (sysRole != null && !(sysRole.getIsCheckPhone()==1)) {
             for (FsIntegralOrderListVO vo : list) {
                 vo.setUserPhone(decryptAutoPhoneMk(vo.getUserPhone()));
             }
-            return getDataTable(list);
-        }
-        List<FsIntegralOrderListVO> list = fsIntegralOrderService.selectFsIntegralOrderListVO(fsIntegralOrder);
-        for (FsIntegralOrderListVO vo : list) {
-            vo.setUserPhone(decryptAutoPhoneMk(vo.getUserPhone()));
         }
         return getDataTable(list);
     }
 
+    @Autowired
+    private ISysRoleService sysRoleService;
+    private SysRole isCheckPermission() {
+        SysRole sysRole = new SysRole();
+        SysUser user = getLoginUser().getUser();
+        boolean flag = user.isAdmin();
+        if (flag) {
+            sysRole.setIsCheckPhone(1);
+            sysRole.setIsCheckAddress(1);
+        } else {
+            List<SysRole> roles = user.getRoles();
+            if (roles != null && !roles.isEmpty()) {
+                Long[] roleIds = roles.stream().map(SysRole::getRoleId).toArray(Long[]::new);
+                return sysRoleService.getIsCheckPermission(roleIds);
+            }
+        }
+        return sysRole;
+    }
+
     /**
      * 导出积分商品订单列表
      */
     @PreAuthorize("@ss.hasPermi('his:integralOrder:export')")
     @Log(title = "积分商品订单", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(FsIntegralOrder fsIntegralOrder)
-    {
-        if (CloudHostUtils.hasCloudHostName("金牛明医")&&fsIntegralOrder.getStatus() != null && fsIntegralOrder.getStatus().equals(6)) {
+    public AjaxResult export(FsIntegralOrderParam fsIntegralOrder) {
+        List<FsIntegralOrderListVO> fsIntegralOrderListVOS = new ArrayList<>();
+        if (CloudHostUtils.hasCloudHostName("金牛明医")){
             /*目前只有金牛有状态为6的查询,其他项目避免使用6状态码*/
-            FsIntegralOrderParam param = new FsIntegralOrderParam();
-            BeanUtil.copyProperties(fsIntegralOrder, param);
-            param.setStatus("1");
-            param.setIsPush(0);
-            List<FsIntegralOrderListVO> fsIntegralOrderListVOS = fsIntegralOrderService.selectFsIntegralOrderListByJn(param);
-            ExcelUtil<FsIntegralOrderListVO> util = new ExcelUtil<>(FsIntegralOrderListVO.class);
-            return util.exportExcel(new ArrayList<>(fsIntegralOrderListVOS), "积分商品订单数据");
+            if (fsIntegralOrder.getStatus() != null && fsIntegralOrder.getStatus().equals("6")) {
+                fsIntegralOrder.setStatus("1");
+                fsIntegralOrder.setIsPush(0);
+            }
+            fsIntegralOrderListVOS = fsIntegralOrderService.selectFsIntegralOrderListByJn(fsIntegralOrder);
+        } else {
+            fsIntegralOrderListVOS = fsIntegralOrderService.selectFsIntegralOrderListVO(fsIntegralOrder);
+        }
+        SysRole sysRole = isCheckPermission();
+        // 处理商品名称:解析item_json并设置goodsName
+        for (FsIntegralOrderListVO vo : fsIntegralOrderListVOS) {
+            if (StringUtils.isNotEmpty(vo.getItemJson())) {
+                try {
+                    // 尝试解析JSON格式的商品信息
+                    if (vo.getItemJson().startsWith("[")) {
+                        // 数组格式,取第一个商品
+                        com.alibaba.fastjson.JSONArray jsonArray = com.alibaba.fastjson.JSONArray.parseArray(vo.getItemJson());
+                        if (jsonArray != null && !jsonArray.isEmpty()) {
+                            com.alibaba.fastjson.JSONObject goods = jsonArray.getJSONObject(0);
+                            if (goods != null && goods.getString("goodsName") != null) {
+                                vo.setGoodsName(goods.getString("goodsName"));
+                            }
+                        }
+                    } else if (vo.getItemJson().startsWith("{")) {
+                        // 对象格式
+                        com.alibaba.fastjson.JSONObject goods = com.alibaba.fastjson.JSONObject.parseObject(vo.getItemJson());
+                        if (goods != null && goods.getString("goodsName") != null) {
+                            vo.setGoodsName(goods.getString("goodsName"));
+                        }
+                    }
+                } catch (Exception e) {
+                    // 解析失败时保持goodsName为空,避免导出出错
+                    log.warn("解析商品信息失败,订单编号:{}, 商品信息:{}", vo.getOrderCode(), vo.getItemJson());
+                }
+            }
+            if (!(sysRole.getIsCheckPhone()==1)){
+                // 加密手机号
+                vo.setUserPhone(decryptAutoPhoneMk(vo.getUserPhone()));
+            }
+
         }
-        return fsIntegralOrderService.export(fsIntegralOrder);
+        ExcelUtil<FsIntegralOrderListVO> util = new ExcelUtil<>(FsIntegralOrderListVO.class);
+        return util.exportExcel(new ArrayList<>(fsIntegralOrderListVOS), "积分商品订单数据");
     }
     /**
      * 发货

+ 107 - 0
fs-admin/src/main/java/com/fs/his/controller/MerchantAppConfigController.java

@@ -0,0 +1,107 @@
+package com.fs.his.controller;
+
+import java.util.List;
+
+import com.fs.his.domain.MerchantAppConfig;
+import com.fs.his.service.IMerchantAppConfigService;
+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.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 商户应用配置Controller
+ *
+ * @author fs
+ * @date 2025-12-05
+ */
+@RestController
+@RequestMapping("/his/merchantAppConfig")
+public class MerchantAppConfigController extends BaseController
+{
+    @Autowired
+    private IMerchantAppConfigService merchantAppConfigService;
+
+    /**
+     * 查询商户应用配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchantAppConfig:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(MerchantAppConfig merchantAppConfig)
+    {
+        startPage();
+        List<MerchantAppConfig> list = merchantAppConfigService.selectMerchantAppConfigList(merchantAppConfig);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商户应用配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchantAppConfig:export')")
+    @Log(title = "商户应用配置", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(MerchantAppConfig merchantAppConfig)
+    {
+        List<MerchantAppConfig> list = merchantAppConfigService.selectMerchantAppConfigList(merchantAppConfig);
+        ExcelUtil<MerchantAppConfig> util = new ExcelUtil<MerchantAppConfig>(MerchantAppConfig.class);
+        return util.exportExcel(list, "商户应用配置数据");
+    }
+
+    /**
+     * 获取商户应用配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchantAppConfig:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(merchantAppConfigService.selectMerchantAppConfigById(id));
+    }
+
+    /**
+     * 新增商户应用配置
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchantAppConfig:add')")
+    @Log(title = "商户应用配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody MerchantAppConfig merchantAppConfig)
+    {
+        merchantAppConfig.setCreatedBy(getUsername());
+        merchantAppConfig.setUpdatedBy(getUsername());
+        return toAjax(merchantAppConfigService.insertMerchantAppConfig(merchantAppConfig));
+    }
+
+    /**
+     * 修改商户应用配置
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchantAppConfig:edit')")
+    @Log(title = "商户应用配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody MerchantAppConfig merchantAppConfig)
+    {
+        merchantAppConfig.setUpdatedBy(getUsername());
+        return toAjax(merchantAppConfigService.updateMerchantAppConfig(merchantAppConfig));
+    }
+
+    /**
+     * 删除商户应用配置
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchantAppConfig:remove')")
+    @Log(title = "商户应用配置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long ids)
+    {
+        return toAjax(merchantAppConfigService.deleteMerchantAppConfigById(ids));
+    }
+}

+ 9 - 0
fs-admin/src/main/java/com/fs/hisStore/task/LiveTask.java

@@ -12,6 +12,7 @@ import com.fs.erp.domain.ErpDeliverys;
 import com.fs.erp.domain.ErpOrderQuery;
 import com.fs.erp.dto.ErpOrderQueryRequert;
 import com.fs.erp.dto.ErpOrderQueryResponse;
+import com.fs.erp.service.FsJstAftersalePushScrmService;
 import com.fs.erp.service.IErpOrderService;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.dto.ExpressInfoDTO;
@@ -160,6 +161,14 @@ public class LiveTask {
     @Autowired
     private IFsStoreOrderScrmService orderService;
 
+    @Autowired
+    private FsJstAftersalePushScrmService fsJstAftersalePushScrmService;
+
+    // 聚水潭 推送售后信息
+    public void pushJst(){
+        fsJstAftersalePushScrmService.pushJst();
+    }
+
 
     // 订单银行回调数据丢失补偿
     public void recoveryBankOrder() {

+ 4 - 4
fs-admin/src/main/java/com/fs/live/controller/LiveController.java

@@ -93,7 +93,7 @@ public class LiveController extends BaseController {
     @PutMapping
     public AjaxResult edit(@RequestBody Live live) {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        log.warn("loginUser:{},update:{}", loginUser.getUserId(), JSON.toJSONString( live));
+        log.info("loginUser:{},update:{}", loginUser.getUserId(), JSON.toJSONString( live));
         return toAjax(liveService.updateLive(live));
     }
 
@@ -105,7 +105,7 @@ public class LiveController extends BaseController {
     @DeleteMapping("/{liveIds}")
     public AjaxResult remove(@PathVariable Long[] liveIds) {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        log.warn("loginUser:{},update:{}", loginUser.getUserId(), JSON.toJSONString( liveIds));
+        log.info("loginUser:{},update:{}", loginUser.getUserId(), JSON.toJSONString( liveIds));
         return toAjax(liveService.deleteLiveByLiveIds(liveIds, new Live()));
     }
 
@@ -130,7 +130,7 @@ public class LiveController extends BaseController {
     @PostMapping("/handleShelfOrUn")
     public R handleShelfOrUn(@RequestBody LiveListVo listVo) {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        log.warn("loginUser:{},update:{}", loginUser.getUserId(), JSON.toJSONString( listVo));
+        log.info("loginUser:{},update:{}", loginUser.getUserId(), JSON.toJSONString( listVo));
         return liveService.handleShelfOrUnAdmin(listVo);
     }
 
@@ -141,7 +141,7 @@ public class LiveController extends BaseController {
     @PostMapping("/handleDeleteSelected")
     public R handleDeleteSelected(@RequestBody LiveListVo listVo) {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        log.warn("loginUser:{},update:{}", loginUser.getUserId(), JSON.toJSONString( listVo));
+        log.info("loginUser:{},update:{}", loginUser.getUserId(), JSON.toJSONString( listVo));
         return liveService.handleDeleteSelectedAdmin(listVo);
     }
     /**

+ 10 - 4
fs-company/src/main/java/com/fs/company/controller/live/LiveController.java

@@ -15,9 +15,17 @@ import com.fs.company.domain.CompanyUser;
 import com.fs.framework.security.LoginUser;
 import com.fs.framework.security.SecurityUtils;
 import com.fs.framework.service.TokenService;
+import com.fs.huifuPay.domain.HuiFuQueryOrderResult;
+import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayQueryRequest;
+import com.fs.huifuPay.service.HuiFuService;
 import com.fs.live.domain.Live;
 import com.fs.live.domain.LiveCompanyCode;
+import com.fs.live.domain.LiveOrder;
+import com.fs.live.domain.LiveOrderPayment;
+import com.fs.live.mapper.LiveOrderMapper;
+import com.fs.live.mapper.LiveOrderPaymentMapper;
 import com.fs.live.service.ILiveCompanyCodeService;
+import com.fs.live.service.ILiveOrderService;
 import com.fs.live.service.ILiveService;
 import com.fs.live.vo.LiveListVo;
 import com.fs.system.oss.OSSFactory;
@@ -29,10 +37,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.nio.charset.StandardCharsets;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 /**
  * 直播Controller

+ 4 - 4
fs-company/src/main/java/com/fs/framework/service/CompanyLoginService.java

@@ -58,13 +58,13 @@ public class CompanyLoginService
     @Autowired
     private ICompanyUserService companyUserService;
 
-    @Value("${wechat.company.appid}")
+    @Value("${wechat.company.appid:#{null}}")
     private String appId;
-    @Value("${wechat.company.secret}")
+    @Value("${wechat.company.secret:#{null}}")
     private String secret;
-    @Value("${wechat.company.redirectUri}")
+    @Value("${wechat.company.redirectUri:#{null}}")
     private String redirectUri;
-    @Value("${wechat.isNeedScan}")
+    @Value("${wechat.isNeedScan:false}")
     private Boolean isNeedScan;
 
     @Autowired

+ 4 - 4
fs-framework/src/main/java/com/fs/framework/web/service/SysLoginService.java

@@ -59,13 +59,13 @@ public class SysLoginService
     @Autowired
     private WechatLoginService wechatLoginService;
 
-    @Value("${wechat.admin.appid}")
+    @Value("${wechat.admin.appid:#{null}}")
     private String appId;
-    @Value("${wechat.admin.secret}")
+    @Value("${wechat.admin.secret:#{null}}")
     private String secret;
-    @Value("${wechat.admin.redirectUri}")
+    @Value("${wechat.admin.redirectUri:#{null}}")
     private String redirectUri;
-    @Value("${wechat.isNeedScan}")
+    @Value("${wechat.isNeedScan:false}")
     private Boolean isNeedScan;
 
     /**

+ 5 - 0
fs-service/src/main/java/com/fs/course/domain/FsCoursePlaySourceConfig.java

@@ -104,4 +104,9 @@ public class FsCoursePlaySourceConfig {
      * 小程序状态:0正常,1半封禁,2封禁
      */
     private Integer status;
+
+    /**
+     * 商户支付配置id
+     */
+    private Long merchantConfigId;
 }

+ 2 - 0
fs-service/src/main/java/com/fs/course/mapper/FsCoursePlaySourceConfigMapper.java

@@ -14,4 +14,6 @@ public interface FsCoursePlaySourceConfigMapper extends BaseMapper<FsCoursePlayS
      * 查询点播配置列表
      */
     List<FsCoursePlaySourceConfigVO> selectCoursePlaySourceConfigVOListByMap(@Param("params") Map<String, Object> params);
+
+    FsCoursePlaySourceConfig selectCoursePlaySourceConfigByAppId(String appId);
 }

+ 3 - 0
fs-service/src/main/java/com/fs/course/param/FsCoursePlaySourceConfigEditParam.java

@@ -55,4 +55,7 @@ public class FsCoursePlaySourceConfigEditParam {
 
     @ApiModelProperty("小程序状态:0正常,1半封禁,2封禁")
     private Integer status;
+
+    @ApiModelProperty("商户支付配置id")
+    private Long merchantConfigId;
 }

+ 7 - 0
fs-service/src/main/java/com/fs/course/service/IFsCoursePlaySourceConfigService.java

@@ -15,4 +15,11 @@ public interface IFsCoursePlaySourceConfigService extends IService<FsCoursePlayS
     List<FsCoursePlaySourceConfigVO> selectCoursePlaySourceConfigVOListByMap(Map<String, Object> params);
 
     List<FsCoursePlaySourceConfig> selectByAppIds(List<String> miniAppList);
+
+    /**
+     * 根据appId查询
+     * @param appId
+     * @return
+     */
+    FsCoursePlaySourceConfig selectCoursePlaySourceConfigByAppId(String appId);
 }

+ 5 - 0
fs-service/src/main/java/com/fs/course/service/impl/FsCoursePlaySourceConfigServiceImpl.java

@@ -30,4 +30,9 @@ public class FsCoursePlaySourceConfigServiceImpl extends ServiceImpl<FsCoursePla
     public List<FsCoursePlaySourceConfig> selectByAppIds(List<String> miniAppList) {
         return baseMapper.selectList(new QueryWrapper<FsCoursePlaySourceConfig>().in("appid", miniAppList));
     }
+
+    @Override
+    public FsCoursePlaySourceConfig selectCoursePlaySourceConfigByAppId(String appId) {
+        return baseMapper.selectCoursePlaySourceConfigByAppId(appId);
+    }
 }

+ 5 - 0
fs-service/src/main/java/com/fs/course/vo/newfs/FsUserCourseVideoDetailsVO.java

@@ -31,6 +31,11 @@ public class FsUserCourseVideoDetailsVO {
     @ApiModelProperty(value = "课程ID")
     private Long courseId;
 
+
+    @ApiModelProperty(value = "是否启用倍速(0:否;1:是)")
+    private Integer isSpeed;
+
+
     @ApiModelProperty(value = "题库内容")
     private List<FsUserVideoQuestionVO> questionBankList;
 

+ 75 - 10
fs-service/src/main/java/com/fs/erp/service/impl/FsJstAftersalePushScrmServiceImpl.java

@@ -22,6 +22,12 @@ import com.fs.hisStore.domain.FsStoreOrderScrm;
 import com.fs.hisStore.mapper.FsStoreAfterSalesScrmMapper;
 import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
 import com.fs.hisStore.service.IFsStoreOrderItemScrmService;
+import com.fs.live.domain.LiveOrder;
+import com.fs.live.domain.LiveOrderItem;
+import com.fs.live.mapper.LiveOrderMapper;
+import com.fs.live.mapper.LiveOrderPaymentMapper;
+import com.fs.live.service.ILiveOrderItemService;
+import com.fs.live.service.ILiveOrderPaymentService;
 import com.fs.ybPay.dto.RefundOrderDTO;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.http.util.Asserts;
@@ -45,6 +51,13 @@ public class FsJstAftersalePushScrmServiceImpl implements FsJstAftersalePushScrm
 
     @Autowired
     private FsStoreOrderScrmMapper fsStoreOrderMapper;
+    @Autowired
+    private LiveOrderMapper liveOrderMapper;
+
+    @Autowired
+    private ILiveOrderItemService liveOrderItemService;
+    @Autowired
+    private LiveOrderPaymentMapper liveOrderPaymentMapper;
 
     @Autowired
     private IFsStoreOrderItemScrmService storeOrderItemService;
@@ -65,21 +78,37 @@ public class FsJstAftersalePushScrmServiceImpl implements FsJstAftersalePushScrm
                 log.info("获取记录{} 锁失败!",item.getId());
                 continue;
             }
-
+            item.setRetryCount(item.getRetryCount()+1);
             FsStoreOrderScrm fsStoreOrder = fsStoreOrderMapper.selectFsStoreOrderByOrderCode(item.getOrderId());
+            LiveOrder liveOrder = null;
+            // 拆开,现在分为商城订单和直播订单
+            if (fsStoreOrder == null) {
+                liveOrder = liveOrderMapper.selectLiveOrderByOrderCode(item.getOrderId());
+                if (liveOrder == null) {
+                    item.setErrorMessage("该订单未找到!");
+                    item.setTaskStatus(TaskStatusEnum.FAILED.getCode());
+                    log.info("该订单未找到!");
+                    fsJstAftersalePushMapper.update(item);
+                    continue;
+                }
+            }
 
-            item.setRetryCount(item.getRetryCount()+1);
 
-            if(fsStoreOrder == null){
-                item.setErrorMessage("该订单未找到!");
-                item.setTaskStatus(TaskStatusEnum.FAILED.getCode());
-                log.info("该订单未找到!");
-                fsJstAftersalePushMapper.update(item);
+            RefundOrderDTO dto;
+            try {
+                if(fsStoreOrder != null){
+                    dto = getAfterSaleDTO(item, fsStoreOrder);
+                }else {
+                    dto = getAfterSaleLiveDTO(item, liveOrder);
+                }
+            } catch (Exception e) {
+                log.error("订单售后创建售后信息失败:{}" ,e.getMessage());
                 continue;
             }
-            Asserts.notNull(fsStoreOrder,"该订单未找到!");
-            RefundOrderDTO dto;
-            dto = getAfterSaleDTO(item, fsStoreOrder);
+
+
+
+
             // 买家已经申请,等待卖家同意
             if(StringUtils.equals(AfterSalesOrderStatusEnum.WAIT_SELLER_AGREE.getIndex().toString()
                     ,item.getType())){
@@ -173,4 +202,40 @@ public class FsJstAftersalePushScrmServiceImpl implements FsJstAftersalePushScrm
         dto.setItems(refundItemDTOS);
         return dto;
     }
+
+    private RefundOrderDTO getAfterSaleLiveDTO(FsJstAftersalePush item, LiveOrder fsStoreOrder) {
+        RefundOrderDTO dto = new RefundOrderDTO();
+        AfterSalesOrderStatusEnum statusEnum = AfterSalesOrderStatusEnum.getByIndex(Integer.valueOf(item.getType()));
+
+        dto.setShopStatus(statusEnum.getCode());
+        dto.setQuestionType("可更新");
+        dto.setOuterAsId(item.getAfterSaleId());
+        dto.setRemark("用户退款");
+        dto.setType("仅退款");
+
+        dto.setShopId(Long.parseLong(shopId));
+        dto.setTotalAmount(fsStoreOrder.getTotalPrice());
+        dto.setSoId(item.getOrderId());
+        dto.setRefund(fsStoreOrder.getPayPrice());
+
+
+        FsStoreOrderItemScrm itemMap=new FsStoreOrderItemScrm();
+//        itemMap.setOrderId(fsStoreOrder.getId());
+        itemMap.setOrderId(fsStoreOrder.getOrderId());
+        List<LiveOrderItem> orderItems=liveOrderItemService.selectCheckedByOrderId(fsStoreOrder.getOrderId());
+        List<RefundItemDTO> refundItemDTOS=new ArrayList<>();
+
+        for(LiveOrderItem orderItem: orderItems) {
+            FsStoreCartDTO cartDTO = JSONUtil.toBean(orderItem.getJsonInfo(), FsStoreCartDTO.class);
+
+            RefundItemDTO itemDTO = new RefundItemDTO();
+            itemDTO.setSkuId(cartDTO.getBarCode());
+            itemDTO.setQty(cartDTO.getNum());
+            itemDTO.setAmount(cartDTO.getPrice());
+            itemDTO.setType("退货");
+            refundItemDTOS.add(itemDTO);
+        }
+        dto.setItems(refundItemDTOS);
+        return dto;
+    }
 }

+ 3 - 0
fs-service/src/main/java/com/fs/his/domain/FsPayConfig.java

@@ -15,6 +15,9 @@ public class FsPayConfig {
     private String appId;
     private String wxMchId;
     private String wxMchKey;
+    private String keyPath;
+    private String wxApiV3Key;
+    private String notifyUrlScrm;
 
     private String ybNotifyUrl;
     private String tzPayDecrypt;

+ 66 - 0
fs-service/src/main/java/com/fs/his/domain/MerchantAppConfig.java

@@ -0,0 +1,66 @@
+package com.fs.his.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+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;
+
+/**
+ * 商户应用配置对象 merchant_app_config
+ *
+ * @author fs
+ * @date 2025-12-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MerchantAppConfig extends BaseEntity{
+
+    /** 主键ID */
+    private Long id;
+
+    /** 商户类型 */
+    @Excel(name = "商户类型")
+    private String merchantType;
+
+    // 应用ID
+    @Excel(name = "应用ID")
+    private String appId;
+
+    /** 回调地址,用于接收支付结果等通知 */
+    @Excel(name = "回调地址,用于接收支付结果等通知")
+    private String callbackUrl;
+
+    /** 配置详情 */
+    @Excel(name = "配置详情")
+    private String dataJson;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdTime;
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedTime;
+
+    /** 删除状态:0-正常,1-已删除 */
+    @Excel(name = "删除状态:0-正常,1-已删除")
+    private Long isDeleted;
+
+    /** 创建人ID或用户名 */
+    private String createdBy;
+
+    /** 修改人ID或用户名 */
+    private String updatedBy;
+
+    /**
+     * 商户号
+     */
+    private String merchantId;
+
+
+}

+ 74 - 0
fs-service/src/main/java/com/fs/his/mapper/MerchantAppConfigMapper.java

@@ -0,0 +1,74 @@
+package com.fs.his.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.his.domain.MerchantAppConfig;
+
+/**
+ * 商户应用配置Mapper接口
+ *
+ * @author fs
+ * @date 2025-12-05
+ */
+public interface MerchantAppConfigMapper extends BaseMapper<MerchantAppConfig>{
+
+
+    /**
+     * 检查表是否存在
+     */
+    Integer checkTableExists();
+
+    /**
+     * 创建商户配置表
+     */
+    void createMerchantAppConfigTable();
+
+
+    /**
+     * 查询商户应用配置
+     *
+     * @param id 商户应用配置主键
+     * @return 商户应用配置
+     */
+    MerchantAppConfig selectMerchantAppConfigById(Long id);
+
+    /**
+     * 查询商户应用配置列表
+     *
+     * @param merchantAppConfig 商户应用配置
+     * @return 商户应用配置集合
+     */
+    List<MerchantAppConfig> selectMerchantAppConfigList(MerchantAppConfig merchantAppConfig);
+
+    /**
+     * 新增商户应用配置
+     *
+     * @param merchantAppConfig 商户应用配置
+     * @return 结果
+     */
+    int insertMerchantAppConfig(MerchantAppConfig merchantAppConfig);
+
+    /**
+     * 修改商户应用配置
+     *
+     * @param merchantAppConfig 商户应用配置
+     * @return 结果
+     */
+    int updateMerchantAppConfig(MerchantAppConfig merchantAppConfig);
+
+    /**
+     * 删除商户应用配置
+     *
+     * @param id 商户应用配置主键
+     * @return 结果
+     */
+    int deleteMerchantAppConfigById(Long id);
+
+    /**
+     * 批量删除商户应用配置
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteMerchantAppConfigByIds(Long[] ids);
+}

+ 3 - 0
fs-service/src/main/java/com/fs/his/param/FsIntegralOrderParam.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.util.Date;
+import java.util.List;
 
 @Data
 public class FsIntegralOrderParam {
@@ -17,6 +18,8 @@ public class FsIntegralOrderParam {
     @Excel(name = "订单编号")
     private String orderCode;
 
+    private List<String> orderCodes;
+
     /** 用户id */
     @Excel(name = "用户id")
     private Long userId;

+ 61 - 0
fs-service/src/main/java/com/fs/his/service/IMerchantAppConfigService.java

@@ -0,0 +1,61 @@
+package com.fs.his.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.his.domain.MerchantAppConfig;
+
+/**
+ * 商户应用配置Service接口
+ *
+ * @author fs
+ * @date 2025-12-05
+ */
+public interface IMerchantAppConfigService extends IService<MerchantAppConfig>{
+    /**
+     * 查询商户应用配置
+     *
+     * @param id 商户应用配置主键
+     * @return 商户应用配置
+     */
+    MerchantAppConfig selectMerchantAppConfigById(Long id);
+
+    /**
+     * 查询商户应用配置列表
+     *
+     * @param merchantAppConfig 商户应用配置
+     * @return 商户应用配置集合
+     */
+    List<MerchantAppConfig> selectMerchantAppConfigList(MerchantAppConfig merchantAppConfig);
+
+    /**
+     * 新增商户应用配置
+     *
+     * @param merchantAppConfig 商户应用配置
+     * @return 结果
+     */
+    int insertMerchantAppConfig(MerchantAppConfig merchantAppConfig);
+
+    /**
+     * 修改商户应用配置
+     *
+     * @param merchantAppConfig 商户应用配置
+     * @return 结果
+     */
+    int updateMerchantAppConfig(MerchantAppConfig merchantAppConfig);
+
+    /**
+     * 批量删除商户应用配置
+     *
+     * @param ids 需要删除的商户应用配置主键集合
+     * @return 结果
+     */
+    int deleteMerchantAppConfigByIds(Long[] ids);
+
+    /**
+     * 删除商户应用配置信息
+     *
+     * @param id 商户应用配置主键
+     * @return 结果
+     */
+    int deleteMerchantAppConfigById(Long id);
+}

+ 200 - 0
fs-service/src/main/java/com/fs/his/service/impl/MerchantAppConfigServiceImpl.java

@@ -0,0 +1,200 @@
+package com.fs.his.service.impl;
+
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.common.core.domain.entity.SysDictType;
+import com.fs.his.domain.FsPayConfig;
+import com.fs.his.domain.MerchantAppConfig;
+import com.fs.his.mapper.MerchantAppConfigMapper;
+import com.fs.his.service.IMerchantAppConfigService;
+import com.fs.hisStore.domain.FsPayConfigScrm;
+import com.fs.system.domain.SysConfig;
+import com.fs.system.mapper.SysConfigMapper;
+import com.fs.system.mapper.SysDictTypeMapper;
+import com.google.gson.Gson;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+
+/**
+ * 商户应用配置Service业务层处理
+ *
+ * @author fs
+ * @date 2025-12-05
+ */
+@Service
+@Slf4j
+public class MerchantAppConfigServiceImpl extends ServiceImpl<MerchantAppConfigMapper, MerchantAppConfig> implements IMerchantAppConfigService {
+
+    @Autowired
+    private SysConfigMapper sysConfigMapper;
+
+    /**
+     * 异步初始化方法
+     */
+    @PostConstruct
+    @Async("merchantInitExecutor")
+    public void init() {
+        log.info("开始异步初始化商户配置表...");
+
+        // 使用CompletableFuture进行异步初始化
+        CompletableFuture.runAsync(() -> {
+            try {
+                // 延迟5秒,等待数据库连接就绪
+                Thread.sleep(5000);
+                Integer count = baseMapper.checkTableExists();
+                if (ObjectUtil.isNotNull(count)&&count>0) {
+                    return;
+                }
+                // 1. 检查并创建表
+                initMerchantTable();
+
+            } catch (Exception e) {
+                log.error("初始化商户配置表失败", e);
+            }
+        });
+    }
+
+    /**
+     * 初始化商户配置表
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void initMerchantTable() {
+        try {
+            // 检查表是否存在
+            log.info("商户配置表不存在,开始创建...");
+            baseMapper.createMerchantAppConfigTable();
+            log.info("商户配置表创建成功");
+        } catch (Exception e) {
+            log.error("初始化商户配置表失败", e);
+            throw e;
+        }
+    }
+    /**
+     * 查询商户应用配置
+     *
+     * @param id 商户应用配置主键
+     * @return 商户应用配置
+     */
+    @Override
+    public MerchantAppConfig selectMerchantAppConfigById(Long id)
+    {
+        return baseMapper.selectMerchantAppConfigById(id);
+    }
+
+    /**
+     * 查询商户应用配置列表
+     *
+     * @param merchantAppConfig 商户应用配置
+     * @return 商户应用配置
+     */
+    @Override
+    public List<MerchantAppConfig> selectMerchantAppConfigList(MerchantAppConfig merchantAppConfig)
+    {
+        return baseMapper.selectMerchantAppConfigList(merchantAppConfig);
+    }
+
+    /**
+     * 新增商户应用配置
+     *
+     * @param merchantAppConfig 商户应用配置
+     * @return 结果
+     */
+    @Override
+    public int insertMerchantAppConfig(MerchantAppConfig merchantAppConfig)
+    {
+        FsPayConfig fsPayConfig = JSON.parseObject(merchantAppConfig.getDataJson(), FsPayConfig.class);
+        switch (merchantAppConfig.getMerchantType()){
+            case "yb": // 易宝
+                merchantAppConfig.setMerchantId(fsPayConfig.getYbAccount());
+                merchantAppConfig.setCallbackUrl(fsPayConfig.getYbNotifyUrl());
+
+                break;
+            case "tz": // 台州
+                merchantAppConfig.setMerchantId(fsPayConfig.getTzPlatMerCstNo());
+                merchantAppConfig.setCallbackUrl(fsPayConfig.getTzPayDecrypt());
+                break;
+            case "wx": // 微信
+                merchantAppConfig.setMerchantId(fsPayConfig.getWxMchId());
+                merchantAppConfig.setCallbackUrl(fsPayConfig.getNotifyUrlScrm());
+                break;
+            case "hf": // 汇付
+                merchantAppConfig.setMerchantId(fsPayConfig.getHuifuId());
+                merchantAppConfig.setCallbackUrl(fsPayConfig.getHfPayNotifyUrl());
+                break;
+            default:
+                throw new RuntimeException("商户类型错误");
+        }
+
+        return baseMapper.insertMerchantAppConfig(merchantAppConfig);
+    }
+
+    /**
+     * 修改商户应用配置
+     *
+     * @param merchantAppConfig 商户应用配置
+     * @return 结果
+     */
+    @Override
+    public int updateMerchantAppConfig(MerchantAppConfig merchantAppConfig)
+    {
+        FsPayConfig fsPayConfig = JSON.parseObject(merchantAppConfig.getDataJson(), FsPayConfig.class);
+        switch (merchantAppConfig.getMerchantType()){
+            case "yb": // 易宝
+                merchantAppConfig.setMerchantId(fsPayConfig.getYbAccount());
+                merchantAppConfig.setCallbackUrl(fsPayConfig.getYbNotifyUrl());
+
+                break;
+            case "tz": // 台州
+                merchantAppConfig.setMerchantId(fsPayConfig.getTzPlatMerCstNo());
+                merchantAppConfig.setCallbackUrl(fsPayConfig.getTzPayDecrypt());
+                break;
+            case "wx": // 微信
+                merchantAppConfig.setMerchantId(fsPayConfig.getWxMchId());
+                merchantAppConfig.setCallbackUrl(fsPayConfig.getNotifyUrlScrm());
+                break;
+            case "hf": // 汇付
+                merchantAppConfig.setMerchantId(fsPayConfig.getHuifuId());
+                merchantAppConfig.setCallbackUrl(fsPayConfig.getHfPayNotifyUrl());
+                break;
+            default:
+                throw new RuntimeException("商户类型错误");
+        }
+        return baseMapper.updateMerchantAppConfig(merchantAppConfig);
+    }
+
+    /**
+     * 批量删除商户应用配置
+     *
+     * @param ids 需要删除的商户应用配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMerchantAppConfigByIds(Long[] ids)
+    {
+        return baseMapper.deleteMerchantAppConfigByIds(ids);
+    }
+
+    /**
+     * 删除商户应用配置信息
+     *
+     * @param id 商户应用配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMerchantAppConfigById(Long id)
+    {
+        MerchantAppConfig merchantAppConfig = new MerchantAppConfig();
+        merchantAppConfig.setId( id);
+        merchantAppConfig.setIsDeleted(1L);
+        return baseMapper.updateMerchantAppConfig(merchantAppConfig);
+    }
+}

+ 1 - 0
fs-service/src/main/java/com/fs/his/vo/FsIntegralOrderListVO.java

@@ -84,4 +84,5 @@ public class FsIntegralOrderListVO {
     private String erpPhone;
 
     private String loginAccount;
+    private String goodsName;
 }

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

@@ -35,4 +35,6 @@ public class FsPayConfigScrm {
     private String notifyUrlScrm;
     private String publicKeyPath;
     private String publicKeyId;
+
+
 }

+ 1 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreAfterSalesScrmServiceImpl.java

@@ -393,6 +393,7 @@ public class FsStoreAfterSalesScrmServiceImpl implements IFsStoreAfterSalesScrmS
         request.setOid(order.getOrderCode());
         request.setRefund_state(1);
         request.setStoreAfterSalesId(storeAfterSales.getId());
+        request.setOrderStatus(orderStatus);
         if (StringUtils.isNotBlank(order.getExtendOrderId())){
             BaseResponse response=erpOrderService.refundUpdateScrm(request);
             if(response.getSuccess()){

+ 1 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -2394,6 +2394,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
             request.setTid(order.getOrderCode());
             request.setOid(order.getOrderCode());
             request.setRefund_state(1);
+            request.setOrderStatus(order.getStatus());
             //BaseResponse response=erpOrderService.refundUpdate(request);
 //            if(response.getSuccess()){
 //            }

+ 8 - 2
fs-service/src/main/java/com/fs/live/mapper/LiveMapper.java

@@ -164,6 +164,7 @@ public interface LiveMapper
             "select * from live where 1=1 " +
             " <if test='param.companyId!=null' > and company_id = #{param.companyId} </if> and live_type IN (1,2, 3) AND status IN (3, 4) AND is_del = 0 and is_audit=1 " +
             " <if test='param.liveName!=null' > and live_name like concat('%' ,#{param.liveName},'%') </if> " +
+            " <if test='param.startTime!=null and param.endTime!=null' > and start_time between #{param.startTime} and  #{param.endTime}  </if> " +
             " UNION " +
             "select l.* from live l " +
             "LEFT JOIN ( " +
@@ -179,6 +180,7 @@ public interface LiveMapper
             "and TIMESTAMPDIFF(SECOND, l.start_time, NOW()) > COALESCE(video_duration.total_duration, 0) " +
             "and COALESCE(video_duration.total_duration, 0) > 0 " +
             " <if test='param.liveName!=null' > and l.live_name like concat('%' ,#{param.liveName},'%') </if> " +
+            " <if test='param.startTime!=null and param.endTime!=null' > and l.start_time between #{param.startTime} and  #{param.endTime}  </if> " +
             ") as temp " +
             " </script>"})
     int listLiveDataCount(@Param("param") LiveDataParam param);
@@ -209,6 +211,10 @@ public interface LiveMapper
             "GROUP BY l.live_id, l.start_time")
     Integer selectLiveFlagByLiveId(@Param("liveId") Long liveId);
 
-    @Select("SELECT * FROM live WHERE is_audit = 1 and is_del = 0 and status in (1,2,4) and live_type in (2,3) order by create_time desc")
-    List<Live> listToLiveNoEnd(Live live);
+    @Select({"<script>" +
+            " SELECT * FROM live WHERE is_audit = 1 and is_del = 0 and status in (1,2,4) and live_type in (2,3) " +
+            "  <if test='live.liveName!=null' > and live_name like concat('%',#{live.liveName},'%') </if> " +
+            " order by create_time desc" +
+            " </script>"})
+    List<Live> listToLiveNoEnd(@Param("live") Live live);
 }

+ 1 - 0
fs-service/src/main/java/com/fs/live/service/impl/LiveAfterSalesServiceImpl.java

@@ -461,6 +461,7 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
         request.setOid(order.getOrderCode());
         request.setRefund_state(1);
         request.setStoreAfterSalesId(storeAfterSales.getId());
+        request.setOrderStatus(orderStatus);
         if (StringUtils.isNotBlank(order.getExtendOrderId())){
             BaseResponse response=erpOrderService.refundUpdateLive(request);
             if(response.getSuccess()){

+ 3 - 2
fs-service/src/main/java/com/fs/live/service/impl/LiveOrderServiceImpl.java

@@ -1177,6 +1177,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
             request.setTid(order.getOrderCode());
             request.setOid(order.getOrderCode());
             request.setRefund_state(1);
+            request.setOrderStatus(order.getStatus());
 
             if (ObjectUtils.equals(order.getStatus(), 2)) {
                 LiveAfterSalesParam param = new LiveAfterSalesParam();
@@ -1373,7 +1374,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
             request.setTid(order.getOrderCode());
             request.setOid(order.getOrderCode());
             request.setRefund_state(1);
-
+            request.setOrderStatus(order.getStatus());
             if (ObjectUtils.equals(order.getStatus(), 2)) {
                 LiveAfterSalesParam param = new LiveAfterSalesParam();
                 param.setOrderCode(order.getOrderCode());
@@ -2982,7 +2983,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
         }
         String orderId=redisCache.getCacheObject("isPaying:"+order.getOrderId());
         if(StringUtils.isNotEmpty(orderId)&&order.getOrderId().toString().equals(orderId)){
-            return R.error("正在支付中...");
+            return R.error(501,"正在支付中...");
         }
         FsUserScrm user=userMapper.selectFsUserById(Long.valueOf(order.getUserId()));
         if(user == null){

+ 0 - 9
fs-service/src/main/resources/application-common.yml

@@ -143,12 +143,3 @@ wechat:
   api:
     base-url: https://api.weixin.qq.com
     upload-shipping-info: /wxa/sec/order/upload_shipping_info
-  company:
-    appid: wxd7c1e221622a0ccf
-    secret: 70d3ed4f8eb68cca0cf525b8ce07405d
-    redirectUri: http://rfa96c48.natappfree.cc/callback
-  admin:
-    appid: wxd7c1e221622a0ccf
-    secret: 70d3ed4f8eb68cca0cf525b8ce07405d
-    redirectUri: http://rfa96c48.natappfree.cc/callback
-  isNeedScan: false

+ 10 - 0
fs-service/src/main/resources/application-druid-jnmy-test.yml

@@ -232,5 +232,15 @@ isNewWxMerchant: true
 ipad:
     url: http://localhost:8999/dev-api
     companyId: 13
+#wechat:
+#    company:
+#        appid: wxd7c1e221622a0ccf
+#        secret: 70d3ed4f8eb68cca0cf525b8ce07405d
+#        redirectUri: http://ta6d97ec.natappfree.cc/callback
+#    admin:
+#        appid: wxd7c1e221622a0ccf
+#        secret: 70d3ed4f8eb68cca0cf525b8ce07405d
+#        redirectUri: http://ta6d97ec.natappfree.cc/callback
+#    isNeedScan: true
 
 

+ 11 - 0
fs-service/src/main/resources/application-druid-jnmy.yml

@@ -161,4 +161,15 @@ im:
 #是否为新商户,新商户不走mpOpenId
 isNewWxMerchant: true
 
+wechat:
+    company:
+        appid: wxd7c1e221622a0ccf
+        secret: 70d3ed4f8eb68cca0cf525b8ce07405d
+        redirectUri: https://company.jnmyunl.com/prod-api/callback
+    admin:
+        appid: wxd7c1e221622a0ccf
+        secret: 70d3ed4f8eb68cca0cf525b8ce07405d
+        redirectUri: https://admin.jnmyunl.com/prod-api/callback
+    isNeedScan: false
+
 

+ 125 - 0
fs-service/src/main/resources/mapper/MerchantAppConfigMapper.xml

@@ -0,0 +1,125 @@
+<?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.MerchantAppConfigMapper">
+
+    <resultMap type="MerchantAppConfig" id="MerchantAppConfigResult">
+        <result property="id"    column="id"    />
+        <result property="merchantType"    column="merchant_type"    />
+        <result property="appId"    column="app_id"    />
+        <result property="callbackUrl"    column="callback_url"    />
+        <result property="dataJson"    column="data_json"    />
+        <result property="createdTime"    column="created_time"    />
+        <result property="updatedTime"    column="updated_time"    />
+        <result property="isDeleted"    column="is_deleted"    />
+        <result property="createdBy"    column="created_by"    />
+        <result property="updatedBy"    column="updated_by"    />
+        <result property="merchantId"    column="merchant_id"    />
+    </resultMap>
+
+    <!-- 检查表是否存在 -->
+    <select id="checkTableExists" resultType="java.lang.Integer">
+        SELECT COUNT(*) FROM information_schema.tables
+        WHERE table_schema = DATABASE() AND table_name = 'merchant_app_config'
+    </select>
+
+    <!-- 创建商户配置表 -->
+    <update id="createMerchantAppConfigTable">
+        CREATE TABLE `merchant_app_config` (
+        `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+        `merchant_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户类型:如WECHAT_PAY、ALIPAY等',
+        `app_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用ID',
+        `callback_url` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '回调地址,用于接收支付结果等通知',
+        `data_json` json DEFAULT NULL COMMENT '扩展配置数据,JSON格式存储其他配置信息',
+        `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+        `updated_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+        `is_deleted` tinyint NOT NULL DEFAULT '0' COMMENT '删除状态:0-正常,1-已删除',
+        `created_by` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '创建人ID或用户名',
+        `updated_by` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '修改人ID或用户名',
+        `merchant_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '商户号',
+        PRIMARY KEY (`id`),
+        KEY `idx_merchant_type` (`merchant_type`),
+        KEY `idx_app_id` (`app_id`),
+        KEY `idx_created_time` (`created_time`),
+        KEY `merchant_app_config_merchant_type_IDX` (`merchant_type`,`is_deleted`,`merchant_id`) USING BTREE
+        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商户应用配置表'
+    </update>
+
+
+    <sql id="selectMerchantAppConfigVo">
+        select id, merchant_type, app_id, merchant_id,callback_url, data_json, created_time, updated_time, is_deleted, created_by, updated_by from merchant_app_config
+    </sql>
+
+    <select id="selectMerchantAppConfigList" parameterType="MerchantAppConfig" resultMap="MerchantAppConfigResult">
+        <include refid="selectMerchantAppConfigVo"/>
+        <where>
+            <if test="merchantId != null and merchantId != ''"> and merchant_id = #{merchantId}</if>
+            <if test="merchantType != null  and merchantType != ''"> and merchant_type = #{merchantType}</if>
+            <if test="appId != null  and appId != ''"> and app_id = #{appId}</if>
+            <if test="params.beginCreatedTime != null and params.beginCreatedTime != '' and params.endCreatedTime != null and params.endCreatedTime != ''"> and created_time between #{params.beginCreatedTime} and #{params.endCreatedTime}</if>
+            <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
+        </where>
+    </select>
+
+    <select id="selectMerchantAppConfigById" parameterType="Long" resultMap="MerchantAppConfigResult">
+        <include refid="selectMerchantAppConfigVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertMerchantAppConfig" parameterType="MerchantAppConfig" useGeneratedKeys="true" keyProperty="id">
+        insert into merchant_app_config
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="merchantType != null and merchantType != ''">merchant_type,</if>
+            <if test="appId != null and appId != ''">app_id,</if>
+            <if test="callbackUrl != null">callback_url,</if>
+            <if test="dataJson != null">data_json,</if>
+            <if test="createdTime != null">created_time,</if>
+            <if test="updatedTime != null">updated_time,</if>
+            <if test="isDeleted != null">is_deleted,</if>
+            <if test="createdBy != null and createdBy != ''">created_by,</if>
+            <if test="updatedBy != null and updatedBy != ''">updated_by,</if>
+            <if test="merchantId != null and merchantId != ''">merchant_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="merchantType != null and merchantType != ''">#{merchantType},</if>
+            <if test="appId != null and appId != ''">#{appId},</if>
+            <if test="callbackUrl != null">#{callbackUrl},</if>
+            <if test="dataJson != null">#{dataJson},</if>
+            <if test="createdTime != null">#{createdTime},</if>
+            <if test="updatedTime != null">#{updatedTime},</if>
+            <if test="isDeleted != null">#{isDeleted},</if>
+            <if test="createdBy != null and createdBy != ''">#{createdBy},</if>
+            <if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if>
+            <if test="merchantId != null and merchantId != ''">#{merchantId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateMerchantAppConfig" parameterType="MerchantAppConfig">
+        update merchant_app_config
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="merchantType != null and merchantType != ''">merchant_type = #{merchantType},</if>
+            <if test="appId != null and appId != ''">app_id = #{appId},</if>
+            <if test="callbackUrl != null">callback_url = #{callbackUrl},</if>
+            <if test="dataJson != null">data_json = #{dataJson},</if>
+            <if test="createdTime != null">created_time = #{createdTime},</if>
+            <if test="updatedTime != null">updated_time = #{updatedTime},</if>
+            <if test="isDeleted != null">is_deleted = #{isDeleted},</if>
+            <if test="createdBy != null and createdBy != ''">created_by = #{createdBy},</if>
+            <if test="updatedBy != null and updatedBy != ''">updated_by = #{updatedBy},</if>
+            <if test="merchantId != null and merchantId != ''">merchant_id = #{merchantId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteMerchantAppConfigById" parameterType="Long">
+        delete from merchant_app_config where id = #{id}
+    </delete>
+
+    <delete id="deleteMerchantAppConfigByIds" parameterType="String">
+        delete from merchant_app_config where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 8 - 0
fs-service/src/main/resources/mapper/course/FsCoursePlaySourceConfigMapper.xml

@@ -29,4 +29,12 @@
         </if>
         order by fcpsc.id desc
     </select>
+
+    <select id="selectCoursePlaySourceConfigByAppId" resultType="com.fs.course.domain.FsCoursePlaySourceConfig">
+        select
+            fcpsc.*
+        from fs_course_play_source_config fcpsc
+        where fcpsc.is_del = 0 and fcpsc.appid= #{appid}
+       limit 1
+    </select>
 </mapper>

+ 6 - 0
fs-service/src/main/resources/mapper/his/FsIntegralOrderMapper.xml

@@ -97,6 +97,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         1 = 1
         <!-- 订单编码精确查询 -->
         <if test="orderCode != null and orderCode != ''"> AND fio.order_code = #{orderCode} </if>
+        <if test="orderCodes != null and orderCodes.size >0">
+            AND fio.order_code in
+            <foreach collection="orderCodes" item="orderCode" open="(" close=")" separator=",">
+                #{orderCode}
+            </foreach>
+        </if>
         <!-- 用户名模糊查询 -->
         <if test="userName != null and userName != ''"> AND fio.user_name LIKE CONCAT('%', #{userName}, '%') </if>
         <!-- 用户手机号精确查询 -->

+ 2 - 2
fs-service/src/main/resources/mapper/his/FsStoreOrderMapper.xml

@@ -579,7 +579,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             so.store_id in (select store_id from fs_store where delivery_type=2 or delivery_type=1)
             )
             and  (so.extend_order_id is null or  so.extend_order_id like '')
-            and (fuic.doctor_type2_confirm = 1 or fuic.doctor_type2_confirm = null)
+            and (fuic.doctor_type2_confirm = 1 or fuic.doctor_type2_confirm IS null)
         </if>
         <if test="maps.status == 7">
             and so.`status`= 2
@@ -796,7 +796,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 so.store_id in (select store_id from fs_store where delivery_type=2 or delivery_type=1)
                 )
                 and  (so.extend_order_id is null or  so.extend_order_id like '')
-                and (fuic.doctor_type2_confirm = 1 or fuic.doctor_type2_confirm = null)
+                and (fuic.doctor_type2_confirm = 1 or fuic.doctor_type2_confirm IS null)
             </if>
             <if test="maps.status == 7">
                 and so.`status`= 2

+ 3 - 0
fs-service/src/main/resources/mapper/live/LiveOrderMapper.xml

@@ -1026,6 +1026,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
         <where>
             o.is_del = 0 and p.product_id IS NOT NULL
+            <if test="bankTransactionId != null and  bankTransactionId !=''">
+                and lop.bank_transaction_id like CONCAT('%',#{bankTransactionId},'%')
+            </if>
             <if test="orderId != null">
                 AND o.order_id = #{orderId}
             </if>

+ 1 - 0
fs-user-app/src/main/java/com/fs/app/controller/live/LiveAfterSalesController.java

@@ -6,6 +6,7 @@ import com.fs.app.controller.AppBaseController;
 import com.fs.common.annotation.RepeatSubmit;
 import com.fs.common.core.domain.R;
 import com.fs.common.utils.ParseUtils;
+import com.fs.erp.service.FsJstAftersalePushScrmService;
 import com.fs.live.domain.LiveAfterSales;
 import com.fs.live.domain.LiveAfterSalesItem;
 import com.fs.live.domain.LiveOrder;