跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 刚学 1 年 Java ,有没有大佬实现过类似功能/了解相关框架

发表于

叠个甲:Java 没写多久,可能这个问题有现成的解决方案,但是我找了很久没找到

目标: 找到一个最简单最通用的框架/方法,来实现对自定义表(没有实体)的通用增删改查操作。

前提:

0.项目内有两种类型的表,一种是预置的表,比如用户表,菜单表。还有一种是在项目发布不清楚数据结构,用户自定义的表。但是每个表都有一些固定的字段,比如id,create_at等,可以有一个基类,但是更多的还是不同的业务字段。

1.用户可以自定义表以及表内的字段信息,这种表一般来说固定好了之后很少会修改。用户会在项目中配置(有配置页面)有哪些表,每个表有哪些字段。

想法:

0.最底层的方法,写一个 XML ,里面有一系列的通用的方法,比如(select {field_list} from {table_name} where {query_condition})然后每次查询的时候把所有的需要的信息丢进去。

好处:肯定可以实现功能 缺点:比较繁琐

1.找到一个方法,去生成类似于实体概念的一个玩意儿,然后后续就是对接到现有的 Mybatis 等框架上。

2.找各位大佬寻求建议

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.