
java方法
阿·成
热爱编程
展开
-
自定义校验手机号码和电话号码注解
自定义注解原创 2022-03-21 09:14:16 · 3538 阅读 · 0 评论 -
Mysql之LEFT JOIN,RIGHT JOIN,INNER JOIN
现有a,b两表 a表数据 b表数据 a表数据 b表数据sql:// 1SELECT a.* FROM a aLEFT JOIN b b ON (b...原创 2021-08-11 16:05:11 · 12575 阅读 · 0 评论 -
把一个字符串转换成Long类型的一串数字
/** * @Description 获取串的hashcode * @Param UUID * @author zxc * @date 2021/4/30 10:51 上午 */ public Long getId(String UUID){ Integer userId=UUID.toString().hashCode(); //String.hashCode()可能会是负数,如果为负数需要转换为正数 .原创 2021-04-30 13:39:33 · 16432 阅读 · 0 评论 -
根据日期获取年龄
public Integer getAge(Date birthday){ LocalDate now = LocalDate.now(); int nowYear = now.getYear(); int nowMonth = now.getMonthValue(); int nowDayOfMonth = now.getDayOfMonth(); LocalDate birth = birthday.toInstant().原创 2021-03-29 15:04:24 · 14087 阅读 · 0 评论