新版仿ok交易所-后端
1
zj
19 hours ago 640ccb9229224642515527daf87f308a7aa9bdf4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/ico/AdminIcoController.java
@@ -77,21 +77,21 @@
         long iCount = itemService.count(new LambdaQueryWrapper<Item>()
               .eq(Item::getSymbol, ico.getSymbol()).or().eq(Item::getSymbolData, ico.getSymbolData()));
         if(iCount > 0){
            throw new YamiShopBindException("产品表已存在数据");
            throw new YamiShopBindException("Product data already exists");
         }
         if(count > 0){
            throw new YamiShopBindException("代币符号或数据源编码已存在");
            throw new YamiShopBindException("Token symbol or data source code already exists");
         }
      } else {
         Ico model = icoService.getById(ico.getId());
         if (model == null) {
            throw new YamiShopBindException("数据不存在");
            throw new YamiShopBindException("Data does not exist");
         }
         Date now = Date.from(Instant.now());
         if (model.getMarketDate() != null && model.getMarketDate().before(now)){
            if (!model.getSymbol().equalsIgnoreCase(ico.getSymbol()) ||
                  !model.getSymbolData().equalsIgnoreCase(ico.getSymbolData())) {
               throw new YamiShopBindException("已上市,禁止修改代币符号,数据源编码");
               throw new YamiShopBindException("Already listed, token symbol and data source code cannot be modified");
            }
         }
@@ -102,11 +102,11 @@
                           .or()
                           .eq(Ico::getSymbolData, ico.getSymbolData())));
         if(count > 0){
            throw new YamiShopBindException("代币符号或数据源编码已存在");
            throw new YamiShopBindException("Token symbol or data source code already exists");
         }
         //更新ico实时价格
         if (model.getUnitAmount().compareTo(BigDecimal.ZERO) >0 &&
         /*if (model.getUnitAmount().compareTo(BigDecimal.ZERO) >0 &&
               model.getUnitAmount().compareTo(ico.getUnitAmount()) != 0){
            String symbol = ico.getSymbol();
            RequestDataHelper.set("symbol", symbol);
@@ -119,7 +119,7 @@
            realtimeService.updateById(realtime);
            RequestDataHelper.clear();
            DataCache.putRealtime(symbol, realtime);
         }
         }*/
      }
      //新增或编辑表单保存
      icoService.saveOrUpdate(ico);
@@ -139,7 +139,7 @@
      queryWrapper.eq("ico_project_id", id);
      long count = userSubscriptionService.count(queryWrapper);
      if (count > 0) {
         throw new YamiShopBindException("已有申购记录,删除失败");
         throw new YamiShopBindException("Subscription records exist, deletion failed");
      }
      if (icoService.removeById(id)) {
         return Result.ok("删除成功");