admin
2020-11-28 dc5be7d38446f70e6ff86df311119c32b41fe7f8
fanli/src/main/java/com/yeshi/fanli/service/manger/alipay/UserCloudAlipayManager.java
@@ -2,6 +2,8 @@
import javax.annotation.Resource;
import com.yeshi.fanli.entity.SystemEnum;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -43,6 +45,9 @@
   
   @Resource
   private UserCloudManageService userCloudManageService;
   @Resource
   private UserInfoService userInfoService;
   
   public static final String  TRADE_INDEX = "yufadan-";
    
@@ -79,6 +84,8 @@
      UserCloudOrder cloudOrder = userCloudOrderService.addCloudOrder(uid, type); 
      if (cloudOrder == null || cloudOrder.getId() == null)
         throw new UserCloudException(1, "创建订单信息失败");
      SystemEnum system=userInfoService.getUserSystem(uid);
      
      AlipayTradeWapPayDTO payDTO = new AlipayTradeWapPayDTO();
      payDTO.setSubject("云发单充值");
@@ -87,8 +94,8 @@
      payDTO.setProductCode(type);
      payDTO.setTotalAmount(menuEnum.getMoney() + "");
      payDTO.setTimeoutExpress("30m");
      payDTO.setReturnUrl(configService.get(ConfigKeyEnum.cloudAlipayReturnLink.getKey()));
      payDTO.setNotifyUrl(configService.get(ConfigKeyEnum.cloudAlipayNotifyLink.getKey()) +"?id=" +cloudOrder.getId());
      payDTO.setReturnUrl(configService.getValue(ConfigKeyEnum.cloudAlipayReturnLink.getKey(),system) +"?id=" +cloudOrder.getId());
      payDTO.setNotifyUrl(configService.getValue(ConfigKeyEnum.cloudAlipayNotifyLink.getKey(),system) +"?id=" +cloudOrder.getId());
      
      // 获取支付form
      return AlipayApi.tradeWapPayRequest(payDTO);