ipo
zyy
2026-01-08 4affbdf8938d321c0926bc2b1832dfc81c317ffa
trading-order-admin/src/main/java/com/yami/trading/admin/controller/loan/LoanController.java
@@ -26,6 +26,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.token.TokenService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -155,10 +156,10 @@
         return resultObject;
      }
      /*String symbol=getParamValue(request,resultObject,"symbol");
      String symbol=getParamValue(request,resultObject,"symbol");
      if(null==symbol) return resultObject;
      String dailyRate=getParamValue(request,resultObject,"dailyRate");
      /*String dailyRate=getParamValue(request,resultObject,"dailyRate");
      if(null==dailyRate) return resultObject;
      String repayment=getParamValue(request,resultObject,"repayment");
@@ -187,7 +188,7 @@
      }*/
      Date now = new Date();
      SimpleLoanOrder simpleLoanOrder=new SimpleLoanOrder(partyId,new BigDecimal(quota), "usdt");
      SimpleLoanOrder simpleLoanOrder=new SimpleLoanOrder(partyId,new BigDecimal(quota), symbol);
      String uuid = UUIDGenerator.getUUID();
      simpleLoanOrder.setUuid(uuid);
      simpleLoanOrder.setLendingInstitution(null);
@@ -222,6 +223,42 @@
   }
   /**
    * 提交还款申请
    * @param request 请求对象
    * @return 申请结果
    */
   @GetMapping("/api/loan!refund.action")
   public ResultObject refund(HttpServletRequest request) {
      ResultObject resultObject = new ResultObject();
      String partyId = SecurityUtils.getCurrentUserId();
      if(null==partyId) {
         resultObject.setCode("1");
         resultObject.setMsg("通过Token获取partyId为空!");
         return resultObject;
      }
      String orderNo=getParamValue(request,resultObject,"orderNo");
      if(null==orderNo) return resultObject;
      try {
         boolean flag = loanService.refundLoanOrder(orderNo, partyId);
         if (flag) {
            resultObject.setMsg("提交成功");
         } else {
            resultObject.setCode("1");
            resultObject.setMsg("提交失败");
         }
      } catch(Throwable e) {
         resultObject.setCode("1");
         resultObject.setMsg("程序错误");
         logger.error("error:", e);
      }
      return resultObject;
   }
   /**
    * 查看借贷申请单列表
    * @param request 请求对象
    * @return 申请单列表