ludc
2023-05-14 b46cf401da847d7cca6269c6b2ffb04f6f72691a
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciBaseUtil.java
@@ -10,8 +10,10 @@
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.vci.ubcs.starter.exception.VciBaseException;
import com.vci.ubcs.starter.web.enumpck.BooleanEnum;
import com.vci.ubcs.starter.web.enumpck.UserSecretEnum;
import com.vci.ubcs.starter.web.pagemodel.SessionInfo;
import com.vci.ubcs.starter.web.toolmodel.DateConverter;
import com.vci.ubcs.starter.web.wrapper.VciQueryWrapperForDO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.CollectionUtils;
@@ -77,7 +79,14 @@
         return 0;
      }
   }
   public static SessionInfo getCurrentUserSessionInfo() throws VciBaseException {
      SessionInfo si = getCurrentUserSessionInfoNotException();
      if (si == null) {
         throw new VciBaseException("noLogin", new String[]{"没有当前用户信息"});
      } else {
         return si;
      }
   }
   public static long getLong(String s) {
      long l = 0L;
      if (s == null) {
@@ -90,6 +99,11 @@
            return 0L;
         }
      }
   }
   public static Integer getCurrentUserSecret() {
      SessionInfo currentUserSession = getCurrentUserSessionInfoNotException();
      return currentUserSession != null ? getInt(currentUserSession.getUserSecret()) : UserSecretEnum.NONE.getValue();
   }
   public static float getFloat(String s) {
@@ -835,6 +849,10 @@
      return allField;
   }
   public static String getTableName(String btmname) {
      return (VciQueryWrapperForDO.USER_TABLE_COMPATIBILITY ? "pl_code_" : "vcibt_") + btmname.trim().toLowerCase();
   }
   public static Field getTsField(Class c) {
      List<Field> allField = getAllFieldForObj(c);
      if (allField != null && allField.size() > 0) {