linwei
2024-02-23 826d219fa22e37d3d6c20f48727b39f244c1ba06
src/main/java/org/springblade/binlog/util/BinLogUtils.java
@@ -8,11 +8,8 @@
import org.springblade.binlog.config.DataSourceConfig;
import org.springblade.binlog.vo.BinLogItem;
import org.springblade.binlog.vo.DataProperty;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.io.Serializable;
import java.sql.*;
import java.util.Arrays;
@@ -36,15 +33,6 @@
public class BinLogUtils {
   private static BinLogUtils binLogUtils;
//   @Resource
//   private SearchStoreLogoExtMapper searchStoreLogoExtMapper;
//   @PostConstruct
//   public void init() {
//      binLogUtils = this;
//      binLogUtils.searchStoreLogoExtMapper = this.searchStoreLogoExtMapper;
//   }
   /**
    * 拼接dbTable
@@ -90,26 +78,6 @@
      }
      return null;
   }
//   /**
//    * 根据table获取code
//    *
//    * @param table
//    * @return java.lang.Integer
//    */
//   public static Integer getCodeByTable(String table) {
//      if (StringUtils.isEmpty(table)) {
//         return null;
//      }
//      return CategoryEnum.getCodeByTab(table);
//   }
//   public static String getMsgByTab(String table) {
//      if (StringUtils.isEmpty(table)) {
//         return null;
//      }
//      return CategoryEnum.getMsgByTab(table);
//   }
   /**
    * 根据DBTable获取table
@@ -181,28 +149,6 @@
      return null;
   }
//   /**
//    * 根据storeId获取imgUrl
//    */
//   public static String getImgUrl(Long storeId) {
//
//      if (storeId == null) {
//         return "";
//      }
//      //获取url
//      SearchStoreLogo searchStoreLogo = new SearchStoreLogo();
//      searchStoreLogo.setStoreId(storeId);
//      List<SearchStoreLogo> searchStoreLogos = binLogUtils.searchStoreLogoExtMapper.selectList(searchStoreLogo);
//      if (CollectionUtil.isNotEmpty(searchStoreLogos)) {
//         SearchStoreLogo storeLogo = searchStoreLogos.get(0);
//         if (storeLogo != null) {
//            return storeLogo.getStoreLogo();
//         }
//      }
//      return "";
//   }
   /**
    * 格式化date
    *
@@ -222,6 +168,20 @@
      Date formatDate = DateUtil.parse(strDate, dateFormat);
      return formatDate;
   }
   /**
    * 格式化date
    *
    * @param date
    * @return java.util.Date
    */
   public static String getDateFormatStr(Date date) {
      if (date == null) {
         return null;
      }
      String dateFormat = "yyyy-MM-dd HH:mm:ss";
      return DateUtil.format(date, dateFormat);
   }
}