07 2021 档案
摘要:1、html <input type="text" id="birthdayBegin1" field="birthday" operator=">=" autocomplete="off" class="layui-input dateType1" style="position:absolute
阅读全文
摘要:1、UUID函数 在MySQL中,可以用uuid()函数来生成一个UUID select UUID() from dual 2、replace函数 默认生成的uuid含有'-',我们可以使用replace函数替换掉'-',SQL如下: select REPLACE(UUID(),"-","") as
阅读全文
摘要:在oracle8i以后提供了一个生成不重复的数据的一个函数sys_guid()一共32位, 生成的依据主要是时间和机器码,具有世界唯一性,类似于java中的UUID(都是世界唯一的)。 应用场景:当数据库某字段设置为唯一,可用此生成主键; 例如: select sys_guid() from dua
阅读全文
摘要:%Y 年, 数字, 4 位 %y 年, 数字, 2 位 %m 月, 数字(01……12) %H 小时(00……23) %h 小时(01……12) %i 分钟, 数字(00……59) %S 秒(00……59) 把日期转为字符串格式 进行查询 select * from staff where DATE
阅读全文
摘要:字符串转日期 select to_date(birthday, 'yyyy-mm-dd') from staff 日期转字符串 select to_char(to_date(birthday, 'yyyy-mm-dd'), 'yyyy"年"mm"月"dd"日"') from staff 先将orac
阅读全文
摘要:Oracle 语法 IN 后集合 不能超过1000, IN 的个数建议控制在 200 以内。 select * from table where id in ( '1' , ' ', ' ',.........,'1000') 解决方式 1、分多次查询,最大不超过 1000, 然后将结果汇总 2、把
阅读全文
摘要:Mybatis-Plus 使用 数据库不存在的字段,可在实体类的属性加上 @TableField 注解 @TableField(exist=false)
阅读全文
摘要:1、 html <button class="layui-btn" id="searchStaff" data-type="reload" type="button" onclick="Staff.search()"> <i class="layui-icon"></i>查询 </button> 2
阅读全文
摘要:1、oracle 方式一: select name from staff <where> <if test="name != null"> name like '%'|| #{name} ||'%' </if> </where> 方式二: select name from staff <where>
阅读全文
摘要:1、java8 Person person1 = new Person("tom", 15); Person person2 = new Person("jack", 26); Person person3 = new Person("lucy", 12); List<Person> list =
阅读全文
摘要:$("#tableId").bootstrapTable({ ... formatNoMatches:function(){ return "自定义提示内容"; } ... })
阅读全文
摘要:错误代码: mapper接口: List<MeetingDeploy> resultTypeList(List<String> codes); mapper.xml: select * from meeting_deploy where meeting_code IN <foreach item="
阅读全文
摘要:File > Setting > Editor > General > Auto Import Add unambiguous imports on the fly:自动帮我们优化导入的包 Optimize imports on the fly:自动去掉一些没有用到的包
阅读全文
摘要:1、使用LinkedHashSet删除arraylist中的重复数据 LinkedHashSet是在一个ArrayList删除重复数据的最佳方法。LinkedHashSet在内部完成两件事: 删除重复数据 保持添加到其中的数据的顺序 public static void main(String[]
阅读全文