| | |
| | | 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 com.vci.ubcs.system.cache.NacosConfigCache; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ResourceUtils; |
| | |
| | | private static String localIp = null; |
| | | |
| | | public VciBaseUtil() { |
| | | } |
| | | |
| | | /** |
| | | * 检查是否为配置的超管租户和用户 |
| | | * @return false不是超管,true是超管 |
| | | */ |
| | | public static Boolean checkAdminTenant(){ |
| | | return NacosConfigCache.getAdminUserInfo().getTenantId().equals(AuthUtil.getTenantId()) |
| | | && NacosConfigCache.getAdminUserInfo().getUserName().equals(AuthUtil.getUserName()); |
| | | } |
| | | |
| | | public static String getPk() { |
| | |
| | | } |
| | | |
| | | public static String getTableName(String btmname) { |
| | | return (VciQueryWrapperForDO.USER_TABLE_COMPATIBILITY ? "vcibt_" : "pl_code_") + btmname.trim().toLowerCase(); |
| | | return (VciQueryWrapperForDO.USER_TABLE_COMPATIBILITY ? "PLBT_CODE" : "PL_CODE_") + btmname.trim().toLowerCase(); |
| | | } |
| | | |
| | | public static String getTableName(String btmname,Boolean isMdmTable) { |
| | | return (isMdmTable ? "PLBT_CODE_" : "PL_CODE_") + btmname.trim().toUpperCase(Locale.ROOT); |
| | | } |
| | | |
| | | public static Field getTsField(Class c) { |
| | |
| | | } |
| | | for (Field declaredField : declaredFields) { |
| | | declaredField.setAccessible(true); |
| | | |
| | | // 获取字段的值 |
| | | boolean isTableField = declaredField.isAnnotationPresent(TableField.class); |
| | | if (isTableField) { |