2022-03-03 10:30
@zzutligang 昂,是HTML啊,看茬了,那用 axios 发起请求就可以了,还是自己封装一下,里面随便切换请求工具:
https://www.runoob.com/vue3/vue3-ajax-axios.html
2022-02-28 17:42
https://jfinal.com/doc/5-14
new ActiveRecordPlugin("这个值", dsMysql)
Db.use("这个值").find(XXX
如果他是第一个启动的ActiveRecordPlugin插件,
那么Db.use() 这个主配置的name就是 "这个值" ,不是"main"了。
PS代码:
/**
* Replace the main config if current config name is MAIN_CONFIG_NAME
*/
if (MAIN_CONFIG_NAME.equals(config.getName())) {
DbKit.config = config;
Db.init(DbKit.config.getName());
}
/**
* The configName may not be MAIN_CONFIG_NAME,
* the main config have to set the first comming Config if it is null
*/
if (DbKit.config == null) {
DbKit.config = config;
Db.init(DbKit.config.getName());
}
2022-02-21 22:15
@北流家园网 2022-02-21 08:59:33已经发版了呀,在仓库里面了
https://developer.aliyun.com/mvn/search
2022-02-18 17:38
@zeroabc totalRow 总行数这个值的来源,如果想在后端缓存起来。
第一次查得总行后,存起来供下次使用就行。
至于咋存咋取值,完全就是业务处理了,没有最好只有符合业务情况的才是好,可以CacheKit,可以Redis,可以ConcurrentHashMap。
可以为该业务或请求加个参数拦截器,拦截查询参数作为键都是可以的。
MyDbPro.paginate(totalRow,XX
总的来看,前端缓存totalRow相对折中灵活一些。比如查询按钮会设置totalRow为null。长时间停留在页面,js还可以定时执行设置totalRow为null。刷新页面也会设置totalRow为null。这些都是后话了,需要看场景再决定咋缓存totalRow