فهرست منبع

fix(payment):修复支付参数校验逻辑

- 移除硬编码的公司ID和用户ID- 添加服务商存在性和状态校验
- 添加支付金额必须大于0的校验
- 添加公司用户存在性和状态校验
xw 1 ماه پیش
والد
کامیت
ce87978ca5
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

+ 2 - 2
fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

@@ -1209,7 +1209,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
         if (StringUtils.isBlank(user.getMaOpenId())){
             return R.error("用户未绑定微信!");
         }
-        payParam.setCompanyId(300L);
+
         Company company = companyService.selectCompanyById(payParam.getCompanyId());
         if (company==null || company.getStatus()==0){
             return R.error("服务商不存在,或已被停用!");
@@ -1217,7 +1217,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
         if(payParam.getPayMoney().compareTo(new BigDecimal(0.0))<1){
             return R.error("支付金额必须大于0");
         }
-        payParam.setCompanyUserId(9587L);
+
         if (payParam.getCompanyUserId()!=null){
             CompanyUser companyUser = companyUserService.selectCompanyUserById(payParam.getCompanyUserId());
             if(companyUser == null || companyUser.getStatus().equals("1")){