ELADMIN Mybatis-Plus 版本发布
ELADMIN Mybatis-Plus 版本发布,,具体更新内容包括: 完全移除JPA,移除Mapstruct,代码优化 支持Mybatis代码生成,项目结构不变, 数据库结构不变,欢迎体验,给出建议 源码: https://github.com/elunez/eladmin-mp https://gitee.com/elunez/eladmin-mp
更新功能:
1.对数据库表添加、修改、删除追加action。
2.添加对表结构的返回值
3.添加对FIND_IN_SET及RAW支持
对 Medoo Version: 2.1.10 再封装,让操作更简单。
composer require thefunpower/db_medoo
'user_name[REGEXP]' => '[a-z0-9]*'
'user_name[FIND_IN_SET]'=>(string)10
'user_name[RAW]' => '[a-z0-9]*'
$where = [
//like查寻
'product_num[~]' => 379,
//等于查寻
'product_num' => 3669,
//大于查寻
'id[>]' => 1,
'id[>=]' => 1,
'id[<]' => 1,
'id[<=]' => 1,
];
$where = [];
$where['OR'] = [
'product_num[~]'=>379,
'product_num[>]'=>366,
];
$where['LIMIT'] = 10;
$where['ORDER'] = ['id'=>'DESC'];
字段是datetime类型
$date1 = '2022-11-01';
$date2 = '2022-12-14';
db_between_date($field,$date1,$date2)
$date1 = '2022-11';
$date2 = '2022-12';
db_between_month($field,$date1,$date2
$res = db_get_one("products","*",$where);
$res = db_get_one("products",$where);
$res = db_get("products","*",$where);
$res = db_get("products",$where);
$res = db_pager("products","*",$where);
原生方法将不会触发action
$res = db()->select("products",['id'],[]);
$res = db_get("qr_rule","qr_num",['GROUP'=>'qr_num']);
print_r($res);
db_insert($table, $data = [],$don_run_action = false)
db_update($table, $data = [], $where = [],$don_run_action = false)
db_get_min($table, $join = "*", $column = null, $where = null)
其他一些如取最大值等
db_get_max
db_get_count
db_get_has
db_get_rand
db_get_sum
db_get_avg
db_del($table, $where)
do_action("db_insert.$table.before", $data);
do_action("db_save.$table.before", $data);
其中$data有 id 及 data
do_action("db_insert.$table.after", $action_data);
do_action("db_save.$table.after", $action_data);
do_action("db_update.$table.before", $data);
do_action("db_save.$table.before", $data);
其中$data有 id data where
do_action("db_update.$table.after", $action_data);
do_action("db_save.$table.after", $action_data);
do_action("db_get_one.$table", $v);
do_action("db_insert.$table.del", $where);
show_tables($table)
get_table_fields($table, $has_key = true)
db_allow($table, $data)
database_tables($name = null, $show_markdown = false)
array_order_by($row,$order,SORT_DESC);
is_json($data)
db_query($sql, $raw = null)
do_action("db_query", $all)
其中$sql为select * from table_name where user_id=:user_id
$raw 为 [':user_id'=>1]
需要inner db支持
db_action(function()use($data)){
});
db_for_update($table,$id)
db_pager_count($nums = null)
$data = db_pager("do_order",
["[><]do_mini_user" => ["uid" => "id"]],
[
"do_order.id",
"do_order.uid",
"user" => [
"do_mini_user.nickName",
"do_mini_user.avatarUrl",
"do_mini_user.openid",
]
],
$where);
$lists = db_get('do_order', [
'count' => 'COUNT(`id`)',
'total' => 'SUM(`total_fee`)',
'date' => "FROM_UNIXTIME(`inserttime`, '%Y-%m-%d')"
],
The MIT License (MIT)
微信关注我们
转载内容版权归作者及来源网站所有!
低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。
马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。
为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。
Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。